20 #ifndef GEOSX_PHYSICSSOLVERS_SIMPLEPDE_LAPLACEFEMKERNELS_HPP_ 21 #define GEOSX_PHYSICSSOLVERS_SIMPLEPDE_LAPLACEFEMKERNELS_HPP_ 51 template<
typename SUBREGION_TYPE,
52 typename CONSTITUTIVE_TYPE,
90 SUBREGION_TYPE
const & elementSubRegion,
91 FE_TYPE
const & finiteElementSpace,
92 CONSTITUTIVE_TYPE *
const inputConstitutiveType,
97 string const & fieldName ):
103 inputConstitutiveType,
108 m_X( nodeManager.referencePosition() ),
110 m_dNdX( elementSubRegion.dNdX() ),
111 m_detJ( elementSubRegion.detJ() )
135 #if !defined(CALC_FEM_SHAPE_IN_KERNEL) 165 #if defined(CALC_FEM_SHAPE_IN_KERNEL) 166 for(
int i=0; i<3; ++i )
168 stack.
xLocal[ a ][ i ] =
m_X[ localNodeIndex ][ i ];
194 stack.
localJacobian[ a ][ b ] += LvArray::tensorOps::AiBi< 3 >( dNdX[a], dNdX[b] ) * detJ;
226 m_matrix.template addToRowBinarySearchUnsorted< parallelDeviceAtomic >( dof,
232 maxForce = fmax( maxForce, fabs( stack.
localResidual[ a ] ) );
260 #endif // GEOSX_PHYSICSSOLVERS_SIMPLEPDE_LAPLACEFEMKERNELS_HPP_ #define GEOSX_HOST_DEVICE
Marks a host-device function.
Kernel variables allocated on the stack.
Define the base interface for implicit finite element kernels.
real64 localResidual[numRows]
C-array storage for the element local residual vector.
Kernel variables allocated on the stack.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data...
arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const m_X
The array containing the nodal position array.
Implements kernels for solving Laplace's equation.
traits::ViewTypeConst< typename SUBREGION_TYPE::NodeMapType::base_type > const m_elemsToNodes
The element to nodes map.
This class serves to provide a "view" of a multidimensional array.
arrayView1d< globalIndex const > const m_dofNumber
The global degree of freedom number.
constexpr INDEX_TYPE_NC numRows() const
globalIndex const m_dofRankOffset
The global rank offset.
double real64
64-bit floating point type.
arrayView2d< real64 const > const m_detJ
The global determinant of the parent/physical Jacobian.
LaplaceFEMKernel(NodeManager const &nodeManager, EdgeManager const &edgeManager, FaceManager const &faceManager, SUBREGION_TYPE const &elementSubRegion, FE_TYPE const &finiteElementSpace, CONSTITUTIVE_TYPE *const inputConstitutiveType, arrayView1d< globalIndex const > const &inputDofNumber, globalIndex const rankOffset, CRSMatrixView< real64, globalIndex const > const &inputMatrix, arrayView1d< real64 > const &inputRhs, string const &fieldName)
Constructor.
globalIndex localColDofIndex[numCols]
C-array storage for the element local column degrees of freedom.
static constexpr int numTestSupportPointsPerElem
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void setup(localIndex const k, StackVariables &stack) const
Copy global values from primary field to a local stack array.
FE_TYPE const & m_finiteElementSpace
static constexpr int numDofPerTestSupportPoint
arrayView1d< real64 const > const m_primaryField
The global primary field array.
This class provides an interface to ObjectManagerBase in order to manage edge data.
real64 primaryField_local[numNodesPerElem]
C-array storage for the element local primary field variable.
#define GEOSX_FORCE_INLINE
Marks a function or lambda for inlining.
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void quadraturePointKernel(localIndex const k, localIndex const q, StackVariables &stack) const
Performs a state update at a quadrature point.
#define GEOSX_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
static constexpr int numDofPerTrialSupportPoint
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE real64 complete(localIndex const k, StackVariables &stack) const
Performs the complete phase for the kernel.
arrayView4d< real64 const > const m_dNdX
The global shape function derivatives array.
CRSMatrixView< real64, globalIndex const > const m_matrix
The global Jacobian matrix.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data...
GEOSX_HOST_DEVICE StackVariables()
Constructor.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
globalIndex localRowDofIndex[numRows]
C-array storage for the element local row degrees of freedom.
arrayView1d< real64 > const m_rhs
The global residaul vector.
real64 localJacobian[numRows][numCols]
C-array storage for the element local Jacobian matrix.
static constexpr int numNodesPerElem
The number of nodes per element.