-
Notifications
You must be signed in to change notification settings - Fork 247
How to use the FEAST Solver in Kratos?
The FEAST Solver is used for solving an eigenvalue problem. It is based on a new algorithm which deviates fundamentally from the Krylov subspace based techniques (Arnoldi and Lanczos algorithms), Davidson-Jacobi techniques or other traditional subspace iteration techniques
E. Polizzi, Density-Matrix-Based Algorithms for Solving Eigenvalue Problems, Phys. Rev. B. Vol. 79, 115112 (2009)
A documentation about how FEAST 4.0 works internally is available here.
In order to compile the FEAST Library, the LinearSolversApplication with Intel MKL is required. The following lines must be added to the configure.sh file:
-DLINEAR_SOLVERS_APPLICATION=ON \
-DUSE_EIGEN_MKL=ON \
-DUSE_EIGEN_FEAST=ON \
Once these lines are included, it is just needed the execution of the configure.sh
file. However, only compilation on Linux is supported at the moment. For more information, please consult the LinearSolversApplication readme.
FEAST 4.0 can be used for solving an eigenvalue problem in a structural mechanics context by specifying eigen_value
as solver_type
in the problem parameters json
. The default input parameters for solving a real-valued problem using FEAST are:
"eigensolver_settings":{
"solver_type" : "feast",
"symmetric" : true,
"number_of_eigenvalues" : 0,
"e_min": 0.0,
"e_max": 0.2,
"search_lowest_eigenvalues" : false,
"search_highest_eigenvalues" : false,
"sort_eigenvalues" : false,
"sort_order" : "sr",
"subspace_size" : 0,
"max_iteration" : 20,
"tolerance" : 1e-12,
"echo_level" : 0
},
The settings controlled with these parameters are:
-
solver_type
: If FEAST is used. Another possibility iseigen_eigensystem
. The following settings are only applicable, iffeast
is chosen. -
symmetric
: True, if the input matrices are symmetric. -
number_of_eigenvalues
: Specifies the number of eigenvalues to be found. -
e_min
ande_max
: Defines the search interval, where eigenvalues are found ase_min
< λ <e_max
. Note, that for strucural mechanics, the relation between eigenvalue λ and angular eigenfrequency ω is ω²=λ -
search_lowest_eigenvalues
andsearch_highest_eigenvalues
: Either search for the highest or lowest eigenvalues in the specified region. Only available for real, symmetric problems and in combination with a definednumber_of_eigenvalues
. -
sort_eigenvalues
: True, if the resulting eigenvalues should be sorted- -
sort_order
: Defines the sort order. Possible choices aresr
(smallest real part),sm
(smallest magnitude),lr
(largest real part),lm
(largest magnitude). -
subspace_size
: Manually defines the size of the subspace used to find eigenvalues. The FEAST documentation recommends a size of 1.5 * numer of eigenvalues to be found. This value is overwritten, ifnumer_of_eigenvalues
is specified. -
max_iteration
: Maximum number of FEAST iterations. -
tolerance
: Defines the FEAST solver tolerance.
In the StructuralMechanicsApplication there is a process for of postprocessing eigenvalues. It animates the results and writtes all EigenValues into one file for easier postprocessing.
PostprocessEigenvaluesProcess
This process is written in C++ but can be called by adding the corresponding python process to the list_other_processes
in the ProjectParameters.json
"list_other_processes" : [{
"python_module" : "postprocess_eigenvalues_process",
"kratos_module" : "KratosMultiphysics.StructuralMechanicsApplication",
"help" : "This process postprocces the eigen values for GiD",
"process_name" : "PostProcessEigenvaluesProcess",
"Parameters" : {
"result_file_name" : "Structure",
"result_file_format_use_ascii" : false,
"computing_model_part_name" : "computing_domain",
"animation_steps" : 20,
"list_of_result_variables" : ["DISPLACEMENT"],
"label_type" : "frequency"
}
}]
Certain Parameters can be chosen (but don't have to, the settings above are the defaults. If the defaults are to be used, simply omit the corresponding parameter):
-
result_file_name
: Name of the result file, will be followed by "_EigenResults" -
result_file_format_use_ascii
: Usually the results are printed in binary format, this setting is only used for testing and debugging -
computing_model_part_name
: Name of the Computing Model Part that is used as input for the solver -
animation_steps
: Number of steps used to animate the eigenvectors -
list_of_result_variables
: Variables that are used for the computation of the eigen-solution. These are used for the animation. In Structural Analysis this is theDISPLACEMENT
-
label_type
: Output the results in eitherangular_frequency
[rad/s] orfrequency
[Hz]
- Getting Kratos (Last compiled Release)
- Compiling Kratos
- Running an example from GiD
- Kratos input files and I/O
- Data management
- Solving strategies
- Manipulating solution values
- Multiphysics
- Video tutorials
- Style Guide
- Authorship of Kratos files
- Configure .gitignore
- How to configure clang-format
- How to use smart pointer in Kratos
- How to define adjoint elements and response functions
- Visibility and Exposure
- Namespaces and Static Classes
Kratos structure
Conventions
Solvers
Debugging, profiling and testing
- Compiling Kratos in debug mode
- Debugging Kratos using GDB
- Cross-debugging Kratos under Windows
- Debugging Kratos C++ under Windows
- Checking memory usage with Valgind
- Profiling Kratos with MAQAO
- Creating unitary tests
- Using ThreadSanitizer to detect OMP data race bugs
- Debugging Memory with ASAN
HOW TOs
- How to create applications
- Python Tutorials
- Kratos For Dummies (I)
- List of classes and variables accessible via python
- How to use Logger
- How to Create a New Application using cmake
- How to write a JSON configuration file
- How to Access DataBase
- How to use quaternions in Kratos
- How to do Mapping between nonmatching meshes
- How to use Clang-Tidy to automatically correct code
- How to use the Constitutive Law class
- How to use Serialization
- How to use GlobalPointerCommunicator
- How to use PointerMapCommunicator
- How to use the Geometry
- How to use processes for BCs
- How to use Parallel Utilities in futureproofing the code
- Porting to Pybind11 (LEGACY CODE)
- Porting to AMatrix
- How to use Cotire
- Applications: Python-modules
- How to run multiple cases using PyCOMPSs
- How to apply a function to a list of variables
- How to use Kratos Native sparse linear algebra
Utilities
Kratos API
Kratos Structural Mechanics API