20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_SOLUTIONSCALINGANDCHECKINGKERNELBASE_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_SOLUTIONSCALINGANDCHECKINGKERNELBASE_HPP
25 #include "common/GEOS_RAJA_Interface.hpp"
31 namespace isothermalCompositionalMultiphaseBaseKernels
38 template<
typename TYPE >
70 m_compDens( compDens ),
72 m_compDensScalingFactor( compDensScalingFactor )
128 template<
typename POLICY,
typename KERNEL_TYPE >
131 KERNEL_TYPE
const & kernelComponent )
133 RAJA::ReduceMin< ReducePolicy< POLICY >, TYPE > minVal( 1 );
136 if( kernelComponent.ghostRank( ei ) >= 0 )
142 kernelComponent.setup( ei, stack );
143 kernelComponent.compute( ei, stack );
144 minVal.min( stack.localMinVal );
#define GEOS_HOST_DEVICE
Marks a host-device function.
Define the kernel for scaling the solution and check its validity.
arrayView1d< integer const > const m_ghostRank
View on the ghost ranks.
globalIndex const m_rankOffset
Offset for my MPI rank.
arrayView1d< real64 const > const m_localSolution
View on the local residual.
GEOS_HOST_DEVICE integer ghostRank(localIndex const i) const
Getter for the ghost rank.
arrayView1d< real64 > const m_pressureScalingFactor
View on the scaling factors.
arrayView1d< globalIndex const > const m_dofNumber
View on the dof numbers.
GEOS_HOST_DEVICE void setup(localIndex const ei, StackVariables &stack) const
Performs the setup phase for the kernel.
static TYPE launch(localIndex const numElems, KERNEL_TYPE const &kernelComponent)
Performs the kernel launch.
SolutionScalingAndCheckingKernelBase(globalIndex const rankOffset, integer const numComp, string const dofKey, ElementSubRegionBase const &subRegion, arrayView1d< real64 const > const localSolution, arrayView1d< real64 const > const pressure, arrayView2d< real64 const, compflow::USD_COMP > const compDens, arrayView1d< real64 > pressureScalingFactor, arrayView1d< real64 > compDensScalingFactor)
Create a new kernel instance.
arrayView1d< real64 const > const m_pressure
View on the primary variables.
real64 const m_numComp
Number of components.
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).
std::int32_t integer
Signed integer type.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.
Kernel variables located on the stack.
localIndex localRow
Index of the local row corresponding to this element.
TYPE localMinVal
The local value.