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

#include <enrichment_utilities_duplicate_dofs.h>

Collaboration diagram for Kratos::EnrichmentUtilitiesDuplicateDofs:

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)
 

Detailed Description

This function implements the calculation of enrichment functions, where the position of the discontinuity is prescribed by giving a level set function prescribing the distance the enrichmenet surface. WARNING: the function works only for simplicial elements (Triangles and tetrahedras) TODO: only implemented for Tetrahedras so far

The essential idea is that the element is divided by the level set functions into 2 parts one + and the other - let's suppose for a moment that nodes 1 and 2 (in local numeration) lay on the negative side and nodes 3,4 on the positive side if N1, N2, N3, N4 are the shape functions "centered" in the node with corresponding id, the enrichment shape functions are defined as follows:

POSITIVE SIDE N1enriched = N1, N2enriched = N2, N3enriched=0, N4enriched=0

NEGATIVE SIDE N1enriched = 0, N2enriched = 0, N3enriched=N3, N4enriched=N4

the combination of the original element shape functions and of thos enrichements can model a discontinuity and a discontinuity of the gradient of the function to be enriched.

WARNING: difficulties can be expected if the division prescribed passes exactly in one node or if one of the two sides has a volume approximately 0. In this case the definition above works correctly but the use of the enrichment shape functions requires some care

Member Function Documentation

◆ CalculateTetrahedraEnrichedShapeFuncions()

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

The method to calculate the ernriched shape functions for given tetrahedra. 4 ENRICHED SHAPE FUNCTIONS ARE GENERATED!!

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 4*3 matrix representing the gradient of enriched shape functions. 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)

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