16 #include <unordered_set>
17 #include <unordered_map>
92 template<MMGLibrary TMMGLibrary>
174 void Execute()
override;
184 void ExecuteBeforeSolutionLoop()
override;
189 void ExecuteInitializeSolutionStep()
override;
199 void ExecuteBeforeOutputStep()
override;
204 void ExecuteAfterOutputStep()
override;
209 void ExecuteFinalize()
override;
214 virtual void OutputMdpa();
219 void CleanSuperfluousNodes();
224 void CleanSuperfluousConditions();
230 std::string GetMmgVersion();
235 const Parameters GetDefaultParameters()
const override;
251 std::string
Info()
const override
259 rOStream <<
"MmgProcess";
288 std::unordered_map<IndexType,std::vector<std::string>>
mColors;
316 if(rString ==
"Lagrangian" || rString ==
"LAGRANGIAN")
318 else if(rString ==
"Eulerian" || rString ==
"EULERIAN")
320 else if(rString ==
"ALE")
333 if(rString ==
"Lagrangian" || rString ==
"LAGRANGIAN")
335 else if(rString ==
"Standard" || rString ==
"STANDARD")
337 else if(rString ==
"Isosurface" || rString ==
"ISOSURFACE" || rString ==
"IsoSurface")
346 virtual void InitializeMeshData();
351 virtual void InitializeSolDataMetric();
356 virtual void InitializeSolDataDistance();
361 virtual void InitializeDisplacementData();
366 virtual void ExecuteRemeshing();
371 virtual void InitializeElementsAndConditions();
377 virtual void SaveSolutionToFile(
const bool PostOutput);
382 virtual void FreeMemory();
391 template<
class TContainerType>
393 TContainerType& rNewContainer,
394 const TContainerType& rOldContainer
398 std::unordered_set<std::string> list_variables;
399 const auto it_begin_old = rOldContainer.begin();
400 auto&
data = it_begin_old->GetData();
401 for(
auto i =
data.begin() ;
i !=
data.end() ; ++
i) {
402 list_variables.insert((
i->first)->Name());
405 for (
auto& var_name : list_variables) {
434 const Matrix& ref_matrix = it_begin_old->GetValue(r_var);
444 virtual void ClearConditionsDuplicatedGeometries();
450 virtual void CreateDebugPrePostRemeshOutput(
ModelPart& rOldModelPart);
456 void ApplyLocalParameters();
494 void CollapsePrismsToTriangles();
500 void ExtrudeTrianglestoPrisms(
ModelPart& rOldModelPart);
506 void MarkConditionsSubmodelParts(
ModelPart& rModelPart);
542 template<MMGLibrary TMMGLibrary>
547 template<MMGLibrary TMMGLibrary>
552 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:55
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:37
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class is a remesher which uses the MMG library.
Definition: mmg_process.h:95
KRATOS_CLASS_POINTER_DEFINITION(MmgProcess)
Pointer definition of MmgProcess.
IndexType mEchoLevel
I/O file name.
Definition: mmg_process.h:281
static FrameworkEulerLagrange ConvertFramework(const std::string &rString)
This converts the framework string to an enum.
Definition: mmg_process.h:314
std::string Info() const override
Turn back information as a string.
Definition: mmg_process.h:251
Parameters mThisParameters
The model part to compute.
Definition: mmg_process.h:277
std::unordered_map< IndexType, std::vector< std::string > > mColors
Cuttig-out specified regions during surface remeshing.
Definition: mmg_process.h:288
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mmg_process.h:257
std::unordered_map< IndexType, Condition::Pointer > mpRefCondition
Reference element.
Definition: mmg_process.h:291
ModelPart & mrThisModelPart
Definition: mmg_process.h:276
std::unordered_map< IndexType, Element::Pointer > mpRefElement
Where the sub model parts IDs are stored.
Definition: mmg_process.h:290
std::pair< IndexType, IndexType > IndexPairType
Index pair.
Definition: mmg_process.h:119
NodeType::DofsContainerType mDofs
The parameters (can be used for general pourposes)
Definition: mmg_process.h:278
bool mRemoveRegions
The discretization option.
Definition: mmg_process.h:286
void SetToZeroEntityData(TContainerType &rNewContainer, const TContainerType &rOldContainer)
It sets to zero the entity data, using the variables from the orginal model part.
Definition: mmg_process.h:392
std::unordered_map< IndexType, IndexType > ColorsMapType
Colors map.
Definition: mmg_process.h:116
Geometry< NodeType > GeometryType
Definition: mmg_process.h:107
std::string mFilename
Storage for the dof of the node.
Definition: mmg_process.h:280
FrameworkEulerLagrange mFramework
The echo level.
Definition: mmg_process.h:283
DiscretizationOption mDiscretization
The framework.
Definition: mmg_process.h:285
std::conditional< Dimension==2, array_1d< double, 3 >, array_1d< double, 6 > >::type TensorArrayType
The type of array considered for the tensor.
Definition: mmg_process.h:113
Node NodeType
Node definition.
Definition: mmg_process.h:105
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mmg_process.h:263
static DiscretizationOption ConvertDiscretization(const std::string &rString)
This converts the discretization string to an enum.
Definition: mmg_process.h:331
~MmgProcess() override=default
Destructor.
Provides the Kratos interface to the MMG library API.
Definition: mmg_utilities.h:153
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
std::vector< std::unique_ptr< Dof< double > >> DofsContainerType
The DoF container type definition.
Definition: node.h:92
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
The base class for all processes in Kratos.
Definition: process.h:49
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void SetNonHistoricalVariable(const TVarType &rVariable, const TType &Value, TContainerType &rContainer)
Sets the container value of any type of non historical variable.
Definition: variable_utils.h:790
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
FrameworkEulerLagrange
This enums allows to differentiate the working framework.
Definition: meshing_application.h:66
DiscretizationOption
This enums allows to differentiate the discretization options.
Definition: meshing_application.h:71
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::vector< IndexType > IndexVectorType
Index vector.
Definition: mmg_io.h:63
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
type
Definition: generate_gid_list_file.py:35
data
Definition: mesh_to_mdpa_converter.py:59
integer i
Definition: TensorModule.f:17