20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_SOLUTIONCHECKKERNEL_HPP
24 #include "common/GEOS_RAJA_Interface.hpp"
31 namespace singlePhaseBaseKernels
44 template<
typename POLICY >
51 real64 const scalingFactor,
55 using reducePolicy = ReducePolicy< POLICY >;
56 using atomicPolicy = AtomicPolicy< POLICY >;
57 RAJA::ReduceMin< reducePolicy, real64 > minNegPres( 0.0 );
59 bool const localScaling = scalingType == flowSolverUtilities::ScalingType::Local;
63 if( ghostRank[ei] < 0 && dofNumber[ei] >= 0 )
65 localIndex const lid = dofNumber[ei] - rankOffset;
66 real64 const newPres = pres[ei] + ( localScaling ? perElementScaling[ei] : scalingFactor ) * localSolution[lid];
70 minNegPres.min( newPres );
77 return KernelStats{ minNegPres.get() };
ScalingType
Solution scaling type.
#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).