14 #if !defined(KRATOS_NEW_STRUCTURAL_MESHMOVING_STRATEGY)
15 #define KRATOS_NEW_STRUCTURAL_MESHMOVING_STRATEGY
57 template <
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
79 typename TLinearSolver::Pointer pNewLinearSolver,
81 bool ReformDofSetAtEachStep =
false,
82 bool ComputeReactions =
false,
85 const double PoissonRatio = 0.3,
86 const bool ReInitializeModelPartEachStep =
false)
90 mreform_dof_set_at_each_step = ReformDofSetAtEachStep || ReInitializeModelPartEachStep;
91 mcompute_reactions = ComputeReactions;
94 mtime_order = TimeOrder;
95 mreinitialize_model_part_at_each_step = ReInitializeModelPartEachStep;
96 bool calculate_norm_dx_flag =
false;
98 typename SchemeType::Pointer pscheme =
typename SchemeType::Pointer(
102 const std::string
element_type =
"StructuralMeshMovingElement";
106 mpmesh_model_part->
pGetProperties(0)->GetValue(MESH_POISSON_RATIO) = PoissonRatio;
108 mpbulider_and_solver =
typename TBuilderAndSolverType::Pointer(
116 mpbulider_and_solver,
118 mreform_dof_set_at_each_step,
119 calculate_norm_dx_flag));
121 mstrategy->SetEchoLevel(mecho_level);
129 std::string name = mpmesh_model_part->
Name();
138 if (mreinitialize_model_part_at_each_step) {
141 mpmesh_model_part->
pGetProperties(0),
"StructuralMeshMovingElement");
151 if (mreform_dof_set_at_each_step ==
true)
221 typename BaseType::Pointer mstrategy;
222 typename TBuilderAndSolverType::Pointer mpbulider_and_solver;
226 bool mreform_dof_set_at_each_step;
227 bool mcompute_reactions;
228 bool mcalculate_mesh_velocities;
229 bool mreinitialize_model_part_at_each_step;
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
Definition: implicit_solving_strategy.h:84
NodesContainerType & Nodes()
Definition: mesh.h:346
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
void DeleteModelPart(const std::string &ModelPartName)
This method deletes a modelpart with a given name.
Definition: model.cpp:64
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
PropertiesType::Pointer pGetProperties(IndexType PropertiesId, IndexType MeshIndex=0)
Returns the Properties::Pointer corresponding to it's identifier.
Definition: model_part.cpp:664
Communicator & GetCommunicator()
Definition: model_part.h:1821
std::string & Name()
Definition: model_part.h:1811
Model & GetModel()
Definition: model_part.h:323
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
Short class definition.
Definition: structural_meshmoving_strategy.h:59
double Solve() override
The problem of interest is solved.
Definition: structural_meshmoving_strategy.h:135
BaseType::TBuilderAndSolverType TBuilderAndSolverType
Definition: structural_meshmoving_strategy.h:68
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: structural_meshmoving_strategy.h:67
Scheme< TSparseSpace, TDenseSpace > SchemeType
Definition: structural_meshmoving_strategy.h:69
virtual ~StructuralMeshMovingStrategy()
Definition: structural_meshmoving_strategy.h:126
StructuralMeshMovingStrategy(ModelPart &model_part, typename TLinearSolver::Pointer pNewLinearSolver, int TimeOrder=2, bool ReformDofSetAtEachStep=false, bool ComputeReactions=false, bool CalculateMeshVelocities=true, int EchoLevel=0, const double PoissonRatio=0.3, const bool ReInitializeModelPartEachStep=false)
Definition: structural_meshmoving_strategy.h:78
void Initialize() override
Initialization of member variables and prior operations.
Definition: structural_meshmoving_strategy.h:133
KRATOS_CLASS_POINTER_DEFINITION(StructuralMeshMovingStrategy)
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
void CalculateMeshVelocities(ModelPart &rModelPart, const TimeDiscretization::BDF1 &rBDF)
Definition: mesh_velocity_calculation.cpp:56
void InitializeMeshPartWithElements(ModelPart &rDestinationModelPart, ModelPart &rOriginModelPart, Properties::Pointer pProperties, const std::string &rElementName)
Definition: move_mesh_utilities.cpp:176
ModelPart * GenerateMeshPart(ModelPart &rModelPart, const std::string &rElementName)
Definition: move_mesh_utilities.cpp:143
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
model_part
Definition: face_heat.py:14
element_type
Choosing element type for lagrangian_model_part.
Definition: lagrangian_droplet_test.py:56