Skip to content
Snippets Groups Projects
Commit cb9478d0 authored by Ned Coltman's avatar Ned Coltman
Browse files

[test][staggered][discretization] make test 3d, write out all distance (cell...

[test][staggered][discretization] make test 3d, write out all distance (cell centered and parallel widths)
parent 844aadbd
No related branches found
No related tags found
1 merge request!1543[staggered][geometry] Store two parallel distances per svcf lateral axis, not three
...@@ -89,7 +89,7 @@ int main (int argc, char *argv[]) try ...@@ -89,7 +89,7 @@ int main (int argc, char *argv[]) try
// parse command line arguments and input file // parse command line arguments and input file
Parameters::init(argc, argv); Parameters::init(argc, argv);
using Grid = Dune::YaspGrid<2>; using Grid = Dune::YaspGrid<3>;
constexpr int dim = Grid::dimension; constexpr int dim = Grid::dimension;
...@@ -105,7 +105,7 @@ int main (int argc, char *argv[]) try ...@@ -105,7 +105,7 @@ int main (int argc, char *argv[]) try
// make a grid // make a grid
GlobalPosition lower(0.0); GlobalPosition lower(0.0);
GlobalPosition upper(10.0); GlobalPosition upper(10.0);
std::array<unsigned int, dim> els{{5, 5}}; std::array<unsigned int, dim> els{{5, 5, 5}};
std::shared_ptr<Grid> grid = Dune::StructuredGridFactory<Grid>::createCubeGrid(lower, upper, els); std::shared_ptr<Grid> grid = Dune::StructuredGridFactory<Grid>::createCubeGrid(lower, upper, els);
auto leafGridView = grid->leafGridView(); auto leafGridView = grid->leafGridView();
...@@ -196,7 +196,15 @@ int main (int argc, char *argv[]) try ...@@ -196,7 +196,15 @@ int main (int argc, char *argv[]) try
{ {
for(int j = 0; j < fvGridGeometry.upwindStencilOrder(); j++) for(int j = 0; j < fvGridGeometry.upwindStencilOrder(); j++)
{ {
std::cout << " | Parallel Distance "<< j << " on axis " << i << ": "<< std::setw(3) << scvf.pairData(i).parallelDistances[j] << "\n"; std::cout << " | Parallel Cell Widths "<< j << " on axis " << i << ": "<< std::setw(3) << scvf.pairData(i).parallelCellWidths[j] << "\n";
}
}
for(int i = 0; i < scvf.pairData().size(); i++)
{
for(int j = 0; j < fvGridGeometry.upwindStencilOrder(); j++)
{
std::cout << " | Cell Centered Parallel Distance "<< j << " on axis " << i << ": "<< std::setw(3) << scvf.cellCenteredParallelDistance(i,j) << "\n";
} }
} }
std::cout << std::endl; std::cout << std::endl;
......
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