Skip to content

Commit

Permalink
Merge branch 'fix_turbulent_channel' into 'master'
Browse files Browse the repository at this point in the history
Fix domain size for turbulent channel

See merge request walberla/walberla!690
  • Loading branch information
brendan-waters committed Oct 9, 2024
2 parents fb98460 + 62a9018 commit 2be81a1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/benchmarks/TurbulentChannel/TurbulentChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ namespace walberla {
WALBERLA_LOG_INFO_ON_ROOT("Creating block forest...")

const auto channelParameter = walberlaEnv.config()->getOneBlock("TurbulentChannel");
const SimulationParameters simulationParameters(channelParameter);
SimulationParameters simulationParameters(channelParameter);

// domain creation
std::shared_ptr<StructuredBlockForest> blocks;
Expand All @@ -661,7 +661,13 @@ namespace walberla {
numBlocks, cellsPerBlock);

const auto & periodicity = simulationParameters.periodicity;
const auto & domainSize = simulationParameters.domainSize;
auto & domainSize = simulationParameters.domainSize;
const Vector3<uint_t> newDomainSize(numBlocks[0] * cellsPerBlock[0], numBlocks[1] * cellsPerBlock[1], numBlocks[2] * cellsPerBlock[2]);

if(domainSize != newDomainSize) {
domainSize = newDomainSize;
WALBERLA_LOG_WARNING_ON_ROOT("\nWARNING: Domain size has changed due to the chosen domain decomposition.\n")
}

SetupBlockForest sforest;

Expand Down

0 comments on commit 2be81a1

Please sign in to comment.