Commit 96af47e7 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

Merge remote-tracking branch 'official/master' into mesa

parents 5e0f42c8 b2f8b539
--- ---
Checks: '-*,bugprone-*,-bugprone-exception-escape,misc-*,-misc-misplaced-const,modernize-*,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-use-transparent-functors,-modernize-redundant-void-arg,performance-*' Checks: '
-*,
boost-*,
bugprone-*,
-bugprone-exception-escape,
misc-*,
-misc-misplaced-const,
-misc-non-private-member-variables-in-classes,
modernize-*,
-modernize-use-auto,
-modernize-loop-convert,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-use-using,
-modernize-avoid-bind,
-modernize-return-braced-init-list,
-modernize-use-transparent-functors,
-modernize-redundant-void-arg,
-modernize-avoid-c-arrays,
mpi-*,
openmp-*,
performance-*,
portability-*,
readability-const-return-type,
readability-container-size-empty,
readability-delete-null-pointer,
readability-deleted-default,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-redundant-control-flow,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-static-accessed-through-instance,
readability-string-compare,
readability-uniqueptr-delete-release
'
WarningsAsErrors: '*' WarningsAsErrors: '*'
HeaderFilterRegex: '' HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false AnalyzeTemporaryDtors: false
FormatStyle: none
User: si11fita
CheckOptions:
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-make-shared.IgnoreMacros
value: '1'
- key: modernize-make-shared.IncludeStyle
value: '0'
- key: modernize-make-shared.MakeSmartPtrFunction
value: 'std::make_shared'
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
value: memory
- key: modernize-make-unique.IgnoreMacros
value: '1'
- key: modernize-make-unique.IncludeStyle
value: '0'
- key: modernize-make-unique.MakeSmartPtrFunction
value: 'std::make_unique'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: memory
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-pass-by-value.ValuesOnly
value: '0'
- key: modernize-raw-string-literal.ReplaceShorterLiterals
value: '0'
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-replace-random-shuffle.IncludeStyle
value: llvm
- key: modernize-use-auto.RemoveStars
value: '0'
- key: modernize-use-default-member-init.IgnoreMacros
value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '0'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-equals-default.IgnoreMacros
value: '1'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-noexcept.UseNoexceptFalse
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
- key: modernize-use-using.IgnoreMacros
value: '1'
... ...
...@@ -1399,7 +1399,7 @@ doc: ...@@ -1399,7 +1399,7 @@ doc:
############################################################################### ###############################################################################
clang-tidy: clang-tidy:
image: i10git.cs.fau.de:5005/walberla/buildenvs/clang:7.0 image: i10git.cs.fau.de:5005/walberla/buildenvs/clang:8.0
script: script:
- $CXX --version - $CXX --version
- clang-tidy -version - clang-tidy -version
...@@ -1877,4 +1877,4 @@ benchmark_gcc8: ...@@ -1877,4 +1877,4 @@ benchmark_gcc8:
benchmark_clang8: benchmark_clang8:
<<: *benchmark_definition <<: *benchmark_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/clang:8.0 image: i10git.cs.fau.de:5005/walberla/buildenvs/clang:8.0
\ No newline at end of file
...@@ -95,11 +95,13 @@ option ( WALBERLA_NO_OUTDATED_FEATURES "Show warning/errors when outdated f ...@@ -95,11 +95,13 @@ option ( WALBERLA_NO_OUTDATED_FEATURES "Show warning/errors when outdated f
"(i.e. features that will be deprecated) are used" ) "(i.e. features that will be deprecated) are used" )
# Profile guided optimization # Profile guided optimization
option ( WALBERLA_PROFILE_GENERATE "Generates Profile for Optimization" ) option ( WALBERLA_PROFILE_GENERATE "Generates Profile for Optimization" )
option ( WALBERLA_PROFILE_USE "Uses Profile to optimize" ) option ( WALBERLA_PROFILE_USE "Uses Profile to optimize" )
# Compiler Optimization # Compiler Optimization
option ( WALBERLA_OPTIMIZE_FOR_LOCALHOST "Enable compiler optimizations spcific to localhost" ) option ( WALBERLA_OPTIMIZE_FOR_LOCALHOST "Enable compiler optimizations spcific to localhost" )
option ( WALBERLA_LOG_SKIPPED "Log skipped cmake targets" ON )
# Installation Directory # Installation Directory
set ( CMAKE_INSTALL_PREFIX /usr/local/waLBerla CACHE STRING "The default installation directory." ) set ( CMAKE_INSTALL_PREFIX /usr/local/waLBerla CACHE STRING "The default installation directory." )
......
waLBerla_link_files_to_builddir( "*.dat" ) waLBerla_link_files_to_builddir( "*.dat" )
waLBerla_add_executable( NAME CouetteFlow DEPENDS blockforest boundary core field lbm postprocessing stencil timeloop vtk ) waLBerla_add_executable( NAME CouetteFlow DEPENDS blockforest boundary core field lbm postprocessing stencil timeloop vtk sqlite )
############## ##############
# Some tests # # Some tests #
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
#include "lbm/vtk/NonEquilibrium.h" #include "lbm/vtk/NonEquilibrium.h"
#include "lbm/vtk/Velocity.h" #include "lbm/vtk/Velocity.h"
#include "postprocessing/sqlite/SQLite.h" #include "sqlite/SQLite.h"
#include "stencil/D3Q15.h" #include "stencil/D3Q15.h"
#include "stencil/D3Q19.h" #include "stencil/D3Q19.h"
...@@ -871,10 +871,10 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod ...@@ -871,10 +871,10 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod
realProperties[ "simulationProgress" ] = double_c( ( outerRun + uint_t(1) ) * innerTimeSteps ) / double_c( outerTimeSteps * innerTimeSteps ); realProperties[ "simulationProgress" ] = double_c( ( outerRun + uint_t(1) ) * innerTimeSteps ) / double_c( outerTimeSteps * innerTimeSteps );
auto runId = postprocessing::storeRunInSqliteDB( sqlFile, integerProperties, stringProperties, realProperties ); auto runId = sqlite::storeRunInSqliteDB( sqlFile, integerProperties, stringProperties, realProperties );
postprocessing::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedTimeloopTiming, "Timeloop" ); sqlite::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedTimeloopTiming, "Timeloop" );
postprocessing::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedRTSTiming, "RefinementTimeStep" ); sqlite::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedRTSTiming, "RefinementTimeStep" );
postprocessing::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedRTSLTiming, "RefinementTimeStepLevelwise" ); sqlite::storeTimingPoolInSqliteDB( sqlFile, runId, *reducedRTSLTiming, "RefinementTimeStepLevelwise" );
} }
} }
} }
......
...@@ -4,4 +4,4 @@ waLBerla_link_files_to_builddir( "*.py" ) ...@@ -4,4 +4,4 @@ waLBerla_link_files_to_builddir( "*.py" )
waLBerla_add_executable ( NAME FieldCommunication waLBerla_add_executable ( NAME FieldCommunication
DEPENDS blockforest core domain_decomposition field postprocessing ) DEPENDS blockforest core domain_decomposition field postprocessing sqlite )
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "field/communication/PackInfo.h" #include "field/communication/PackInfo.h"
#include "field/communication/StencilRestrictedPackInfo.h" #include "field/communication/StencilRestrictedPackInfo.h"
#include "field/communication/UniformMPIDatatypeInfo.h" #include "field/communication/UniformMPIDatatypeInfo.h"
#include "postprocessing/sqlite/SQLite.h" #include "sqlite/SQLite.h"
#include "python_coupling/CreateConfig.h" #include "python_coupling/CreateConfig.h"
#include "stencil/D3Q7.h" #include "stencil/D3Q7.h"
#include "stencil/D3Q19.h" #include "stencil/D3Q19.h"
...@@ -414,9 +414,9 @@ int main( int argc, char **argv ) ...@@ -414,9 +414,9 @@ int main( int argc, char **argv )
stringProperties["buildType"] = std::string( WALBERLA_BUILD_TYPE ); stringProperties["buildType"] = std::string( WALBERLA_BUILD_TYPE );
stringProperties["compilerFlags"] = std::string( WALBERLA_COMPILER_FLAGS ); stringProperties["compilerFlags"] = std::string( WALBERLA_COMPILER_FLAGS );
auto runId = postprocessing::storeRunInSqliteDB( databaseFile, integerProperties, stringProperties, realProperties ); auto runId = sqlite::storeRunInSqliteDB( databaseFile, integerProperties, stringProperties, realProperties );
postprocessing::storeTimingPoolInSqliteDB( databaseFile, runId, timingPool, "TimingRoot" ); sqlite::storeTimingPoolInSqliteDB( databaseFile, runId, timingPool, "TimingRoot" );
postprocessing::storeTimingPoolInSqliteDB( databaseFile, runId, *reducedTimingPool, "TimingReduced" ); sqlite::storeTimingPoolInSqliteDB( databaseFile, runId, *reducedTimingPool, "TimingReduced" );
} }
} }
......
...@@ -3,24 +3,24 @@ waLBerla_link_files_to_builddir( *.py ) ...@@ -3,24 +3,24 @@ waLBerla_link_files_to_builddir( *.py )
waLBerla_add_executable ( NAME PE_GranularGas waLBerla_add_executable ( NAME PE_GranularGas
FILES PE_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp FILES PE_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp
DEPENDS blockforest core pe postprocessing ) DEPENDS blockforest core pe postprocessing sqlite )
waLBerla_add_executable ( NAME PE_LoadBalancing waLBerla_add_executable ( NAME PE_LoadBalancing
FILES PE_LoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp FILES PE_LoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp
DEPENDS blockforest core pe postprocessing ) DEPENDS blockforest core pe postprocessing sqlite )
waLBerla_add_executable ( NAME MESA_PD_LoadBalancing waLBerla_add_executable ( NAME MESA_PD_LoadBalancing
FILES MESA_PD_LoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_LoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk )
waLBerla_add_executable ( NAME MESA_PD_GranularGas waLBerla_add_executable ( NAME MESA_PD_GranularGas
FILES MESA_PD_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk )
waLBerla_add_executable ( NAME MESA_PD_KernelBenchmark waLBerla_add_executable ( NAME MESA_PD_KernelBenchmark
FILES MESA_PD_KernelBenchmark.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_KernelBenchmark.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk )
waLBerla_add_executable ( NAME MESA_PD_KernelLoadBalancing waLBerla_add_executable ( NAME MESA_PD_KernelLoadBalancing
FILES MESA_PD_KernelLoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_KernelLoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing sqlite vtk )
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#include <core/OpenMP.h> #include <core/OpenMP.h>
#include <core/timing/Timer.h> #include <core/timing/Timer.h>
#include <core/waLBerlaBuildInfo.h> #include <core/waLBerlaBuildInfo.h>
#include <postprocessing/sqlite/SQLite.h> #include <sqlite/SQLite.h>
#include <vtk/VTKOutput.h> #include <vtk/VTKOutput.h>
#include <functional> #include <functional>
...@@ -380,14 +380,19 @@ int main( int argc, char ** argv ) ...@@ -380,14 +380,19 @@ int main( int argc, char ** argv )
integerProperties["RPReceives"] = RPReceives; integerProperties["RPReceives"] = RPReceives;
realProperties["linkedCellsVolume"] = linkedCellsVolume; realProperties["linkedCellsVolume"] = linkedCellsVolume;
integerProperties["numLinkedCells"] = int64_c(numLinkedCells); integerProperties["numLinkedCells"] = int64_c(numLinkedCells);
realProperties["PUpS"] = double_c(PUpS);
realProperties["timer_min"] = timer_reduced->min();
realProperties["timer_max"] = timer_reduced->max();
realProperties["timer_average"] = timer_reduced->average();
realProperties["timer_total"] = timer_reduced->total();
addBuildInfoToSQL( integerProperties, realProperties, stringProperties ); addBuildInfoToSQL( integerProperties, realProperties, stringProperties );
saveToSQL(params, integerProperties, realProperties, stringProperties ); saveToSQL(params, integerProperties, realProperties, stringProperties );
addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties); addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties);
addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties); addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties);
runId = postprocessing::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties ); runId = sqlite::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties );
postprocessing::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" ); sqlite::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" );
} }
if (params.storeNodeTimings) if (params.storeNodeTimings)
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#include <core/timing/Timer.h> #include <core/timing/Timer.h>
#include <core/timing/TimingPool.h> #include <core/timing/TimingPool.h>
#include <core/waLBerlaBuildInfo.h> #include <core/waLBerlaBuildInfo.h>
#include <postprocessing/sqlite/SQLite.h> #include <sqlite/SQLite.h>
#include <vtk/VTKOutput.h> #include <vtk/VTKOutput.h>
#include <functional> #include <functional>
...@@ -378,8 +378,8 @@ int main( int argc, char ** argv ) ...@@ -378,8 +378,8 @@ int main( int argc, char ** argv )
addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties); addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties);
addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties); addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties);
runId = postprocessing::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties ); runId = sqlite::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties );
postprocessing::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" ); sqlite::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" );
} }
if (params.storeNodeTimings) if (params.storeNodeTimings)
{ {
......
...@@ -63,7 +63,7 @@ void storeNodeTimings( const uint_t runId, ...@@ -63,7 +63,7 @@ void storeNodeTimings( const uint_t runId,
realProperties[v.first] = v.second.average(); realProperties[v.first] = v.second.average();
} }
postprocessing::storeAdditionalRunInfoInSqliteDB( runId, sqlite::storeAdditionalRunInfoInSqliteDB( runId,
dbFile, dbFile,
tableName, tableName,
integerProperties, integerProperties,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <core/mpi/Gatherv.h> #include <core/mpi/Gatherv.h>
#include <core/logging/Logging.h> #include <core/logging/Logging.h>
#include <core/timing/TimingPool.h> #include <core/timing/TimingPool.h>
#include <postprocessing/sqlite/SQLite.h> #include <sqlite/SQLite.h>
namespace walberla { namespace walberla {
namespace mesa_pd { namespace mesa_pd {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <core/OpenMP.h> #include <core/OpenMP.h>
#include <core/timing/TimingTree.h> #include <core/timing/TimingTree.h>
#include <core/waLBerlaBuildInfo.h> #include <core/waLBerlaBuildInfo.h>
#include <postprocessing/sqlite/SQLite.h> #include <sqlite/SQLite.h>
#include <vtk/VTKOutput.h> #include <vtk/VTKOutput.h>
#include <functional> #include <functional>
...@@ -325,8 +325,8 @@ int main( int argc, char ** argv ) ...@@ -325,8 +325,8 @@ int main( int argc, char ** argv )
mesa_pd::addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties); mesa_pd::addDomainPropertiesToSQL(*forest, integerProperties, realProperties, stringProperties);
mesa_pd::addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties); mesa_pd::addSlurmPropertiesToSQL(integerProperties, realProperties, stringProperties);
runId = postprocessing::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties ); runId = sqlite::storeRunInSqliteDB( params.sqlFile, integerProperties, stringProperties, realProperties );
postprocessing::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" ); sqlite::storeTimingPoolInSqliteDB( params.sqlFile, runId, *tp_reduced, "Timeloop" );
} }
if (params.storeNodeTimings) if (params.storeNodeTimings)
{ {
......
...@@ -198,11 +198,11 @@ BoundaryHandling_T * MyBoundaryHandling::operator()( IBlock * const block, const ...@@ -198,11 +198,11 @@ BoundaryHandling_T * MyBoundaryHandling::operator()( IBlock * const block, const
const auto fluid = flagField->flagExists( Fluid_Flag ) ? flagField->getFlag( Fluid_Flag ) : flagField->registerFlag( Fluid_Flag ); const auto fluid = flagField->flagExists( Fluid_Flag ) ? flagField->getFlag( Fluid_Flag ) : flagField->registerFlag( Fluid_Flag );
BoundaryHandling_T * handling = new BoundaryHandling_T( "moving obstacle boundary handling", flagField, fluid, BoundaryHandling_T * handling = new BoundaryHandling_T( "moving obstacle boundary handling", flagField, fluid,
UBB_T( "UBB", UBB_Flag, pdfField, velocity_), UBB_T( "UBB", UBB_Flag, pdfField, velocity_),
Outlet_T( "Outlet", Outlet_Flag, pdfField, real_t(1) ), Outlet_T( "Outlet", Outlet_Flag, pdfField, real_t(1) ),
MEM_BB_T ( "MEM_BB", MEM_BB_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ), MEM_BB_T ( "MEM_BB", MEM_BB_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ),
MEM_CLI_T( "MEM_CLI", MEM_CLI_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ), MEM_CLI_T( "MEM_CLI", MEM_CLI_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ),
MEM_MR_T ( "MEM_MR", MEM_MR_Flag, pdfField, flagField, bodyField, fluid, *storage, *block, pdfFieldPreCol ) ); MEM_MR_T ( "MEM_MR", MEM_MR_Flag, pdfField, flagField, bodyField, fluid, *storage, *block, pdfFieldPreCol ) );
const auto ubb = flagField->getFlag( UBB_Flag ); const auto ubb = flagField->getFlag( UBB_Flag );
const auto outlet = flagField->getFlag( Outlet_Flag ); const auto outlet = flagField->getFlag( Outlet_Flag );
...@@ -522,7 +522,7 @@ public: ...@@ -522,7 +522,7 @@ public:
VTKInfoLogger( SweepTimeloop* timeloop, const shared_ptr< StructuredBlockStorage > & blocks, VTKInfoLogger( SweepTimeloop* timeloop, const shared_ptr< StructuredBlockStorage > & blocks,
const ConstBlockDataID & bodyStorageID, const std::string & baseFolder, const ConstBlockDataID & bodyStorageID, const std::string & baseFolder,
const Vector3<real_t>& u_infty ) : const Vector3<real_t>& u_infty ) :
timeloop_( timeloop ), blocks_( blocks ), bodyStorageID_( bodyStorageID ), baseFolder_( baseFolder ), u_infty_( u_infty ) timeloop_( timeloop ), blocks_( blocks ), bodyStorageID_( bodyStorageID ), baseFolder_( baseFolder ), u_infty_( u_infty )
{ } { }
void operator()() void operator()()
...@@ -677,16 +677,44 @@ int main( int argc, char **argv ) ...@@ -677,16 +677,44 @@ int main( int argc, char **argv )
for( int i = 1; i < argc; ++i ) for( int i = 1; i < argc; ++i )
{ {
if( std::strcmp( argv[i], "--Galileo" ) == 0 ) Galileo = real_c( std::atof( argv[++i] ) ); // targeted Galileo number if( std::strcmp( argv[i], "--Galileo" ) == 0 )
else if( std::strcmp( argv[i], "--diameter" ) == 0 ) diameter = real_c( std::atof( argv[++i] ) ); // diameter of the spheres, in cells per diameter {
else if( std::strcmp( argv[i], "--noViscosityIterations" ) == 0 ) noViscosityIterations = true; // keep viscosity unchanged in initial simulation Galileo = real_c( std::atof( argv[++i] ) ); // targeted Galileo number
else if( std::strcmp( argv[i], "--vtkIOInit" ) == 0 ) vtkIOInit = true; // write vtk IO for initial simulation continue;
else if( std::strcmp( argv[i], "--longDom" ) == 0 ) longDom = true; // use a domain that is extended by the original domain length in positive and negative streamwise direction }
else if( std::strcmp( argv[i], "--useMEM" ) == 0 ) // use momentum exchange coupling and the given MEM variant (BB, CLI, or MR) if( std::strcmp( argv[i], "--diameter" ) == 0 )
{ useMEM = true; memVariant = to_MEMVariant( argv[++i] ); } {
else if( std::strcmp( argv[i], "--usePSM" ) == 0 ) // use partially saturated cells method and the given PSM variant (SC1W1, SC1W2, SC2W1, SC2W2, SC3W1, or SC3W2) diameter = real_c( std::atof( argv[++i] ) ); // diameter of the spheres, in cells per diameter
{ usePSM = true; psmVariant = to_PSMVariant( argv[++i] ); } continue;
else WALBERLA_ABORT("command line argument unknown: " << argv[i] ); }
if( std::strcmp( argv[i], "--noViscosityIterations" ) == 0 )
{
noViscosityIterations = true; // keep viscosity unchanged in initial simulation
continue;
}
if( std::strcmp( argv[i], "--vtkIOInit" ) == 0 )
{
vtkIOInit = true; // write vtk IO for initial simulation
continue;
}
if( std::strcmp( argv[i], "--longDom" ) == 0 )
{
longDom = true; // use a domain that is extended by the original domain length in positive and negative streamwise direction
continue;
}
if( std::strcmp( argv[i], "--useMEM" ) == 0 ) // use momentum exchange coupling and the given MEM variant (BB, CLI, or MR)
{
useMEM = true;
memVariant = to_MEMVariant( argv[++i] );
continue;
}
if( std::strcmp( argv[i], "--usePSM" ) == 0 ) // use partially saturated cells method and the given PSM variant (SC1W1, SC1W2, SC2W1, SC2W2, SC3W1, or SC3W2)
{
usePSM = true;
psmVariant = to_PSMVariant( argv[++i] );
continue;
}
WALBERLA_ABORT("command line argument unknown: " << argv[i] );
} }
if( !useMEM && !usePSM ) WALBERLA_ABORT("No coupling method chosen via command line!\nChose either \"--useMEM MEMVARIANT\" or \"--usePSM PSMVARIANT\"!"); if( !useMEM && !usePSM ) WALBERLA_ABORT("No coupling method chosen via command line!\nChose either \"--useMEM MEMVARIANT\" or \"--usePSM PSMVARIANT\"!");
...@@ -712,24 +740,24 @@ int main( int argc, char **argv ) ...@@ -712,24 +740,24 @@ int main( int argc, char **argv )
// values are taken from the original simulation of Uhlmann, Dusek // values are taken from the original simulation of Uhlmann, Dusek
switch( int(Galileo) ) switch( int(Galileo) )
{ {
case 144: case 144:
Re_target = real_t(185.08); Re_target = real_t(185.08);
timestepsNonDim = real_t(100); timestepsNonDim = real_t(100);
break; break;
case 178: case 178:
Re_target = real_t(243.01); Re_target = real_t(243.01);
timestepsNonDim = real_t(250); timestepsNonDim = real_t(250);
break; break;
case 190: case 190:
Re_target = real_t(262.71); Re_target = real_t(262.71);
timestepsNonDim = real_t(250); timestepsNonDim = real_t(250);
break; break;
case 250: case 250:
Re_target = real_t(365.10); Re_target = real_t(365.10);
timestepsNonDim = real_t(510); timestepsNonDim = real_t(510);
break; break;
default: default:
WALBERLA_ABORT("Galileo number is different from the usual ones (144, 178, 190, or 250). No estimate of the Reynolds number available. Add this case manually!"); WALBERLA_ABORT("Galileo number is different from the usual ones (144, 178, 190, or 250). No estimate of the Reynolds number available. Add this case manually!");
} }
// estimate fitting inflow velocity (diffusive scaling, viscosity is fixed) // estimate fitting inflow velocity (diffusive scaling, viscosity is fixed)
...@@ -890,7 +918,7 @@ int main( int argc, char **argv ) ...@@ -890,7 +918,7 @@ int main( int argc, char **argv )
// add boundary handling & initialize outer domain boundaries // add boundary handling & initialize outer domain boundaries
BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >( BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID, pdfFieldPreColID, uInfty ), "boundary handling" ); MyBoundaryHandling( flagFieldID, pdfFieldID, bodyFieldID, pdfFieldPreColID, uInfty ), "boundary handling" );
if( usePSM ){ if( usePSM ){
// mapping of sphere required by PSM methods // mapping of sphere required by PSM methods
...@@ -969,8 +997,8 @@ int main( int argc, char **argv ) ...@@ -969,8 +997,8 @@ int main( int argc, char **argv )
// add LBM communication function and boundary handling sweep // add LBM communication function and boundary handling sweep
timeloopInit.add() timeloopInit.add()
<< BeforeFunction( commFunction, "LBM Communication" ) << BeforeFunction( commFunction, "LBM Communication" )
<< Sweep( BoundaryHandling_T::getBlockSweep( boundaryHandlingID ), "Boundary Handling" ); << Sweep( BoundaryHandling_T::getBlockSweep( boundaryHandlingID ), "Boundary Handling" );