Commit a22ba853 authored by Daniel Drzisga's avatar Daniel Drzisga
Browse files

Implemented block-smoothers in Jacobi fashion

parent f8c20e13
Pipeline #26785 failed with stages
in 9 minutes and 56 seconds
......@@ -220,12 +220,12 @@ void run( walberla::Config::BlockHandle& parameters, const SmootherFactoryType<
real_t innerCircleRadius = 1.0;
real_t outerCircleRadius = 2.0;
// MeshInfo meshInfo = MeshInfo::meshAnnulus( innerCircleRadius, outerCircleRadius, MeshInfo::CROSS, nTan, nRad );
MeshInfo meshInfo = MeshInfo::meshFaceChain( 1, 1.0, 0.25 );
MeshInfo meshInfo = MeshInfo::meshAnnulus( innerCircleRadius, outerCircleRadius, MeshInfo::CROSS, nTan, nRad );
// MeshInfo meshInfo = MeshInfo::meshFaceChain( 1, 1.0, 0.1 );
SetupPrimitiveStorage setupStorage( meshInfo, uint_c( walberla::mpi::MPIManager::instance()->numProcesses() ) );
setupStorage.setMeshBoundaryFlagsOnBoundary( 1, 0, true );
// AnnulusMap::setMap( setupStorage );
AnnulusMap::setMap( setupStorage );
const auto storage = std::make_shared< PrimitiveStorage >( setupStorage );
......@@ -460,7 +460,7 @@ void run( walberla::Config::BlockHandle& parameters, const SmootherFactoryType<
real_t solveTime = real_c( 0.0 );
real_t averageConvergenceRate = real_c( 0.0 );
const uint_t convergenceStartIter = 3;
const uint_t convergenceStartIter = 8;
uint_t i = 0;
for ( ; i < max_outer_iter; ++i )
......@@ -498,17 +498,25 @@ void run( walberla::Config::BlockHandle& parameters, const SmootherFactoryType<
real_t abs_res = std::sqrt( r.dotGlobal( r, maxLevel, Inner | NeumannBoundary ) );
rel_res = abs_res / begin_res;
WALBERLA_LOG_INFO_ON_ROOT( walberla::format( "%6d|%10.3e|%10.3e|%10.3e", i + 1, abs_res, rel_res, abs_res / abs_res_old ) );
real_t conv_rate = abs_res / abs_res_old;
WALBERLA_LOG_INFO_ON_ROOT( walberla::format( "%6d|%10.3e|%10.3e|%10.3e", i + 1, abs_res, rel_res, conv_rate ) );
solveTime += vCycleTime;
if ( i >= convergenceStartIter )
{
averageConvergenceRate += abs_res / abs_res_old;
averageConvergenceRate += conv_rate;
}
abs_res_old = abs_res;
if ( conv_rate >= 1.0 )
{
averageConvergenceRate = 1e300;
break;
}
if ( rel_res < mg_tolerance )
{
break;
......
......@@ -3,7 +3,7 @@ Parameters
nTan 12;
nRad 2;
minLevel 2;
maxLevel 4;
maxLevel 6;
vtkOutput true;
max_outer_iter 80;
......@@ -11,14 +11,14 @@ Parameters
mg_tolerance 1e-12;
coarse_tolerance 1e-20;
pre_smooth_steps 3;
post_smooth_steps 3;
pre_smooth_steps 4;
post_smooth_steps 4;
// should we use the full_tensor operators or the block wise operators?
use_full_tensor_operator false;
use_full_tensor_operator true;
// should we use a block smoother or normal smoother?
use_block_smoother true;
use_block_smoother false;
// should we use a symmetric GS?
use_symmetric false;
......@@ -27,7 +27,7 @@ Parameters
bynode_jacobi true;
// relaxation parameter
relax 0.5;
relax 0.8;
polyDegree 4;
interpolationLevel 4;
......
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