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.
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Kratos::TrilinosCuttingIsosurfaceApplication Class Reference

#include <trilinos_cutting_iso_app.h>

Collaboration diagram for Kratos::TrilinosCuttingIsosurfaceApplication:

Public Types

typedef ModelPart::NodesContainerType NodesArrayType
 
typedef ModelPart::ElementsContainerType ElementsArrayType
 
typedef ModelPart::ConditionsContainerType ConditionsArrayType
 
typedef vector< MatrixMatrix_Order_Tensor
 
typedef vector< VectorVector_Order_Tensor
 
typedef vector< Vector_Order_TensorNode_Vector_Order_Tensor
 
typedef Node PointType
 
typedef Node ::Pointer PointPointerType
 
typedef std::vector< PointType::Pointer > PointVector
 
typedef PointVector::iterator PointIterator
 

Public Member Functions

 TrilinosCuttingIsosurfaceApplication (Epetra_MpiComm &Comm)
 
 ~TrilinosCuttingIsosurfaceApplication ()
 
void AddSkinConditions (ModelPart &mr_model_part, ModelPart &mr_new_model_part, int plane_number)
 ADDSKINCONDITIONS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA OF THE CONDITIONS BELONGING TO THE OLD MODEL PART, THE NODES COORDINATES ALREADY EXIST. WE ONLY NEED TO COPY THEM INTO THE NEW MODEL PART. More...
 
template<class TDataType >
void GenerateVariableCut (ModelPart &mr_model_part, ModelPart &mr_new_model_part, Variable< TDataType > &variable, double isovalue, int plane_number, float tolerance)
 
void Clear ()
 
void CSR_Row_Matrix (ModelPart &this_model_part, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids, Kratos::shared_ptr< Epetra_FECrsMatrix > &used_nodes_matrix)
 
void FirstLoop (ModelPart &this_model_part, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_edge_ids, Kratos::shared_ptr< Epetra_FECrsMatrix > &p_partition_ids, Variable< double > &variable, double isovalue, int &number_of_triangles, vector< int > &Elems_In_Plane, double tolerance, Kratos::shared_ptr< Epetra_FECrsMatrix > &used_nodes_matrix)
 
void Create_List_Of_New_Nodes (ModelPart &this_model_part, ModelPart &new_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, Kratos::shared_ptr< Epetra_FECrsMatrix > &used_nodes_matrix)
 
void Calculate_Coordinate_And_Insert_New_Nodes (ModelPart &this_model_part, ModelPart &new_model_part, const vector< array_1d< int, 2 > > &father_node_ids, const vector< int > &List_New_Nodes, const vector< int > &partition_new_nodes, Variable< double > &variable, double isovalue, float tolerance)
 
void GenerateElements (ModelPart &this_model_part, ModelPart &new_model_part, vector< int > Elems_In_Plane, const Kratos::shared_ptr< Epetra_FECrsMatrix > p_edge_ids, int plane_number, int &number_of_triangles, Variable< double > &variable)
 
void UpdateCutData (ModelPart &new_model_part, ModelPart &old_model_part)
 
void DeleteCutData (ModelPart &new_model_part)
 

Protected Member Functions

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)
 

Protected Attributes

double smallest_edge
 
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
 

Detailed Description

This Function is designed to generate isosurfaces from a given variable. using the origin model part (tetraedras) it creates the isosurface in a different model part. this is useful to avoid printing the whole thetraedra mesh when models are too large, just as with the cutting application It creates nodes and triangles that define the isosurfaces and it interpolates the variables from the original model part

Member Typedef Documentation

◆ ConditionsArrayType

◆ ElementsArrayType

◆ Matrix_Order_Tensor

◆ Node_Vector_Order_Tensor

◆ NodesArrayType

◆ PointIterator

◆ PointPointerType

◆ PointType

◆ PointVector

typedef std::vector<PointType::Pointer> Kratos::TrilinosCuttingIsosurfaceApplication::PointVector

◆ Vector_Order_Tensor

Constructor & Destructor Documentation

◆ TrilinosCuttingIsosurfaceApplication()

Kratos::TrilinosCuttingIsosurfaceApplication::TrilinosCuttingIsosurfaceApplication ( Epetra_MpiComm &  Comm)
inline

constructor:

Parameters
ModelPart&the model part to be refined
Epetra_MpiCommthe Epetra Communicator to be used

◆ ~TrilinosCuttingIsosurfaceApplication()

Kratos::TrilinosCuttingIsosurfaceApplication::~TrilinosCuttingIsosurfaceApplication ( )
inline

Member Function Documentation

◆ AddSkinConditions()

void Kratos::TrilinosCuttingIsosurfaceApplication::AddSkinConditions ( ModelPart mr_model_part,
ModelPart mr_new_model_part,
int  plane_number 
)
inline

ADDSKINCONDITIONS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA OF THE CONDITIONS BELONGING TO THE OLD MODEL PART, THE NODES COORDINATES ALREADY EXIST. WE ONLY NEED TO COPY THEM INTO THE NEW MODEL PART.

this function adds the skin condtion. WARNING: They have to be triangles and it CAN'T be empty, otherwise a segmentation fault will appear

Parameters
mr_model_part. original model part
mr__new_model_part. destinantion model part
plane_number. layer to add the conditions (integer)

KRATOS_WATCH('line349')

◆ Calculate_Coordinate_And_Insert_New_Nodes()

void Kratos::TrilinosCuttingIsosurfaceApplication::Calculate_Coordinate_And_Insert_New_Nodes ( ModelPart this_model_part,
ModelPart new_model_part,
const vector< array_1d< int, 2 > > &  father_node_ids,
const vector< int > &  List_New_Nodes,
const vector< int > &  partition_new_nodes,
Variable< double > &  variable,
double  isovalue,
float  tolerance 
)
inline

calculating the coordinate of the new nodes

◆ Clear()

void Kratos::TrilinosCuttingIsosurfaceApplication::Clear ( )
inline

◆ Create_List_Of_New_Nodes()

void Kratos::TrilinosCuttingIsosurfaceApplication::Create_List_Of_New_Nodes ( ModelPart this_model_part,
ModelPart new_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,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  used_nodes_matrix 
)
inline
  • New Id of the nodes

◆ CSR_Row_Matrix()

void Kratos::TrilinosCuttingIsosurfaceApplication::CSR_Row_Matrix ( ModelPart this_model_part,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  p_edge_ids,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  used_nodes_matrix 
)
inline

◆ DeleteCutData()

void Kratos::TrilinosCuttingIsosurfaceApplication::DeleteCutData ( ModelPart new_model_part)
inline

◆ FirstLoop()

void Kratos::TrilinosCuttingIsosurfaceApplication::FirstLoop ( ModelPart this_model_part,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  p_edge_ids,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  p_partition_ids,
Variable< double > &  variable,
double  isovalue,
int number_of_triangles,
vector< int > &  Elems_In_Plane,
double  tolerance,
Kratos::shared_ptr< Epetra_FECrsMatrix > &  used_nodes_matrix 
)
inline

◆ GenerateElements()

void Kratos::TrilinosCuttingIsosurfaceApplication::GenerateElements ( ModelPart this_model_part,
ModelPart new_model_part,
vector< int Elems_In_Plane,
const Kratos::shared_ptr< Epetra_FECrsMatrix >  p_edge_ids,
int  plane_number,
int number_of_triangles,
Variable< double > &  variable 
)
inline


as the name says...

we enter the element loop

we enter in the if for only one triangle in the tetraedra

entering now the if for 2 triangles inside the tetraedra.

◆ GenerateVariableCut()

template<class TDataType >
void Kratos::TrilinosCuttingIsosurfaceApplication::GenerateVariableCut ( ModelPart mr_model_part,
ModelPart mr_new_model_part,
Variable< TDataType > &  variable,
double  isovalue,
int  plane_number,
float  tolerance 
)
inline
  • the news nodes
  • the news nodes
  • edges where are the news nodes
  • the coordinate of the new nodes

◆ GetUpperTriangularMatrixValue()

double Kratos::TrilinosCuttingIsosurfaceApplication::GetUpperTriangularMatrixValue ( const Kratos::shared_ptr< Epetra_FECrsMatrix > &  p_edge_ids,
int  index_0,
int  index_1,
int MaxNumEntries,
int NumEntries,
int Indices,
double values 
)
inlineprotected

◆ GetValueFromRow()

double Kratos::TrilinosCuttingIsosurfaceApplication::GetValueFromRow ( int  row,
int  j,
int  row_size,
int indices,
double values 
)
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.

◆ UpdateCutData()

void Kratos::TrilinosCuttingIsosurfaceApplication::UpdateCutData ( ModelPart new_model_part,
ModelPart old_model_part 
)
inline


Member Data Documentation

◆ mp_non_overlapping_graph

Kratos::shared_ptr<Epetra_FECrsGraph> Kratos::TrilinosCuttingIsosurfaceApplication::mp_non_overlapping_graph
protected

◆ mp_non_overlapping_map

Kratos::shared_ptr<Epetra_Map> Kratos::TrilinosCuttingIsosurfaceApplication::mp_non_overlapping_map
protected

◆ mp_overlapping_graph

Kratos::shared_ptr<Epetra_CrsGraph> Kratos::TrilinosCuttingIsosurfaceApplication::mp_overlapping_graph
protected

◆ mp_overlapping_map

Kratos::shared_ptr<Epetra_Map> Kratos::TrilinosCuttingIsosurfaceApplication::mp_overlapping_map
protected

◆ mrComm

Epetra_MpiComm& Kratos::TrilinosCuttingIsosurfaceApplication::mrComm
protected

◆ mtotal_number_of_existing_nodes

int Kratos::TrilinosCuttingIsosurfaceApplication::mtotal_number_of_existing_nodes
protected

◆ smallest_edge

double Kratos::TrilinosCuttingIsosurfaceApplication::smallest_edge
protected

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