Loading...
Searching...
No Matches
CpGridUtilities.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_CPGRIDUTILITIES_HEADER_INCLUDED
#define OPM_CPGRIDUTILITIES_HEADER_INCLUDED
#include <opm/grid/CpGrid.hpp>
namespace Opm
{
std::pair<std::unordered_map<int, int>, std::vector<std::array<int, 3>>>
lgrIJK(const Dune::CpGrid& grid, const std::string& lgr_name);
std::pair<std::vector<double>, std::vector<double>>
lgrCOORDandZCORN(const Dune::CpGrid& grid,
int level,
const std::unordered_map<int, int>& lgrCartesianIdxToCellIdx,
const std::vector<std::array<int, 3>>& lgrIJK);
void setPillarCoordinates(int i, int j, int nx,
int topCorner, int bottomCorner,
int positionIdx,
const Dune::cpgrid::Entity<0>& topElem,
const Dune::cpgrid::Entity<0>& bottomElem,
std::vector<double>& lgrCOORD);
void processPillars(int i, int j, int nx,
const Dune::cpgrid::Entity<0>& topElem,
const Dune::cpgrid::Entity<0>& bottomElem,
std::vector<double>& lgrCOORD);
} // namespace Opm
#endif // OPM_CPGRIDUTILITIES_HEADER_INCLUDED
Opm
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68
Opm::processPillars
void processPillars(int i, int j, int nx, const Dune::cpgrid::Entity< 0 > &topElem, const Dune::cpgrid::Entity< 0 > &bottomElem, std::vector< double > &lgrCOORD)
Processes and sets the coordinates for all four pillars of a given "(i,j) column of cells".
Definition CpGridUtilities.cpp:215
Opm::setPillarCoordinates
void setPillarCoordinates(int i, int j, int nx, int topCorner, int bottomCorner, int positionIdx, const Dune::cpgrid::Entity< 0 > &topElem, const Dune::cpgrid::Entity< 0 > &bottomElem, std::vector< double > &lgrCOORD)
Sets the coordinates for a pillar.
Definition CpGridUtilities.cpp:184
Opm::lgrIJK
std::pair< std::unordered_map< int, int >, std::vector< std::array< int, 3 > > > lgrIJK(const Dune::CpGrid &grid, const std::string &lgr_name)
Retrieves Cartesian indices for a specified Local Grid Refinement (LGR) level in a Dune::CpGrid.
Definition CpGridUtilities.cpp:39
Opm::lgrCOORDandZCORN
std::pair< std::vector< double >, std::vector< double > > lgrCOORDandZCORN(const Dune::CpGrid &grid, int level, const std::unordered_map< int, int > &lgrCartesianIdxToCellIdx, const std::vector< std::array< int, 3 > > &lgrIJK)
Extracts the COORD and ZCORN values for the LGR (Local Grid Refinement) block.
Definition CpGridUtilities.cpp:73