Peano
Loading...
Searching...
No Matches
FaceMarker.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
8#include "tarch/la/Vector.h"
9
10
11#include <bitset>
12
13
14namespace peano4 {
15 namespace datamanagement {
16 struct FaceMarker;
17 }
18}
19
20
21std::ostream& operator<<( std::ostream& out, const peano4::datamanagement::FaceMarker& marker );
22
23
36 private:
41
46
48
50
54 std::bitset<2*Dimensions> _hasBeenRefined;
55
59 std::bitset<2*Dimensions> _willBeRefined;
60
61 std::bitset<2*Dimensions> _isLocal;
62
63 std::bitset<2*Dimensions> _isAdjacentToParallelBoundary;
64
69
70 public:
76
84 FaceMarker& select(int face);
85
96 int getSelectedFaceNumber() const;
97
102
112
133
141
146
147 std::string toString() const;
148
158 bool hasBeenRefined() const;
159 bool hasBeenRefined(int i) const;
160
161 bool willBeRefined() const;
162 bool willBeRefined(int i) const;
163
164 bool isLocal() const;
165 bool isLocal(int i) const;
166
167 bool isAdjacentToParallelBoundary() const;
168 bool isAdjacentToParallelBoundary(int i) const;
169
177
183
188 bool isInteriorFaceWithinPatch() const;
189};
190
191
std::ostream & operator<<(std::ostream &out, const peano4::datamanagement::FaceMarker &marker)
Definition FaceMarker.cpp:4
Provide information about selected face.
Definition FaceMarker.h:35
std::bitset< 2 *Dimensions > _willBeRefined
Definition FaceMarker.h:59
tarch::la::Vector< Dimensions, double > outerNormal() const
tarch::la::Vector< Dimensions, int > _relativePositionOfCellWithinFatherCell
Entries from (0,1,2).
Definition FaceMarker.h:68
FaceMarker(const peano4::grid::GridTraversalEvent &event, int select=0)
The derivation of _isLocal and _isRefined is very similar to peano4::grid::Spacetree::getFaceType().
bool hasBeenRefined() const
Has a face been refined.
int getSelectedFaceNumber() const
Return the number of the face.
tarch::la::Vector< Dimensions, double > x() const
A marker is always tied to one particular face.
tarch::la::Vector< Dimensions, double > normal() const
tarch::la::Vector< Dimensions, double > _cellCentre
Centre of the underlying cell.
Definition FaceMarker.h:40
FaceMarker & select(int face)
Selects a face within a cell, i.e.
tarch::la::Vector< Dimensions-1, int > getRelativePositionWithinFatherFace() const
Return relative position of a subface within its father face.
std::bitset< 2 *Dimensions > _hasBeenRefined
Definition FaceMarker.h:54
bool isInteriorFaceWithinPatch() const
The term patch here refers to a 3x3 or 3x3x3 refinement.
tarch::la::Vector< Dimensions, int > getRelativePositionWithinFatherCell() const
Return relative position within father cell.
std::bitset< 2 *Dimensions > _isLocal
Definition FaceMarker.h:61
tarch::la::Vector< Dimensions, double > h() const
Size of the underlying cell.
std::bitset< 2 *Dimensions > _isAdjacentToParallelBoundary
Definition FaceMarker.h:63
tarch::la::Vector< Dimensions, double > _h
Size of the underlying cell.
Definition FaceMarker.h:45
Simple vector class.
Definition Vector.h:150