Created
July 4, 2015 09:29
-
-
Save erthalion/8e22eab55b2191b72fec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long double TImmersedBoundaryProblem::Coord(T3dNormalGrid *grid, const int index, const int type, const int data_axis) | |
{ | |
long double step; | |
if (type == COORD_X) { | |
step = grid->GetSeparator1().Separation[0]; | |
} | |
else if (type == COORD_Y) { | |
step = grid->GetSeparator2().Separation[0]; | |
} | |
else if (type == COORD_Z) { | |
step = grid->GetSeparator3().Separation[0]; | |
} | |
else { | |
throw "Incorrect type of axis"; | |
} | |
return index * step + (type == data_axis ? 0.5 * step : 0); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment