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

[appl] add average grid bounding box

parent 42d28e6b
No related branches found
No related tags found
1 merge request!15Feature/line average over whole domani and postprocessing
......@@ -190,9 +190,11 @@ int main(int argc, char** argv)
// Make a grid for the volume averaged elements
using AveragedGrid = Dune::YaspGrid<2>;
DimensionPair numVolumes = getParam<DimensionPair>("VolumeAveraging.NumVolumes");
std::pair<GlobalPosition, GlobalPosition> averageBox = {getParam<GlobalPosition>("VolumeAveraging.AverageBoxMin"),
getParam<GlobalPosition>("VolumeAveraging.AverageBoxMax")};
auto averageGrid = Dune::StructuredGridFactory<AveragedGrid>::createCubeGrid(
{porousMediaBox.first},
{porousMediaBox.second},
{averageBox.first},
{averageBox.second},
{numVolumes[0], numVolumes[1]});
using AveragedGridGeometry = CCTpfaFVGridGeometry<typename AveragedGrid::LeafGridView>;
auto averagedGridGeometry = std::make_shared<AveragedGridGeometry>(averageGrid->leafGridView());
......
......@@ -26,6 +26,8 @@ GridInputFileName = gridfiles/PoreGeometry_Random-1.csv # gridfiles/*.csv
[VolumeAveraging]
NumVolumes = 10 5
AverageBoxMin = 0.0 0.0
AverageBoxMax = 1.0 0.5
NumPoreScaleCellsPerBlock = 20
[Newton]
......
......@@ -193,9 +193,11 @@ int main(int argc, char** argv)
// Make a grid for the volume averaged elements
using AveragedGrid = Dune::YaspGrid<2>;
DimensionPair numVolumes = getParam<DimensionPair>("VolumeAveraging.NumVolumes");
std::pair<GlobalPosition, GlobalPosition> averageBox = {getParam<GlobalPosition>("VolumeAveraging.AverageBoxMin"),
getParam<GlobalPosition>("VolumeAveraging.AverageBoxMax")};
auto averageGrid = Dune::StructuredGridFactory<AveragedGrid>::createCubeGrid(
{porousMediaBox.first},
{porousMediaBox.second},
{averageBox.first},
{averageBox.second},
{numVolumes[0], numVolumes[1]});
using AveragedGridGeometry = CCTpfaFVGridGeometry<typename AveragedGrid::LeafGridView>;
auto averagedGridGeometry = std::make_shared<AveragedGridGeometry>(averageGrid->leafGridView());
......
......@@ -26,6 +26,8 @@ GridInputFileName = gridfiles/PoreGeometry_Random-1.csv # gridfiles/*.csv
[VolumeAveraging]
NumVolumes = 10 5
AverageBoxMin = 0.0 0.0
AverageBoxMax = 1.0 0.5
NumPoreScaleCellsPerBlock = 20
[Newton]
......
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