Skip to content
Snippets Groups Projects
Commit f56916b2 authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[navierstokes] Adapt indices

* add method to determine the velocity index for a given direction
parent f2399bb1
No related branches found
No related tags found
2 merge requests!676Cleanup/staggered remove privar class,!617[WIP] Next
...@@ -55,11 +55,15 @@ struct NavierStokesCommonIndices ...@@ -55,11 +55,15 @@ struct NavierStokesCommonIndices
static constexpr int momentumXBalanceIdx = momentumBalanceIdx; //!< Index of the momentum balance equation static constexpr int momentumXBalanceIdx = momentumBalanceIdx; //!< Index of the momentum balance equation
static constexpr int momentumYBalanceIdx = momentumBalanceIdx + 1; //!< Index of the momentum balance equation static constexpr int momentumYBalanceIdx = momentumBalanceIdx + 1; //!< Index of the momentum balance equation
static constexpr int momentumZBalanceIdx = momentumBalanceIdx + 2; //!< Index of the momentum balance equation static constexpr int momentumZBalanceIdx = momentumBalanceIdx + 2; //!< Index of the momentum balance equation
static constexpr int velocityIdx = momentumBalanceIdx; //!< Index of the velocity in a solution vector
static constexpr int velocityXIdx = velocityIdx; //!< Index of the velocity in a solution vector
static constexpr int velocityYIdx = velocityIdx + 1; //!< Index of the velocity in a solution vector
static constexpr int velocityZIdx = velocityIdx + 2; //!< Index of the velocity in a solution vector
static constexpr int velocityXIdx = momentumBalanceIdx; //!< Index of the velocity in a solution vector
static constexpr int velocityYIdx = momentumBalanceIdx + 1; //!< Index of the velocity in a solution vector
static constexpr int velocityZIdx = momentumBalanceIdx + 2; //!< Index of the velocity in a solution vector
static constexpr int velocity(int dirIdx) //!< Index of the velocity in a solution vector given a certain dimension
{
return dirIdx + momentumBalanceIdx;
}
}; };
// \} // \}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment