14 #if !defined(KRATOS_HELMHOLTZ_VEC_STRATEGY)
15 #define KRATOS_HELMHOLTZ_VEC_STRATEGY
54 template <
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
78 typename TLinearSolver::Pointer pNewLinearSolver,
79 bool ReformDofSetAtEachStep =
false,
80 bool ComputeReactions =
false,
82 const double PoissonRatio = 0.3)
86 mreform_dof_set_at_each_step = ReformDofSetAtEachStep;
87 mcompute_reactions = ComputeReactions;
89 bool calculate_norm_dx_flag =
false;
91 mpscheme =
typename SchemeType::Pointer(
95 mpbulider_and_solver =
typename TBuilderAndSolverType::Pointer(
103 mpbulider_and_solver,
105 mreform_dof_set_at_each_step,
106 calculate_norm_dx_flag));
108 mpstrategy->SetEchoLevel(mecho_level);
130 if (mreform_dof_set_at_each_step ==
true)
156 return mpstrategy->GetSystemMatrix();
161 return mpstrategy->GetSystemVector();
166 return mpstrategy->GetSolutionVector();
172 mpstrategy->Initialize();
173 mpstrategy->InitializeSolutionStep();
174 mpstrategy->Predict();
175 mpbulider_and_solver->Build(mpscheme,
BaseType::GetModelPart(),mpstrategy->GetSystemMatrix(),mpstrategy->GetSystemVector());
177 std::stringstream matrix_market_name;
178 matrix_market_name <<
"A_wo_D_BC.mm";
181 std::stringstream matrix_market_vectname;
182 matrix_market_vectname <<
"b_wo_D_BC.mm";
185 mpstrategy->SolveSolutionStep();
187 matrix_market_name.str(
"");
188 matrix_market_name <<
"A_wi_D_BC.mm";
191 matrix_market_vectname.str(
"");
192 matrix_market_vectname <<
"b_wi_D_BC.mm";
195 mpstrategy->FinalizeSolutionStep();
250 typename SchemeType::Pointer mpscheme;
251 typename BaseType::Pointer mpstrategy;
252 typename TBuilderAndSolverType::Pointer mpbulider_and_solver;
255 bool mreform_dof_set_at_each_step;
256 bool mcompute_reactions;
Short class definition.
Definition: helmholtz_strategy.h:56
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: helmholtz_strategy.h:64
TSystemMatrixType & GetSystemMatrix() override
This method returns the LHS matrix.
Definition: helmholtz_strategy.h:154
virtual ~HelmholtzStrategy()
Definition: helmholtz_strategy.h:113
BaseType::TSystemVectorType TSystemVectorType
Definition: helmholtz_strategy.h:67
void ExportSystem()
Definition: helmholtz_strategy.h:169
double Solve() override
The problem of interest is solved.
Definition: helmholtz_strategy.h:120
TSystemVectorType & GetSystemVector() override
This method returns the RHS vector.
Definition: helmholtz_strategy.h:159
BaseType::TSystemMatrixType TSystemMatrixType
Definition: helmholtz_strategy.h:66
BaseType::TBuilderAndSolverType TBuilderAndSolverType
Definition: helmholtz_strategy.h:65
HelmholtzStrategy(ModelPart &model_part, typename TLinearSolver::Pointer pNewLinearSolver, bool ReformDofSetAtEachStep=false, bool ComputeReactions=false, int EchoLevel=0, const double PoissonRatio=0.3)
Definition: helmholtz_strategy.h:77
KRATOS_CLASS_POINTER_DEFINITION(HelmholtzStrategy)
BaseType::Pointer GetStrategy()
Definition: helmholtz_strategy.h:201
void Initialize() override
Initialization of member variables and prior operations.
Definition: helmholtz_strategy.h:118
TSystemVectorType & GetSolutionVector() override
This method returns the solution vector.
Definition: helmholtz_strategy.h:164
Scheme< TSparseSpace, TDenseSpace > SchemeType
Definition: helmholtz_strategy.h:68
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
BaseType::TSystemVectorType TSystemVectorType
Definition: implicit_solving_strategy.h:72
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
Definition: implicit_solving_strategy.h:84
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Current class provides an implementation for standard builder and solving operations.
Definition: residualbased_block_builder_and_solver.h:82
This class provides the implementation of a static scheme.
Definition: residualbased_incrementalupdate_static_scheme.h:57
This is a very simple strategy to solve linearly the problem.
Definition: residualbased_linear_strategy.h:64
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
TSparseSpace::MatrixType TSystemMatrixType
Definition: solving_strategy.h:71
TSparseSpace::VectorType TSystemVectorType
Definition: solving_strategy.h:73
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void UpdateCurrentToInitialConfiguration(const ModelPart::NodesContainerType &rNodes)
This method updates the current nodal coordinates back to the initial coordinates.
Definition: variable_utils.cpp:245
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
bool WriteMatrixMarketVector(const char *FileName, VectorType &V)
Definition: matrix_market_interface.h:539
bool WriteMatrixMarketMatrix(const char *FileName, CompressedMatrixType &M, bool Symmetric)
Definition: matrix_market_interface.h:308
model_part
Definition: face_heat.py:14