27 namespace surfaceGenerationKernelsHelpers
31 inline void computeNodalForce(
real64 const ( &stress) [ 6 ],
32 real64 const ( &dNdX) [ 3 ],
37 force[ 0 ] -= ( stress[ 0 ] * dNdX[ 0 ] +
38 stress[ 5 ] * dNdX[ 1 ] +
39 stress[ 4 ] * dNdX[ 2 ] ) * detJ;
40 force[ 1 ] -= ( stress[ 5 ] * dNdX[ 0 ] +
41 stress[ 1 ] * dNdX[ 1 ] +
42 stress[ 3 ] * dNdX[ 2 ] ) * detJ;
43 force[ 2 ] -= ( stress[ 4 ] * dNdX[ 0 ] +
44 stress[ 3 ] * dNdX[ 1 ] +
45 stress[ 2 ] * dNdX[ 2 ] ) * detJ;
49 inline void scaleNodalForce(
real64 const bulkModulus,
53 real64 const YoungModulus = 9 * bulkModulus * shearModulus / ( 3 * bulkModulus + shearModulus );
54 real64 const poissonRatio = ( 3 * bulkModulus - 2 * shearModulus ) / ( 2 * ( 3 * bulkModulus + shearModulus ) );
56 LvArray::tensorOps::scale< 3 >( force, YoungModulus );
57 LvArray::tensorOps::scale< 3 >( force, 1.0 / (1 - poissonRatio * poissonRatio) );
#define GEOS_HOST_DEVICE
Marks a host-device function.
double real64
64-bit floating point type.