9 #ifndef KRATOS_TWO_STEP_VP_SOLVER_SETTINGS_H
10 #define KRATOS_TWO_STEP_VP_SOLVER_SETTINGS_H
53 template <
class TSparseSpace,
82 const unsigned int ThisDomainSize,
83 const unsigned int ThisTimeOrder,
85 mrModelPart(rModelPart),
86 mDomainSize(ThisDomainSize),
87 mTimeOrder(ThisTimeOrder),
89 mReformDofSet(ReformDofSet)
120 typename TLinearSolver::Pointer pLinearSolver,
121 const double Tolerance,
122 const unsigned int MaxIter) = 0;
132 typename std::map<StrategyLabel, StrategyPointerType>::iterator itStrategy =
mStrategies.find(rStrategyLabel);
136 pThisStrategy.swap(itStrategy->second);
146 typename std::map<StrategyLabel, double>::iterator itTol =
mTolerances.find(rStrategyLabel);
149 rTolerance = itTol->second;
157 unsigned int &rMaxIter)
159 typename std::map<StrategyLabel, unsigned int>::iterator itMaxIter =
mMaxIter.find(rStrategyLabel);
162 rMaxIter = itMaxIter->second;
172 for (
typename std::map<StrategyLabel, StrategyPointerType>::iterator itStrategy =
mStrategies.begin(); itStrategy !=
mStrategies.end(); ++itStrategy)
183 return mReformDofSet;
195 virtual std::string
Info()
const
197 std::stringstream buffer;
198 buffer <<
"TwoStepVPSolverSettings";
203 virtual void PrintInfo(std::ostream &rOStream)
const { rOStream <<
"TwoStepVPSolverSettings"; }
265 unsigned int mDomainSize;
267 unsigned int mEchoLevel;
269 unsigned int mTimeOrder;
300 TwoStepVPSolverSettings(TwoStepVPSolverSettings
const &rOther) {}
316 template <
class TDenseSpace,
class TSparseSpace,
class TLinearSolver>
324 template <
class TDenseSpace,
class TSparseSpace,
class TLinearSolver>
329 rOStream << std::endl;
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Solving strategy base class This is the base class from which we will derive all the strategies (impl...
Definition: solving_strategy.h:64
Helper class to define solution strategies for TwoStepVPStrategy.
Definition: solver_settings.h:57
SolvingStrategy< TSparseSpace, TDenseSpace > StrategyType
Definition: solver_settings.h:65
ModelPart & GetModelPart()
Definition: solver_settings.h:234
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: solver_settings.h:203
virtual bool FindTolerance(StrategyLabel const &rStrategyLabel, double &rTolerance)
Definition: solver_settings.h:143
StrategyLabel
Definition: solver_settings.h:70
@ Velocity
Definition: solver_settings.h:71
@ NumLabels
Definition: solver_settings.h:73
@ Pressure
Definition: solver_settings.h:72
KRATOS_CLASS_POINTER_DEFINITION(TwoStepVPSolverSettings)
Pointer definition of TwoStepVPSolverSettings.
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: solver_settings.h:206
virtual bool FindMaxIter(StrategyLabel const &rStrategyLabel, unsigned int &rMaxIter)
Definition: solver_settings.h:156
virtual unsigned int GetDomainSize() const
Definition: solver_settings.h:124
std::map< StrategyLabel, double > mTolerances
Definition: solver_settings.h:241
virtual unsigned int GetEchoLevel()
Definition: solver_settings.h:176
std::map< StrategyLabel, unsigned int > mMaxIter
Definition: solver_settings.h:243
virtual bool FindStrategy(StrategyLabel const &rStrategyLabel, StrategyPointerType &pThisStrategy)
Definition: solver_settings.h:129
Process::Pointer ProcessPointerType
Definition: solver_settings.h:67
StrategyType::Pointer StrategyPointerType
Definition: solver_settings.h:66
virtual StrategyPointerType pGetStrategy(StrategyLabel const &rStrategyLabel)
Definition: solver_settings.h:108
TwoStepVPSolverSettings(ModelPart &rModelPart, const unsigned int ThisDomainSize, const unsigned int ThisTimeOrder, const bool ReformDofSet)
Constructor.
Definition: solver_settings.h:81
bool GetReformDofSet()
Definition: solver_settings.h:181
virtual std::string Info() const
Turn back information as a string.
Definition: solver_settings.h:195
std::map< StrategyLabel, StrategyPointerType > mStrategies
Definition: solver_settings.h:239
virtual void SetEchoLevel(unsigned int EchoLevel)
Definition: solver_settings.h:169
virtual ~TwoStepVPSolverSettings()
Destructor.
Definition: solver_settings.h:94
virtual void SetStrategy(StrategyLabel const &rStrategyLabel, typename TLinearSolver::Pointer pLinearSolver, const double Tolerance, const unsigned int MaxIter)=0
virtual void SetStrategy(StrategyLabel const &rStrategyLabel, StrategyPointerType pStrategy)
Definition: solver_settings.h:113
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432