Skip to content
Snippets Groups Projects
Commit 940ff625 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

make the cgsolver not print any output -- at a paranoia check to make sure the...

make the cgsolver not print any output -- at a paranoia check to make sure the residual really is zero afterwards

[[Imported from SVN: r6900]]
parent 71dd9d0c
No related branches found
No related tags found
No related merge requests found
...@@ -687,14 +687,23 @@ linearizedRodNeumannToDirichletMap(const std::string& rodName, ...@@ -687,14 +687,23 @@ linearizedRodNeumannToDirichletMap(const std::string& rodName,
Dune::SeqILU0<MatrixType,RodCorrectionType,RodCorrectionType> ilu0(stiffnessMatrix,1.0); Dune::SeqILU0<MatrixType,RodCorrectionType,RodCorrectionType> ilu0(stiffnessMatrix,1.0);
// A preconditioned conjugate-gradient solver // A preconditioned conjugate-gradient solver
Dune::CGSolver<RodCorrectionType> cg(op,ilu0,1E-4,100,2); Dune::CGSolver<RodCorrectionType> cg(op,ilu0,1E-4,100,0);
// Object storing some statistics about the solving process // Object storing some statistics about the solving process
Dune::InverseOperatorResult statistics; Dune::InverseOperatorResult statistics;
// Solve! // Solve!
#ifndef NDEBUG
RodCorrectionType residual = rhs;
#endif
cg.apply(x, rhs, statistics); cg.apply(x, rhs, statistics);
#ifndef NDEBUG
// paranoia
stiffnessMatrix.mmv(x,residual);
assert(residual.infinity_norm() < 1e-4);
#endif
/////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////
// Extract the solution at the interface boundaries // Extract the solution at the interface boundaries
/////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment