12 struct AutomatonState;
Utility functions specific to the Peano SFC.
static int getVertexWriteStackNumber(const AutomatonState &state, const std::bitset< Dimensions > &vertex)
static constexpr int CallStack
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.
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.
static int getCellWriteStackNumber(const AutomatonState &state)
static bool isTraversePositiveAlongAxis(const AutomatonState &state, int axis)
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...
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.