PartitionTypeIndicator.hpp
Go to the documentation of this file.
1//===========================================================================
2//
3// File: PartitionTypeIndicator.hpp
4//
5// Created: Oct 20 2013
6//
7// Author(s): Markus Blatt <markus@dr-blatt.de>
8//
9// $Date$
10//
11// $Revision$
12//
13//===========================================================================
14
15/*
16Copyright 2013 Dr. Blatt - HPC-Simulation-Software & Service
17Copyright 2013 Statoil ASA.
18
19This file is part of The Open Porous Media project (OPM).
20
21OPM is free software: you can redistribute it and/or modify
22it under the terms of the GNU General Public License as published by
23the Free Software Foundation, either version 3 of the License, or
24(at your option) any later version.
25
26OPM is distributed in the hope that it will be useful,
27but WITHOUT ANY WARRANTY; without even the implied warranty of
28MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29GNU General Public License for more details.
30
31You should have received a copy of the GNU General Public License
32along with OPM. If not, see <http://www.gnu.org/licenses/>.
33*/
34
35#ifndef OPM_PARTITIONTYPEINDICATOR_HEADER
36#define OPM_PARTITIONTYPEINDICATOR_HEADER
37
38#include<vector>
39#include <dune/grid/common/gridenums.hh>
40
41namespace Dune
42{
43namespace cpgrid
44{
45class CpGridData;
46template<int> class Entity;
47template<int> class EntityRep;
48
50{
51public:
55 : grid_data_(&data)
56 {}
60 PartitionType getPartitionType(const EntityRep<0>& cell_entity) const;
64 PartitionType getPartitionType(const EntityRep<1>& face_entity) const;
68 PartitionType getPartitionType(const EntityRep<3>& point_entity) const;
69
70private:
74 PartitionType getFacePartitionType(int i) const;
75
76
80 PartitionType getPointPartitionType(int i) const;
81
83 const CpGridData* grid_data_;
88 std::vector<char> cell_indicator_;
93 std::vector<char> point_indicator_;
94 friend class CpGridData;
96};
97} // end namespace Dune
98} // end namespace cpgrid
99
100#endif
DataHandle & data
Definition: CpGridData.hpp:1085
Struct that hods all the data needed to represent a Cpgrid.
Definition: CpGridData.hpp:131
Represents an entity of a given codim, with positive or negative orientation.
Definition: EntityRep.hpp:99
Definition: PartitionTypeIndicator.hpp:50
PartitionType getPartitionType(const EntityRep< 0 > &cell_entity) const
PartitionTypeIndicator(const CpGridData &data)
Definition: PartitionTypeIndicator.hpp:54
PartitionType getPartitionType(const EntityRep< 1 > &face_entity) const
PartitionType getPartitionType(const EntityRep< 3 > &point_entity) const
friend class FacePartitionTypeIterator
Definition: PartitionTypeIndicator.hpp:95
The namespace Dune is the main namespace for all Dune code.
Definition: common/CartesianIndexMapper.hpp:10