22 #include "constitutive/solid/CoupledSolidBase.hpp" 
   23 #include "constitutive/solid/SolidBase.hpp" 
   24 #include "constitutive/solid/SolidFields.hpp" 
   26 #include "constitutive/ConstitutiveManager.hpp" 
   33 namespace surfaceGenerationKernels
 
   42                     constitutive::ConstitutiveManager 
const & constitutiveManager,
 
   43                     string const solidMaterialKey ):
 
   50                                                                                                                      constitutiveManager ) )
 
   52     m_solidMaterialFullIndex.resize( elemManager.
numRegions() );
 
   56       string const & solidMaterialName = region.getSubRegion( 0 ).getReference< 
string >( solidMaterialKey );
 
   57       constitutive::ConstitutiveBase 
const & solid = constitutiveManager.getConstitutiveRelation< constitutive::ConstitutiveBase >( solidMaterialName );
 
   58       m_solidMaterialFullIndex[regionIndex] = solid.getIndexInParent();
 
   63   calculateSingleNodalForce( 
localIndex const er,
 
   67                              real64 ( & force )[ 3 ] )
 const 
   71     localIndex const numQuadraturePoints = m_detJ[er][esr].size( 1 );
 
   74     for( 
localIndex q = 0; q < numQuadraturePoints; ++q )
 
   76       real64 const quadratureStress[6] = LVARRAY_TENSOROPS_INIT_LOCAL_6 ( m_stress[er][esr][m_solidMaterialFullIndex[er]][ei][q] );
 
   77       real64 const dNdX[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( m_dNdX[er][esr][ei][q][targetNode] );
 
   78       surfaceGenerationKernelsHelpers::computeNodalForce( quadratureStress, dNdX, m_detJ[er][esr][ei][q], force );
 
   82     surfaceGenerationKernelsHelpers::scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force );
 
  106                                constitutive::ConstitutiveManager 
const & constitutiveManager,
 
  107                                string const solidMaterialKey,
 
  108                                string const porosityModelKey ):
 
  113     m_porosityMaterialFullIndex.resize( elemManager.
numRegions() );
 
  117       string const & porosityModelName = region.getSubRegion( 0 ).getReference< 
string >( porosityModelKey );
 
  118       constitutive::ConstitutiveBase 
const & porosityModel = constitutiveManager.getConstitutiveRelation< constitutive::ConstitutiveBase >( porosityModelName );
 
  119       m_porosityMaterialFullIndex[regionIndex] = porosityModel.getIndexInParent();
 
  129                              real64 ( & force )[ 3 ] )
 const override 
  134     localIndex const numQuadraturePoints = m_detJ[er][esr].size( 1 );
 
  137     for( 
localIndex q = 0; q < numQuadraturePoints; ++q )
 
  139       real64 totalStress[6] = LVARRAY_TENSOROPS_INIT_LOCAL_6 ( m_stress[er][esr][m_solidMaterialFullIndex[er]][ei][q] );
 
  140       real64 const dNdX[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( m_dNdX[er][esr][ei][q][targetNode] );
 
  142       LvArray::tensorOps::symAddIdentity< 3 >( totalStress, -m_biotCoefficient[er][esr][m_porosityMaterialFullIndex[er]][ei] * m_pressure[er][esr][ei] );
 
  144       surfaceGenerationKernelsHelpers::computeNodalForce( totalStress, dNdX, m_detJ[er][esr][ei][q], force );
 
  148     surfaceGenerationKernelsHelpers::scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force );
 
  161 template< 
typename LAMBDA >
 
  163                      constitutive::ConstitutiveManager 
const & constitutiveManager,
 
  164                      string const solidMaterialKey,
 
  168   if( isPoroelastic == 0 )
 
  170     lambda( NodalForceKernel( elemManager, constitutiveManager, solidMaterialKey ) );
 
  174     string const porosityModelKey = constitutive::CoupledSolidBase::viewKeyStruct::porosityModelNameString();
 
  175     lambda( PoroElasticNodalForceKernel( elemManager, constitutiveManager, solidMaterialKey, porosityModelKey )  );
 
#define GEOS_MARK_FUNCTION
Mark function with both Caliper and NVTX if enabled.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
MaterialViewAccessor< LHS > constructFullMaterialViewAccessor(string const &viewName, constitutive::ConstitutiveManager const &cm) const
This is a const function to construct a MaterialViewAccessor to access the material data.
localIndex numRegions() const
Get number of the regions.
void forElementRegionsComplete(LAMBDA lambda) const
This const function is used to launch kernel function over all the types of element regions.
ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructArrayViewAccessor(string const &name, string const &neighborName=string()) const
This is a function to construct a ElementViewAccessor to access array data registered on the mesh.
array1d< array1d< array1d< VIEWTYPE > > > MaterialViewAccessor
The MaterialViewAccessor at the ElementRegionManager level is a 3D array of VIEWTYPE.
array1d< array1d< VIEWTYPE > > ElementViewAccessor
The ElementViewAccessor at the ElementRegionManager level is an array of array of VIEWTYPE.
ElementViewAccessor< LHS > constructViewAccessor(string const &name, string const &neighborName=string()) const
This is a const function to construct a ElementViewAccessor to access the data registered on the mesh...
void calculateSingleNodalForce(localIndex const er, localIndex const esr, localIndex const ei, localIndex const targetNode, real64(&force)[3]) const override
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
Array< T, 3, PERMUTATION > array3d
Alias for 3D array.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Array< T, 4, PERMUTATION > array4d
Alias for 4D array.
ArrayView< T, 4, USD > arrayView4d
Alias for 4D array view.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
int integer
Signed integer type.
Array< T, 1 > array1d
Alias for 1D array.
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.