10 #if !defined(KRATOS_EXPLICIT_HAMILTON_STRATEGY)
11 #define KRATOS_EXPLICIT_HAMILTON_STRATEGY
31 template<
class TSparseSpace,
77 typename SchemeType::Pointer pScheme,
78 typename LinearSolverType::Pointer pNewLinearSolver,
80 bool ReformDofSetAtEachStep =
false,
114 rCurrentProcessInfo[ALPHA_TRAPEZOIDAL_RULE] = 0.5;
115 rCurrentProcessInfo[POSITION_UPDATE_LABEL] =
false;
116 rCurrentProcessInfo[ROTATION_UPDATE_LABEL] =
false;
117 rCurrentProcessInfo[MOMENTUM_UPDATE_LABEL] =
false;
212 typename SchemeType::Pointer pScheme =
GetScheme();
221 if (pScheme->SchemeIsInitialized() ==
false)
225 if (pScheme->ElementsAreInitialized() ==
false)
229 if (pScheme->ConditionsAreInitialized() ==
false)
232 pBuilderAndSolver->BuildLHS(pScheme, r_model_part, mA);
246 typename SchemeType::Pointer pScheme =
GetScheme();
259 pBuilderAndSolver->BuildLHS(pScheme, r_model_part, mA);
297 typename SchemeType::Pointer pScheme =
GetScheme();
308 std::cout <<
" " << std::endl;
319 bool update_at_start =
false;
320 if( update_at_start ){
340 if( !update_at_start ){
393 std::cout <<
"Explicit strategy Clear function used" << std::endl;
Definition: explicit_hamilton_builder_and_solver.hpp:55
Definition: explicit_hamilton_strategy.hpp:37
BaseType::SystemVectorType SystemVectorType
Definition: explicit_hamilton_strategy.hpp:58
SchemeType::Pointer mpScheme
Definition: explicit_hamilton_strategy.hpp:483
SystemVectorPointerType mpb
Definition: explicit_hamilton_strategy.hpp:490
BuilderAndSolverType::Pointer mpBuilderAndSolver
Definition: explicit_hamilton_strategy.hpp:487
BaseType::BuilderAndSolverType BuilderAndSolverType
Definition: explicit_hamilton_strategy.hpp:46
LinearSolverType::Pointer mpLinearSolver
Definition: explicit_hamilton_strategy.hpp:485
SystemMatrixPointerType mpA
Definition: explicit_hamilton_strategy.hpp:491
void SetEchoLevel(int Level)
This sets the level of echo for the solving strategy.
Definition: explicit_hamilton_strategy.hpp:198
void SetCalculateReactionsFlag(bool CalculateReactionsFlag)
Definition: explicit_hamilton_strategy.hpp:169
BuilderAndSolverType::Pointer GetBuilderAndSolver()
Definition: explicit_hamilton_strategy.hpp:152
BaseType::SystemVectorPointerType SystemVectorPointerType
Definition: explicit_hamilton_strategy.hpp:62
double Solve()
The problem of interest is solved.
Definition: explicit_hamilton_strategy.hpp:287
KRATOS_CLASS_POINTER_DEFINITION(ExplicitHamiltonStrategy)
TLinearSolver LinearSolverType
Definition: explicit_hamilton_strategy.hpp:48
BaseType::SchemeType SchemeType
Definition: explicit_hamilton_strategy.hpp:52
bool GetCalculateReactionsFlag()
Definition: explicit_hamilton_strategy.hpp:174
void SetReformDofSetAtEachStepFlag(bool flag)
Definition: explicit_hamilton_strategy.hpp:179
SystemVectorPointerType mpDx
Definition: explicit_hamilton_strategy.hpp:489
int Check()
Definition: explicit_hamilton_strategy.hpp:539
bool mReformDofSetAtEachStep
Definition: explicit_hamilton_strategy.hpp:502
void Clear()
Clears the internal storage.
Definition: explicit_hamilton_strategy.hpp:390
void SetScheme(typename SchemeType::Pointer pScheme)
Definition: explicit_hamilton_strategy.hpp:135
bool mCalculateReactionsFlag
Definition: explicit_hamilton_strategy.hpp:509
SchemeType::Pointer GetScheme()
Definition: explicit_hamilton_strategy.hpp:140
bool mComputeTime
Definition: explicit_hamilton_strategy.hpp:515
BaseType::DofsArrayType DofsArrayType
Definition: explicit_hamilton_strategy.hpp:54
BaseType::SystemMatrixPointerType SystemMatrixPointerType
Definition: explicit_hamilton_strategy.hpp:60
ExplicitHamiltonStrategy(const ExplicitHamiltonStrategy &Other)
Definition: explicit_hamilton_strategy.hpp:578
void InitializeSolutionStep()
Performs all the required operations that should be done (for each step) before solving the solution ...
Definition: explicit_hamilton_strategy.hpp:242
void SetInitializePerformedFlag(bool InitializePerformedFlag=true)
Definition: explicit_hamilton_strategy.hpp:159
TSparseSpace SparseSpaceType
Definition: explicit_hamilton_strategy.hpp:50
bool mInitializeWasPerformed
Definition: explicit_hamilton_strategy.hpp:513
ExplicitHamiltonStrategy(ModelPart &model_part, bool MoveMeshFlag=false)
Definition: explicit_hamilton_strategy.hpp:67
BaseType::SystemMatrixType SystemMatrixType
Definition: explicit_hamilton_strategy.hpp:56
ExplicitHamiltonStrategy(ModelPart &model_part, typename SchemeType::Pointer pScheme, typename LinearSolverType::Pointer pNewLinearSolver, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false)
Definition: explicit_hamilton_strategy.hpp:75
bool GetReformDofSetAtEachStepFlag()
Definition: explicit_hamilton_strategy.hpp:186
void CalculateReactions()
Definition: explicit_hamilton_strategy.hpp:526
bool GetInitializePerformedFlag()
Definition: explicit_hamilton_strategy.hpp:164
bool mSolutionStepIsInitialized
Definition: explicit_hamilton_strategy.hpp:511
void SetBuilderAndSolver(typename BuilderAndSolverType::Pointer pNewBuilderAndSolver)
Definition: explicit_hamilton_strategy.hpp:147
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: explicit_hamilton_strategy.hpp:44
void Initialize()
Initialization of member variables and prior operations.
Definition: explicit_hamilton_strategy.hpp:207
virtual ~ExplicitHamiltonStrategy()
Definition: explicit_hamilton_strategy.hpp:126
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
void SetRebuildLevel(int Level) override
This sets the build level.
Definition: implicit_solving_strategy.h:207
int mRebuildLevel
Definition: implicit_solving_strategy.h:263
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
int GetEchoLevel()
This returns the level of echo for the solving strategy.
Definition: solving_strategy.h:271
virtual int Check()
Function to perform expensive checks.
Definition: solving_strategy.h:377
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
int mEchoLevel
Definition: solving_strategy.h:485
virtual void MoveMesh()
This function is designed to move the mesh.
Definition: solving_strategy.h:330
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
model_part
Definition: face_heat.py:14
double precision function mb(a)
Definition: TensorModule.f:849