Skip to content
Snippets Groups Projects
Commit 7e161f40 authored by wenqing's avatar wenqing
Browse files

[Num] Added a member to ConvergenceCriterion

parent 5b2d9f21
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,10 @@ public: ...@@ -60,6 +60,10 @@ public:
//! (while solving a specific nonlinear system). //! (while solving a specific nonlinear system).
virtual void preFirstIteration() {} virtual void preFirstIteration() {}
//! Tell the ConvergenceCriterion that it is not called for the first time
//! (while solving a coupling system).
virtual void setNoFirstIteration() {}
//! Indicate that a new iteration now starts. //! Indicate that a new iteration now starts.
//! //!
//! A concrete implementation of ConvergenceCriterion might want to check //! A concrete implementation of ConvergenceCriterion might want to check
......
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
void checkResidual(const GlobalVector& residual) override; void checkResidual(const GlobalVector& residual) override;
void preFirstIteration() override { _is_first_iteration = true; } void preFirstIteration() override { _is_first_iteration = true; }
void setNoFirstIteration() override { _is_first_iteration = false; }
void reset() override { _satisfied = true; _is_first_iteration = false; } void reset() override { _satisfied = true; _is_first_iteration = false; }
bool isSatisfied() const override { return _satisfied; } bool isSatisfied() const override { return _satisfied; }
private: private:
......
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