19 #ifndef GEOSX_MESH_MESHFORLOOPINTERFACE_HPP 20 #define GEOSX_MESH_MESHFORLOOPINTERFACE_HPP 22 #include "finiteElement/FiniteElementDiscretization.hpp" 23 #include "finiteElement/FiniteElementDiscretizationManager.hpp" 24 #include "rajaInterface/GEOS_RAJA_Interface.hpp" 28 #include "constitutive/ConstitutiveManager.hpp" 40 template<
class POLICY=serialPolicy,
typename LAMBDA=
void >
50 forAll< POLICY >( subRegion.size(), [&](
localIndex const k ) { lambda( er, esr, k ); } );
60 template<
typename LAMBDA >
64 using NUMBER = decltype( lambda( 0, 0, 0 ) );
67 localIndex minReg = -1, minSubreg = -1, minIndex = -1;
80 NUMBER
const val = lambda( er, esr, k );
92 return std::make_pair( minVal, std::make_tuple( minReg, minSubreg, minIndex ));
97 #endif // GEOSX_MESH_MESHFORLOOPINTERFACE_HPP
auto minLocOverElemsInMesh(MeshLevel const *const mesh, LAMBDA &&lambda)
Class facilitating the representation of a multi-level discretization of a MeshBody.
void forElementSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over the element subregions of all subregion ty...
void forElementSubRegionsIndex(LAMBDA &&lambda) const
Apply LAMBDA to the subregions, loop using subregion indices.
ElementRegionManager const * getElemManager() const
Get the element region manager.
T const * GetRegion(string const ®ionName) const
Get a element region.
The ElementRegionBase is the base class to manage the data stored at the element level.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
void forAllElemsInMesh(MeshLevel const *const mesh, LAMBDA &&lambda)
Loop over all elements in a geosx::MeshLevel.
constexpr std::enable_if_t< std::is_arithmetic< T >::value, T > max(T const a, T const b)
localIndex numRegions() const
Get number of the regions.