Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hyteg
hyteg
Commits
a2d156f7
Commit
a2d156f7
authored
Jan 14, 2022
by
Marcel Koch
Browse files
add sanity check to ginkgo block preconditioner test
parent
69e48ce9
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/hyteg/composites/P2P1Stokes3DGinkgoSolveTest.cpp
View file @
a2d156f7
...
...
@@ -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
()
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment