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.
|
CUTTING ISOSURFACE APPLICATION. More...
#include <cutting_iso_app.h>
Public Types | |
Type Definitions | |
typedef ModelPart::NodesContainerType | NodesArrayType |
typedef ModelPart::ElementsContainerType | ElementsArrayType |
typedef ModelPart::ConditionsContainerType | ConditionsArrayType |
typedef boost::numeric::ublas::vector< Matrix > | Matrix_Order_Tensor |
typedef boost::numeric::ublas::vector< Vector > | Vector_Order_Tensor |
typedef boost::numeric::ublas::vector< Vector_Order_Tensor > | Node_Vector_Order_Tensor |
typedef Node | PointType |
typedef Node ::Pointer | PointPointerType |
typedef std::vector< PointType::Pointer > | PointVector |
Life Cycle | |
Cutting_Isosurface_Application ()=default | |
Default constructor. More... | |
virtual | ~Cutting_Isosurface_Application ()=default |
Destructor. More... | |
template<class TDataType > | |
void | GenerateVariableCut (ModelPart &mr_model_part, ModelPart &mr_new_model_part, Variable< TDataType > &variable, double isovalue, int isosurface_number, float tolerance) |
This function Creates cutting isosurfaces by creating nodes and conditions (to define the conectivities) in a different model part. (new_model_part) More... | |
void | AddModelPartElements (ModelPart &mr_model_part, ModelPart &mr_new_model_part, int number) |
ADDMODELPARTELEMENTS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA BELONGING TO THE OLD MODEL PART. More... | |
void | AddSkinConditions (ModelPart &mr_model_part, ModelPart &mr_new_model_part, int number) |
ADDSKINCONDITIONS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA OF THE CONDITIONS BELONGING TO THE OLD MODEL PART, BASICALLY THE SAME AS THE PREVIOUS FUNCTION BUT THERE'S NO NEED TO INTERPOLATE SINCE THE NODES COORDINATES ALREADY EXIST. WE ONLY NEED TO COPY THEM TO THE NEW MODEL PART. More... | |
void | CSR_Row_Matrix_Mod (ModelPart &this_model_part, compressed_matrix< int > &Coord) |
LIST OF SUBROUTINES. More... | |
void | FirstLoop (ModelPart &this_model_part, compressed_matrix< int > &Coord, Variable< double > &variable, double isovalue, int number_of_triangles, vector< int > &Elems_In_Isosurface, float tolerance) |
************************************************************************************************ More... | |
void | FirstLoop (ModelPart &this_model_part, compressed_matrix< int > &Coord, Variable< array_1d< double, 3 > > &variable, double isovalue, int number_of_triangles, vector< int > &Elems_In_Isosurface, float tolerance) |
void | Create_List_Of_New_Nodes_Mod (ModelPart &this_model_part, ModelPart &new_model_part, compressed_matrix< int > &Coord, boost::numeric::ublas::vector< int > &List_New_Nodes, boost::numeric::ublas::vector< array_1d< int, 2 > > &Position_Node) |
************************************************************************************************ More... | |
void | Calculate_Coordinate_And_Insert_New_Nodes_Mod (ModelPart &this_model_part, ModelPart &new_model_part, const boost::numeric::ublas::vector< array_1d< int, 2 > > &Position_Node, const boost::numeric::ublas::vector< int > &List_New_Nodes, Variable< double > &variable, double isovalue, float tolerance) |
************************************************************************************************ More... | |
void | Calculate_Coordinate_And_Insert_New_Nodes_Mod (ModelPart &this_model_part, ModelPart &new_model_part, const boost::numeric::ublas::vector< array_1d< int, 2 > > &Position_Node, const boost::numeric::ublas::vector< int > &List_New_Nodes, Variable< array_1d< double, 3 > > &variable, double isovalue, float tolerance) |
void | GenerateElements (ModelPart &this_model_part, ModelPart &new_model_part, const boost::numeric::ublas::vector< array_1d< int, 4 > > &Position_Node, vector< int > Elems_In_Isosurface, compressed_matrix< int > &Coord, Variable< double > &variable, int surface_number) |
************************************************************************************************ More... | |
void | GenerateElements (ModelPart &this_model_part, ModelPart &new_model_part, const boost::numeric::ublas::vector< array_1d< int, 4 > > &Position_Node, vector< int > Elems_In_Isosurface, compressed_matrix< int > &Coord, Variable< array_1d< double, 3 > > &variable, int surface_number) |
void | UpdateCutData (ModelPart &new_model_part, ModelPart &old_model_part) |
UPDATECUTDATA: THIS FUNCTION UPDATES THE DATA OF THE NEW MODEL PART READING FROM THE DATA OF THE FATHER NODES (and weight factor) More... | |
void | DeleteCutData (ModelPart &new_model_part) |
DELETECUTDATA: THIS FUNCTION DELETES THE MESH FROM THE PREVIOUS TIME STEP. More... | |
CUTTING ISOSURFACE APPLICATION.
The cutting app is used to create cutting isosurfaces in a 3D domain. Despite this can be done in the postprocessing (using Kratos), on large domains the output data would be really large and include info that is not useful for the user. This app creates nodes and conditions (in a new, empty model part)intersecting the domain with as many surfaces as the user want. It is also possible to use different layers. If conditions are triangles, they can be added too to the new model part. After each time step UpdateCutData must be called to save the new info into the new model part, interpolating from the tetraeda elements. After each time step DeleteCutData must also be called to have a clean model part for the next step. NOTE: it only work with tetrahedra elements, generating triangles (1 or 2) from the tetrahedra - plane intersection.
typedef ModelPart::ConditionsContainerType Kratos::Cutting_Isosurface_Application::ConditionsArrayType |
typedef boost::numeric::ublas::vector<Matrix> Kratos::Cutting_Isosurface_Application::Matrix_Order_Tensor |
typedef boost::numeric::ublas::vector<Vector_Order_Tensor> Kratos::Cutting_Isosurface_Application::Node_Vector_Order_Tensor |
typedef Node ::Pointer Kratos::Cutting_Isosurface_Application::PointPointerType |
typedef std::vector<PointType::Pointer> Kratos::Cutting_Isosurface_Application::PointVector |
typedef boost::numeric::ublas::vector<Vector> Kratos::Cutting_Isosurface_Application::Vector_Order_Tensor |
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
inline |
ADDMODELPARTELEMENTS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA BELONGING TO THE OLD MODEL PART.
this function adds the elements to the new_model_part. WARNING: They have to be tetrahedras and it CAN'T be empty, otherwise a segmentation fault will appear
mr_model_part | . original model part |
mr_new_model_part | . destinantion model part |
number | . layer to add the conditions (integer) |
|
inline |
ADDSKINCONDITIONS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA OF THE CONDITIONS BELONGING TO THE OLD MODEL PART, BASICALLY THE SAME AS THE PREVIOUS FUNCTION BUT THERE'S NO NEED TO INTERPOLATE SINCE THE NODES COORDINATES ALREADY EXIST. WE ONLY NEED TO COPY THEM TO THE NEW MODEL PART.
this function adds the skin condition. WARNING: They have to be triangles and it CAN'T be empty, otherwise a segmentation fault will appear
mr_model_part | . original model part |
mr_new_model_part | . destinantion model part |
number | . layer to add the conditions (integer) |
|
inline |
calculating the coordinate of the new nodes
inserting the new node in the model part
|
inline |
************************************************************************************************
calculating the coordinate of the new nodes
inserting the new node in the model part
|
inline |
************************************************************************************************
*WARNING
|
inline |
LIST OF SUBROUTINES.
|
inline |
DELETECUTDATA: THIS FUNCTION DELETES THE MESH FROM THE PREVIOUS TIME STEP.
deletes data
new_model_part | . cut model part |
|
inline |
|
inline |
************************************************************************************************
|
inline |
we enter the element loop
we enter in the if for only one triangle in the tetrahedra
entering now the if for 2 triangles inside the tetrahedra.
|
inline |
************************************************************************************************
we enter the element loop
we enter in the if for only one triangle in the tetrahedra
entering now the if for 2 triangles inside the tetrahedra.
|
inline |
This function Creates cutting isosurfaces by creating nodes and conditions (to define the conectivities) in a different model part. (new_model_part)
each time it is called a new cutting isosurface is created and therefore new nodes and conditions are added to the new model part WARNING: the cutting isosurface MUST cut the domain in at least one triangle, otherwise a segmentiation fault might appear
mr_model_part | . original model part |
mr__new_model_part | . destinantion model part |
variable. | variable to define the isosurface |
isovalue. | value of the variable to define the isosurface |
isosurface_number | . layer to add the conditions (integer) |
tolerance | factor . |
|
inline |
UPDATECUTDATA: THIS FUNCTION UPDATES THE DATA OF THE NEW MODEL PART READING FROM THE DATA OF THE FATHER NODES (and weight factor)
interpolates data form the origin model part into the new model part (containing the cutting planes)
new_model_part | . destination model part |
old_model_part | . origin model part |