My Project
PartitionTypeIndicator.hpp
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 /*
16 Copyright 2013 Dr. Blatt - HPC-Simulation-Software & Service
17 Copyright 2013 Statoil ASA.
18 
19 This file is part of The Open Porous Media project (OPM).
20 
21 OPM is free software: you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation, either version 3 of the License, or
24 (at your option) any later version.
25 
26 OPM is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30 
31 You should have received a copy of the GNU General Public License
32 along 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 
41 namespace Dune
42 {
43 namespace cpgrid
44 {
45 class CpGridData;
46 template<int> class Entity;
47 template<int> class EntityRep;
48 
50 {
51 public:
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 
70 private:
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;
95  friend class FacePartitionTypeIterator;
96 };
97 } // end namespace Dune
98 } // end namespace cpgrid
99 
100 #endif
Struct that hods all the data needed to represent a Cpgrid.
Definition: CpGridData.hpp:123
Represents an entity of a given codim, with positive or negative orientation.
Definition: EntityRep.hpp:98
Definition: PartitionTypeIndicator.hpp:50
PartitionType getPartitionType(const EntityRep< 0 > &cell_entity) const
Get the partition type of a cell.
Definition: PartitionTypeIndicator.cpp:12
PartitionTypeIndicator(const CpGridData &data)
Constructor.
Definition: PartitionTypeIndicator.hpp:54
Copyright 2019 Equinor AS.
Definition: CartesianIndexMapper.hpp:10