Loading...
Searching...
No Matches
LgrHelpers.hpp
/*
Copyright 2025 Equinor ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_GRID_CPGRID_LGRHELPERS_HEADER_INCLUDED
#define OPM_GRID_CPGRID_LGRHELPERS_HEADER_INCLUDED
#include <dune/grid/common/mcmgmapper.hh>
#include <dune/common/version.hh>
#include <opm/grid/CpGrid.hpp>
#include <array>
#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility> // for std::pair
#include <vector>
namespace Dune
{
namespace cpgrid
{
class CpGridData;
}
}
namespace Opm
{
template<class Grid> class LevelCartesianIndexMapper;
namespace Lgr
{
void refineAndProvideMarkedRefinedRelations(const Dune::CpGrid& grid,/* Marked elements parameters */
std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
int& markedElem_count,
std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
std::map<std::array<int,2>,int>& markedElemAndEquivRefinedCorn_to_corner,
std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
/* Refined cells parameters */
std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCell_to_refinedLevelAdRefinedCell,
std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCell_to_elemLgrAndElemLgrCell,
std::vector<int>& refined_cell_count_vec,
const std::vector<int>& assignRefinedLevel,
std::vector<std::vector<std::tuple<int,std::vector<int>>>>& preAdapt_parent_to_children_cells_vec,
/* Adapted cells parameters */
std::map<std::array<int,2>,int>& elemLgrAndElemLgrCell_to_adaptedCell,
std::unordered_map<int,std::array<int,2>>& adaptedCell_to_elemLgrAndElemLgrCell,
int& cell_count,
std::vector<std::vector<int>>& preAdapt_level_to_leaf_cells_vec,
/* Additional parameters */
const std::vector<std::array<int,3>>& cells_per_dim_vec);
std::tuple< std::vector<std::vector<std::array<int,2>>>,
std::vector<std::vector<int>>,
std::vector<std::array<int,2>>,
std::vector<int>>
defineChildToParentAndIdxInParentCell(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
const std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCell_to_elemLgrAndElemLgrCell,
const std::vector<int>& refined_cell_count_vec,
const std::unordered_map<int,std::array<int,2>>& adaptedCell_to_elemLgrAndElemLgrCell,
const int& cell_count);
std::pair<std::vector<std::vector<int>>, std::vector<std::array<int,2>>>
defineLevelToLeafAndLeafToLevelCells(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCell_to_refinedLevelAndRefinedCell,
const std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCell_to_elemLgrAndElemLgrCell,
const std::vector<int>& refined_cell_count_vec,
const std::map<std::array<int,2>,int>& elemLgrAndElemLgrCell_to_adaptedCell,
const std::unordered_map<int,std::array<int,2>>& adaptedCell_to_elemLgrAndElemLgrCell,
const int& cell_count);
void identifyRefinedCornersPerLevel(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCorner_to_elemLgrAndElemLgrCorner,
std::vector<int>& refined_corner_count_vec,
std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
bool isRefinedCornerInInteriorLgr(const std::array<int,3>& cells_per_dim, int cornerIdxInLgr);
std::array<int,3> getRefinedCornerIJK(const std::array<int,3>& cells_per_dim, int cornerIdxInLgr);
bool newRefinedCornerLiesOnEdge(const std::array<int,3>& cells_per_dim, int cornerIdxInLgr);
std::array<int,2> getParentFacesAssocWithNewRefinedCornLyingOnEdge(const Dune::cpgrid::CpGridData& current_data,
const std::array<int,3>& cells_per_dim,
int cornerIdxInLgr,
int elemLgr);
bool isRefinedNewBornCornerOnLgrBoundary(const std::array<int,3>& cells_per_dim, int cornerIdxInLgr);
// @brief Get the parent face containing the new refined corner.
int getParentFaceWhereNewRefinedCornerLiesOn(const Dune::cpgrid::CpGridData& current_data,
const std::array<int,3>& cells_per_dim,
int cornerIdxInLgr,
int elemLgr);
int replaceLgr1CornerIdxByLgr2CornerIdx(const std::array<int,3>& cells_per_dim_lgr1,
int cornerIdxLgr1,
const std::array<int,3>& cells_per_dim_lgr2);
int replaceLgr1CornerIdxByLgr2CornerIdx(const Dune::cpgrid::CpGridData& current_data,
const std::array<int,3>& cells_per_dim_lgr1,
int cornerIdxLgr1, int elemLgr1, int parentFaceLastAppearanceIdx,
const std::array<int,3>& cells_per_dim_lgr2);
void identifyLeafGridCorners(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner,
int& corner_count,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void markVanishedCorner(const std::array<int,2>& vanished,
const std::array<int,2>& lastAppearance,
std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance);
void processInteriorCorners(int elemIdx, int shiftedLevel,
const std::shared_ptr<Dune::cpgrid::CpGridData>& lgr,
int& corner_count,
std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void processEdgeCorners(int elemIdx, int shiftedLevel,
const std::shared_ptr<Dune::cpgrid::CpGridData>& lgr,
int& corner_count,
std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner,
std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void processBoundaryCorners(int elemIdx, int shiftedLevel,
const std::shared_ptr<Dune::cpgrid::CpGridData>& lgr,
int& corner_count,
std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner,
std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
// To insert bidirectional mapping and increment counter
void insertBidirectional(std::map<std::array<int,2>,std::array<int,2>>& a_to_b,
std::map<std::array<int,2>,std::array<int,2>>& b_to_a,
const std::array<int,2>& keyA,
const std::array<int,2>& keyB,
int& counter,
bool useFullKeyB = false);
void identifyRefinedFacesPerLevel(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrFace_to_refinedLevelAndRefinedFace,
std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedFace_to_elemLgrAndElemLgrFace,
std::vector<int>& refined_face_count_vec,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void identifyLeafGridFaces(const Dune::cpgrid::CpGridData& current_data,
int preAdaptMaxLevel,
std::map<std::array<int,2>,int>& elemLgrAndElemLgrFace_to_adaptedFace,
std::unordered_map<int,std::array<int,2>>& adaptedFace_to_elemLgrAndElemLgrFace,
int& face_count,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
std::array<int,3> getRefinedFaceIJK(const std::array<int,3>& cells_per_dim, int faceIdxInLgr,
const std::shared_ptr<Dune::cpgrid::CpGridData>& elemLgr_ptr);
bool isRefinedFaceInInteriorLgr(const std::array<int,3>& cells_per_dim, int faceIdxInLgr,
const std::shared_ptr<Dune::cpgrid::CpGridData>& elemLgr_ptr);
bool isRefinedFaceOnLgrBoundary(const std::array<int,3>& cells_per_dim, int faceIdxInLgr,
const std::shared_ptr<Dune::cpgrid::CpGridData>& elemLgr_ptr);
int getParentFaceWhereNewRefinedFaceLiesOn(const Dune::cpgrid::CpGridData& current_data,
const std::array<int,3>& cells_per_dim, int faceIdxInLgr,
const std::shared_ptr<Dune::cpgrid::CpGridData>& elemLgr_ptr,
int elemLgr);
void populateRefinedCorners(std::vector<Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<0,3>>>& refined_corners_vec,
const std::vector<int>& refined_corner_count_vec,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const int& preAdaptMaxLevel,
const std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCorner_to_elemLgrAndElemLgrCorner);
void populateRefinedFaces(std::vector<Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<2,3>>>& refined_faces_vec,
std::vector<Dune::cpgrid::EntityVariableBase<enum face_tag>>& mutable_refined_face_tags_vec,
std::vector<Dune::cpgrid::EntityVariableBase<Dune::FieldVector<double,3>>>& mutable_refine_face_normals_vec,
std::vector<Opm::SparseTable<int>>& refined_face_to_point_vec,
const std::vector<int>& refined_face_count_vec,
const std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedFace_to_elemLgrAndElemLgrFace,
const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
const std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const int& preAdaptMaxLevel,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::map<std::array<int,2>,int>& markedElemAndEquivRefinedCorn_to_corner);
void populateRefinedCells(const Dune::cpgrid::CpGridData& current_data,
std::vector<Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<3,3>>>& refined_cells_vec,
std::vector<std::vector<std::array<int,8>>>& refined_cell_to_point_vec,
std::vector<std::vector<int>>& refined_global_cell_vec,
const std::vector<int>& refined_cell_count_vec,
std::vector<Dune::cpgrid::OrientedEntityTable<0,1>>& refined_cell_to_face_vec,
std::vector<Dune::cpgrid::OrientedEntityTable<1,0>>& refined_face_to_cell_vec,
const std::map<std::array<int,2>,std::array<int,2>>& refinedLevelAndRefinedCell_to_elemLgrAndElemLgrCell,
const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrFace_to_refinedLevelAndRefinedFace,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const std::vector<Dune::cpgrid::DefaultGeometryPolicy>& refined_geometries_vec,
const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
const std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const int& preAdaptMaxLevel,
const std::map<std::array<int,2>,int>& markedElemAndEquivRefinedCorn_to_corner,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
int replaceLgr1FaceIdxByLgr2FaceIdx(const std::array<int,3>& cells_per_dim_lgr1, int faceIdxInLgr1,
const std::shared_ptr<Dune::cpgrid::CpGridData>& elemLgr1_ptr,
const std::array<int,3>& cells_per_dim_lgr2);
void populateLeafGridCorners(const Dune::cpgrid::CpGridData& current_data,
Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<0,3>>& adapted_corners,
const int& corners_count,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner);
void populateLeafGridFaces(const Dune::cpgrid::CpGridData& current_data,
Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<2,3>>& adapted_faces,
Dune::cpgrid::EntityVariableBase<enum face_tag>& mutable_face_tags,
Dune::cpgrid::EntityVariableBase<Dune::FieldVector<double,3>>& mutable_face_normals,
Opm::SparseTable<int>& adapted_face_to_point,
const int& face_count,
const std::unordered_map<int,std::array<int,2>>& adaptedFace_to_elemLgrAndElemLgrFace,
const std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
const std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::map<std::array<int,2>,int>& markedElemAndEquivRefinedCorn_to_corner,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::vector<std::array<int,3>>& cells_per_dim_vec,
const int& preAdaptMaxLevel);
void populateLeafGridCells(const Dune::cpgrid::CpGridData& current_data,
Dune::cpgrid::EntityVariableBase<Dune::cpgrid::Geometry<3,3>>& adapted_cells,
std::vector<std::array<int,8>>& adapted_cell_to_point,
const int& cell_count,
Dune::cpgrid::OrientedEntityTable<0,1>& adapted_cell_to_face,
Dune::cpgrid::OrientedEntityTable<1,0>& adapted_face_to_cell,
const std::unordered_map<int,std::array<int,2>>& adaptedCell_to_elemLgrAndElemLgrCell,
const std::map<std::array<int,2>,int>& elemLgrAndElemLgrFace_to_adaptedFace,
const std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces,
const Dune::cpgrid::DefaultGeometryPolicy& adapted_geometries,
const std::map<std::array<int,2>,int>& elemLgrAndElemLgrCorner_to_adaptedCorner,
const std::map<std::array<int,2>, std::array<int,2>>& vanishedRefinedCorner_to_itsLastAppearance,
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& markedElem_to_itsLgr,
const std::vector<int>& assignRefinedLevel,
const std::map<std::array<int,2>,int>& markedElemAndEquivRefinedCorn_to_corner,
const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::vector<std::array<int,3>>& cells_per_dim_vec,
const int& preAdaptMaxLevel);
template<class T>
void computeOnLgrParents(const Dune::CpGrid& grid,
const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec,
T func)
{
// Find out which (ACTIVE) elements belong to the block cells defined by startIJK and endIJK values.
for(const auto& element: Dune::elements(grid.leafGridView())) {
std::array<int,3> ijk;
grid.getIJK(element.index(), ijk);
for (std::size_t level = 0; level < startIJK_vec.size(); ++level) {
bool belongsToLevel = true;
for (int c = 0; c < 3; ++c) {
belongsToLevel = belongsToLevel && ( (ijk[c] >= startIJK_vec[level][c]) && (ijk[c] < endIJK_vec[level][c]) );
if (!belongsToLevel)
break;
}
if(belongsToLevel) {
func(element, level);
}
}
}
}
void detectActiveLgrs(const Dune::CpGrid& grid,
const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec,
std::vector<int>& lgr_with_at_least_one_active_cell);
void predictMinCellAndPointGlobalIdPerProcess(const Dune::CpGrid& grid,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::array<int,3>>& cells_per_dim_vec,
const std::vector<int>& lgr_with_at_least_one_active_cell,
int& min_globalId_cell_in_proc,
int& min_globalId_point_in_proc);
void assignCellIdsAndCandidatePointIds( const Dune::CpGrid& grid,
std::vector<std::vector<int>>& localToGlobal_cells_per_level,
std::vector<std::vector<int>>& localToGlobal_points_per_level,
int min_globalId_cell_in_proc,
int min_globalId_point_in_proc,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void selectWinnerPointIds(const Dune::CpGrid& grid,
std::vector<std::vector<int>>& localToGlobal_points_per_level,
const std::vector<std::tuple<int,std::vector<int>>>& parent_to_children,
const std::vector<std::array<int,3>>& cells_per_dim_vec);
void getFirstChildGlobalIds(const Dune::CpGrid& grid,
std::vector<int>& parentToFirstChildGlobalIds);
std::array<int,3> getIJK(int idx_in_parent_cell, const std::array<int,3>& cells_per_dim);
void validStartEndIJKs(const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec);
std::array<std::vector<int>,6> getBoundaryPatchFaces(const std::array<int,3>& startIJK,
const std::array<int,3>& endIJK,
const std::array<int,3>& grid_dim);
std::array<int,3> getPatchDim(const std::array<int,3>& startIJK, const std::array<int,3>& endIJK);
bool patchesShareFace(const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec,
const std::array<int,3>& grid_dim);
int sharedFaceTag(const std::vector<std::array<int,3>>& startIJK_2Patches,
const std::vector<std::array<int,3>>& endIJK_2Patches,
const std::array<int,3>& grid_dim);
std::tuple<bool,
std::vector<std::array<int,3>>,
std::vector<std::array<int,3>>,
std::vector<std::array<int,3>>,
std::vector<std::string>,
std::vector<std::string>>
excludeFakeSubdivisions(const std::vector<std::array<int, 3>>& cells_per_dim_vec,
const std::vector<std::array<int, 3>>& startIJK_vec,
const std::vector<std::array<int, 3>>& endIJK_vec,
const std::vector<std::string>& lgr_name_vec,
const std::vector<std::string>& lgr_parent_grid_name_vec);
bool compatibleSubdivisions(const std::vector<std::array<int,3>>& cells_per_dim_vec,
const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec,
const std::array<int,3>& logicalCartesianSize);
void containsEightDifferentCorners(const std::array<int,8>& cell_to_point);
std::vector<int> mapLevelIndicesToCartesianOutputOrder(const Dune::CpGrid& grid,
const Opm::LevelCartesianIndexMapper<Dune::CpGrid>& levelCartMapp,
int level);
template <typename Container>
Container reorderForOutput(const Container& simulatorContainer,
const std::vector<int>& toOutput)
{
// Use toOutput to reorder simulatorContainer
Container outputContainer;
outputContainer.resize(toOutput.size());
for (std::size_t i = 0; i < toOutput.size(); ++i) {
outputContainer[i] = simulatorContainer[toOutput[i]];
}
return outputContainer;
}
} // namespace Lgr
} // namespace Opm
#endif // OPM_GRID_CPGRID_LGRHELPERS_HEADER_INCLUDED
Dune::CpGrid::getIJK
void getIJK(const int c, std::array< int, 3 > &ijk) const
Extract Cartesian index triplet (i,j,k) of an active cell.
Definition CpGrid.cpp:746
Dune::cpgrid::CpGridData
Struct that hods all the data needed to represent a Cpgrid.
Definition CpGridData.hpp:118
Opm::LevelCartesianIndexMapper
Definition LevelCartesianIndexMapper.hpp:45
Dune::cpgrid
Copyright 2019 Equinor AS.
Definition GridPartitioning.cpp:673
Dune
The namespace Dune is the main namespace for all Dune code.
Definition CartesianIndexMapper.hpp:10
Opm
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68