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.
|
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>
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... | |
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.
Type of body geometry
typedef std::pair<IndexType, IndexType> Kratos::UniformRefinementUtility::EdgeKeyType |
Key and map types to locate nodes in the mesh
Type of edge geometry
typedef std::array<IndexType, 4> Kratos::UniformRefinementUtility::FaceKeyType |
Type of face geometry
typedef std::unordered_map<IndexType, IndexType> Kratos::UniformRefinementUtility::IndexIndexMapType |
typedef std::unordered_map<IndexType, IndexVectorType> Kratos::UniformRefinementUtility::IndexIndexVectorMapType |
typedef std::unordered_map<IndexType, StringVectorType> Kratos::UniformRefinementUtility::IndexStringVectorMapType |
typedef std::size_t Kratos::UniformRefinementUtility::IndexType |
Type of IDs
typedef std::vector<IndexType> Kratos::UniformRefinementUtility::IndexVectorType |
Map types for the AssignUniqueModelPartCollectionTagUtility
Nodes, elements and conditions containers definition
typedef std::map<EdgeKeyType, IndexType> Kratos::UniformRefinementUtility::NodesInEdgeMapType |
typedef std::unordered_map<FaceKeyType, IndexType, KeyHasherRange<FaceKeyType>, KeyComparorRange<FaceKeyType> > Kratos::UniformRefinementUtility::NodesInFaceMapType |
Node type
typedef std::vector<std::string> Kratos::UniformRefinementUtility::StringVectorType |
Kratos::UniformRefinementUtility::UniformRefinementUtility | ( | ModelPart & | rModelPart | ) |
Default constructor.
|
virtual |
Destructor.
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.
rNodeId | |
rElemId | |
rCondId |
|
virtual |
Turn back information as a string.
Kratos::UniformRefinementUtility::KRATOS_CLASS_POINTER_DEFINITION | ( | UniformRefinementUtility | ) |
Pointer definition of UniformRefinementUtility.
|
virtual |
Print object's data.
|
virtual |
Print information about this object.
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.
void Kratos::UniformRefinementUtility::RemoveRefinedEntities | ( | Flags | ThisFlag | ) |
RemoveRefinedEntities.
Remove the refined entities.
ThisFlag |
void Kratos::UniformRefinementUtility::SetCustomIds | ( | IndexType & | rNodeId, |
IndexType & | rElemId, | ||
IndexType & | rCondId | ||
) |
Set the custom ids which will be used to create new entities.
rNodeId | |
rElemId | |
rCondId |