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.
linear_to_quadratic_tetrahedra_mesh_converter_utility.h
Go to the documentation of this file.
1 // KRATOS __ __ _____ ____ _ _ ___ _ _ ____
2 // | \/ | ____/ ___|| | | |_ _| \ | |/ ___|
3 // | |\/| | _| \___ \| |_| || || \| | | _
4 // | | | | |___ ___) | _ || || |\ | |_| |
5 // |_| |_|_____|____/|_| |_|___|_| \_|\____| APPLICATION
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ariadna Cortés
11 //
12 
13 #if !defined(KRATOS_LINEAR_TO_QUADRATIC_TETRAHEDRA_MESH_CONVERTER_UTILITY)
14 #define KRATOS_LINEAR_TO_QUADRATIC_TETRAHEDRA_MESH_CONVERTER_UTILITY
15 
16 // System includes
17 
18 /* Project includes */
22 
23 namespace Kratos
24 {
39 class KRATOS_API(MESHING_APPLICATION) LinearToQuadraticTetrahedraMeshConverter : public LocalRefineTetrahedraMesh
40 {
41 public:
42 
46 
47  typedef Node NodeType;
49  typedef GeometryType::Pointer GeometryPtrType;
50 
53 
56 
59  {
60 
61  }
62 
65  = default;
66 
70 
74 
82  void LocalConvertLinearToQuadraticTetrahedraMesh(
83  bool RefineOnReference,
84  bool InterpolateInternalVariables);
85 
86 private:
89 
93 
97 
101 
106  Tetrahedra3D10<Node> GenerateTetrahedra(
107  ModelPart& rThisModelPart,
108  const std::vector<int>& rNodeIds);
109 
114  Triangle3D6<Node> GenerateTriangle3D6(
115  ModelPart& rThisModelPart,
116  const array_1d<int, 6>& rNodeIds);
117 
126  void EraseOldElementAndCreateNewElement(
127  ModelPart& rThisModelPart,
128  const compressed_matrix<int>& Coord,
129  PointerVector< Element >& NewElements,
130  bool InterpolateInternalVariables
131  ) override;
132 
137  void ReplaceElementsInSubModelPart(ModelPart& rThisModelPart);
138 
145  void EraseOldConditionsAndCreateNew(
146  ModelPart& rThisModelPart,
147  const compressed_matrix<int>& Coord
148  ) override;
149 
154  void ReplaceConditionsInSubModelPart(ModelPart& rThisModelPart);
155 
159 
163 
168 
169 }; // Class LinearToQuadraticTetrahedraMeshConverter
170 
171 } // namespace Kratos.
172 
173 #endif // KRATOS_LINEAR_TO_QUADRATIC_TETRAHEDRA_MESH_CONVERTER_UTILITY defined
Geometry base class.
Definition: geometry.h:71
Definition: linear_to_quadratic_tetrahedra_mesh_converter_utility.h:40
GeometryType::Pointer GeometryPtrType
Definition: linear_to_quadratic_tetrahedra_mesh_converter_utility.h:49
KRATOS_CLASS_POINTER_DEFINITION(LinearToQuadraticTetrahedraMeshConverter)
Pointer definition of VoxelInsideVolume.
LinearToQuadraticTetrahedraMeshConverter(ModelPart &ModelPart)
Default constructors.
Definition: linear_to_quadratic_tetrahedra_mesh_converter_utility.h:58
Node NodeType
Definition: linear_to_quadratic_tetrahedra_mesh_converter_utility.h:47
Geometry< NodeType > GeometryType
Definition: linear_to_quadratic_tetrahedra_mesh_converter_utility.h:48
~LinearToQuadraticTetrahedraMeshConverter()=default
Destructor.
Definition: local_refine_tetrahedra_mesh.hpp:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A ten node tetrahedra geometry with quadratic shape functions.
Definition: tetrahedra_3d_10.h:75
A six node 3D triangular geometry with quadratic shape functions.
Definition: triangle_3d_6.h:68
Short class definition.
Definition: array_1d.h:61
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21