Commit e0423ba9 authored by Michael Kuron's avatar Michael Kuron
Browse files

Fix boundary force test case

parent 6a2b19f0
......@@ -132,7 +132,7 @@ int main( int argc, char ** argv )
const uint_t yBlocks = ( processes >= 4 ) ? uint_c(2) : uint_c(1);
const uint_t zBlocks = ( processes >= 2 ) ? uint_c(2) : uint_c(1);
const uint_t L = uint_t(50);
const uint_t L = uint_t(64);
auto blocks = blockforest::createUniformBlockGrid( xBlocks, yBlocks, zBlocks,
L / xBlocks,
......@@ -157,11 +157,13 @@ int main( int argc, char ** argv )
geometry::Sphere sphere( Vector3<real_t>( real_t(L/2), real_t(L/2), real_t(L/2) ), R );
bodyInitializer.template init< geometry::Sphere >( sphere, UBB_Sphere_Flag );
geometry::initializer::BoundaryFromDomainBorder< BoundaryHandling_T > borderInitializer( *blocks, boundaryHandlingId );
borderInitializer.init( UBB_Wall_Flag, stencil::T, cell_idx_t(-1) );
borderInitializer.init( UBB_Wall_Flag, stencil::B, cell_idx_t(-1) );
borderInitializer.init( UBB_Wall_Flag, stencil::N, cell_idx_t(-1) );
borderInitializer.init( UBB_Wall_Flag, stencil::S, cell_idx_t(-1) );
borderInitializer.init( UBB_Wall_Flag, stencil::E, cell_idx_t(-1) );
borderInitializer.init( UBB_Wall_Flag, stencil::W, cell_idx_t(-1) );
geometry::setNonBoundaryCellsToDomain< BoundaryHandling_T >( *blocks, boundaryHandlingId );
uint_t timeSteps = uint_c(1000);
uint_t timeSteps = uint_c(200);
if( argc > 1 )
timeSteps = boost::lexical_cast<uint_t>( argv[1] );
SweepTimeloop timeloop( blocks->getBlockStorage(), timeSteps );
......@@ -214,9 +216,9 @@ int main( int argc, char ** argv )
real_t err = (force-stokes).length() / stokes.length();
WALBERLA_LOG_RESULT_ON_ROOT("Relative error: " << (real_t(100)*err) << " %");
if( timeSteps > 200 )
if( timeSteps > 100 )
{
WALBERLA_CHECK_LESS(err, 0.06);
WALBERLA_CHECK_LESS(err, 0.1);
WALBERLA_LOG_PROGRESS_ON_ROOT("Test succeeded");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment