Peano
Loading...
Searching...
No Matches
PeanoCurve.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
6#include "peano4/utils/Loop.h"
7
8
9namespace peano4 {
10 namespace grid {
11 class PeanoCurve;
12 struct AutomatonState;
13 }
14}
15
16
23 public:
27 static constexpr int CallStack = 0;
28
33 static constexpr int NumberOfBaseStacks = 3;
34
51
87
89 const AutomatonState& state,
90 int axis
91 );
92
99 );
100
101 static void setExitFace(AutomatonState& cell, int axis);
102 static void setEntryFace(AutomatonState& cell, int axis);
103 static void invertEvenFlag(AutomatonState& cell, int axis);
104 static void removeFaceAccessNumber(AutomatonState& cell, int face);
105 static void setFaceAccessNumber(AutomatonState& cell, int face, int value);
106
125 static std::bitset<Dimensions> getFirstVertexIndex( const AutomatonState& cell );
126
138 static int getVertexReadStackNumber(const AutomatonState& state, const std::bitset<Dimensions>& vertex );
139
143 static int getVertexWriteStackNumber(const AutomatonState& state, const std::bitset<Dimensions>& vertex );
144
165 static int getFaceNumberAlongCurve(const AutomatonState& state, int logicalFaceNumber );
166
179 static int getFaceReadStackNumber(const AutomatonState& state, int face );
180 static int getFaceWriteStackNumber(const AutomatonState& state, int face );
181
184
185 static bool isInOutStack( int number );
186 static bool isTemporaryStack( int number );
187
188 static int getInputStackNumber(const AutomatonState& state);
189 static int getOutputStackNumber(const AutomatonState& state);
190};
#define ThreePowerD
Definition Globals.h:24
AutomatonState state
Utility functions specific to the Peano SFC.
Definition PeanoCurve.h:22
static int getVertexWriteStackNumber(const AutomatonState &state, const std::bitset< Dimensions > &vertex)
static constexpr int CallStack
Definition PeanoCurve.h:27
static int getInputStackNumber(const AutomatonState &state)
static int getCellReadStackNumber(const AutomatonState &state)
static int getFaceWriteStackNumber(const AutomatonState &state, int face)
static int getFaceNumberAlongCurve(const AutomatonState &state, int logicalFaceNumber)
Faces are enumerated following the same paradigm as the vertices.
static constexpr int MaxNumberOfCoreStacksPerSpacetreeInstance
Standard (serial) number of stacks required per spacetree.
Definition PeanoCurve.h:86
static void invertEvenFlag(AutomatonState &cell, int axis)
static void removeFaceAccessNumber(AutomatonState &cell, int face)
static bool isInOutStack(int number)
static int getVertexReadStackNumber(const AutomatonState &state, const std::bitset< Dimensions > &vertex)
static int getOutputStackNumber(const AutomatonState &state)
static peano4::utils::LoopDirection getLoopDirection(const AutomatonState &state)
Holds a set bit for each dimension along which the traversal is positive.
static void setFaceAccessNumber(AutomatonState &cell, int face, int value)
static void setEntryFace(AutomatonState &cell, int axis)
static constexpr int NumberOfPeriodicBoundaryConditionStacks
In principle, there are Dimensions axes along which we can have periodic boundary conditions.
Definition PeanoCurve.h:50
static int getCellWriteStackNumber(const AutomatonState &state)
static bool isTraversePositiveAlongAxis(const AutomatonState &state, int axis)
Definition PeanoCurve.cpp:9
static bool isTemporaryStack(int number)
static constexpr int NumberOfBaseStacks
By setting the value to something bigger than 2, we effectively reserve NumberOfBaseStacks - 2 as cal...
Definition PeanoCurve.h:33
static int getFaceReadStackNumber(const AutomatonState &state, int face)
It is important to get the input/output stack ordering per stack type consistent among all grid entit...
static std::bitset< Dimensions > getFirstVertexIndex(const AutomatonState &cell)
Looks into a cell of the spacetree and gives the index of the first local vertex.
static void setExitFace(AutomatonState &cell, int axis)
std::bitset< Dimensions > LoopDirection
Is used by the z-loop.
Definition Loop.h:70