dynLattice
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Line3D Class Reference

Shape function for 1D line elements in 3D space. More...

#include "Line3D.h"

Inheritance diagram for Line3D:
Inheritance graph
[legend]
Collaboration diagram for Line3D:
Collaboration graph
[legend]

Public Member Functions

 Line3D (const String &name, const Properties &conf, const Properties &props)
 Constructs a new Line3D shape object.
 
idx_t globalRank () const override
 Get the global rank (spatial dimension).
 
idx_t localRank () const override
 Get the local rank of the line element.
 
idx_t nodeCount () const override
 Get the number of nodes in the line element.
 
idx_t vertexCount () const override
 Get the number of vertices in the line element.
 
idx_t ipointCount () const override
 Get the number of integration points.
 
idx_t shapeFuncCount () const override
 Get the number of shape functions.
 
Matrix getVertexCoords () const override
 Get the local coordinates of the vertices.
 
Matrix getIntegrationScheme () const override
 Get the integration scheme.
 
bool containsLocalPoint (const Vector &u) const override
 Check whether a local point is inside the element.
 
void getIntegrationWeights (const Vector &w, const Matrix &c) const override
 Compute integration weights for numerical integration.
 
Matrix getVertexFunctions () const override
 Get shape function values at the integration points.
 
Matrix getShapeFunctions () const override
 Get shape function values at the integration points.
 
void getGlobalPoint (const Vector &x, const Vector &u, const Matrix &c) const override
 Transform local coordinates to global coordinates.
 
void getShapeGradients (const Matrix &g, const Vector &w, const Matrix &c) const
 get the gradients of the shape functions at the integration points
 
void getRotations (const Cubix &Ri, const Cubix &Rn) const
 return the rotations at the integration points
 
void getXi (const Quadix &Xi, const Vector &w, const Matrix &u, const Matrix &c) const
 Get the Xi at the integration points.
 
void getXi (const Quadix &Xi, const Matrix &grads, const Matrix &phiP) const
 Xi from precomputed shape gradients and tangent (allocation free)
 
void getPsi (const Quadix &Psi, const Vector &w, const Matrix &c) const
 Get the Psi at the integration points.
 
void getPi (const Cubix &Pi, const Cubix &Ri, const Cubix &Rn) const
 Get the Pi at the integration points.
 
void getPi (const Cubix &Pi, const Cubix &Rn) const
 Get the Pi at the integration points.
 
void getRotationGradients (const Cubix &LambdaP, const Vector &w, const Matrix &c, const Cubix &nodeLambda) const
 Get the rotation gradients at the integration points from the rotations (Crisfield/Jelenic)
 
void getRotationsAndGradients (const Cubix &Ri, const Cubix &LambdaP, const Matrix &grads, const Cubix &nodeLambda) const
 Get the rotations and the rotation gradients at the integration points using one evaluation of the node rotation vectors.
 
void evalShapeFunctions (const Vector &h, const Vector &u) const override
 Evaluate shape functions at given local coordinates.
 
void evalShapeGradients (const Vector &h, const Vector &g, const Vector &u) const
 Evaluate shape functions and their gradients at local coordinates.
 
void evalShapeGradGrads (const Vector &h, const Vector &g, const Vector &gg, const Vector &u) const
 Evaluate shape functions, gradients, and second derivatives.
 

Static Public Attributes

static const String PROP_NODES = "numPoints"
 Property name for number of nodes.
 
static const String PROP_INT = "intScheme"
 Property name for integration scheme.
 
static const String PROP_LOCAL
 Property name for local coordinates.
 
static const idx_t GLOB_RANK = 3
 Global rank (always 3 for 3D space)
 

Protected Attributes

jem::Ref< ParametricLine > intLine_
 internal line element for some standard functions
 
Matrix nodePsi_
 relative rotation vectors of the nodes, 3 x nodeCount
 
Matrix lambdaR_
 reference rotation, 3 x 3
 
Matrix ipPsi_
 rotation vectors at the integration points, 3 x ipointCount
 
MatmulChain< double, 2 > matmul_
 matrix products without allocations
 
Matrix relRot_
 relative rotation, 3 x 3
 
Matrix skewP_
 skew symmetric matrix of the tangent, 3 x 3
 
Vector phiIJ_
 relative rotation vector between the reference nodes
 
Memo of the last getShapeGradients() call

The gradients only depend on the node coordinates, and the same coordinates are requested several times in a row (strains, Xi, rotation gradients of one element). A hit needs bit-identical coordinates, so the results are exactly those of a fresh evaluation. Not thread safe.

bool gradMemoValid_ = false
 
Matrix gradMemoCoords_
 
Matrix gradMemoGrads_
 
Vector gradMemoWeights_
 

Detailed Description

Provides shape functions and geometric operations for line elements embedded in 3D space. Supports 2, 3, and 4-node line elements with configurable integration schemes and rotational control functions.

Supported Elements

Author
Til Gärtner
See also
Line Shapes

Constructor & Destructor Documentation

◆ Line3D()

Line3D::Line3D ( const String &  name,
const Properties &  conf,
const Properties &  props 
)
explicit
Parameters
[in]nameShape instance name for identification
[out]confConfiguration properties container for output
[in]propsInput properties containing shape parameters
Exceptions
jem::IllegalInputExceptionif unsupported number of nodes is specified

Member Function Documentation

◆ containsLocalPoint()

bool Line3D::containsLocalPoint ( const Vector &  u) const
inlineoverride
Parameters
[in]uLocal coordinate vector
Returns
Whether the point is contained in the element

◆ evalShapeFunctions()

void Line3D::evalShapeFunctions ( const Vector &  h,
const Vector &  u 
) const
inlineoverride
Parameters
[out]hShape function value vector
[in]uLocal coordinate vector

◆ evalShapeGradGrads()

void Line3D::evalShapeGradGrads ( const Vector &  h,
const Vector &  g,
const Vector &  gg,
const Vector &  u 
) const
inline
Parameters
[out]hShape function value vector
[out]gShape function gradient vector
[out]ggShape function second derivative vector
[in]uLocal coordinate vector

◆ evalShapeGradients()

void Line3D::evalShapeGradients ( const Vector &  h,
const Vector &  g,
const Vector &  u 
) const
inline
Parameters
[out]hShape function value vector
[out]gShape function gradient vector
[in]uLocal coordinate vector

◆ getGlobalPoint()

void Line3D::getGlobalPoint ( const Vector &  x,
const Vector &  u,
const Matrix &  c 
) const
override
Parameters
[out]xGlobal coordinate vector
[in]uLocal coordinate vector
[in]cCoordinates of the nodes, c(i,j) is the i-th coordinate of the j-th node

◆ getIntegrationScheme()

Matrix Line3D::getIntegrationScheme ( ) const
inlineoverride
Returns
Matrix describing the integration scheme

◆ getIntegrationWeights()

void Line3D::getIntegrationWeights ( const Vector &  w,
const Matrix &  c 
) const
override
Parameters
[out]wIntegration weights at the integration points
[in]cNode coordinates matrix, c(i,j) is the i-th coordinate of the j-th node

◆ getPi() [1/2]

void Line3D::getPi ( const Cubix &  Pi,
const Cubix &  Ri,
const Cubix &  Rn 
) const
Parameters
[out]Pi6 x 6 Pi(.,.,i) where i are the integration points
[out]Ri3 x 3 Ri(.,.,i) rotation at the i-th integration point
[in]Rnnodal rotations, Rn(.,.,i) is the 3 x 3 rotation matrix at the i-th node

◆ getPi() [2/2]

void Line3D::getPi ( const Cubix &  Pi,
const Cubix &  Rn 
) const
Parameters
[out]Pi6 x 6 Pi(.,.,i) where i are the integration points
[in]Rnnodal rotations, Rn(.,.,i) is the 3 x 3 rotation matrix at the i-th node

◆ getPsi()

void Line3D::getPsi ( const Quadix &  Psi,
const Vector &  w,
const Matrix &  c 
) const
Parameters
[out]Psi6 x 9 Psi(.,.,j,i), where j are the nodes and i are the integration points
[out]wweights of the integration points
[in]ccoordinates of the nodes, c(i,j) is the i-th coordinate of the j-th node

◆ getRotationGradients()

void Line3D::getRotationGradients ( const Cubix &  LambdaP,
const Vector &  w,
const Matrix &  c,
const Cubix &  nodeLambda 
) const
Parameters
[out]LambdaP3 x 3 curvature at the integration points, LambdaP(.,.,i) is the gradient at the i-th point
[out]wintegration weights
[in]ccoordinates of the nodes, c(i,j) is the i-th coordinate of the j-th node
[in]nodeLambdanodal rotations, nodeLambda(.,.,i) is the 3 x 3 rotation matrix at the i-th node

◆ getRotations()

void Line3D::getRotations ( const Cubix &  Ri,
const Cubix &  Rn 
) const
Parameters
[out]Ri3 x 3 Ri(.,.,i) rotational matrix at the i-th integration point
[in]Rnnodal rotations, Rn(.,.,i) is the 3 x 3 rotation matrix at the i-th node

◆ getRotationsAndGradients()

void Line3D::getRotationsAndGradients ( const Cubix &  Ri,
const Cubix &  LambdaP,
const Matrix &  grads,
const Cubix &  nodeLambda 
) const
Parameters
[out]Ri3 x 3 Ri(.,.,i) rotation at the i-th integration point (Pi = diag(Ri, Ri), see getPi)
[out]LambdaP3 x 3 curvature at the integration points, LambdaP(.,.,i) is the gradient at the i-th point
[in]gradsshape gradients, shapeFuncCount x ipointCount (see getShapeGradients)
[in]nodeLambdanodal rotations, nodeLambda(.,.,i) is the 3 x 3 rotation matrix at the i-th node

◆ getShapeFunctions()

Matrix Line3D::getShapeFunctions ( ) const
inlineoverride
Returns
Matrix of shape function values

◆ getShapeGradients()

void Line3D::getShapeGradients ( const Matrix &  g,
const Vector &  w,
const Matrix &  c 
) const
Parameters
[out]ggradient of the shape functions at the integration points g(i,j) i-th shape function at the j-th int point
[out]wweights of the integration points
[in]ccoordinates of the nodes, c(i,j) is the i-th coordinate of the j-th node

◆ getVertexCoords()

Matrix Line3D::getVertexCoords ( ) const
inlineoverride
Returns
Matrix of vertex coordinates

◆ getVertexFunctions()

Matrix Line3D::getVertexFunctions ( ) const
inlineoverride

Get the vertex shape function values at the integration points.

Returns
Matrix of shape function values

◆ getXi() [1/2]

void Line3D::getXi ( const Quadix &  Xi,
const Matrix &  grads,
const Matrix &  phiP 
) const
Parameters
[out]XiXi matrices, 6 x 6 x nodeCount x ipointCount
[in]gradsShape gradients, shapeFuncCount x ipointCount
[in]phiPTangent of the deformed line at the integration points, 3 x ipointCount

◆ getXi() [2/2]

void Line3D::getXi ( const Quadix &  Xi,
const Vector &  w,
const Matrix &  u,
const Matrix &  c 
) const
Parameters
[out]Xi6 x 6 Xi(.,.,j,i), where j are the nodes and i are the integration points
[out]wweights of the integration points
[in]udisplacements of the nodes, u(i,j) is the i-th displacement of the j-th node
[in]ccoordinates of the nodes, c(i,j) is the i-th coordinate of the j-th node

◆ globalRank()

idx_t Line3D::globalRank ( ) const
inlineoverride
Returns
Global rank (always 3 for 3D space)
Global rank

◆ ipointCount()

idx_t Line3D::ipointCount ( ) const
inlineoverride
Returns
Number of integration points

◆ localRank()

idx_t Line3D::localRank ( ) const
inlineoverride
Returns
Local coordinate dimension

◆ nodeCount()

idx_t Line3D::nodeCount ( ) const
inlineoverride
Returns
Number of nodes

◆ shapeFuncCount()

idx_t Line3D::shapeFuncCount ( ) const
inlineoverride
Returns
Number of shape functions

◆ vertexCount()

idx_t Line3D::vertexCount ( ) const
inlineoverride
Returns
Number of vertices

Member Data Documentation

◆ GLOB_RANK

const idx_t Line3D::GLOB_RANK = 3
static

◆ gradMemoCoords_

Matrix Line3D::gradMemoCoords_
mutableprotected

◆ gradMemoGrads_

Matrix Line3D::gradMemoGrads_
mutableprotected

◆ gradMemoValid_

bool Line3D::gradMemoValid_ = false
mutableprotected

◆ gradMemoWeights_

Vector Line3D::gradMemoWeights_
mutableprotected

◆ intLine_

jem::Ref<ParametricLine> Line3D::intLine_
protected

◆ ipPsi_

Matrix Line3D::ipPsi_
mutableprotected

◆ lambdaR_

Matrix Line3D::lambdaR_
mutableprotected

◆ matmul_

MatmulChain<double, 2> Line3D::matmul_
mutableprotected

◆ nodePsi_

Matrix Line3D::nodePsi_
mutableprotected

◆ phiIJ_

Vector Line3D::phiIJ_
mutableprotected

◆ PROP_INT

const String Line3D::PROP_INT = "intScheme"
static

◆ PROP_LOCAL

const String Line3D::PROP_LOCAL
static

◆ PROP_NODES

const String Line3D::PROP_NODES = "numPoints"
static

◆ relRot_

Matrix Line3D::relRot_
mutableprotected

◆ skewP_

Matrix Line3D::skewP_
mutableprotected