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 UTILITY. More...
#include <cutting_utility.h>
Public Types | |
Type Definitions | |
typedef ModelPart::NodesContainerType | NodesArrayType |
typedef ModelPart::ElementsContainerType | ElementsArrayType |
typedef ModelPart::ConditionsContainerType | ConditionsArrayType |
typedef DenseVector< Matrix > | Matrix_Order_Tensor |
typedef DenseVector< Vector > | Vector_Order_Tensor |
typedef DenseVector< Vector_Order_Tensor > | Node_Vector_Order_Tensor |
typedef Node | PointType |
typedef Node ::Pointer | PointPointerType |
typedef std::vector< PointType::Pointer > | PointVector |
typedef PointVector::iterator | PointIterator |
Life Cycle | |
CuttingUtility () | |
Default constructor. More... | |
virtual | ~CuttingUtility () |
Destructor. More... | |
void | FindSmallestEdge (ModelPart &mr_model_part) |
This function Creates cutting planes by creating nodes and conditions (to define the conectivities) in a different model part. More... | |
void | GenerateCut (ModelPart &mr_model_part, ModelPart &mr_new_model_part, const array_1d< double, 3 > &versor, const array_1d< double, 3 > &Xp, int plane_number, double tolerance_factor) |
This function Creates cutting planes by creating nodes and conditions (to define the conectivities) in a different model part. (new_model_part) More... | |
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, 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 | AddVariablesToCutModelPart (const ModelPart &rModelPart, ModelPart &rNewModelPart) const |
Initialize the solution step data container for the cut model part. More... | |
void | CSR_Row_Matrix_Mod (ModelPart &this_model_part, boost::numeric::ublas::compressed_matrix< int > &Coord) |
void | FirstLoop (ModelPart &this_model_part, boost::numeric::ublas::compressed_matrix< int > &Coord, const array_1d< double, 3 > &versor, const array_1d< double, 3 > &Xp, int number_of_triangles, DenseVector< int > &Elems_In_Plane, double tolerance) |
void | Create_List_Of_New_Nodes_Mod (ModelPart &this_model_part, ModelPart &new_model_part, boost::numeric::ublas::compressed_matrix< int > &Coord, DenseVector< int > &List_New_Nodes, DenseVector< array_1d< int, 2 > > &Position_Node) |
************************************************************************************************ More... | |
void | Calculate_Coordinate_And_Insert_New_Nodes_Mod (ModelPart &this_model_part, ModelPart &new_model_part, const DenseVector< array_1d< int, 2 > > &Position_Node, const DenseVector< int > &List_New_Nodes, const array_1d< double, 3 > &versor, const array_1d< double, 3 > &Xp, double tolerance) |
************************************************************************************************ More... | |
void | GenerateElements (ModelPart &this_model_part, ModelPart &new_model_part, DenseVector< int > Elems_In_Plane, boost::numeric::ublas::compressed_matrix< int > &Coord, const array_1d< double, 3 > &versor, int plane_number) |
********************************************************************************** More... | |
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... | |
CUTTING UTILITY.
The cutting utility is used to create cutting planes 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 planes 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 NOTE: it only work with tetraedra elements, generating triangles (1 or 2) from the tetraedra - plane intersection.
typedef PointVector::iterator Kratos::CuttingUtility::PointIterator |
typedef Node ::Pointer Kratos::CuttingUtility::PointPointerType |
typedef std::vector<PointType::Pointer> Kratos::CuttingUtility::PointVector |
|
inline |
Default constructor.
|
inlinevirtual |
Destructor.
|
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 condtion. 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 |
plane_number | . layer to add the conditions (integer) |
|
inline |
Initialize the solution step data container for the cut model part.
Please call this function before either GenerateCut or AddSkinCondition.
rModelPart | the reference (problem) model part. |
rNewModelPart | the new model part, where cut data will be stored. |
|
inline |
************************************************************************************************
calculating the coordinate of the new nodes
inserting the new node in the model part
|
inline |
************************************************************************************************
*WARNING
|
inline |
|
inline |
This function Creates cutting planes by creating nodes and conditions (to define the conectivities) in a different model part.
It is used to find the smallest edge that will be used later as a reference to identify whether a node is part of the plane or is simple close (and therefore a new point will be created by interpolation)
mr_model_part | . model part to find the smallest edge |
|
inline |
|
inline |
This function Creates cutting planes 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 plane is created and therefore new nodes and conditions are added to the new model part WARNING: the cutting plane 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 |
versor. | unit vector perpendicular to the plane |
Xp. | a point that is part of the plane |
plane_number | . layer to add the conditions (integer) |
tolerance | factor . if find_smallest edge has been called, then it is the tolerance relative to that edge, in this case it should be 0.5>factor>0. high values will generate less triangles but the result will not be a perfect plane. on the other hand small values will generate a perfect plane but with lots of ugly triangles. If findsmallestedge has noot been run, it absolute tolerance. |
|
inline |
**********************************************************************************
we enter the element loop
we eter in the if for only one triangle in the tetraedra
entering now the if for 2 triangles inside the tetraedra.
|
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 |