Commit 60d99b0e authored by Daniel Drzisga's avatar Daniel Drzisga
Browse files

some parameter optimizations

parent 65d1e19f
Pipeline #26244 failed with stages
in 13 minutes and 43 seconds
......@@ -126,7 +126,9 @@ void convergenceBenchmark( int argc, char* argv[] )
std::vector< real_t > runTimes;
for ( uint_t maxLevel = minLevel; maxLevel <= upperLevelBound; maxLevel += 1 )
uint_t maxLevel = upperLevelBound;
// for ( uint_t maxLevel = minLevel; maxLevel <= upperLevelBound; maxLevel += 1 )
{
StokesFunction f( "f", storage, minLevel, maxLevel );
......@@ -148,7 +150,7 @@ void convergenceBenchmark( int argc, char* argv[] )
auto start = std::chrono::high_resolution_clock::now();
if ( solverName == "pminres" )
{
auto solver = hyteg::solvertemplates::stokesMinResSolver< StokesOperator >( storage, maxLevel, 1e-12, 1000000 );
auto solver = hyteg::solvertemplates::stokesMinResSolver< StokesOperator >( storage, maxLevel, 1e-8, 1000000 );
if ( auto s = std::dynamic_pointer_cast< MinResSolver< StokesOperator > >( solver ) )
s->setPrintInfo( true );
solver->solve( *L, u, f, maxLevel );
......@@ -158,19 +160,19 @@ void convergenceBenchmark( int argc, char* argv[] )
auto solver =
createStokesVelocityPressureBlockPreconditioner< StokesOperator,
P1P1StokesToP1P1StokesRestriction,
P1P1StokesToP1P1StokesProlongation >( L, 1e-12, 1e-11, 4 );
P1P1StokesToP1P1StokesProlongation >( L, 1e-8, 1e-11, 4 );
if ( auto s = std::dynamic_pointer_cast< MinResSolver< StokesOperator > >( solver ) )
s->setPrintInfo( true );
solver->solve( *L, u, f, maxLevel );
}
else if ( solverName == "schur" )
{
auto solver = createDefaultSolver( L, 1e-12, 1e-13, 100 );
auto solver = createDefaultSolver( L, 1e-8, 1e-13, 100 );
solver->solve( *L, u, f, maxLevel );
}
else if ( solverName == "pcs" )
{
auto solver = createDefaultPCSSolver( L, 1e-12, 80, 1e-13, 2 );
auto solver = createDefaultPCSSolver( L, 1e-8, 80, 1e-16, 2 );
solver->solve( *L, u, f, maxLevel );
}
else
......
Parameters
{
minLevel 2;
upperLevelBound 7;
upperLevelBound 8;
channelLength 2;
channelHeight 0.5;
......
......@@ -241,9 +241,9 @@ int main( int argc, char* argv[] )
// }
{
auto solver = createDefaultSolver( L, 1e-8, 1e-13, 2 );
// auto solver = createDefaultSolver( L, 1e-8, 1e-13, 2 );
// auto solver = createExactPCSSolver( L );
// auto solver = createDefaultPCSSolver( L, 1e-12, 80, 1e-13, 2 );
auto solver = createDefaultPCSSolver( L, 1e-7, 80, 1e-13, 2 );
// auto solver = PressureCorrectionScheme< StokesOperator >( L );
solver->solve( *L, uu, f, maxLevel );
}
......
......@@ -363,9 +363,9 @@ class PressureCorrectionScheme : public Solver< OperatorType >
, outerPressureSolver_( std::make_shared< CGSolver< SchurComplementOperatorType > >( op->getStorage(),
op->getMinLevel(),
op->getMaxLevel(),
1000,
1e-12,
1e-8,
100,
1e-16,
1e-2,
pressurePreconditioner ) )
, innerPressureSolver_( innerPressureSolver )
, schurOp_( op, innerPressureSolver_ )
......@@ -564,7 +564,7 @@ decltype( auto ) createDefaultPCSSolver( const std::shared_ptr< OperatorType > o
auto smoother =
std::make_shared< VectorialJacobiSmoother< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel(), 2. / 3. );
// auto smoother = std::make_shared< VectorialGaussSeidelSmoother< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel() );
auto coarseGridSolver = std::make_shared< CGSolver< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel() );
auto coarseGridSolver = std::make_shared< CGSolver< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel(), 1000, 1e-16, 1e-2 );
std::shared_ptr< Solver< SchurOperatorType > > pressurePrecond =
std::make_shared< IdentityPreconditioner< SchurOperatorType > >( All );
......@@ -576,7 +576,7 @@ decltype( auto ) createDefaultPCSSolver( const std::shared_ptr< OperatorType > o
auto innerMGPressureSolver = std::make_shared< GeometricMultigridSolver< AType > >(
op->getStorage(), smoother, coarseGridSolver, restrictionOp, prolongationOp, op->getMinLevel(), op->getMaxLevel(), 2, 2 );
auto innerPressureSolver =
std::make_shared< Repeater< AType > >( op->getA(), innerMGPressureSolver, absTolInner, maxIterInner );
std::make_shared< Repeater< AType > >( op->getA(), innerMGPressureSolver, absTolInner, 2 );
auto solver = std::make_shared< SchurSolverType >( op, velocitySolver, innerPressureSolver, pressurePrecond );
solver->setMaxOuterIter( maxIter );
solver->setAbsTol( absTol );
......
......@@ -127,7 +127,7 @@ decltype( auto ) createStokesVelocityPressureBlockPreconditioner( const std::sha
// multigrid solver:
auto restriction = std::make_shared< RestrictionType >();
auto prolongation = std::make_shared< ProlongationType >();
auto coarseGridSolver = std::make_shared< CGSolver< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel() );
auto coarseGridSolver = std::make_shared< CGSolver< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel(), 1000, 1e-16, 1e-2 );
// coarseGridSolverFS->setPrintInfo( true );
auto smoother =
std::make_shared< VectorialJacobiSmoother< AType > >( op->getStorage(), op->getMinLevel(), op->getMaxLevel(), 2. / 3. );
......
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