Loading...
Searching...
No Matches
PartitionTypeIndicator.hpp
//===========================================================================
//
// File: PartitionTypeIndicator.hpp
//
// Created: Oct 20 2013
//
// Author(s): Markus Blatt <markus@dr-blatt.de>
//
// $Date$
//
// $Revision$
//
//===========================================================================
/*
Copyright 2013 Dr. Blatt - HPC-Simulation-Software & Service
Copyright 2013 Statoil 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_PARTITIONTYPEINDICATOR_HEADER
#define OPM_PARTITIONTYPEINDICATOR_HEADER
#include<vector>
#include <dune/grid/common/gridenums.hh>
namespace Dune
{
namespace cpgrid
{
class CpGridData;
template<int> class Entity;
template<int> class EntityRep;
class PartitionTypeIndicator
{
public:
explicit PartitionTypeIndicator(const CpGridData& data)
: grid_data_(&data)
{}
PartitionType getPartitionType(const Entity<0>& cell_entity) const;
PartitionType getPartitionType(const EntityRep<1>& face_entity) const;
PartitionType getPartitionType(const EntityRep<3>& point_entity) const;
private:
PartitionType getFacePartitionType(int i) const;
PartitionType getPointPartitionType(int i) const;
const CpGridData* grid_data_;
std::vector<char> cell_indicator_;
std::vector<char> point_indicator_;
friend class CpGridData;
friend class FacePartitionTypeIterator;
};
} // end namespace Dune
} // end namespace cpgrid
#endif
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::PartitionTypeIndicator::PartitionTypeIndicator
PartitionTypeIndicator(const CpGridData &data)
Constructor.
Definition PartitionTypeIndicator.hpp:54
Dune::cpgrid::PartitionTypeIndicator::getPartitionType
PartitionType getPartitionType(const Entity< 0 > &cell_entity) const
Get the partition type of a cell.
Definition PartitionTypeIndicator.cpp:12
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