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.
Static Public Member Functions | List of all members
Kratos::EnrichmentUtilities Class Reference

#include <enrichment_utilities.h>

Collaboration diagram for Kratos::EnrichmentUtilities:

Static Public Member Functions

template<class TMatrixType , class TVectorType , class TGradientType >
static int CalculateTetrahedraEnrichedShapeFuncions (TMatrixType const &rPoints, TGradientType const &DN_DX, TVectorType rDistances, TVectorType &rVolumes, TMatrixType &rShapeFunctionValues, TVectorType &rPartitionsSign, std::vector< TMatrixType > &rGradientsValue, TMatrixType &NEnriched, array_1d< double, 6 > &edge_areas)
 
static int CalculateEnrichedShapeFuncions (BoundedMatrix< double, 4, 3 > &rPoints, BoundedMatrix< double, 4, 3 > &DN_DX, array_1d< double, 4 > &rDistances, array_1d< double, 6 > &rVolumes, BoundedMatrix< double, 6, 4 > &rShapeFunctionValues, array_1d< double, 6 > &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 6, 2 > &NEnriched)
 
static int CalculateEnrichedShapeFuncions (BoundedMatrix< double, 3, 2 > &rPoints, BoundedMatrix< double, 3, 2 > &DN_DX, array_1d< double, 3 > &rDistances, array_1d< double, 3 > &rVolumes, BoundedMatrix< double, 3, 3 > &rGPShapeFunctionValues, array_1d< double, 3 > &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 3, 2 > &NEnriched)
 
static int CalculateEnrichedShapeFuncionsExtended (BoundedMatrix< double,(2+1), 2 > &rPoints, BoundedMatrix< double,(2+1), 2 > &DN_DX, array_1d< double,(2+1)> &rDistances, array_1d< double,(3 *(2-1))> &rVolumes, BoundedMatrix< double, 3 *(2-1),(2+1) > &rGPShapeFunctionValues, array_1d< double,(3 *(2-1))> &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 3 *(2-1),(4)> &NEnriched)
 
static int CalculateEnrichedShapeFuncions (BoundedMatrix< double,(2+1), 2 > &rPoints, BoundedMatrix< double,(2+1), 2 > &DN_DX, array_1d< double,(2+1)> &rDistances, array_1d< double,(3 *(2-1))> &rVolumes, BoundedMatrix< double, 3 *(2-1),(2+1) > &rGPShapeFunctionValues, array_1d< double,(3 *(2-1))> &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 3 *(2-1),(2)> &NEnriched, array_1d< double,(3)> &rGPShapeFunctionValues_in_interfase, array_1d< double,(3)> &NEnriched_in_interfase, double &InterfaseArea)
 
static int CalculateEnrichedShapeFuncionsInLocalAxis (BoundedMatrix< double,(2+1), 2 > &rOriginalPoints, BoundedMatrix< double,(2+1), 2 > &DN_DX_original, array_1d< double,(2+1)> &rDistances, array_1d< double,(3 *(2-1))> &rVolumes, BoundedMatrix< double, 3 *(2-1),(2+1) > &rGPShapeFunctionValues, array_1d< double,(3 *(2-1))> &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 3 *(2-1),(2)> &NEnriched, BoundedMatrix< double,(2), 2 > &rRotationMatrix, BoundedMatrix< double,(2+1), 2 > &DN_DX_in_local_axis)
 

Detailed Description

This utility can be used to calculate the enriched shape function for tetrahedra element. The metodology consists in partitioning the tetrahedra in a set of sub-tetrahedra and cacluate the enrichment information using these partitions.

Member Function Documentation

◆ CalculateEnrichedShapeFuncions() [1/3]

static int Kratos::EnrichmentUtilities::CalculateEnrichedShapeFuncions ( BoundedMatrix< double, 3, 2 > &  rPoints,
BoundedMatrix< double, 3, 2 > &  DN_DX,
array_1d< double, 3 > &  rDistances,
array_1d< double, 3 > &  rVolumes,
BoundedMatrix< double, 3, 3 > &  rGPShapeFunctionValues,
array_1d< double, 3 > &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 3, 2 > &  NEnriched 
)
inlinestatic

◆ CalculateEnrichedShapeFuncions() [2/3]

static int Kratos::EnrichmentUtilities::CalculateEnrichedShapeFuncions ( BoundedMatrix< double, 4, 3 > &  rPoints,
BoundedMatrix< double, 4, 3 > &  DN_DX,
array_1d< double, 4 > &  rDistances,
array_1d< double, 6 > &  rVolumes,
BoundedMatrix< double, 6, 4 > &  rShapeFunctionValues,
array_1d< double, 6 > &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 6, 2 > &  NEnriched 
)
inlinestatic

The method to calculate 2 ernrichment shape functions for given tetrahedra. the first one is the gradient, just like the previous function, and the second is a jump. another difference with the previous function is that fixed size arrays and matrices are used if possible.

Parameters
rPointsA 4x3 matrix where row i has the coordinates of node i.
DN_DXThe gradient of the shape functions Ni respect to the reference coordinates
rDistancesis an input vector of 4 size which holds relative distance (not need to be exact) for each node. it is used internally to mark the position of the zero level
rVolumesResult vector with size 6 (maximumn number of partitions) holding the volume of each partition
rShapeFunctionValuesResult 6x4 matrix where each row represents a partition and holds the shape functions N1 to N4 of the original tetrahedra evaluated in the gauss point (center) of the partition. so that it is N(gauss_index, node_index)
rPartitionsSignA result vector of 6 holding the sign of the distance for the partition. The value -1 represents the negative distance sign, 1 represents positive distance and 0 stands for not used partition
rGradientsValueRestult vector of size 6 holding the gradient of the enriched shape funcitons for each volume. Each element of vector is a 2x3 matrix representing the gradients of enriched shape functions. The row indicates enrichemnt function and the colum the direction of the gradient
Nenrichedis a Matrix of size 6x2 that contains for every gauss point the values of the enriched shape functions at the position of the gauss point so that Nenriched(1,0) contains the value of the enriched shape function "0" at the gauss point "1"
Returns
number of partitions created which can be from 1 to 6. 1 holds for only 1 partition which is the original element. (No partitioning needed)

◆ CalculateEnrichedShapeFuncions() [3/3]

static int Kratos::EnrichmentUtilities::CalculateEnrichedShapeFuncions ( BoundedMatrix< double,(2+1), 2 > &  rPoints,
BoundedMatrix< double,(2+1), 2 > &  DN_DX,
array_1d< double,(2+1)> &  rDistances,
array_1d< double,(3 *(2-1))> &  rVolumes,
BoundedMatrix< double, 3 *(2-1),(2+1) > &  rGPShapeFunctionValues,
array_1d< double,(3 *(2-1))> &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 3 *(2-1),(2)> &  NEnriched,
array_1d< double,(3)> &  rGPShapeFunctionValues_in_interfase,
array_1d< double,(3)> &  NEnriched_in_interfase,
double InterfaseArea 
)
inlinestatic

◆ CalculateEnrichedShapeFuncionsExtended()

static int Kratos::EnrichmentUtilities::CalculateEnrichedShapeFuncionsExtended ( BoundedMatrix< double,(2+1), 2 > &  rPoints,
BoundedMatrix< double,(2+1), 2 > &  DN_DX,
array_1d< double,(2+1)> &  rDistances,
array_1d< double,(3 *(2-1))> &  rVolumes,
BoundedMatrix< double, 3 *(2-1),(2+1) > &  rGPShapeFunctionValues,
array_1d< double,(3 *(2-1))> &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 3 *(2-1),(4)> &  NEnriched 
)
inlinestatic

◆ CalculateEnrichedShapeFuncionsInLocalAxis()

static int Kratos::EnrichmentUtilities::CalculateEnrichedShapeFuncionsInLocalAxis ( BoundedMatrix< double,(2+1), 2 > &  rOriginalPoints,
BoundedMatrix< double,(2+1), 2 > &  DN_DX_original,
array_1d< double,(2+1)> &  rDistances,
array_1d< double,(3 *(2-1))> &  rVolumes,
BoundedMatrix< double, 3 *(2-1),(2+1) > &  rGPShapeFunctionValues,
array_1d< double,(3 *(2-1))> &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 3 *(2-1),(2)> &  NEnriched,
BoundedMatrix< double,(2), 2 > &  rRotationMatrix,
BoundedMatrix< double,(2+1), 2 > &  DN_DX_in_local_axis 
)
inlinestatic

◆ CalculateTetrahedraEnrichedShapeFuncions()

template<class TMatrixType , class TVectorType , class TGradientType >
static int Kratos::EnrichmentUtilities::CalculateTetrahedraEnrichedShapeFuncions ( TMatrixType const &  rPoints,
TGradientType const &  DN_DX,
TVectorType  rDistances,
TVectorType &  rVolumes,
TMatrixType &  rShapeFunctionValues,
TVectorType &  rPartitionsSign,
std::vector< TMatrixType > &  rGradientsValue,
TMatrixType &  NEnriched,
array_1d< double, 6 > &  edge_areas 
)
inlinestatic

The method to calculate the ernriched shape functions for given tetrahedra.

Parameters
rPointsA 4x3 matrix where row i has the coordinates of node i.
DN_DXThe gradient of the shape functions Ni respect to the reference coordinates
rDistancesis an input vector of 4 size which holds relative distance (not need to be exact) for each node. it is used internally to mark the position of the zero level
rVolumesResult vector with size 6 (maximumn number of partitions) holding the volume of each partition
rShapeFunctionValuesResult 6x4 matrix where each row represents a partition and holds the shape functions N1 to N4 of the original tetrahedra evaluated in the gauss point (center) of the partition. so that it is N(gauss_index, node_index)
rPartitionsSignA result vector of 6 holding the sign of the distance for the partition. The value -1 represents the negative distance sign, 1 represents positive distance and 0 stands for not used partition
rGradientsValueRestult vector of size 6 holding the gradient of the enriched shape funciton for each volume. Each element of vector is a 1x3 matrix representing the gradient of enriched shape function. The use of matrix is for possible future improvement.
Nenrichedis a Matrix that contains for every gauss point the values of the enriched shape functions at the position of the gauss point so that Nenriched(1,0) contains the value of the enriched shape function "0" at the gauss point "1"
edge_areasan array of size 6 containing a positive double value for each edge. This value is zero if the edge is not cut, it corresponds to the area of the cut surface associtated to the edge otherwise
Returns
number of partitions created which can be from 1 to 6. 1 holds for only 1 partition which is the original element. (No partitioning needed)

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