Commit a2d156f7 authored by Marcel Koch's avatar Marcel Koch
Browse files

add sanity check to ginkgo block preconditioner test

parent 69e48ce9
......@@ -24,6 +24,7 @@
#include "hyteg/composites/P2P1TaylorHoodFunction.hpp"
#include "hyteg/composites/P2P1TaylorHoodStokesOperator.hpp"
#include "hyteg/dataexport/TimingOutput.hpp"
#include "hyteg/ginkgo/GinkgoBlockSolver.hpp"
#include "hyteg/ginkgo/GinkgoUtilities.hpp"
#include "hyteg/mesh/MeshInfo.hpp"
......@@ -45,13 +46,13 @@ namespace hyteg {
/// \param blockPreconditionerType
/// 0: velocity AMG, pressure lumped mass
/// 1: velocity Jacobi, pressure lumped mass
void petscSolveTest( std::shared_ptr< const gko::Executor > exec,
const uint_t& blockPreconditionerType,
const uint_t& level,
const MeshInfo& meshInfo,
const real_t& resEps,
const real_t& errEpsUSum,
const real_t& errEpsP )
void petscSolveTest( std::shared_ptr< gko::Executor > exec,
const uint_t& blockPreconditionerType,
const uint_t& level,
const MeshInfo& meshInfo,
const real_t& resEps,
const real_t& errEpsUSum,
const real_t& errEpsP )
{
SetupPrimitiveStorage setupStorage( meshInfo, uint_c( walberla::mpi::MPIManager::instance()->numProcesses() ) );
......@@ -126,10 +127,13 @@ void petscSolveTest( std::shared_ptr< const gko::Executor > exec,
}
walberla::WcTimer timer;
WALBERLA_LOG_INFO_ON_ROOT( "Block precond. BiCGStab solver (preconditioner: " << precondType << ") ..." )
WALBERLA_LOG_INFO_ON_ROOT( "Block precond. GMRes solver (preconditioner: " << precondType << ") ..." )
solver->solve( A, x, b, level );
timer.end();
WALBERLA_LOG_INFO_ON_ROOT( "Sanity check for block precond. GMRes solver (preconditioner: " << precondType << ") ..." )
solver->solve( A, x, b, level );
hyteg::vertexdof::projectMean( x.p, level );
WALBERLA_LOG_INFO_ON_ROOT( "time was: " << timer.last() );
......
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