diff --git a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp index 2b7cdc8a7f397f91def27220f188039dec07666c..e6a1f4f6f9c405151b6c764ebdefab5859ee1b66 100644 --- a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp +++ b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp @@ -20,8 +20,14 @@ //====================================================================================================================== #include "blockforest/Initialization.h" -#include "blockforest/communication/UniformBufferedScheme.h" -#include "blockforest/loadbalancing/all.h" +#include "blockforest/loadbalancing/InfoCollection.h" +#include "blockforest/loadbalancing/DynamicCurve.h" +#include "blockforest/loadbalancing/DynamicDiffusive.h" +#include "blockforest/loadbalancing/DynamicParMetis.h" +#include "blockforest/loadbalancing/StaticCurve.h" +#include "blockforest/loadbalancing/StaticParMetis.h" +#include "blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h" +#include "blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h" #include "blockforest/AABBRefinementSelection.h" #include "boundary/all.h" @@ -35,7 +41,6 @@ #include "core/timing/RemainingTimeLogger.h" #include "core/mpi/Broadcast.h" -#include "domain_decomposition/SharedSweep.h" #include "domain_decomposition/BlockSweepWrapper.h" #include "field/AddToStorage.h" @@ -43,26 +48,21 @@ #include "field/communication/PackInfo.h" #include "lbm/boundary/all.h" -#include "lbm/communication/PdfFieldPackInfo.h" #include "lbm/field/AddToStorage.h" #include "lbm/field/PdfField.h" #include "lbm/field/VelocityFieldWriter.h" #include "lbm/lattice_model/D3Q19.h" #include "lbm/refinement/all.h" #include "lbm/sweeps/CellwiseSweep.h" -#include "lbm/sweeps/SweepWrappers.h" #include "pe/basic.h" #include "pe/Types.h" #include "pe/fcd/GJKEPACollideFunctor.h" -#include "pe/vtk/BodyVtkOutput.h" #include "pe/vtk/SphereVtkOutput.h" #include "pe/vtk/EllipsoidVtkOutput.h" #include "pe/cr/ICR.h" #include "pe/synchronization/ClearSynchronization.h" #include "pe/amr/InfoCollection.h" -#include "pe/amr/weight_assignment/WeightAssignmentFunctor.h" -#include "pe/amr/weight_assignment/MetisAssignmentFunctor.h" #include "pe_coupling/amr/all.h" #include "pe_coupling/mapping/all.h" @@ -1616,7 +1616,7 @@ int main( int argc, char **argv ) } else if( loadEvaluationStrategy == "PE" ) { - pe::amr::WeightAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); + blockforest::WeightAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); blockforest.setRefreshPhantomBlockDataAssignmentFunction(weightAssignmentFunctor); } else if( loadEvaluationStrategy == "LBM" ) @@ -1700,7 +1700,7 @@ int main( int argc, char **argv ) } else if( loadEvaluationStrategy == "PE" ) { - pe::amr::MetisAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); + blockforest::MetisAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); blockforest.setRefreshPhantomBlockDataAssignmentFunction(weightAssignmentFunctor); } else if( loadEvaluationStrategy == "LBM" ) @@ -1743,7 +1743,7 @@ int main( int argc, char **argv ) } else if( loadEvaluationStrategy == "PE" ) { - pe::amr::WeightAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); + blockforest::WeightAssignmentFunctor weightAssignmentFunctor(peInfoCollection, peBlockBaseWeight ); blockforest.setRefreshPhantomBlockDataAssignmentFunction(weightAssignmentFunctor); } else if( loadEvaluationStrategy == "LBM" ) diff --git a/apps/benchmarks/GranularGas/CMakeLists.txt b/apps/benchmarks/GranularGas/CMakeLists.txt index b017add69e5080df42ac236dd5670ffbe466c020..f54ca9096aef035bd09cd0170a2c39a2b69a5576 100644 --- a/apps/benchmarks/GranularGas/CMakeLists.txt +++ b/apps/benchmarks/GranularGas/CMakeLists.txt @@ -15,11 +15,11 @@ waLBerla_add_executable ( NAME MESA_PD_LoadBalancing waLBerla_add_executable ( NAME MESA_PD_GranularGas FILES MESA_PD_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp - DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk ) + DEPENDS blockforest core mesa_pd postprocessing sqlite vtk ) waLBerla_add_executable ( NAME MESA_PD_KernelBenchmark FILES MESA_PD_KernelBenchmark.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp - DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk ) + DEPENDS blockforest core mesa_pd postprocessing sqlite vtk ) waLBerla_add_executable ( NAME MESA_PD_KernelLoadBalancing FILES MESA_PD_KernelLoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp diff --git a/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp b/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp index 1763884931f5784d8a472997af75e5c8a9a0262b..c3640e9f099eeaab3aaa0db4fef9752e7561d9ad 100644 --- a/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp +++ b/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp @@ -59,6 +59,9 @@ #include <blockforest/loadbalancing/DynamicParMetis.h> #include <blockforest/loadbalancing/InfoCollection.h> #include <blockforest/loadbalancing/PODPhantomData.h> +#include <blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h> +#include <blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h> +#include <blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h> #include <core/Abort.h> #include <core/Environment.h> #include <core/Hostname.h> @@ -73,9 +76,6 @@ #include <core/timing/Timer.h> #include <core/timing/TimingPool.h> #include <core/waLBerlaBuildInfo.h> -#include <pe/amr/level_determination/MinMaxLevelDetermination.h> -#include <pe/amr/weight_assignment/MetisAssignmentFunctor.h> -#include <pe/amr/weight_assignment/WeightAssignmentFunctor.h> #include <sqlite/SQLite.h> #include <vtk/VTKOutput.h> @@ -136,7 +136,7 @@ int main( int argc, char ** argv ) auto ic = make_shared<blockforest::InfoCollection>(); - pe::amr::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); + blockforest::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); forest->setRefreshMinTargetLevelDeterminationFunction( regrid ); bool bRebalance = true; @@ -145,28 +145,28 @@ int main( int argc, char ** argv ) bRebalance = false; } else if (params.LBAlgorithm == "Morton") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Hilbert") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Metis") { - auto assFunc = pe::amr::MetisAssignmentFunctor( ic, params.baseWeight ); + auto assFunc = blockforest::MetisAssignmentFunctor( ic, params.baseWeight ); forest->setRefreshPhantomBlockDataAssignmentFunction( assFunc ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); auto alg = blockforest::DynamicParMetis::stringToAlgorithm( params.metisAlgorithm ); auto vWeight = blockforest::DynamicParMetis::stringToWeightsToUse( params.metisWeightsToUse ); @@ -178,10 +178,10 @@ int main( int argc, char ** argv ) forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Diffusive") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicDiffusionBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + auto prepFunc = blockforest::DynamicDiffusionBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); //configure(cfg, prepFunc); //addDynamicDiffusivePropertiesToSQL(prepFunc, integerProperties, realProperties, stringProperties); forest->setRefreshPhantomBlockMigrationPreparationFunction(prepFunc); diff --git a/apps/benchmarks/GranularGas/MESA_PD_LoadBalancing.cpp b/apps/benchmarks/GranularGas/MESA_PD_LoadBalancing.cpp index b8360a14f655be9258dcbe47fb67d22a069d2875..e7de4a209f374cf0005e86b5385e96941b95ea54 100644 --- a/apps/benchmarks/GranularGas/MESA_PD_LoadBalancing.cpp +++ b/apps/benchmarks/GranularGas/MESA_PD_LoadBalancing.cpp @@ -57,6 +57,9 @@ #include <blockforest/loadbalancing/DynamicParMetis.h> #include <blockforest/loadbalancing/InfoCollection.h> #include <blockforest/loadbalancing/PODPhantomData.h> +#include <blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h> +#include <blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h> +#include <blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h> #include <core/Abort.h> #include <core/Environment.h> #include <core/math/Random.h> @@ -67,9 +70,6 @@ #include <core/OpenMP.h> #include <core/timing/Timer.h> #include <core/waLBerlaBuildInfo.h> -#include <pe/amr/level_determination/MinMaxLevelDetermination.h> -#include <pe/amr/weight_assignment/MetisAssignmentFunctor.h> -#include <pe/amr/weight_assignment/WeightAssignmentFunctor.h> #include <sqlite/SQLite.h> #include <vtk/VTKOutput.h> @@ -174,7 +174,7 @@ int main( int argc, char ** argv ) auto ic = make_shared<blockforest::InfoCollection>(); - pe::amr::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); + blockforest::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); forest->setRefreshMinTargetLevelDeterminationFunction( regrid ); bool bRebalance = true; @@ -183,28 +183,28 @@ int main( int argc, char ** argv ) bRebalance = false; } else if (params.LBAlgorithm == "Morton") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Hilbert") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Metis") { - auto assFunc = pe::amr::MetisAssignmentFunctor( ic, params.baseWeight ); + auto assFunc = blockforest::MetisAssignmentFunctor( ic, params.baseWeight ); forest->setRefreshPhantomBlockDataAssignmentFunction( assFunc ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); auto alg = blockforest::DynamicParMetis::stringToAlgorithm( params.metisAlgorithm ); auto vWeight = blockforest::DynamicParMetis::stringToWeightsToUse( params.metisWeightsToUse ); @@ -216,10 +216,10 @@ int main( int argc, char ** argv ) forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Diffusive") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicDiffusionBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + auto prepFunc = blockforest::DynamicDiffusionBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); configure(mainConf, prepFunc); addDynamicDiffusivePropertiesToSQL(prepFunc, integerProperties, realProperties, stringProperties); forest->setRefreshPhantomBlockMigrationPreparationFunction(prepFunc); diff --git a/apps/benchmarks/GranularGas/PE_LoadBalancing.cpp b/apps/benchmarks/GranularGas/PE_LoadBalancing.cpp index 511624fdeebfe51fba151c0456fc5842e3e93ee7..ecfd51e28fe3d2e1fc25682b3dae91516d83aa02 100644 --- a/apps/benchmarks/GranularGas/PE_LoadBalancing.cpp +++ b/apps/benchmarks/GranularGas/PE_LoadBalancing.cpp @@ -23,9 +23,6 @@ #include "SQLProperties.h" #include <pe/amr/InfoCollection.h> -#include <pe/amr/level_determination/MinMaxLevelDetermination.h> -#include <pe/amr/weight_assignment/MetisAssignmentFunctor.h> -#include <pe/amr/weight_assignment/WeightAssignmentFunctor.h> #include <pe/basic.h> #include <pe/synchronization/ClearSynchronization.h> #include <pe/vtk/SphereVtkOutput.h> @@ -34,6 +31,9 @@ #include <blockforest/loadbalancing/DynamicCurve.h> #include <blockforest/loadbalancing/DynamicParMetis.h> #include <blockforest/loadbalancing/PODPhantomData.h> +#include <blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h> +#include <blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h> +#include <blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h> #include <core/Abort.h> #include <core/Environment.h> #include <core/math/Random.h> @@ -132,7 +132,7 @@ int main( int argc, char ** argv ) auto ic = make_shared<blockforest::InfoCollection>(); - pe::amr::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); + blockforest::MinMaxLevelDetermination regrid(ic, params.regridMin, params.regridMax); forest->setRefreshMinTargetLevelDeterminationFunction( regrid ); bool bRebalance = true; @@ -141,28 +141,28 @@ int main( int argc, char ** argv ) bRebalance = false; } else if (params.LBAlgorithm == "Morton") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Hilbert") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); prepFunc.setMaxBlocksPerProcess( params.maxBlocksPerProcess ); forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Metis") { - auto assFunc = pe::amr::MetisAssignmentFunctor( ic, params.baseWeight ); + auto assFunc = blockforest::MetisAssignmentFunctor( ic, params.baseWeight ); forest->setRefreshPhantomBlockDataAssignmentFunction( assFunc ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); auto alg = blockforest::DynamicParMetis::stringToAlgorithm( params.metisAlgorithm ); auto vWeight = blockforest::DynamicParMetis::stringToWeightsToUse( params.metisWeightsToUse ); @@ -174,10 +174,10 @@ int main( int argc, char ** argv ) forest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (params.LBAlgorithm == "Diffusive") { - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( ic, params.baseWeight ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicDiffusionBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, params.baseWeight ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + auto prepFunc = blockforest::DynamicDiffusionBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( 1, 1, false ); //configure(cfg, prepFunc); //addDynamicDiffusivePropertiesToSQL(prepFunc, integerProperties, realProperties, stringProperties); forest->setRefreshPhantomBlockMigrationPreparationFunction(prepFunc); diff --git a/src/blockforest/loadbalancing/CMakeLists.txt b/src/blockforest/loadbalancing/CMakeLists.txt index ba4d7c69787dda149a68b01a77cbab46dc2be1ef..a40165a2e3d9c19cab092ff90ad96dc7df91ba77 100644 --- a/src/blockforest/loadbalancing/CMakeLists.txt +++ b/src/blockforest/loadbalancing/CMakeLists.txt @@ -14,4 +14,8 @@ target_sources( blockforest DynamicParMetis.cpp StaticCurve.cpp StaticParMetis.cpp - ) \ No newline at end of file + ) + + +add_subdirectory( weight_assignment ) +add_subdirectory( level_determination ) \ No newline at end of file diff --git a/src/pe/amr/level_determination/CMakeLists.txt b/src/blockforest/loadbalancing/level_determination/CMakeLists.txt similarity index 75% rename from src/pe/amr/level_determination/CMakeLists.txt rename to src/blockforest/loadbalancing/level_determination/CMakeLists.txt index 3124c8f8a9f677dfa24544cbb364b6e336331b77..34358b29daac9bd471955ceeabc0c309792e530e 100644 --- a/src/pe/amr/level_determination/CMakeLists.txt +++ b/src/blockforest/loadbalancing/level_determination/CMakeLists.txt @@ -1,4 +1,4 @@ -target_sources( pe +target_sources( blockforest PRIVATE MinMaxLevelDetermination.h MinMaxLevelDetermination.cpp diff --git a/src/pe/amr/level_determination/MinMaxLevelDetermination.cpp b/src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.cpp similarity index 97% rename from src/pe/amr/level_determination/MinMaxLevelDetermination.cpp rename to src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.cpp index 93f0b31c0600044184742c62ed8450ae74a1e7d3..f301fb84480776edd84c2b6894a8d62a1e8582ab 100644 --- a/src/pe/amr/level_determination/MinMaxLevelDetermination.cpp +++ b/src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.cpp @@ -20,9 +20,10 @@ #include "MinMaxLevelDetermination.h" +#include "core/logging/Logging.h" + namespace walberla { -namespace pe { -namespace amr { +namespace blockforest { void MinMaxLevelDetermination::operator()( std::vector< std::pair< const Block *, uint_t > > & minTargetLevels, std::vector< const Block * > &, @@ -81,6 +82,5 @@ blockforest::InfoCollection::const_iterator MinMaxLevelDetermination::getOrCreat return ic_->insert( std::make_pair(fatherId, newWeight) ).first; } -} // namespace amr -} // namespace pe +} // namespace blockforest } // namespace walberla diff --git a/src/pe/amr/level_determination/MinMaxLevelDetermination.h b/src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h similarity index 86% rename from src/pe/amr/level_determination/MinMaxLevelDetermination.h rename to src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h index a5b91e62e3631fa4ac7e1f0b1e71ec998e359ed8..1e890224067715d8f45d8f36a6e5130dcd938a1b 100644 --- a/src/pe/amr/level_determination/MinMaxLevelDetermination.h +++ b/src/blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h @@ -20,17 +20,14 @@ #pragma once -#include <pe/Types.h> -#include <pe/amr/InfoCollection.h> +#include "blockforest/Block.h" +#include "blockforest/BlockForest.h" +#include "blockforest/loadbalancing/InfoCollection.h" -#include <blockforest/Block.h> -#include <blockforest/BlockForest.h> -#include <core/logging/Logging.h> -#include <domain_decomposition/BlockDataID.h> +#include <vector> namespace walberla { -namespace pe { -namespace amr { +namespace blockforest { class MinMaxLevelDetermination { @@ -54,6 +51,5 @@ public: blockforest::InfoCollection::const_iterator getOrCreateCoarseInfo( const blockforest::BlockID& id ); }; -} // namespace amr -} // namespace pe +} // namespace blockforest } // namespace walberla diff --git a/src/pe/amr/weight_assignment/CMakeLists.txt b/src/blockforest/loadbalancing/weight_assignment/CMakeLists.txt similarity index 74% rename from src/pe/amr/weight_assignment/CMakeLists.txt rename to src/blockforest/loadbalancing/weight_assignment/CMakeLists.txt index 7fdd4999b384c2544335b37586c375037391aa28..fd84f74ceeb8512fcdc8b4982e259bd5bc5a7702 100644 --- a/src/pe/amr/weight_assignment/CMakeLists.txt +++ b/src/blockforest/loadbalancing/weight_assignment/CMakeLists.txt @@ -1,4 +1,4 @@ -target_sources( pe +target_sources( blockforest PRIVATE WeightAssignmentFunctor.h MetisAssignmentFunctor.h diff --git a/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h b/src/blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h similarity index 99% rename from src/pe/amr/weight_assignment/MetisAssignmentFunctor.h rename to src/blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h index e16d67540be79cd84eba9d650b3ec247ccf9ad1e..6e4d062a84daff6b3c054ccd6a861e75b455e451 100644 --- a/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h +++ b/src/blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h @@ -27,8 +27,7 @@ #include "domain_decomposition/PeriodicIntersectionVolume.h" namespace walberla { -namespace pe { -namespace amr { +namespace blockforest { /** * Assignment functor for ParMetis based load balancing. @@ -95,5 +94,4 @@ private: } } -} diff --git a/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h b/src/blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h similarity index 98% rename from src/pe/amr/weight_assignment/WeightAssignmentFunctor.h rename to src/blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h index e6373152aac5a98fe2a13559b788c18b8c2b50bb..2fdec3bed1c2cb6ae4f056873f692cc9fcb42b59 100644 --- a/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h +++ b/src/blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h @@ -26,8 +26,7 @@ #include "blockforest/PhantomBlockForest.h" namespace walberla { -namespace pe { -namespace amr { +namespace blockforest { /** * General assignment functor for load balancing. @@ -70,4 +69,3 @@ private: } } -} diff --git a/src/pe/amr/CMakeLists.txt b/src/pe/amr/CMakeLists.txt index b5df7ae32eecef167115b105a61e858c652dac7f..c5643990db56d8f7f61653e5ce3331dde6e0b32d 100644 --- a/src/pe/amr/CMakeLists.txt +++ b/src/pe/amr/CMakeLists.txt @@ -2,6 +2,4 @@ target_sources( pe PRIVATE InfoCollection.cpp InfoCollection.h - ) -add_subdirectory( level_determination ) -add_subdirectory( weight_assignment ) \ No newline at end of file + ) \ No newline at end of file diff --git a/tests/mesa_pd/domain/DynamicRefinement.cpp b/tests/mesa_pd/domain/DynamicRefinement.cpp index 5f1f83ef786165583ed90da6656122e36d3f83e1..1e1b6a9b9a823cc9d8885ecc8b04c93a959b8323 100644 --- a/tests/mesa_pd/domain/DynamicRefinement.cpp +++ b/tests/mesa_pd/domain/DynamicRefinement.cpp @@ -27,10 +27,10 @@ #include <blockforest/Initialization.h> #include <blockforest/loadbalancing/DynamicCurve.h> #include <blockforest/loadbalancing/InfoCollection.h> +#include <blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h> +#include <blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h> #include <core/debug/TestSubsystem.h> #include <core/logging/Logging.h> -#include <pe/amr/level_determination/MinMaxLevelDetermination.h> -#include <pe/amr/weight_assignment/WeightAssignmentFunctor.h> namespace walberla { @@ -101,14 +101,14 @@ int main( bool simple ) blockforest::DynamicCurveBalance< blockforest::NoPhantomData >( false, true, false ) ); } else { - forest->setRefreshMinTargetLevelDeterminationFunction( pe::amr::MinMaxLevelDetermination(infoCollection, 2, 5) ); + forest->setRefreshMinTargetLevelDeterminationFunction( blockforest::MinMaxLevelDetermination(infoCollection, 2, 5) ); - forest->setRefreshPhantomBlockDataAssignmentFunction( pe::amr::WeightAssignmentFunctor( infoCollection ) ); - forest->setRefreshPhantomBlockDataPackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - forest->setRefreshPhantomBlockDataUnpackFunction( pe::amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( infoCollection ) ); + forest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + forest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); forest->setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicCurveBalance< pe::amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ) ); + blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ) ); } auto ps = std::make_shared<data::ParticleStorage> (100); @@ -138,7 +138,7 @@ int main( bool simple ) if (!simple) { - forest->setRefreshMinTargetLevelDeterminationFunction( pe::amr::MinMaxLevelDetermination(infoCollection, 2, 9) ); + forest->setRefreshMinTargetLevelDeterminationFunction( blockforest::MinMaxLevelDetermination(infoCollection, 2, 9) ); } domain::createWithNeighborhood(ac, *forest, *infoCollection); forest->refresh(); diff --git a/tests/pe/MinMaxRefinement.cpp b/tests/pe/MinMaxRefinement.cpp index 1e47e2e1e3ecc3208b3a61e1426b47a4bd1080ee..6cd56cb0962c8a210c7453ef00ccaf0572c5220a 100644 --- a/tests/pe/MinMaxRefinement.cpp +++ b/tests/pe/MinMaxRefinement.cpp @@ -22,6 +22,9 @@ #include "blockforest/all.h" #include "blockforest/loadbalancing/InfoCollection.h" #include <blockforest/loadbalancing/PODPhantomData.h> +#include <blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h> +#include <blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h> +#include <blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h> #include "core/all.h" #include "domain_decomposition/all.h" #include "timeloop/SweepTimeloop.h" @@ -29,8 +32,7 @@ #include "pe/basic.h" -#include "pe/amr/level_determination/MinMaxLevelDetermination.h" -#include "pe/amr/weight_assignment/WeightAssignmentFunctor.h" +#include "pe/amr/InfoCollection.h" #include "pe/ccd/SimpleCCDDataHandling.h" #include "pe/synchronization/SyncNextNeighbors.h" #include "pe/synchronization/ClearSynchronization.h" @@ -97,15 +99,15 @@ int main( int argc, char ** argv ) auto infoCollection = make_shared<blockforest::InfoCollection>(); - amr::MinMaxLevelDetermination levelDetermination(infoCollection, 2, 5); + blockforest::MinMaxLevelDetermination levelDetermination(infoCollection, 2, 5); blockforest.setRefreshMinTargetLevelDeterminationFunction( levelDetermination ); - blockforest.setRefreshPhantomBlockDataAssignmentFunction( amr::WeightAssignmentFunctor( infoCollection ) ); - blockforest.setRefreshPhantomBlockDataPackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - blockforest.setRefreshPhantomBlockDataUnpackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest.setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( infoCollection ) ); + blockforest.setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest.setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicCurveBalance< amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ) ); + blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ) ); createSphere(*globalStorage.get(), forest->getBlockStorage(), storageID, 0, Vec3(1,1,1), 1); createSphere(*globalStorage.get(), forest->getBlockStorage(), storageID, 0, Vec3(1,1,3), 1); @@ -133,7 +135,7 @@ int main( int argc, char ** argv ) WALBERLA_MPI_BARRIER(); WALBERLA_LOG_DEVEL_ON_ROOT( "Refinement 2" ); - blockforest.setRefreshMinTargetLevelDeterminationFunction( amr::MinMaxLevelDetermination(infoCollection, 9, 20) ); + blockforest.setRefreshMinTargetLevelDeterminationFunction( blockforest::MinMaxLevelDetermination(infoCollection, 9, 20) ); createWithNeighborhoodLocalShadow(blockforest, storageID, *infoCollection); clearSynchronization( blockforest, storageID); forest->refresh(); @@ -155,7 +157,7 @@ int main( int argc, char ** argv ) WALBERLA_MPI_BARRIER(); WALBERLA_LOG_DEVEL_ON_ROOT( "Refinement 3" ); - blockforest.setRefreshMinTargetLevelDeterminationFunction( amr::MinMaxLevelDetermination(infoCollection, 2, 3) ); + blockforest.setRefreshMinTargetLevelDeterminationFunction( blockforest::MinMaxLevelDetermination(infoCollection, 2, 3) ); createWithNeighborhoodLocalShadow(blockforest, storageID, *infoCollection); clearSynchronization( blockforest, storageID); forest->refresh(); diff --git a/tests/pe/RefinementWithSpareProcesses.cpp b/tests/pe/RefinementWithSpareProcesses.cpp index ef31e726ce35d57b8c32d5cd0c5b945b39ff7cd2..946f9c3f9d2bb657060cd395ca95c572a365d01e 100644 --- a/tests/pe/RefinementWithSpareProcesses.cpp +++ b/tests/pe/RefinementWithSpareProcesses.cpp @@ -25,12 +25,13 @@ #include "blockforest/loadbalancing/DynamicParMetis.h" #include "blockforest/loadbalancing/InfoCollection.h" #include "blockforest/loadbalancing/PODPhantomData.h" +#include "blockforest/loadbalancing/level_determination/MinMaxLevelDetermination.h" +#include "blockforest/loadbalancing/weight_assignment/MetisAssignmentFunctor.h" +#include "blockforest/loadbalancing/weight_assignment/WeightAssignmentFunctor.h" #include "pe/basic.h" -#include "pe/amr/level_determination/MinMaxLevelDetermination.h" -#include "pe/amr/weight_assignment/MetisAssignmentFunctor.h" -#include "pe/amr/weight_assignment/WeightAssignmentFunctor.h" #include "pe/ccd/SimpleCCDDataHandling.h" +#include "pe/amr/InfoCollection.h" #include "core/debug/TestSubsystem.h" #include "core/grid_generator/SCIterator.h" @@ -79,30 +80,30 @@ int main( int /*argc*/, char ** /*argv*/, const std::string& LBAlgorithm ) auto ic = make_shared<blockforest::InfoCollection>(); - blockforest->setRefreshMinTargetLevelDeterminationFunction( amr::MinMaxLevelDetermination(ic, 50, 100) ); + blockforest->setRefreshMinTargetLevelDeterminationFunction( blockforest::MinMaxLevelDetermination(ic, 50, 100) ); if (LBAlgorithm == "Morton") { - blockforest->setRefreshPhantomBlockDataAssignmentFunction( amr::WeightAssignmentFunctor( ic, real_t(1) ) ); - blockforest->setRefreshPhantomBlockDataPackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - blockforest->setRefreshPhantomBlockDataUnpackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, real_t(1) ) ); + blockforest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< amr::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( false, true, false ); blockforest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (LBAlgorithm == "Hilbert") { - blockforest->setRefreshPhantomBlockDataAssignmentFunction( amr::WeightAssignmentFunctor( ic, real_t(1) ) ); - blockforest->setRefreshPhantomBlockDataPackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - blockforest->setRefreshPhantomBlockDataUnpackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, real_t(1) ) ); + blockforest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicCurveBalance< amr::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); + auto prepFunc = blockforest::DynamicCurveBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( true, true, false ); blockforest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (LBAlgorithm == "Metis") { - auto assFunc = amr::MetisAssignmentFunctor( ic, real_t(1) ); + auto assFunc = blockforest::MetisAssignmentFunctor( ic, real_t(1) ); blockforest->setRefreshPhantomBlockDataAssignmentFunction( assFunc ); - blockforest->setRefreshPhantomBlockDataPackFunction( amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - blockforest->setRefreshPhantomBlockDataUnpackFunction( amr::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataPackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataUnpackFunction( blockforest::MetisAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); auto alg = blockforest::DynamicParMetis::stringToAlgorithm( "PART_GEOM_KWAY" ); auto vWeight = blockforest::DynamicParMetis::stringToWeightsToUse( "VERTEX_WEIGHTS" ); @@ -113,10 +114,10 @@ int main( int /*argc*/, char ** /*argv*/, const std::string& LBAlgorithm ) blockforest->setRefreshPhantomBlockMigrationPreparationFunction( prepFunc ); } else if (LBAlgorithm == "Diffusive") { - blockforest->setRefreshPhantomBlockDataAssignmentFunction( amr::WeightAssignmentFunctor( ic, real_t(1) ) ); - blockforest->setRefreshPhantomBlockDataPackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - blockforest->setRefreshPhantomBlockDataUnpackFunction( amr::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); - auto prepFunc = blockforest::DynamicDiffusionBalance< amr::WeightAssignmentFunctor::PhantomBlockWeight >( 20, 12, false ); + blockforest->setRefreshPhantomBlockDataAssignmentFunction( blockforest::WeightAssignmentFunctor( ic, real_t(1) ) ); + blockforest->setRefreshPhantomBlockDataPackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + blockforest->setRefreshPhantomBlockDataUnpackFunction( blockforest::WeightAssignmentFunctor::PhantomBlockWeightPackUnpackFunctor() ); + auto prepFunc = blockforest::DynamicDiffusionBalance< blockforest::WeightAssignmentFunctor::PhantomBlockWeight >( 20, 12, false ); prepFunc.adaptInflowWithGlobalInformation( true ); prepFunc.adaptOutflowWithGlobalInformation( true ); blockforest->setRefreshPhantomBlockMigrationPreparationFunction(prepFunc);