20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
24 #include "common/GEOS_RAJA_Interface.hpp"
30 namespace singlePhaseBaseKernels
43 template<
typename POLICY >
49 real64 const scalingFactor,
52 using reducePolicy = ReducePolicy< POLICY >;
53 using atomicPolicy = AtomicPolicy< POLICY >;
54 RAJA::ReduceMin< reducePolicy, real64 > minNegPres( 0.0 );
58 if( ghostRank[ei] < 0 && dofNumber[ei] >= 0 )
60 localIndex const lid = dofNumber[ei] - rankOffset;
61 real64 const newPres = pres[ei] + scalingFactor * localSolution[lid];
65 minNegPres.min( newPres );
72 return KernelStats{ minNegPres.get() };
#define GEOS_HOST_DEVICE
Marks a host-device function.
Collects and reports elements ids and data using an atomic counter. This class provides functionality...
GEOS_HOST_DEVICE void collectElement(CollectorAtomicPolicy, ElementReport const &report) const
Collects a single element report and adds its ID to the output buffer if not disabled and there are a...
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).