20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_STATISTICSKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_STATISTICSKERNEL_HPP
24 #include "common/GEOS_RAJA_Interface.hpp"
29 namespace singlePhaseBaseKernels
44 deltaPres[ei] = pres[ei] - initPres[ei];
66 real64 & totalUncompactedPoreVol,
70 RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinPres( LvArray::NumericLimits< real64 >::max );
71 RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionAvgPresNumerator( 0.0 );
72 RAJA::ReduceMax< parallelDeviceReduce, real64 > subRegionMaxPres( -LvArray::NumericLimits< real64 >::max );
74 RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinDeltaPres( LvArray::NumericLimits< real64 >::max );
75 RAJA::ReduceMax< parallelDeviceReduce, real64 > subRegionMaxDeltaPres( -LvArray::NumericLimits< real64 >::max );
77 RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinTemp( LvArray::NumericLimits< real64 >::max );
78 RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionAvgTempNumerator( 0.0 );
79 RAJA::ReduceMax< parallelDeviceReduce, real64 > subRegionMaxTemp( -LvArray::NumericLimits< real64 >::max );
81 RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalUncompactedPoreVol( 0.0 );
82 RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalPoreVol( 0.0 );
83 RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalMass( 0.0 );
87 if( elemGhostRank[ei] >= 0 )
93 real64 const uncompactedPoreVol = volume[ei] * refPorosity[ei];
94 real64 const dynamicPoreVol = volume[ei] * porosity[ei][0];
96 subRegionMinPres.min( pres[ei] );
97 subRegionAvgPresNumerator += uncompactedPoreVol * pres[ei];
98 subRegionMaxPres.max( pres[ei] );
100 subRegionMinDeltaPres.min( deltaPres[ei] );
101 subRegionMaxDeltaPres.max( deltaPres[ei] );
103 subRegionMinTemp.min( temp[ei] );
104 subRegionAvgTempNumerator += uncompactedPoreVol * temp[ei];
105 subRegionMaxTemp.max( temp[ei] );
107 subRegionTotalUncompactedPoreVol += uncompactedPoreVol;
108 subRegionTotalPoreVol += dynamicPoreVol;
109 subRegionTotalMass += dynamicPoreVol * density[ei][0];
112 minPres = subRegionMinPres.get();
113 avgPresNumerator = subRegionAvgPresNumerator.get();
114 maxPres = subRegionMaxPres.get();
116 minDeltaPres = subRegionMinDeltaPres.get();
117 maxDeltaPres = subRegionMaxDeltaPres.get();
119 minTemp = subRegionMinTemp.get();
120 avgTempNumerator = subRegionAvgTempNumerator.get();
121 maxTemp = subRegionMaxTemp.get();
123 totalUncompactedPoreVol = subRegionTotalUncompactedPoreVol.get();
124 totalPoreVol = subRegionTotalPoreVol.get();
125 totalMass = subRegionTotalMass.get();
#define GEOS_HOST_DEVICE
Marks a host-device function.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.