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.
|
#include <trilinos_refine_mesh.h>
Public Types | |
typedef ModelPart::NodesContainerType | NodesArrayType |
typedef ModelPart::ElementsContainerType | ElementsArrayType |
typedef ModelPart::ConditionsContainerType | ConditionsArrayType |
typedef vector< Matrix > | Matrix_Order_Tensor |
typedef vector< Vector > | Vector_Order_Tensor |
typedef vector< Vector_Order_Tensor > | Node_Vector_Order_Tensor |
typedef Node | PointType |
typedef Node ::Pointer | PointPointerType |
typedef std::vector< PointType::Pointer > | PointVector |
typedef PointVector::iterator | PointIterator |
Public Member Functions | |
TrilinosRefineMesh (ModelPart &model_part, Epetra_MpiComm &Comm) | |
~TrilinosRefineMesh () | |
void | Local_Refine_Mesh (bool refine_on_reference, bool interpolate_internal_variables, int domain_size) |
void | PrintDebugInfo () |
void | Clear () |
This function frees all of the memory used. More... | |
void | CSR_Row_Matrix (ModelPart &this_model_part, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids) |
void | Search_Edge_To_Be_Refined (ModelPart &this_model_part, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_partition_ids) |
void | Create_List_Of_New_Nodes (ModelPart &this_model_part, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_partition_ids, vector< int > &List_New_Nodes, vector< int > &partition_new_nodes, vector< array_1d< int, 2 > > &father_node_ids) |
void | Calculate_Coordinate_And_Insert_New_Nodes (ModelPart &this_model_part, const vector< array_1d< int, 2 > > &father_node_ids, const vector< int > &List_New_Nodes, const vector< int > &partition_new_nodes) |
void | Erase_Old_Element_And_Create_New_Triangle_Element (ModelPart &this_model_part, const Kratos::shared_ptr< Epetra_FECrsMatrix > p_edge_ids, PointerVector< Element > &New_Elements, bool interpolate_internal_variables) |
void | Calculate_Triangle_Edges (Element::GeometryType &geom, const Kratos::shared_ptr< Epetra_FECrsMatrix > p_edge_ids, int *edge_ids, int aux[6]) |
void | Renumbering_Elements (ModelPart &this_model_part, PointerVector< Element > &New_Elements) |
void | Renumbering_Conditions (ModelPart &this_model_part, PointerVector< Condition > &New_Conditions) |
Protected Member Functions | |
void | InterpolateInternalVariables (const int &nel, const Element::Pointer father_elem, Element::Pointer child_elem, const ProcessInfo &rCurrentProcessInfo) |
double | GetValueFromRow (int row, int j, int row_size, int *indices, double *values) |
double | GetUpperTriangularMatrixValue (const Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids, int index_0, int index_1, int &MaxNumEntries, int &NumEntries, int *Indices, double *values) |
void | Erase_Old_Element_And_Create_New_Tetra_Element (ModelPart &this_model_part, const Kratos::shared_ptr< Epetra_FECrsMatrix > p_edge_ids, PointerVector< Element > &New_Elements, bool interpolate_internal_variables) |
unsigned int | CreateCenterNode (Geometry< Node > &geom, ModelPart &model_part, ModelPart::NodesContainerType ¢er_nodes) |
void | AssignIdToCenterNode (ModelPart::NodesContainerType ¢er_nodes) |
void | Erase_Old_Condition_And_Create_New_Triangle_Conditions (ModelPart &this_model_part, const Kratos::shared_ptr< Epetra_FECrsMatrix > p_edge_ids, PointerVector< Condition > &New_Conditions, bool interpolate_internal_variables) |
Node::Pointer | AuxCreateNewNode (ModelPart &r_model_part, int Id, double x, double y, double z) |
Protected Attributes | |
ModelPart & | mr_model_part |
Epetra_MpiComm & | mrComm |
Kratos::shared_ptr< Epetra_Map > | mp_overlapping_map |
Kratos::shared_ptr< Epetra_Map > | mp_non_overlapping_map |
int | mtotal_number_of_existing_nodes |
Kratos::shared_ptr< Epetra_FECrsGraph > | mp_non_overlapping_graph |
Kratos::shared_ptr< Epetra_CrsGraph > | mp_overlapping_graph |
This Function is designed to refine a mesh of triangles or tetrahedra in MPI This is achieved by using the trilinos epetra facilities. Please note that Trilinos has to be patched to work correctly, meaning that versions > 10.6 are needed to compile this
typedef vector<Matrix> Kratos::TrilinosRefineMesh::Matrix_Order_Tensor |
typedef PointVector::iterator Kratos::TrilinosRefineMesh::PointIterator |
typedef Node ::Pointer Kratos::TrilinosRefineMesh::PointPointerType |
typedef std::vector<PointType::Pointer> Kratos::TrilinosRefineMesh::PointVector |
typedef vector<Vector> Kratos::TrilinosRefineMesh::Vector_Order_Tensor |
|
inline |
constructor:
ModelPart& | the model part to be refined |
Epetra_MpiComm | the Epetra Communicator to be used |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
calculating the coordinate of the news nodes
inserting the news node in the model part
*copying this data in the position of the vector we are interested in
WARNING = only for reactions;
|
inline |
|
inline |
This function frees all of the memory used.
|
inline |
|
inlineprotected |
*copying this data in the position of the vector we are interested in
|
inline |
|
inlineprotected |
as the name says...
setting the internal variables in the child elem
*now remove all of the "old" Conditions
|
inlineprotected |
setting the internal variables in the child elem
*now remove all of the "old" elements
|
inline |
as the name says...
setting the internal variables in the child elem
*now remove all of the "old" elements
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
this function transfers the Constitutive Law internal variables from the father to the child. note that this is done through the vector Variable INTERNAL_VARIABLES which should also contain the geometric data needed for this.
|
inline |
Local_Refine_Mesh is the umbrella function that performs the refinement. The elements to be refined are identified by the flag SPLIT_ELEMENT=true current level of refinement is stored element by element in the flag REFINEMENT_LEVEL of type integer NOTE: the refinement is performed with the ONLY AIM of delivering a conformant mesh, that is, no step is performed to ensure the quality of the resultign mesh. The user is expected to select the elements to be refined so to guarantee that some quality level is retained. No effort is made to keep the resulting mesh balanced, consequently a load balancing step should be performed after the refinement step.
refine_on_reference | --> it controls if the interpolation of data (both internal and nodal) should be performed on the initial domain (if set it to true) OR on the deformed one. this is very important for example for refining correctly total lagrangian elements. If the parameter is set to two, the model_part is expected to contain the DISPLACEMENT variable |
interpolate_internal_variables | --> this flag controls if the internal variables (Constitutive Law vars) should be interpolated or not |
|
inline |
|
inline |
function to ensure that the Conditions and conditions are numbered consecutively
|
inline |
function to ensure that the elements and conditions are numbered consecutively
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |