Loading...
Searching...
No Matches
CpGrid.hpp
//===========================================================================
//
// File: CpGrid.hpp
//
// Created: Fri May 29 20:26:36 2009
//
// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
// B�rd Skaflestad <bard.skaflestad@sintef.no>
// Antonella Ritorto <antonella.ritorto@opm-op.com>
//
// $Date$
//
// $Revision$
//
//===========================================================================
/*
Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
Copyright 2009, 2010, 2014, 2022-2023 Equinor ASA.
Copyright 2014, 2015 Dr. Blatt - HPC-Simulartion-Software & Services
Copyright 2015 NTNU
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_CPGRID_HEADER
#define OPM_CPGRID_HEADER
// Warning suppression for Dune includes.
#include <opm/grid/utility/platform_dependent/disable_warnings.h>
#include <dune/grid/common/grid.hh>
#include <opm/grid/utility/platform_dependent/reenable_warnings.h>
#include <opm/grid/common/GridEnums.hpp>
#include <opm/grid/cpgrid/CpGridDataTraits.hpp>
#include <opm/grid/cpgrid/DefaultGeometryPolicy.hpp>
#include <opm/grid/cpgrid/OrientedEntityTable.hpp>
#include <opm/grid/cpgpreprocess/preprocess.h>
#include <opm/grid/utility/OpmWellType.hpp>
#include <set>
namespace Opm
{
struct NNCdata;
class EclipseGrid;
class EclipseState;
}
namespace Dune
{
class CpGrid;
namespace cpgrid
{
class CpGridData;
template <int> class Entity;
template<int,int> class Geometry;
class HierarchicIterator;
class IntersectionIterator;
template<int, PartitionIteratorType> class Iterator;
class LevelGlobalIdSet;
class GlobalIdSet;
class Intersection;
class IntersectionIterator;
class IndexSet;
class IdSet;
}
}
namespace Dune
{
//
// CpGridTraits
//
struct CpGridTraits
{
typedef CpGrid Grid;
typedef cpgrid::Intersection LeafIntersection;
typedef cpgrid::Intersection LevelIntersection;
typedef cpgrid::IntersectionIterator LeafIntersectionIterator;
typedef cpgrid::IntersectionIterator LevelIntersectionIterator;
typedef cpgrid::HierarchicIterator HierarchicIterator;
template <int cd>
struct Codim
{
typedef cpgrid::Geometry<3-cd, 3> Geometry;
//typedef Dune::Geometry<3-cd, 3, CpGrid, cpgrid::Geometry> Geometry;
typedef cpgrid::Geometry<3-cd, 3> LocalGeometry;
//typedef Dune::Geometry<3-cd, 3, CpGrid, cpgrid::Geometry> LocalGeometry;
typedef cpgrid::Entity<cd> Entity;
typedef cpgrid::Iterator<cd, All_Partition> LevelIterator;
typedef cpgrid::Iterator<cd, All_Partition> LeafIterator;
typedef cpgrid::Entity<cd> EntitySeed;
template <PartitionIteratorType pitype>
struct Partition
{
typedef cpgrid::Iterator<cd, pitype> LevelIterator;
typedef cpgrid::Iterator<cd, pitype> LeafIterator;
};
};
template <PartitionIteratorType pitype>
struct Partition
{
typedef Dune::GridView<DefaultLevelGridViewTraits<CpGrid> > LevelGridView;
typedef Dune::GridView<DefaultLeafGridViewTraits<CpGrid> > LeafGridView;
};
typedef Dune::GridView<DefaultLevelGridViewTraits<CpGrid>> LevelGridView;
typedef Dune::GridView<DefaultLeafGridViewTraits<CpGrid>> LeafGridView;
typedef cpgrid::IndexSet LevelIndexSet;
typedef cpgrid::IndexSet LeafIndexSet;
typedef cpgrid::GlobalIdSet GlobalIdSet;
typedef GlobalIdSet LocalIdSet;
using Communication = cpgrid::CpGridDataTraits::Communication;
using CollectiveCommunication = cpgrid::CpGridDataTraits::CollectiveCommunication;
};
//
// CpGridFamily
//
struct CpGridFamily
{
typedef CpGridTraits Traits;
};
//
// CpGrid
//
class CpGrid
: public GridDefaultImplementation<3, 3, double, CpGridFamily>
{
friend class cpgrid::CpGridData;
friend class cpgrid::Entity<0>;
friend class cpgrid::Entity<1>;
friend class cpgrid::Entity<2>;
friend class cpgrid::Entity<3>;
template<int dim>
friend cpgrid::Entity<dim> createEntity(const CpGrid&,int,bool);
public:
// --- Typedefs ---
typedef CpGridFamily GridFamily;
// --- Methods ---
CpGrid();
explicit CpGrid(MPIHelper::MPICommunicator comm);
#if HAVE_ECL_INPUT
std::vector<std::size_t>
processEclipseFormat(const Opm::EclipseGrid* ecl_grid,
Opm::EclipseState* ecl_state,
bool periodic_extension,
bool turn_normals,
bool clip_z,
bool pinchActive,
bool edge_conformal);
std::vector<std::size_t>
processEclipseFormat(const Opm::EclipseGrid* ecl_grid,
Opm::EclipseState* ecl_state,
bool periodic_extension,
bool turn_normals = false,
bool clip_z = false,
bool edge_conformal = false);
#endif // HAVE_ECL_INPUT
void processEclipseFormat(const grdecl& input_data,
bool remove_ij_boundary,
bool turn_normals = false,
bool edge_conformal = false);
void createCartesian(const std::array<int, 3>& dims,
const std::array<double, 3>& cellsize,
const std::array<int, 3>& shift = {0,0,0});
const std::array<int, 3>& logicalCartesianSize() const;
const std::vector<int>& globalCell() const;
const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& currentData() const;
std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>& currentData();
void getIJK(const int c, std::array<int,3>& ijk) const;
bool uniqueBoundaryIds() const;
void setUniqueBoundaryIds(bool uids);
// --- Dune interface below ---
// \@{
std::string name() const;
int maxLevel() const;
template<int codim>
typename Traits::template Codim<codim>::LevelIterator lbegin (int level) const;
template<int codim>
typename Traits::template Codim<codim>::LevelIterator lend (int level) const;
template<int codim, PartitionIteratorType PiType>
typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lbegin (int level) const;
template<int codim, PartitionIteratorType PiType>
typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lend (int level) const;
template<int codim>
typename Traits::template Codim<codim>::LeafIterator leafbegin() const;
template<int codim>
typename Traits::template Codim<codim>::LeafIterator leafend() const;
template<int codim, PartitionIteratorType PiType>
typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafbegin() const;
template<int codim, PartitionIteratorType PiType>
typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafend() const;
int size (int level, int codim) const;
int size (int codim) const;
int size (int level, GeometryType type) const;
int size (GeometryType type) const;
const Traits::GlobalIdSet& globalIdSet() const;
const Traits::LocalIdSet& localIdSet() const;
const Traits::LevelIndexSet& levelIndexSet(int level) const;
const Traits::LeafIndexSet& leafIndexSet() const;
void globalRefine (int refCount);
const std::vector<Dune::GeometryType>& geomTypes(const int) const;
template <int codim>
cpgrid::Entity<codim> entity(const cpgrid::Entity<codim>& seed) const;
void addLgrsUpdateLeafView(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 = std::vector<std::string>{});
void autoRefine(const std::array<int,3>& nxnynz);
// @brief TO BE DONE
const std::map<std::string,int>& getLgrNameToLevel() const;
// @breif Compute center of an entity/element/cell in the Eclipse way:
// - Average of the 4 corners of the bottom face.
// - Average of the 4 corners of the top face.
// Return average of the previous computations.
// @param [in] int Index of a cell.
// @return 'eclipse centroid'
std::array<double,3> getEclCentroid(const int& idx) const;
// @breif Compute center of an entity/element/cell in the Eclipse way:
// - Average of the 4 corners of the bottom face.
// - Average of the 4 corners of the top face.
// Return average of the previous computations.
// @param [in] Entity<0> Entity
// @return 'eclipse centroid'
std::array<double,3> getEclCentroid(const cpgrid::Entity<0>& elem) const;
// @brief Return parent (coarse) intersection (face) of a refined face on the leaf grid view, whose neighboring cells
// are two: one coarse cell (equivalent to its origin cell from level 0), and one refined cell
// from certain LGR.
// Used in Transmissibility_impl.hpp
Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection& intersection) const;
bool mark(int refCount, const cpgrid::Entity<0>& element);
int getMark(const cpgrid::Entity<0>& element) const;
bool preAdapt();
bool adapt();
bool refineAndUpdateGrid(const std::vector<std::array<int,3>>& cells_per_dim_vec,
const std::vector<int>& assignRefinedLevel,
const std::vector<std::string>& lgr_name_vec,
const std::vector<std::array<int,3>>& startIJK_vec = std::vector<std::array<int,3>>{},
const std::vector<std::array<int,3>>& endIJK_vec = std::vector<std::array<int,3>>{});
void postAdapt();
private:
void updateCornerHistoryLevels(const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
const std::unordered_map<int,std::array<int,2>>& adaptedCorner_to_elemLgrAndElemLgrCorner,
const int& corner_count,
const std::vector<std::array<int,2>>& preAdaptGrid_corner_history,
const int& preAdaptMaxLevel,
const int& newLevels);
void globalIdsPartitionTypesLgrAndLeafGrids(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);
void getFirstChildGlobalIds([[maybe_unused]] std::vector<int>& parentToFirstChildGlobalIds);
public:
void syncDistributedGlobalCellIds();
private:
void computeGlobalCellLgr(const int& level, const std::array<int,3>& startIJK, std::vector<int>& global_cell_lgr);
void computeGlobalCellLeafGridViewWithLgrs(std::vector<int>& global_cell_leaf);
private:
void markElemAssignLevelDetectActiveLgrs(const std::vector<std::array<int,3>>& startIJK_vec,
const std::vector<std::array<int,3>>& endIJK_vec,
std::vector<int>& assignRefinedLevel,
std::vector<int>& lgr_with_at_least_one_active_cell);
void populateCellIndexSetRefinedGrid(int level);
void populateCellIndexSetLeafGridView();
void populateLeafGlobalIdSet();
public:
std::vector<std::unordered_map<std::size_t, std::size_t>> mapLocalCartesianIndexSetsToLeafIndexSet() const;
std::vector<std::array<int,2>> mapLeafIndexSetToLocalCartesianIndexSets() const;
unsigned int overlapSize(int) const;
unsigned int ghostSize(int) const;
unsigned int overlapSize(int, int) const;
unsigned int ghostSize(int, int) const;
unsigned int numBoundarySegments() const;
void setPartitioningParams(const std::map<std::string,std::string>& params);
// loadbalance is not part of the grid interface therefore we skip it.
bool loadBalance(int overlapLayers=1,
int partitionMethod = Dune::PartitionMethod::zoltan,
double imbalanceTol = 1.1,
int level =-1)
{
using std::get;
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
/* ownersFirst = */ false,
/* wells = */ nullptr,
/* possibleFutureConnections = */ {},
/* serialPartitioning = */ false,
/* transmissibilities = */ nullptr,
/* addCornerCells = */ true,
overlapLayers,
partitionMethod,
imbalanceTol,
/* allowDistributedWells = */ false,
/* input_cell_part = */ {},
level));
}
// loadbalance is not part of the grid interface therefore we skip it.
bool loadBalanceSerial(int overlapLayers=1,
int partitionMethod = Dune::PartitionMethod::zoltan,
int edgeWeightMethod = Dune::EdgeWeightMethod::defaultTransEdgeWgt,
double imbalanceTol = 1.1,
int level = -1)
{
using std::get;
return get<0>(scatterGrid(EdgeWeightMethod(edgeWeightMethod),
/* ownersFirst = */ false,
/* wells = */ nullptr,
/* possibleFutureConnections = */ {},
/* serialPartitioning = */ true,
/* transmissibilities = */ nullptr,
/* addCornerCells = */ true,
overlapLayers,
partitionMethod,
imbalanceTol,
/* allowDistributedWells = */ false,
/* input_cell_part = */ {},
level));
}
// loadbalance is not part of the grid interface therefore we skip it.
std::pair<bool,std::vector<std::pair<std::string,bool>>>
loadBalance(const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections = {},
const double* transmissibilities = nullptr,
int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG,
int level = -1)
{
return scatterGrid(defaultTransEdgeWgt, /* ownersFirst = */ false, wells, possibleFutureConnections,
/* serialPartitioning = */ false, transmissibilities, /* addCornerCells = */ false,
overlapLayers, partitionMethod, /* imbalanceTol = */ 1.1, /* allowDistributeWells = */ false,
/* input_cell_part = */ {}, level);
}
// loadbalance is not part of the grid interface therefore we skip it.
std::pair<bool,std::vector<std::pair<std::string,bool>>>
loadBalance(EdgeWeightMethod method, const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections = {},
const double* transmissibilities = nullptr, bool ownersFirst=false,
bool addCornerCells=false, int overlapLayers=1,
int partitionMethod = Dune::PartitionMethod::zoltanGoG,
double imbalanceTol = 1.1,
int level = -1)
{
return scatterGrid(method, ownersFirst, wells, possibleFutureConnections, /* serialPartitioning = */ false,
transmissibilities, addCornerCells, overlapLayers, partitionMethod, imbalanceTol,
/* allowDistributeWells = */ false, /* input_cell_part = */ {}, level);
}
template<class DataHandle>
std::pair<bool, std::vector<std::pair<std::string,bool> > >
loadBalance(DataHandle& data,
const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections = {},
const double* transmissibilities = nullptr,
int overlapLayers=1, int partitionMethod = 1, int level =-1)
{
auto ret = loadBalance(wells, possibleFutureConnections, transmissibilities, overlapLayers, partitionMethod, level);
using std::get;
if (get<0>(ret))
{
scatterData(data);
}
return ret;
}
template<class DataHandle>
std::pair<bool, std::vector<std::pair<std::string,bool> > >
loadBalance(DataHandle& data, EdgeWeightMethod method,
const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
bool serialPartitioning,
const double* transmissibilities = nullptr, bool ownersFirst=false,
bool addCornerCells=false, int overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltanGoG,
double imbalanceTol = 1.1,
bool allowDistributedWells = false)
{
auto ret = scatterGrid(method, ownersFirst, wells, possibleFutureConnections, serialPartitioning, transmissibilities,
addCornerCells, overlapLayers, partitionMethod, imbalanceTol, allowDistributedWells,
/* input_cell_parts = */ std::vector<int>{}, /* level = */ 0);
using std::get;
if (get<0>(ret))
{
scatterData(data);
}
return ret;
}
template<class DataHandle>
std::pair<bool, std::vector<std::pair<std::string,bool> > >
loadBalance(DataHandle& data, const std::vector<int>& parts,
const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections = {},
bool ownersFirst=false,
bool addCornerCells=false, int overlapLayers=1)
{
using std::get;
auto ret = scatterGrid(defaultTransEdgeWgt, ownersFirst, wells,
possibleFutureConnections,
/* serialPartitioning = */ false,
/* transmissibilities = */ {},
addCornerCells, overlapLayers, /* partitionMethod =*/ Dune::PartitionMethod::simple,
/* imbalanceTol (ignored) = */ 0.0,
/* allowDistributedWells = */ true, parts, /* level = */ 0);
using std::get;
if (get<0>(ret))
{
scatterData(data);
}
return ret;
}
template<class DataHandle>
bool loadBalance(DataHandle& data,
decltype(data.fixedSize(0,0)) overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltan)
{
// decltype usage needed to tell the compiler not to use this function if first
// argument is std::vector but rather loadbalance by parts
bool ret = loadBalance(overlapLayers, partitionMethod);
if (ret)
{
scatterData(data);
}
return ret;
}
bool loadBalance(const std::vector<int>& parts, bool ownersFirst=false,
bool addCornerCells=false, int overlapLayers=1)
{
using std::get;
return get<0>(scatterGrid(defaultTransEdgeWgt, ownersFirst, /* wells = */ {},
{},
/* serialPartitioning = */ false,
/* trabsmissibilities = */ {},
addCornerCells, overlapLayers, /* partitionMethod =*/ Dune::PartitionMethod::simple,
/* imbalanceTol (ignored) = */ 0.0,
/* allowDistributedWells = */ true, parts));
}
template<class DataHandle>
bool loadBalance(DataHandle& data, const std::vector<int>& parts, bool ownersFirst=false,
bool addCornerCells=false, int overlapLayers=1)
{
bool ret = loadBalance(parts, ownersFirst, addCornerCells, overlapLayers);
if (ret)
{
scatterData(data);
}
return ret;
}
std::vector<int>
zoltanPartitionWithoutScatter(const std::vector<cpgrid::OpmWellType>* wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
const double* transmissibilities,
const int numParts,
const double imbalanceTol) const;
template<class DataHandle>
void communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir, int /*level*/) const
{
communicate(data, iftype, dir);
}
template<class DataHandle>
void communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const;
const typename CpGridTraits::Communication& comm () const;
// ------------ End of Dune interface, start of simplified interface --------------
// enum { dimension = 3 }; // already defined
typedef Dune::FieldVector<double, 3> Vector;
const std::vector<double>& zcornData() const;
// Topology
int numCells(int level = -1) const;
int numFaces(int level = -1) const;
int numVertices() const;
int numCellFaces(int cell, int level = -1) const;
int cellFace(int cell, int local_index, int level = -1) const;
const cpgrid::OrientedEntityTable<0,1>::row_type cellFaceRow(int cell) const;
int faceCell(int face, int local_index, int level = -1) const;
int numCellFaces() const;
int numFaceVertices(int face) const;
int faceVertex(int face, int local_index) const;
double cellCenterDepth(int cell_index) const;
const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection& intersection) const;
const Vector faceAreaNormalEcl(int face) const;
// Geometry
const Vector& vertexPosition(int vertex) const;
double faceArea(int face) const;
const Vector& faceCentroid(int face) const;
const Vector& faceNormal(int face) const;
double cellVolume(int cell) const;
const Vector& cellCentroid(int cell) const;
template<int codim>
class CentroidIterator
: public RandomAccessIteratorFacade<CentroidIterator<codim>,
FieldVector<double, 3>,
const FieldVector<double, 3>&, int>
{
public:
typedef typename std::vector<cpgrid::Geometry<3-codim, 3> >::const_iterator
GeometryIterator;
explicit CentroidIterator(GeometryIterator iter)
: iter_(iter)
{}
const FieldVector<double,3>& dereference() const
{
return iter_->center();
}
void increment()
{
++iter_;
}
const FieldVector<double,3>& elementAt(int n)
{
return iter_[n]->center();
}
void advance(int n){
iter_+=n;
}
void decrement()
{
--iter_;
}
int distanceTo(const CentroidIterator& o)
{
return o-iter_;
}
bool equals(const CentroidIterator& o) const{
return o==iter_;
}
private:
GeometryIterator iter_;
};
CentroidIterator<0> beginCellCentroids() const;
CentroidIterator<1> beginFaceCentroids() const;
// Extra
int boundaryId(int face) const;
template<class Cell2FacesRowIterator>
int
faceTag(const Cell2FacesRowIterator& cell_face) const;
// ------------ End of simplified interface --------------
//------------- methods not in the DUNE grid interface.
template<class DataHandle>
void scatterData(DataHandle& handle) const;
template<class DataHandle>
void gatherData(DataHandle& handle) const;
using InterfaceMap = cpgrid::CpGridDataTraits::InterfaceMap;
const InterfaceMap& cellScatterGatherInterface() const;
const InterfaceMap& pointScatterGatherInterface() const;
void switchToGlobalView();
void switchToDistributedView();
#if HAVE_MPI
using ParallelIndexSet = cpgrid::CpGridDataTraits::ParallelIndexSet;
using RemoteIndices = cpgrid::CpGridDataTraits::RemoteIndices;
using CommunicationType = cpgrid::CpGridDataTraits::CommunicationType;
const CommunicationType& cellCommunication() const;
ParallelIndexSet& getCellIndexSet();
RemoteIndices& getCellRemoteIndices();
const ParallelIndexSet& getCellIndexSet() const;
const RemoteIndices& getCellRemoteIndices() const;
#endif
const std::vector<int>& sortedNumAquiferCells() const;
private:
std::pair<bool, std::vector<std::pair<std::string,bool> > >
scatterGrid(EdgeWeightMethod method,
bool ownersFirst,
const std::vector<cpgrid::OpmWellType> * wells,
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
bool serialPartitioning,
const double* transmissibilities,
bool addCornerCells,
int overlapLayers,
int partitionMethod = Dune::PartitionMethod::zoltanGoG,
double imbalanceTol = 1.1,
bool allowDistributedWells = true,
const std::vector<int>& input_cell_part = {},
int level = -1);
std::vector<std::shared_ptr<cpgrid::CpGridData>> data_;
cpgrid::CpGridData* current_view_data_;
std::vector<std::shared_ptr<cpgrid::CpGridData>> distributed_data_;
std::vector<std::shared_ptr<cpgrid::CpGridData>>* current_data_;
std::map<std::string,int> lgr_names_ = {{"GLOBAL", 0}};
std::shared_ptr<InterfaceMap> cell_scatter_gather_interfaces_;
/*
* @brief Interface for scattering and gathering point data.
*
* @warning Will only update owner cells
*/
std::shared_ptr<InterfaceMap> point_scatter_gather_interfaces_;
std::shared_ptr<cpgrid::GlobalIdSet> global_id_set_ptr_;
std::map<std::string,std::string> partitioningParams;
}; // end Class CpGrid
} // end namespace Dune
#include <opm/grid/cpgrid/Entity.hpp>
#include <opm/grid/cpgrid/Iterators.hpp>
#include <opm/grid/cpgrid/CpGridData.hpp>
namespace Dune
{
namespace Capabilities
{
template <>
struct hasEntity<CpGrid, 0>
{
static const bool v = true;
};
template <>
struct hasEntity<CpGrid, 3>
{
static const bool v = true;
};
template<>
struct canCommunicate<CpGrid,0>
{
static const bool v = true;
};
template<>
struct canCommunicate<CpGrid,3>
{
static const bool v = true;
};
template <>
struct hasBackupRestoreFacilities<CpGrid>
{
static const bool v = false;
};
}
template<class DataHandle>
void CpGrid::communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const
{
current_view_data_->communicate(data, iftype, dir);
}
template<class DataHandle>
void CpGrid::scatterData([[maybe_unused]] DataHandle& handle) const
{
#if HAVE_MPI
if (distributed_data_.empty()) {
OPM_THROW(std::runtime_error, "Moving Data only allowed with a load balanced grid!");
} else {
distributed_data_[0]->scatterData(handle, data_[0].get(),
distributed_data_[0].get(),
cellScatterGatherInterface(),
pointScatterGatherInterface());
}
#endif
}
template<class DataHandle>
void CpGrid::gatherData([[maybe_unused]] DataHandle& handle) const
{
#if HAVE_MPI
if (distributed_data_.empty()) {
OPM_THROW(std::runtime_error, "Moving Data only allowed with a load balance grid!");
} else {
distributed_data_[0]->gatherData(handle, data_[0].get(), distributed_data_[0].get());
}
#endif
}
template<class Cell2FacesRowIterator>
int
CpGrid::faceTag(const Cell2FacesRowIterator& cell_face) const
{
// Note that this relies on the following implementation detail:
// The grid is always constructed such that the interior faces constructed
// with orientation set to true are
// oriented along the positive IJK direction. Oriented means that
// the first cell attached to face has the lower index.
// For faces along the boundary (only one cell, always attached at index 0)
// the orientation has to be determined by the orientation of the cell.
// If it is true then in UnstructuredGrid it would be stored at index 0,
// otherwise at index 1.
const int cell = cell_face.getCellIndex();
const int face = *cell_face;
assert (0 <= cell); assert (cell < numCells());
assert (0 <= face); assert (face < numFaces());
typedef cpgrid::OrientedEntityTable<1,0>::row_type F2C;
const cpgrid::EntityRep<1> f(face, true);
const F2C& f2c = current_view_data_->face_to_cell_[f];
const face_tag tag = current_view_data_->face_tag_[f];
assert ((f2c.size() == 1) || (f2c.size() == 2));
int inside_cell = 0;
if ( f2c.size() == 2 ) // Two cells => interior
{
if ( f2c[1].index() == cell )
{
inside_cell = 1;
}
}
const bool normal_is_in = ! f2c[inside_cell].orientation();
switch (tag) {
case I_FACE:
// LEFT : RIGHT
return normal_is_in ? 0 : 1; // min(I) : max(I)
case J_FACE:
// BACK : FRONT
return normal_is_in ? 2 : 3; // min(J) : max(J)
case K_FACE:
// Note: TOP at min(K) as 'z' measures *depth*.
// TOP : BOTTOM
return normal_is_in ? 4 : 5; // min(K) : max(K)
case NNC_FACE:
// For nnc faces we return the otherwise unused value -1.
return -1;
default:
OPM_THROW(std::logic_error, "Unhandled face tag. This should never happen!");
}
}
template<int dim>
cpgrid::Entity<dim> createEntity(const CpGrid&, int, bool);
} // namespace Dune
#include <opm/grid/cpgrid/PersistentContainer.hpp>
#include <opm/grid/cpgrid/CartesianIndexMapper.hpp>
#include "cpgrid/Intersection.hpp"
#include "cpgrid/Geometry.hpp"
#include "cpgrid/Indexsets.hpp"
#endif // OPM_CPGRID_HEADER
Dune::CpGrid::CentroidIterator
An iterator over the centroids of the geometry of the entities.
Definition CpGrid.hpp:1253
Dune::CpGrid::CentroidIterator::CentroidIterator
CentroidIterator(GeometryIterator iter)
Constructs a new iterator from an iterator over the geometries.
Definition CpGrid.hpp:1260
Dune::CpGrid::CentroidIterator::GeometryIterator
std::vector< cpgrid::Geometry< 3-codim, 3 > >::const_iterator GeometryIterator
The type of the iterator over the codim geometries.
Definition CpGrid.hpp:1257
Dune::CpGrid
[ provides Dune::Grid ]
Definition CpGrid.hpp:203
Dune::CpGrid::loadBalance
std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< int > &parts, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:979
Dune::CpGrid::name
std::string name() const
Get the grid name.
Definition CpGrid.cpp:761
Dune::CpGrid::mapLocalCartesianIndexSetsToLeafIndexSet
std::vector< std::unordered_map< std::size_t, std::size_t > > mapLocalCartesianIndexSetsToLeafIndexSet() const
Compute for each level grid, a map from the global_cell_[ cell index in level grid ] to the leaf inde...
Definition CpGrid.cpp:726
Dune::CpGrid::switchToGlobalView
void switchToGlobalView()
Switch to the global view.
Definition CpGrid.cpp:1660
Dune::CpGrid::numBoundarySegments
unsigned int numBoundarySegments() const
returns the number of boundary segments within the macro grid
Definition CpGrid.cpp:1111
Dune::CpGrid::GridFamily
CpGridFamily GridFamily
Family typedef, why is this not defined by Grid<>?
Definition CpGrid.hpp:218
Dune::CpGrid::lbegin
Traits::template Codim< codim >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
Dune::CpGrid::gatherData
void gatherData(DataHandle &handle) const
Moves data from the distributed view to the global (all data on process) view.
Definition CpGrid.hpp:1571
Dune::CpGrid::numFaces
int numFaces(int level=-1) const
Get the number of faces.
Definition CpGrid.cpp:1153
Dune::CpGrid::localIdSet
const Traits::LocalIdSet & localIdSet() const
Access to the LocalIdSet.
Definition CpGrid.cpp:1018
Dune::CpGrid::mapLeafIndexSetToLocalCartesianIndexSets
std::vector< std::array< int, 2 > > mapLeafIndexSetToLocalCartesianIndexSets() const
Reverse map: from leaf index cell to { level, local/level Cartesian index of the cell }...
Definition CpGrid.cpp:736
Dune::CpGrid::currentData
const std::vector< std::shared_ptr< Dune::cpgrid::CpGridData > > & currentData() const
Returns either data_ or distributed_data_(if non empty).
Definition CpGrid.cpp:670
Dune::CpGrid::beginCellCentroids
CentroidIterator< 0 > beginCellCentroids() const
Get an iterator over the cell centroids positioned at the first one.
Definition CpGrid.cpp:1594
Dune::CpGrid::globalIdSet
const Traits::GlobalIdSet & globalIdSet() const
Access to the GlobalIdSet.
Definition CpGrid.cpp:1013
Dune::CpGrid::loadBalance
std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections, bool serialPartitioning, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, double imbalanceTol=1.1, bool allowDistributedWells=false)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:933
Dune::CpGrid::faceTag
int faceTag(const Cell2FacesRowIterator &cell_face) const
Get the cartesian tag associated with a face tag.
Definition CpGrid.hpp:1585
Dune::CpGrid::setUniqueBoundaryIds
void setUniqueBoundaryIds(bool uids)
Set whether we want to have unique boundary ids.
Definition CpGrid.cpp:756
Dune::CpGrid::refineAndUpdateGrid
bool refineAndUpdateGrid(const std::vector< std::array< int, 3 > > &cells_per_dim_vec, const std::vector< int > &assignRefinedLevel, const std::vector< std::string > &lgr_name_vec, const std::vector< std::array< int, 3 > > &startIJK_vec=std::vector< std::array< int, 3 > >{}, const std::vector< std::array< int, 3 > > &endIJK_vec=std::vector< std::array< int, 3 > >{})
Triggers the grid refinement process, allowing to select diffrent refined level grids.
Definition CpGrid.cpp:1846
Dune::CpGrid::loadBalance
std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, double imbalanceTol=1.1, int level=-1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:839
Dune::CpGrid::createCartesian
void createCartesian(const std::array< int, 3 > &dims, const std::array< double, 3 > &cellsize, const std::array< int, 3 > &shift={0, 0, 0})
Create a cartesian grid.
Definition CpGrid.cpp:591
Dune::CpGrid::leafend
Traits::template Codim< codim >::LeafIterator leafend() const
one past the end of the sequence of leaf entities
Dune::CpGrid::overlapSize
unsigned int overlapSize(int) const
Size of the overlap on the leaf level.
Definition CpGrid.cpp:1089
Dune::CpGrid::InterfaceMap
cpgrid::CpGridDataTraits::InterfaceMap InterfaceMap
The type of the map describing communication interfaces.
Definition CpGrid.hpp:1347
Dune::CpGrid::loadBalance
std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, int overlapLayers=1, int partitionMethod=1, int level=-1)
Distributes this grid and data over the available nodes in a distributed machine.
Definition CpGrid.hpp:882
Dune::CpGrid::lend
Traits::template Codim< codim >::LevelIterator lend(int level) const
one past the end on this level
Dune::CpGrid::faceNormal
const Vector & faceNormal(int face) const
Get the unit normal of a face.
Definition CpGrid.cpp:1579
Dune::CpGrid::numCellFaces
int numCellFaces() const
Get the sum of all faces attached to all cells.
Definition CpGrid.cpp:1221
Dune::CpGrid::globalCell
const std::vector< int > & globalCell() const
Retrieve mapping from internal ("compressed") active grid cells to external ("uncompressed") cells.
Definition CpGrid.cpp:680
Dune::CpGrid::loadBalanceSerial
bool loadBalanceSerial(int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan, int edgeWeightMethod=Dune::EdgeWeightMethod::defaultTransEdgeWgt, double imbalanceTol=1.1, int level=-1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:738
Dune::CpGrid::cellCentroid
const Vector & cellCentroid(int cell) const
Get the coordinates of the center of a cell.
Definition CpGrid.cpp:1589
Dune::CpGrid::loadBalance
bool loadBalance(int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan, double imbalanceTol=1.1, int level=-1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:705
Dune::CpGrid::maxLevel
int maxLevel() const
Return maximum level defined in this grid. Levels are 0 and 1, maxlevel = 1 (not counting leafview),...
Definition CpGrid.cpp:766
Dune::CpGrid::comm
const CpGridTraits::Communication & comm() const
Get the collective communication object.
Definition CpGrid.cpp:1136
Dune::CpGrid::faceArea
double faceArea(int face) const
Get the area of a face.
Definition CpGrid.cpp:1569
Dune::CpGrid::faceCentroid
const Vector & faceCentroid(int face) const
Get the coordinates of the center of a face.
Definition CpGrid.cpp:1574
Dune::CpGrid::levelIndexSet
const Traits::LevelIndexSet & levelIndexSet(int level) const
Access to the LevelIndexSets.
Definition CpGrid.cpp:1023
Dune::CpGrid::postAdapt
void postAdapt()
Clean up refinement markers - set every element to the mark 0 which represents 'doing nothing'.
Definition CpGrid.cpp:2385
Dune::CpGrid::size
int size(int level, int codim) const
Number of grid entities per level and codim.
Definition CpGrid.cpp:989
Dune::CpGrid::logicalCartesianSize
const std::array< int, 3 > & logicalCartesianSize() const
The logical cartesian size of the global grid.
Definition CpGrid.cpp:663
Dune::CpGrid::faceVertex
int faceVertex(int face, int local_index) const
Get the index identifying a vertex of a face.
Definition CpGrid.cpp:1231
Dune::CpGrid::numVertices
int numVertices() const
Get The number of vertices.
Definition CpGrid.cpp:1159
Dune::CpGrid::getParentIntersectionFromLgrBoundaryFace
Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection &intersection) const
Definition CpGrid.cpp:1236
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::processEclipseFormat
void processEclipseFormat(const grdecl &input_data, bool remove_ij_boundary, bool turn_normals=false, bool edge_conformal=false)
Read the Eclipse grid format ('grdecl').
Definition CpGrid.cpp:1743
Dune::CpGrid::syncDistributedGlobalCellIds
void syncDistributedGlobalCellIds()
Synchronizes cell global ids across processes after load balancing.
Definition CpGrid.cpp:2530
Dune::CpGrid::uniqueBoundaryIds
bool uniqueBoundaryIds() const
Is the grid currently using unique boundary ids?
Definition CpGrid.cpp:751
Dune::CpGrid::faceCell
int faceCell(int face, int local_index, int level=-1) const
Get the index identifying a cell attached to a face.
Definition CpGrid.cpp:1183
Dune::CpGrid::lend
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lend(int level) const
one past the end on this level
Dune::CpGrid::leafbegin
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafbegin() const
Iterator to first leaf entity of given codim and PartitionIteratorType.
Dune::CpGrid::mark
bool mark(int refCount, const cpgrid::Entity< 0 > &element)
------------— Adaptivity (begin) ------------—
Definition CpGrid.cpp:1776
Dune::CpGrid::addLgrsUpdateLeafView
void addLgrsUpdateLeafView(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=std::vector< std::string >{})
Create a grid out of a coarse one and (at most) 2 refinements(LGRs) of selected block-shaped disjoint...
Definition CpGrid.cpp:2593
Dune::CpGrid::loadBalance
bool loadBalance(DataHandle &data, decltype(data.fixedSize(0, 0)) overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan)
Distributes this grid and data over the available nodes in a distributed machine.
Definition CpGrid.hpp:1009
Dune::CpGrid::ghostSize
unsigned int ghostSize(int) const
Size of the ghost cell layer on the leaf level.
Definition CpGrid.cpp:1095
Dune::CpGrid::loadBalance
std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, int level=-1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:791
Dune::CpGrid::entity
cpgrid::Entity< codim > entity(const cpgrid::Entity< codim > &seed) const
given an EntitySeed (or EntityPointer) return an entity object
Definition CpGrid.cpp:1079
Dune::CpGrid::leafIndexSet
const Traits::LeafIndexSet & leafIndexSet() const
Access to the LeafIndexSet.
Definition CpGrid.cpp:1030
Dune::CpGrid::leafbegin
Traits::template Codim< codim >::LeafIterator leafbegin() const
Iterator to first leaf entity of given codim.
Dune::CpGrid::pointScatterGatherInterface
const InterfaceMap & pointScatterGatherInterface() const
Get an interface for gathering/scattering data attached to points with communication.
Definition CpGrid.cpp:1655
Dune::CpGrid::CpGrid
CpGrid()
Default constructor.
Definition CpGrid.cpp:167
Dune::CpGrid::lbegin
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level and PartitionIteratorType.
Dune::CpGrid::sortedNumAquiferCells
const std::vector< int > & sortedNumAquiferCells() const
Get sorted active cell indices of numerical aquifer.
Definition CpGrid.cpp:1604
Dune::CpGrid::adapt
bool adapt()
Triggers the grid refinement process.
Definition CpGrid.cpp:1812
Dune::CpGrid::switchToDistributedView
void switchToDistributedView()
Switch to the distributed view.
Definition CpGrid.cpp:1666
Dune::CpGrid::beginFaceCentroids
CentroidIterator< 1 > beginFaceCentroids() const
Get an iterator over the face centroids positioned at the first one.
Definition CpGrid.cpp:1599
Dune::CpGrid::preAdapt
bool preAdapt()
Set mightVanish flags for elements that will be refined in the next adapt() call Need to be called af...
Definition CpGrid.cpp:1800
Dune::CpGrid::getMark
int getMark(const cpgrid::Entity< 0 > &element) const
Return refinement mark for entity.
Definition CpGrid.cpp:1795
Dune::CpGrid::loadBalance
bool loadBalance(DataHandle &data, const std::vector< int > &parts, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1)
Distributes this grid and data over the available nodes in a distributed machine.
Definition CpGrid.hpp:1059
Dune::CpGrid::cellFaceRow
const cpgrid::OrientedEntityTable< 0, 1 >::row_type cellFaceRow(int cell) const
Get a list of indices identifying all faces of a cell.
Definition CpGrid.cpp:1178
Dune::CpGrid::cellScatterGatherInterface
const InterfaceMap & cellScatterGatherInterface() const
Get an interface for gathering/scattering data attached to cells with communication.
Definition CpGrid.cpp:1650
Dune::CpGrid::loadBalance
bool loadBalance(const std::vector< int > &parts, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1)
Distributes this grid over the available nodes in a distributed machine.
Definition CpGrid.hpp:1033
Dune::CpGrid::zoltanPartitionWithoutScatter
std::vector< int > zoltanPartitionWithoutScatter(const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections, const double *transmissibilities, const int numParts, const double imbalanceTol) const
Partitions the grid using Zoltan without decomposing and distributing it among processes.
Definition CpGrid.cpp:194
Dune::CpGrid::numCells
int numCells(int level=-1) const
Get the number of cells.
Definition CpGrid.cpp:1147
Dune::CpGrid::vertexPosition
const Vector & vertexPosition(int vertex) const
Get the Position of a vertex.
Definition CpGrid.cpp:1564
Dune::CpGrid::cellCenterDepth
double cellCenterDepth(int cell_index) const
Get vertical position of cell center ("zcorn" average).
Definition CpGrid.cpp:1422
Dune::CpGrid::globalRefine
void globalRefine(int refCount)
Refine the grid refCount times using the default refinement rule.
Definition CpGrid.cpp:1035
Dune::CpGrid::communicate
void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int) const
The new communication interface.
Definition CpGrid.hpp:1098
Dune::CpGrid::cellFace
int cellFace(int cell, int local_index, int level=-1) const
Get a specific face of a cell.
Definition CpGrid.cpp:1171
Dune::CpGrid::leafend
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafend() const
one past the end of the sequence of leaf entities
Dune::CpGrid::cellVolume
double cellVolume(int cell) const
Get the volume of the cell.
Definition CpGrid.cpp:1584
Dune::CpGrid::autoRefine
void autoRefine(const std::array< int, 3 > &nxnynz)
Global refine the grid with different refinement factors in each direction.
Definition CpGrid.cpp:2750
Dune::CpGrid::scatterData
void scatterData(DataHandle &handle) const
Moves data from the global (all data on process) view to the distributed view.
Definition CpGrid.hpp:1556
Dune::cpgrid::CpGridData
Struct that hods all the data needed to represent a Cpgrid.
Definition CpGridData.hpp:118
Dune::cpgrid::EntityRep
Represents an entity of a given codim, with positive or negative orientation.
Definition EntityRep.hpp:99
Dune::cpgrid::Entity
Definition Entity.hpp:72
Dune::cpgrid::Geometry
This class encapsulates geometry for vertices, intersections, and cells.
Definition Geometry.hpp:76
Dune::cpgrid::GlobalIdSet
The global id set for Dune.
Definition Indexsets.hpp:487
Dune::cpgrid::HierarchicIterator
Only needs to provide interface for doing nothing.
Definition Iterators.hpp:118
Dune::cpgrid::IdSet
Definition Indexsets.hpp:201
Dune::cpgrid::IndexSet
Definition Indexsets.hpp:56
Dune::cpgrid::IntersectionIterator
Definition Intersection.hpp:279
Dune::cpgrid::Intersection
Definition Intersection.hpp:66
Dune::cpgrid::Iterator
Iterator intended to be used as LeafIterator and LevelIterator (no difference due to no adaptivity) f...
Definition Iterators.hpp:60
Dune::cpgrid::LevelGlobalIdSet
Definition Indexsets.hpp:371
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
Dune::simple
@ simple
Use simple approach based on rectangular partitioning the underlying cartesian grid.
Definition GridEnums.hpp:46
Dune::zoltanGoG
@ zoltanGoG
use Zoltan on GraphOfGrid for partitioning
Definition GridEnums.hpp:52
Dune::zoltan
@ zoltan
Use Zoltan for partitioning.
Definition GridEnums.hpp:48
Dune::EdgeWeightMethod
EdgeWeightMethod
enum for choosing Methods for weighting graph-edges correspoding to cell interfaces in Zoltan's or Me...
Definition GridEnums.hpp:34
Dune::defaultTransEdgeWgt
@ defaultTransEdgeWgt
Use the transmissibilities as edge weights.
Definition GridEnums.hpp:38
Opm
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68
preprocess.h
Low-level corner-point processing routines and supporting data structures.
face_tag
face_tag
Connection taxonomy.
Definition preprocess.h:66
K_FACE
@ K_FACE
Connection topologically normal to I-J plane.
Definition preprocess.h:69
J_FACE
@ J_FACE
Connection topologically normal to I-K plane.
Definition preprocess.h:68
NNC_FACE
@ NNC_FACE
Arbitrary non-neighbouring connection.
Definition preprocess.h:70
I_FACE
@ I_FACE
Connection topologically normal to J-K plane.
Definition preprocess.h:67
Dune::CpGridFamily
Definition CpGrid.hpp:190
Dune::CpGridTraits::Codim::Partition
Traits associated with a specific grid partition type.
Definition CpGrid.hpp:144
Dune::CpGridTraits::Codim::Partition::LevelIterator
cpgrid::Iterator< cd, pitype > LevelIterator
The type of the iterator over the level entities of this codim on this partition.
Definition CpGrid.hpp:146
Dune::CpGridTraits::Codim::Partition::LeafIterator
cpgrid::Iterator< cd, pitype > LeafIterator
The type of the iterator over the leaf entities of this codim on this partition.
Definition CpGrid.hpp:148
Dune::CpGridTraits::Codim
Traits associated with a specific codim.
Definition CpGrid.hpp:120
Dune::CpGridTraits::Codim::Entity
cpgrid::Entity< cd > Entity
The type of the entity.
Definition CpGrid.hpp:129
Dune::CpGridTraits::Codim::Geometry
cpgrid::Geometry< 3-cd, 3 > Geometry
The type of the geometry associated with the entity.
Definition CpGrid.hpp:123
Dune::CpGridTraits::Codim::LocalGeometry
cpgrid::Geometry< 3-cd, 3 > LocalGeometry
The type of the local geometry associated with the entity.
Definition CpGrid.hpp:126
Dune::CpGridTraits::Codim::LeafIterator
cpgrid::Iterator< cd, All_Partition > LeafIterator
The type of the iterator over all leaf entities of this codim.
Definition CpGrid.hpp:135
Dune::CpGridTraits::Codim::LevelIterator
cpgrid::Iterator< cd, All_Partition > LevelIterator
The type of the iterator over all level entities of this codim.
Definition CpGrid.hpp:132
Dune::CpGridTraits::Codim::EntitySeed
cpgrid::Entity< cd > EntitySeed
The type of the entity pointer for entities of this codim.
Definition CpGrid.hpp:138
Dune::CpGridTraits::Partition
Traits associated with a specific grid partition type.
Definition CpGrid.hpp:156
Dune::CpGridTraits::Partition::LeafGridView
Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView
The type of the leaf grid view associated with this partition type.
Definition CpGrid.hpp:160
Dune::CpGridTraits::Partition::LevelGridView
Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView
The type of the level grid view associated with this partition type.
Definition CpGrid.hpp:158
Dune::CpGridTraits
Definition CpGrid.hpp:100
Dune::CpGridTraits::LevelIndexSet
cpgrid::IndexSet LevelIndexSet
The type of the level index set.
Definition CpGrid.hpp:170
Dune::CpGridTraits::LeafIntersectionIterator
cpgrid::IntersectionIterator LeafIntersectionIterator
The type of the intersection iterator at the leafs of the grid.
Definition CpGrid.hpp:109
Dune::CpGridTraits::LeafGridView
Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView
The type of the leaf grid view associated with this partition type.
Definition CpGrid.hpp:167
Dune::CpGridTraits::LevelGridView
Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView
The type of the level grid view associated with this partition type.
Definition CpGrid.hpp:165
Dune::CpGridTraits::GlobalIdSet
cpgrid::GlobalIdSet GlobalIdSet
The type of the global id set.
Definition CpGrid.hpp:174
Dune::CpGridTraits::LevelIntersectionIterator
cpgrid::IntersectionIterator LevelIntersectionIterator
The type of the intersection iterator at the levels of the grid.
Definition CpGrid.hpp:111
Dune::CpGridTraits::LeafIndexSet
cpgrid::IndexSet LeafIndexSet
The type of the leaf index set.
Definition CpGrid.hpp:172
Dune::CpGridTraits::LocalIdSet
GlobalIdSet LocalIdSet
The type of the local id set.
Definition CpGrid.hpp:176
Dune::CpGridTraits::Communication
cpgrid::CpGridDataTraits::Communication Communication
The type of the collective communication.
Definition CpGrid.hpp:179
Dune::CpGridTraits::HierarchicIterator
cpgrid::HierarchicIterator HierarchicIterator
The type of the hierarchic iterator.
Definition CpGrid.hpp:114
Dune::CpGridTraits::LevelIntersection
cpgrid::Intersection LevelIntersection
The type of the intersection at the levels of the grid.
Definition CpGrid.hpp:107
Dune::CpGridTraits::LeafIntersection
cpgrid::Intersection LeafIntersection
The type of the intersection at the leafs of the grid.
Definition CpGrid.hpp:105
Dune::CpGridTraits::Grid
CpGrid Grid
The type that implements the grid.
Definition CpGrid.hpp:102
grdecl
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56