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::DiscontinuousShapeFunctionsUtilities Class Reference

#include <discont_utils.h>

Collaboration diagram for Kratos::DiscontinuousShapeFunctionsUtilities:

Static Public Member Functions

static int CalculateDiscontinuousShapeFunctions (BoundedMatrix< double,(3+1), 3 > &rPoints, BoundedMatrix< double,(3+1), 3 > &DN_DX, array_1d< double,(3+1)> &rDistances, array_1d< double,(3 *(3-1))> &rVolumes, BoundedMatrix< double, 3 *(3-1),(3+1) > &rShapeFunctionValues, array_1d< double,(3 *(3-1))> &rPartitionsSign, std::vector< Matrix > &rGradientsValue, BoundedMatrix< double, 3 *(3-1),(3+1)> &Nenriched, array_1d< double, 6 > &edge_areas)
 
static int CalculateDiscontinuousShapeFunctions (const BoundedMatrix< double,(2+1), 2 > &rPoints, BoundedMatrix< double,(2+1), 2 > &rDN_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+1)> &rNenriched, array_1d< double, 3 > &rEdgeAreas)
 
static int CalculateDiscontinuousShapeFunctionsInLocalAxis (BoundedMatrix< double,(2+1), 2 > &rOriginalPoints, BoundedMatrix< double,(2+1), 2 > &rRotatedPoints, 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+1)> &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 discontinuous shape function for tetrahedra element. The metodology consists in partitioning the tetrahedra in a set of sub-tetrahedra and cacluate the new shape functions using these partitions.

Member Function Documentation

◆ CalculateDiscontinuousShapeFunctions() [1/2]

static int Kratos::DiscontinuousShapeFunctionsUtilities::CalculateDiscontinuousShapeFunctions ( BoundedMatrix< double,(3+1), 3 > &  rPoints,
BoundedMatrix< double,(3+1), 3 > &  DN_DX,
array_1d< double,(3+1)> &  rDistances,
array_1d< double,(3 *(3-1))> &  rVolumes,
BoundedMatrix< double, 3 *(3-1),(3+1) > &  rShapeFunctionValues,
array_1d< double,(3 *(3-1))> &  rPartitionsSign,
std::vector< Matrix > &  rGradientsValue,
BoundedMatrix< double, 3 *(3-1),(3+1)> &  Nenriched,
array_1d< double, 6 > &  edge_areas 
)
inlinestatic

The method to calculate the discontinuous 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"
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)

◆ CalculateDiscontinuousShapeFunctions() [2/2]

static int Kratos::DiscontinuousShapeFunctionsUtilities::CalculateDiscontinuousShapeFunctions ( const BoundedMatrix< double,(2+1), 2 > &  rPoints,
BoundedMatrix< double,(2+1), 2 > &  rDN_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+1)> &  rNenriched,
array_1d< double, 3 > &  rEdgeAreas 
)
inlinestatic

◆ CalculateDiscontinuousShapeFunctionsInLocalAxis()

static int Kratos::DiscontinuousShapeFunctionsUtilities::CalculateDiscontinuousShapeFunctionsInLocalAxis ( BoundedMatrix< double,(2+1), 2 > &  rOriginalPoints,
BoundedMatrix< double,(2+1), 2 > &  rRotatedPoints,
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+1)> &  Nenriched,
BoundedMatrix< double,(2), 2 > &  rRotationMatrix,
BoundedMatrix< double,(2+1), 2 > &  DN_DX_in_local_axis 
)
inlinestatic

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