20 #ifndef GEOS_MESH_MESHFORLOOPINTERFACE_HPP
21 #define GEOS_MESH_MESHFORLOOPINTERFACE_HPP
23 #include "finiteElement/FiniteElementDiscretization.hpp"
24 #include "finiteElement/FiniteElementDiscretizationManager.hpp"
25 #include "common/GEOS_RAJA_Interface.hpp"
29 #include "constitutive/ConstitutiveManager.hpp"
41 template<
class POLICY=serialPolicy,
typename LAMBDA=
void >
51 forAll< POLICY >( subRegion.size(), [&](
localIndex const k ) { lambda( er, esr, k ); } );
61 template<
typename LAMBDA >
65 using NUMBER = decltype( lambda( 0, 0, 0 ) );
67 NUMBER minVal = std::numeric_limits< NUMBER >::max();
68 localIndex minReg = -1, minSubreg = -1, minIndex = -1;
81 NUMBER
const val = lambda( er, esr, k );
93 return std::make_pair( minVal, std::make_tuple( minReg, minSubreg, minIndex ));
The ElementRegionBase is the base class to manage the data stored at the element level.
void forElementSubRegionsIndex(LAMBDA &&lambda) const
Apply LAMBDA to the subregions, loop using subregion indices.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
localIndex numRegions() const
Get number of the regions.
void forElementSubRegionsComplete(LAMBDA &&lambda) const
This const function is used to launch kernel function over the element subregions of all subregion ty...
T const & getRegion(KEY_TYPE const &key) const
Get a element region.
Class facilitating the representation of a multi-level discretization of a MeshBody.
ElementRegionManager const & getElemManager() const
Get the element region manager.
void forAllElemsInMesh(MeshLevel const &mesh, LAMBDA &&lambda)
Loop over all elements in a geos::MeshLevel.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
auto minLocOverElemsInMesh(MeshLevel const &mesh, LAMBDA &&lambda)