KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
dense_linear_solver_factory.h
Go to the documentation of this file.
1 /* KRATOS _ _ ____ _
2 // | | (_)_ __ ___ __ _ _ __/ ___| ___ | |_ _____ _ __ ___
3 // | | | | '_ \ / _ \/ _` | '__\___ \ / _ \| \ \ / / _ \ '__/ __|
4 // | |___| | | | | __/ (_| | | ___) | (_) | |\ V / __/ | \__ |
5 // |_____|_|_| |_|\___|\__,_|_| |____/ \___/|_| \_/ \___|_| |___/ Application
6 //
7 // Author: Quirin Aumann
8 */
9 
10 #if !defined(KRATOS_DENSE_LINEAR_SOLVER_FACTORY_H_INCLUDED )
11 #define KRATOS_DENSE_LINEAR_SOLVER_FACTORY_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
18 #include "includes/define.h"
21 
22 namespace Kratos
23 {
26 
30 
34 
38 
42 
53 template <typename TGlobalSpace, typename TLocalSpace, typename TLinearSolverType>
54 class KRATOS_API(LINEARSOLVERS_APPLICATION) DenseLinearSolverFactory
55  : public LinearSolverFactory<TGlobalSpace,TLocalSpace>
56 {
59 
62 
64 protected:
67 
72  typename LinearSolverType::Pointer CreateSolver(Kratos::Parameters settings) const override
73  {
74  return typename LinearSolverType::Pointer(new TLinearSolverType(settings));
75  }
77 };
78 
80 
83 
87 
89 template <typename TGlobalSpace, typename TLocalSpace, typename TLinearSolverType>
90 inline std::ostream& operator << (std::ostream& rOStream,
92 {
93  rOStream << "DenseLinearSolverFactory" << std::endl;
94  return rOStream;
95 }
96 
99 
101 
103 
105 
106 #ifdef KRATOS_REGISTER_DENSE_LINEAR_SOLVER
107 #undef KRATOS_REGISTER_DENSE_LINEAR_SOLVER
108 #endif
109 #define KRATOS_REGISTER_DENSE_LINEAR_SOLVER(name, reference) ; \
110  KratosComponents<DenseLinearSolverFactoryType>::Add(name, reference);
111 
113 
115 
116 #ifdef KRATOS_REGISTER_COMPLEX_DENSE_LINEAR_SOLVER
117 #undef KRATOS_REGISTER_COMPLEX_DENSE_LINEAR_SOLVER
118 #endif
119 #define KRATOS_REGISTER_COMPLEX_DENSE_LINEAR_SOLVER(name, reference) ; \
120  KratosComponents<ComplexDenseLinearSolverFactoryType>::Add(name, reference);
121 
123 
124 } // namespace Kratos.
125 
126 #endif // KRATOS_DENSE_LINEAR_SOLVER_FACTORY_H_INCLUDED defined
Here we add the functions needed for the registration of dense linear solvers.
Definition: dense_linear_solver_factory.h:56
LinearSolverType::Pointer CreateSolver(Kratos::Parameters settings) const override
This method is an auxiliar method to create a new solver.
Definition: dense_linear_solver_factory.h:72
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
Here we add the functions needed for the registration of linear solvers.
Definition: linear_solver_factory.h:62
Base class for all the linear solvers in Kratos.
Definition: linear_solver.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void RegisterDenseLinearSolvers()
Definition: dense_linear_solver_factory.cpp:24
#define KRATOS_API_EXTERN
Definition: kratos_export_api.h:57
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
LinearSolver< TSpaceType< TDataType >, TLocalSpaceType< TOtherDataType > > TLinearSolverType
Definition: add_linear_solvers_to_python.cpp:50
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
LinearSolverFactory< ComplexLocalSparseSpaceType, ComplexLocalSparseSpaceType > ComplexDenseLinearSolverFactoryType
Definition: dense_linear_solver_factory.h:114
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
LinearSolver< SparseSpaceType, LocalSpaceType > LinearSolverType
Definition: distance_smoothing_process.cpp:23
LinearSolverFactory< LocalSparseSpaceType, LocalSparseSpaceType > DenseLinearSolverFactoryType
Definition: dense_linear_solver_factory.h:104