KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
connectivity_preserve_modeler.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Riccardo Rossi
11 //
12 //
13 
14 #if !defined( KRATOS_CONNECTIVITY_PRESERVE_MODELER_H )
15 #define KRATOS_CONNECTIVITY_PRESERVE_MODELER_H
16 
17 
18 
19 // System includes
20 #include <string>
21 #include <iostream>
22 #include <algorithm>
23 
24 // External includes
25 
26 
27 // Project includes
28 #include "includes/define.h"
29 #include "includes/model_part.h"
30 #include "modeler/modeler.h"
31 
32 
33 namespace Kratos
34 {
38 
40 class KRATOS_API(KRATOS_CORE) ConnectivityPreserveModeler : public Modeler
41 {
42 public:
45 
47 
51 
54 
57 
59  ~ConnectivityPreserveModeler() override = default;
60 
64 
67 
71 
73 
83  void GenerateModelPart(
84  ModelPart& OriginModelPart,
85  ModelPart& DestinationModelPart,
86  const Element& rReferenceElement,
87  const Condition& rReferenceBoundaryCondition
88  ) override;
89 
91 
103  virtual void GenerateModelPart(
104  ModelPart& OriginModelPart,
105  ModelPart& DestinationModelPart,
106  const Element& rReferenceElement
107  );
108 
110 
122  virtual void GenerateModelPart(
123  ModelPart& OriginModelPart,
124  ModelPart& DestinationModelPart,
125  const Condition& rReferenceCondition
126  );
127 
129 
130 private:
133 
134  void CheckVariableLists(ModelPart& rOriginModelPart, ModelPart& rDestinationModelPart) const;
135 
136  void ResetModelPart(ModelPart& rDestinationModelPart) const;
137 
138  void CopyCommonData(
139  ModelPart& rOriginModelPart,
140  ModelPart& rDestinationModelPart
141  ) const;
142 
143  void DuplicateElements(
144  ModelPart& rOriginModelPart,
145  ModelPart& rDestinationModelPart,
146  const Element& rReferenceElement
147  ) const;
148 
149  void DuplicateConditions(
150  ModelPart& rOriginModelPart,
151  ModelPart& rDestinationModelPart,
152  const Condition& rReferenceBoundaryCondition
153  ) const;
154 
155  void DuplicateCommunicatorData(
156  ModelPart& rOriginModelPart,
157  ModelPart& rDestinationModelPart
158  ) const;
159 
160  void DuplicateSubModelParts(
161  ModelPart& rOriginModelPart,
162  ModelPart& rDestinationModelPart
163  ) const;
164 
166 };
167 
169 
170 } // namespace Kratos.
171 
172 #endif //KRATOS_GENERATE_MODEL_PART_MODELER_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
A tool to generate a copy of a ModelPart, sharing the same nodes as the original.
Definition: connectivity_preserve_modeler.h:41
~ConnectivityPreserveModeler() override=default
Destructor.
ConnectivityPreserveModeler(ConnectivityPreserveModeler const &rOther)=delete
Copy constructor.
ConnectivityPreserveModeler()=default
Default Constructor.
ConnectivityPreserveModeler & operator=(ConnectivityPreserveModeler const &rOther)=delete
Assignment operator.
KRATOS_CLASS_POINTER_DEFINITION(ConnectivityPreserveModeler)
Base class for all Elements.
Definition: element.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Modeler to interact with ModelParts.
Definition: modeler.h:39
void GenerateModelPart(FaceHeatUtilities &FaceHeatUtilities, ModelPart &origin_model_part, ModelPart &destination_model_part, unsigned int domain_size)
Definition: add_custom_utilities_to_python.cpp:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21