Commit 3647a0b9 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

newton controller: add flag to make it shut up

i.e. introduce a setVerbose() method

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4908 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent f8565a26
......@@ -254,6 +254,7 @@ public:
: endIterMsgStream_(std::ostringstream::out),
convergenceWriter_(asImp_())
{
verbose_ = true;
numSteps_ = 0;
this->setRelTolerance(1e-8);
......@@ -622,11 +623,17 @@ public:
std::ostringstream &endIterMsg()
{ return endIterMsgStream_; }
/*!
* \brief Specifies if the newton method ought to be chatty.
*/
void setVerbose(bool val)
{ verbose_ = val; }
/*!
* \brief Returns true iff the newton method ought to be chatty.
*/
bool verbose() const
{ return gridView_().comm().rank() == 0; }
{ return verbose_ && gridView_().comm().rank() == 0; }
protected:
/*!
......@@ -762,6 +769,7 @@ protected:
std::ostringstream endIterMsgStream_;
NewtonMethod *method_;
bool verbose_;
ConvergenceWriter convergenceWriter_;
......
Supports Markdown
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