Advanced Multi-Physics (AMP)
On-Line Documentation
UpdatedLagrangianUtils.h
Go to the documentation of this file.
1
2#ifndef included_AMP_UpdatedLagrangianUtils
3#define included_AMP_UpdatedLagrangianUtils
4
5#include <array>
6#include <vector>
7
9
10bool softEquals( double a, double b );
11
12void polarDecomposeRU( double A[3][3], double R[3][3], double U[3][3] );
13
14void matMatMultiply( double A[3][3], double B[3][3], double C[3][3] );
15
16void matVecMultiply( double A[3][3], double b[3], double c[3] );
17
18void vecVecAddition( double a[3], double b[3], double c[3] );
19
20void matTranspose( double A[3][3], double B[3][3] );
21
22void matInverse( double A[3][3], double B[3][3] );
23
24void matDiagMatMultiply( double P1[3][3], double D[3], double P2[3][3], double A[3][3] );
25
26void matCopy( double A[3][3], double B[3][3] );
27
28void matScale( double A[3][3], double c );
29
30double matTrace( double A[3][3] );
31
32double matDeterminant( double A[3][3] );
33
34void eigenValues( double A[3][3], double val[3] );
35
36void eigenVectors( double A[3][3], double val[3], double vec[3][3] );
37
38void solveEquation( double A[3][3], std::vector<std::array<double, 3>> &sols );
39
40void orthonormalize( std::vector<std::array<double, 3>> &vecs );
41
42void quadraticRoots( double a, double b, double c, double &r1, double &r2 );
43
44void cubicRoots( double a, double b, double c, double d, double &r1, double &r2, double &r3 );
45
46void firstCubicRoot( double a, double b, double c, double d, double &r1 );
47
48/* Utils for pushback and pullforwards */
49void pullbackCorotational( double Q[3][3], double A[3][3], double QtAQ[3][3] );
50
51void pushforwardCorotational( double Q[3][3], double A[3][3], double QAQt[3][3] );
52
53void pushforwardCorotationalStiffness( double Q[3][3], double K[6][6], double QQKQtQt[6][6] );
54
55void matrixOuterProduct( double Qia[3][3], double Qjb[3][3], double Tijab[6][6] ); // T = (QxQ)
56
57void polarDecompositionFeqRU_Simo( double F[3][3],
58 double R[3][3],
59 double U[3][3] ); // Decomposes the deformation gradient F into
60 // rotation R and stretch U (F = RU)
61
62// This function calculates the derivatives of the shape functions with respect to the global x, y
63// and z directions.
64// dNdx, dNdy and dNdz are the output arguments which contains the derivatives of the shape
65// functions.
66// x, y and z contains the nodal coordinates for the current element. These are inputs.
67// xi, eta and zeta are the coordinates of the current gauss point. These are given as input.
68// detJ contains the determinant of the jacobian matrix. It is used in the numerical integration.
69// This is an output.
71 double dNdy[8],
72 double dNdz[8],
73 double x[8],
74 double y[8],
75 double z[8],
76 double xi,
77 double eta,
78 double zeta,
79 double detJ[1] );
80
81// This function calculates values of all the 8 shape functions at a particular gauss/quadrature
82// point.
83// xi, eta and zeta are the coordinates of the current gauss point. These are given as input.
84// N holds the 8 shape functions. It is the output.
85void computeShapeFunctions( double N[8], double xi, double eta, double zeta );
86
87// This function calculates the derivatives of the shape function with respect to the isoparametric
88// coordinates xi, eta
89// and zeta.
90// This is evaluated at each gauss/quadrature point.
92 double dNdxi[8], double dNdeta[8], double dNdzeta[8], double xi, double eta, double zeta );
93
94// This function calculates the matrix J^inverse.
95// G is the output matrix. G = J^inverse.
96// dNdxi, dNdeta and dNdzeta are the local derivatives of the shape functions. These are given as
97// inputs.
98// x, y and z contains the nodal coordinates for the current element. These are inputs.
99// detJ is an output. It contains the determinant of the J matrix. It also signifies the volume of
100// the current element.
101void computeJInverse( double G[3][3],
102 double dNdxi[8],
103 double dNdeta[8],
104 double dNdzeta[8],
105 double x[8],
106 double y[8],
107 double z[8],
108 double detJ[1] );
109
110// This function calculates the symmetric part of the deformation gradient also known as the rate of
111// deformation tensor
112// (d_np1o2).
113// dN_dxnp1o2, dN_dynp1o2 and dN_dznp1o2 are the derivatives of the shape functions with respect to
114// the np1o2
115// configuration.
116// delta_u, delta_v and delta_w are the incremental displacements between n-th and (n+1)-th
117// configuration.
118// num_nodes are the number of nodes in the element.
119void computeGradient( double dN_dxnp1o2[8],
120 double dN_dynp1o2[8],
121 double dN_dznp1o2[8],
122 double delta_u[8],
123 double delta_v[8],
124 double delta_w[8],
125 unsigned int num_nodes,
126 double d_np1o2[3][3] );
127
128// This function is called for converting the jaumann rate to cauchy rate.
129void jaumannToCauchy( double Om[3][3], double Sg[3][3] );
130
131
132} // namespace AMP::Operator::UpdatedLagrangianUtils
133
134#endif
double matDeterminant(double A[3][3])
void pushforwardCorotationalStiffness(double Q[3][3], double K[6][6], double QQKQtQt[6][6])
void matScale(double A[3][3], double c)
void firstCubicRoot(double a, double b, double c, double d, double &r1)
void matTranspose(double A[3][3], double B[3][3])
void computeGradient(double dN_dxnp1o2[8], double dN_dynp1o2[8], double dN_dznp1o2[8], double delta_u[8], double delta_v[8], double delta_w[8], unsigned int num_nodes, double d_np1o2[3][3])
void matVecMultiply(double A[3][3], double b[3], double c[3])
void constructShapeFunctionDerivatives(double dNdx[8], double dNdy[8], double dNdz[8], double x[8], double y[8], double z[8], double xi, double eta, double zeta, double detJ[1])
void pullbackCorotational(double Q[3][3], double A[3][3], double QtAQ[3][3])
void solveEquation(double A[3][3], std::vector< std::array< double, 3 > > &sols)
void matDiagMatMultiply(double P1[3][3], double D[3], double P2[3][3], double A[3][3])
void pushforwardCorotational(double Q[3][3], double A[3][3], double QAQt[3][3])
bool softEquals(double a, double b)
void polarDecomposeRU(double A[3][3], double R[3][3], double U[3][3])
void eigenValues(double A[3][3], double val[3])
void polarDecompositionFeqRU_Simo(double F[3][3], double R[3][3], double U[3][3])
void orthonormalize(std::vector< std::array< double, 3 > > &vecs)
void cubicRoots(double a, double b, double c, double d, double &r1, double &r2, double &r3)
void computeJInverse(double G[3][3], double dNdxi[8], double dNdeta[8], double dNdzeta[8], double x[8], double y[8], double z[8], double detJ[1])
void computeShapeFunctions(double N[8], double xi, double eta, double zeta)
void matrixOuterProduct(double Qia[3][3], double Qjb[3][3], double Tijab[6][6])
void vecVecAddition(double a[3], double b[3], double c[3])
void matMatMultiply(double A[3][3], double B[3][3], double C[3][3])
void eigenVectors(double A[3][3], double val[3], double vec[3][3])
void jaumannToCauchy(double Om[3][3], double Sg[3][3])
void quadraticRoots(double a, double b, double c, double &r1, double &r2)
void matCopy(double A[3][3], double B[3][3])
void computeLocalDerivatives(double dNdxi[8], double dNdeta[8], double dNdzeta[8], double xi, double eta, double zeta)
void matInverse(double A[3][3], double B[3][3])



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page