20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_DIRICHLETFLUXCOMPUTEKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_DIRICHLETFLUXCOMPUTEKERNEL_HPP
31 namespace isothermalCompositionalMultiphaseFVMKernels
44 template<
typename FLUIDWRAPPER,
typename POLICY,
integer NUM_COMP,
integer NUM_DOF = NUM_COMP + 1 >
47 BoundaryStencilWrapper >
57 template<
typename VIEWTYPE >
61 using DofNumberAccessor = AbstractBase::DofNumberAccessor;
72 using AbstractBase::m_gravCoef;
75 using AbstractBase::m_dPhaseCompFrac;
79 using AbstractBase::m_kernelFlags;
87 using Base::m_dPhaseMob;
89 using Base::m_dPhaseMassDens;
91 using Base::m_dPerm_dPres;
117 FLUIDWRAPPER
const & fluidWrapper,
118 DofNumberAccessor
const & dofNumberAccessor,
126 BitFlags< KernelFlags > kernelFlags );
146 real64 transmissibility = 0.0;
190 template<
typename FUNC = NoOpFunc >
194 FUNC && compFluxKernelOp = NoOpFunc{} )
const;
201 template<
typename FUNC = NoOpFunc >
205 FUNC && assemblyKernelOp = NoOpFunc{} )
const;
225 template<
typename POLICY >
250 BitFlags< KernelFlags > kernelFlags,
251 string const & dofKey,
252 string const & solverName,
256 constitutive::MultiFluidBase & fluidBase,
#define GEOS_HOST_DEVICE
Marks a host-device function.
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
A struct to automatically construct and store element view accessors.
A struct to automatically construct and store element view accessors.
static void createAndLaunch(integer const numComps, integer const numPhases, globalIndex const rankOffset, BitFlags< KernelFlags > kernelFlags, string const &dofKey, string const &solverName, FaceManager const &faceManager, ElementRegionManager const &elemManager, BoundaryStencilWrapper const &stencilWrapper, constitutive::MultiFluidBase &fluidBase, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
Create a new kernel and launch.
Define the interface for the assembly kernel in charge of Dirichlet face flux terms.
ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based data. Consists entirely of ArrayView's.
GEOS_HOST_DEVICE void computeFlux(localIndex const iconn, StackVariables &stack, FUNC &&compFluxKernelOp=NoOpFunc{}) const
Compute the local Dirichlet face flux contributions to the residual and Jacobian.
FLUIDWRAPPER const m_fluidWrapper
Reference to the fluid wrapper.
arrayView1d< real64 const > const m_faceGravCoef
View on the face gravity coefficient.
GEOS_HOST_DEVICE void complete(localIndex const iconn, StackVariables &stack, FUNC &&assemblyKernelOp=NoOpFunc{}) const
Performs the complete phase for the kernel.
DirichletFluxComputeKernel(integer const numPhases, globalIndex const rankOffset, FaceManager const &faceManager, BoundaryStencilWrapper const &stencilWrapper, FLUIDWRAPPER const &fluidWrapper, DofNumberAccessor const &dofNumberAccessor, CompFlowAccessors const &compFlowAccessors, MultiFluidAccessors const &multiFluidAccessors, CapPressureAccessors const &capPressureAccessors, PermeabilityAccessors const &permeabilityAccessors, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, BitFlags< KernelFlags > kernelFlags)
Constructor for the kernel interface.
void launchKernel(localIndex const numConnections)
Launch the kernel for a given number of connections.
arrayView1d< real64 const > const m_facePres
Views on face pressure, temperature, and composition.
GEOS_HOST_DEVICE void setup(localIndex const iconn, StackVariables &stack) const
Performs the setup phase for the kernel.
Base class for FluxComputeKernel that holds all data not dependent on template parameters (like stenc...
real64 const m_dt
Time step size.
ElementViewConst< arrayView1d< globalIndex const > > const m_dofNumber
Views on dof numbers.
ElementViewConst< arrayView1d< real64 const > > const m_pres
Views on pressure.
ElementViewConst< arrayView1d< integer const > > const m_ghostRank
Views on ghost rank numbers and gravity coefficients.
arrayView1d< real64 > const m_localRhs
View on the local RHS.
ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac
Views on phase component fractions.
globalIndex const m_rankOffset
Offset for my MPI rank.
CRSMatrixView< real64, globalIndex const > const m_localMatrix
View on the local CRS matrix.
ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const m_dCompFrac_dCompDens
Views on derivatives of comp fractions.
integer const m_numPhases
Number of fluid phases.
Define the interface for the assembly kernel in charge of flux terms.
static constexpr integer numEqn
Compute time value for the number of equations (all of them, except the volume balance equation)
static constexpr integer numComp
Compile time value for the number of components.
ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseMassDens
Views on phase mass densities.
ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const m_phaseMob
Views on phase mobilities.
STENCILWRAPPER::IndexContainerViewConstType const m_seri
Connection to element maps.
static constexpr integer numDof
Compute time value for the number of degrees of freedom.
ElementViewConst< arrayView3d< real64 const > > const m_permeability
Views on permeability.
BoundaryStencilWrapper const m_stencilWrapper
Reference to the stencil wrapper.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
LvArray::CRSMatrixView< T, COL_INDEX, INDEX_TYPE const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
int integer
Signed integer type.
Kernel variables (dof numbers, jacobian and residual) located on the stack.
Kernel variables (dof numbers, jacobian and residual) located on the stack.
real64 dCompFlux_dC[numComp][numComp]
Derivatives of component fluxes wrt component densities.
real64 compFlux[numComp]
Component fluxes.
real64 localFlux[numEqn]
Storage for the face local residual vector.
real64 localFluxJacobian[numEqn][numDof]
Storage for the face local Jacobian matrix.
globalIndex dofColIndices[numDof]
Indices of the matrix rows/columns corresponding to the dofs in this face.
real64 dCompFlux_dP[numComp]
Derivatives of component fluxes wrt pressure.
GEOS_HOST_DEVICE StackVariables(localIndex const GEOS_UNUSED_PARAM(size), localIndex GEOS_UNUSED_PARAM(numElems))
Constructor for the stack variables.