20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
24 #include "common/GEOS_RAJA_Interface.hpp"
29 namespace singlePhaseBaseKernels
36 template<
typename POLICY >
42 real64 const scalingFactor )
44 RAJA::ReduceSum< ReducePolicy< POLICY >,
integer > numNegativePressures( 0 );
45 RAJA::ReduceMin< ReducePolicy< POLICY >,
real64 > minPres( 0.0 );
49 if( ghostRank[ei] < 0 && dofNumber[ei] >= 0 )
51 localIndex const lid = dofNumber[ei] - rankOffset;
52 real64 const newPres = pres[ei] + scalingFactor * localSolution[lid];
56 numNegativePressures += 1;
57 minPres.min( newPres );
63 return { numNegativePressures.get(), minPres.get() };
#define GEOS_HOST_DEVICE
Marks a host-device function.
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.