20 #ifndef GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_KERNELS_EXPLICITFINITESTRAIN_IMPL_HPP_
21 #define GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_KERNELS_EXPLICITFINITESTRAIN_IMPL_HPP_
23 #include "constitutive/solid/SolidUtilities.hpp"
25 #include "ExplicitSmallStrain_impl.hpp"
26 #include "finiteElement/Kinematics.h"
31 namespace solidMechanicsLagrangianFEMKernels
34 template<
typename SUBREGION_TYPE,
35 typename CONSTITUTIVE_TYPE,
41 SUBREGION_TYPE
const & elementSubRegion,
42 FE_TYPE
const & finiteElementSpace,
43 CONSTITUTIVE_TYPE & inputConstitutiveType,
45 string const elementListName ):
52 inputConstitutiveType,
57 template<
typename SUBREGION_TYPE,
58 typename CONSTITUTIVE_TYPE,
67 localIndex const nodeIndex = m_elemsToNodes( k, a );
68 for(
int i=0; i<numDofPerTrialSupportPoint; ++i )
70 #if defined(CALC_FEM_SHAPE_IN_KERNEL)
71 stack.
xLocal[ a ][ i ] = m_X[ nodeIndex ][ i ];
73 stack.
uLocal[ a ][ i ] = m_u[ nodeIndex ][ i ];
74 stack.
varLocal[ a ][ i ] = m_vel[ nodeIndex ][ i ];
79 template<
typename SUBREGION_TYPE,
80 typename CONSTITUTIVE_TYPE,
88 real64 dNdX[ numNodesPerElem ][ 3 ];
89 real64 const detJ = m_finiteElementSpace.template getGradN< FE_TYPE >( k, q, stack.
xLocal, dNdX );
91 real64 dUhatdX[3][3] = { {0} };
92 real64 dUdX[3][3] = { {0} };
94 real64 Ldt[3][3] = { {0} };
95 real64 fInv[3][3] = { {0} };
97 FE_TYPE::gradient( dNdX, stack.
varLocal, dUhatdX );
98 FE_TYPE::gradient( dNdX, stack.
uLocal, dUdX );
100 LvArray::tensorOps::scale< 3, 3 >( dUhatdX, m_dt );
103 LvArray::tensorOps::scaledCopy< 3, 3 >( F, dUhatdX, 0.5 );
104 LvArray::tensorOps::add< 3, 3 >( F, dUdX );
105 LvArray::tensorOps::addIdentity< 3 >( F, 1.0 );
106 LvArray::tensorOps::invert< 3 >( fInv, F );
109 LvArray::tensorOps::Rij_eq_AikBkj< 3, 3, 3 >( Ldt, dUhatdX, fInv );
112 LvArray::tensorOps::copy< 3, 3 >( F, dUhatdX );
113 LvArray::tensorOps::add< 3, 3 >( F, dUdX );
114 LvArray::tensorOps::addIdentity< 3 >( F, 1.0 );
115 real64 const detF = LvArray::tensorOps::invert< 3 >( fInv, F );
119 HughesWinget( Rot, Dadt, Ldt );
122 constitutive::SolidUtilities::
123 hypoUpdate_StressOnly( m_constitutiveUpdate,
124 k, q, m_dt, Dadt, Rot, stress );
127 LvArray::tensorOps::Rij_eq_symAikBjk< 3 >( P, stress, fInv );
128 LvArray::tensorOps::scale< 3, 3 >( P, -detJ * detF );
130 FE_TYPE::plusGradNajAij( dNdX, P, stack.
fLocal );
134 template<
typename SUBREGION_TYPE,
135 typename CONSTITUTIVE_TYPE,
137 template<
typename POLICY,
138 typename KERNEL_TYPE >
141 KERNEL_TYPE
const & kernelComponent )
143 return Base::template kernelLaunch< POLICY, KERNEL_TYPE >( numElems, kernelComponent );
#define GEOS_HOST_DEVICE
Marks a host-device function.
This class provides an interface to ObjectManagerBase in order to manage edge data.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
GEOS_HOST_DEVICE void quadraturePointKernel(localIndex const k, localIndex const q, StackVariables &stack) const
Performs a state update at a quadrature point.
ExplicitFiniteStrain(NodeManager &nodeManager, EdgeManager const &edgeManager, FaceManager const &faceManager, localIndex const targetRegionIndex, SUBREGION_TYPE const &elementSubRegion, FE_TYPE const &finiteElementSpace, CONSTITUTIVE_TYPE &inputConstitutiveType, real64 const dt, string const elementListName)
Constructor.
GEOS_HOST_DEVICE void setup(localIndex const k, StackVariables &stack) const
Performs the setup phase for the kernel.
static real64 kernelLaunch(localIndex const numElems, KERNEL_TYPE const &kernelComponent)
Kernel Launcher.
Implements kernels for solving the equations of motion using the explicit Newmark method under the sm...
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Kernel variables allocated on the stack.
real64 uLocal[numNodesPerElem][numDofPerTrialSupportPoint]
Local stack storage for nodal displacements.
real64 varLocal[numNodesPerElem][numDofPerTestSupportPoint]
C-array stack storage for element local primary variable values.
real64 fLocal[numNodesPerElem][numDofPerTrialSupportPoint]
C-array stack storage for the element local force.