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.
List of all members
Kratos::UniformRefinementUtility Class Reference

This class splits all the elements until NUMBER_OF_DIVISIONS reaches the desired value @detail A node is added on the middle of each edge (and an extra node is added inside the quadrilaterals and tetrahedrons) and the nodal values are interpolated Once the element is split, the NUMBER_OF_DIVISIONS variable in increased by one Each division will create the following entities and delete the origin entity: Lines: 2 new lines Triangles: 4 new triangles (mesh quality is conserved) Quadrilaterals: 4 new quadrilaterals (mesh quality is conserved) Tetrahedrons: 8 new tetrahedrons (mesh quality is not conserved) Hexahedrons: 8 new hexahedrons (mesh quality is conserved) It only works with linear elements The splitting keeps the sub model parts. More...

#include <uniform_refinement_utility.h>

Collaboration diagram for Kratos::UniformRefinementUtility:

Public Member Functions

Life Cycle
 UniformRefinementUtility (ModelPart &rModelPart)
 Default constructor. More...
 
virtual ~UniformRefinementUtility ()
 Destructor. More...
 
Operations
void Refine (int &rFinalRefinementLevel)
 Execute the refinement until the final refinement is reached. More...
 
void SetCustomIds (IndexType &rNodeId, IndexType &rElemId, IndexType &rCondId)
 Set the custom ids which will be used to create new entities. More...
 
void GetLastCreatedIds (IndexType &rNodeId, IndexType &rElemId, IndexType &rCondId)
 Get the las id of the created nodes, elements and conditions. More...
 
void RemoveRefinedEntities (Flags ThisFlag)
 RemoveRefinedEntities. More...
 
Input and output
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Type Definitions

typedef Node NodeType
 
typedef Line3D2< NodeTypeEdgeType
 
typedef Quadrilateral3D4< NodeTypeFaceType
 
typedef Hexahedra3D8< NodeTypeBodyType
 
typedef std::size_t IndexType
 
typedef ModelPart::NodesContainerType NodesArrayType
 
typedef ModelPart::ElementsContainerType ElementsArrayType
 
typedef ModelPart::ConditionsContainerType ConditionsArrayType
 
typedef std::pair< IndexType, IndexTypeEdgeKeyType
 
typedef std::array< IndexType, 4 > FaceKeyType
 
typedef std::map< EdgeKeyType, IndexTypeNodesInEdgeMapType
 
typedef std::unordered_map< FaceKeyType, IndexType, KeyHasherRange< FaceKeyType >, KeyComparorRange< FaceKeyType > > NodesInFaceMapType
 
typedef std::vector< IndexTypeIndexVectorType
 
typedef std::vector< std::string > StringVectorType
 
typedef std::unordered_map< IndexType, IndexTypeIndexIndexMapType
 
typedef std::unordered_map< IndexType, IndexVectorTypeIndexIndexVectorMapType
 
typedef std::unordered_map< IndexType, StringVectorTypeIndexStringVectorMapType
 
 KRATOS_CLASS_POINTER_DEFINITION (UniformRefinementUtility)
 Pointer definition of UniformRefinementUtility. More...
 

Detailed Description

This class splits all the elements until NUMBER_OF_DIVISIONS reaches the desired value @detail A node is added on the middle of each edge (and an extra node is added inside the quadrilaterals and tetrahedrons) and the nodal values are interpolated Once the element is split, the NUMBER_OF_DIVISIONS variable in increased by one Each division will create the following entities and delete the origin entity: Lines: 2 new lines Triangles: 4 new triangles (mesh quality is conserved) Quadrilaterals: 4 new quadrilaterals (mesh quality is conserved) Tetrahedrons: 8 new tetrahedrons (mesh quality is not conserved) Hexahedrons: 8 new hexahedrons (mesh quality is conserved) It only works with linear elements The splitting keeps the sub model parts.

Author
Miguel Maso Sotomayor

Member Typedef Documentation

◆ BodyType

Type of body geometry

◆ ConditionsArrayType

◆ EdgeKeyType

Key and map types to locate nodes in the mesh

◆ EdgeType

Type of edge geometry

◆ ElementsArrayType

◆ FaceKeyType

◆ FaceType

Type of face geometry

◆ IndexIndexMapType

◆ IndexIndexVectorMapType

◆ IndexStringVectorMapType

◆ IndexType

Type of IDs

◆ IndexVectorType

◆ NodesArrayType

Nodes, elements and conditions containers definition

◆ NodesInEdgeMapType

◆ NodesInFaceMapType

◆ NodeType

Node type

◆ StringVectorType

typedef std::vector<std::string> Kratos::UniformRefinementUtility::StringVectorType

Constructor & Destructor Documentation

◆ UniformRefinementUtility()

Kratos::UniformRefinementUtility::UniformRefinementUtility ( ModelPart rModelPart)

Default constructor.

◆ ~UniformRefinementUtility()

Kratos::UniformRefinementUtility::~UniformRefinementUtility ( )
virtual

Destructor.

Member Function Documentation

◆ GetLastCreatedIds()

void Kratos::UniformRefinementUtility::GetLastCreatedIds ( IndexType rNodeId,
IndexType rElemId,
IndexType rCondId 
)

Get the las id of the created nodes, elements and conditions.

Get the last id of the created nodes, elements and conditions.

Parameters
rNodeId
rElemId
rCondId

◆ Info()

std::string Kratos::UniformRefinementUtility::Info ( ) const
virtual

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::UniformRefinementUtility::KRATOS_CLASS_POINTER_DEFINITION ( UniformRefinementUtility  )

Pointer definition of UniformRefinementUtility.

◆ PrintData()

void Kratos::UniformRefinementUtility::PrintData ( std::ostream &  rOStream) const
virtual

Print object's data.

◆ PrintInfo()

void Kratos::UniformRefinementUtility::PrintInfo ( std::ostream &  rOStream) const
virtual

Print information about this object.

◆ Refine()

void Kratos::UniformRefinementUtility::Refine ( int rFinalRefinementLevel)

Execute the refinement until the final refinement is reached.

Execute the refinement until the final number of divisions level is reached.

◆ RemoveRefinedEntities()

void Kratos::UniformRefinementUtility::RemoveRefinedEntities ( Flags  ThisFlag)

RemoveRefinedEntities.

Remove the refined entities.

Parameters
ThisFlag

◆ SetCustomIds()

void Kratos::UniformRefinementUtility::SetCustomIds ( IndexType rNodeId,
IndexType rElemId,
IndexType rCondId 
)

Set the custom ids which will be used to create new entities.

Parameters
rNodeId
rElemId
rCondId

The documentation for this class was generated from the following files: