www.mooseframework.org
ReferenceResidualProblem.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef REFERENCERESIDUALPROBLEM_H
9 #define REFERENCERESIDUALPROBLEM_H
10 
11 #include "FEProblem.h"
12 
14 
15 template <>
17 
22 class ReferenceResidualProblem : public FEProblem
23 {
24 public:
25  ReferenceResidualProblem(const InputParameters & params);
26  virtual ~ReferenceResidualProblem();
27 
28  virtual void initialSetup();
29  virtual void timestepSetup();
31  virtual MooseNonlinearConvergenceReason checkNonlinearConvergence(std::string & msg,
32  const PetscInt it,
33  const Real xnorm,
34  const Real snorm,
35  const Real fnorm,
36  const Real rtol,
37  const Real stol,
38  const Real abstol,
39  const PetscInt nfuncs,
40  const PetscInt max_funcs,
41  const Real ref_resid,
42  const Real div_threshold);
43 
44  bool checkConvergenceIndividVars(const Real fnorm,
45  const Real abstol,
46  const Real rtol,
47  const Real ref_resid);
48 
49 protected:
53  std::vector<std::string> _solnVarNames;
54  std::vector<std::string> _refResidVarNames;
56 
59  std::vector<unsigned int> _solnVars;
60  std::vector<unsigned int> _refResidVars;
62 
70 
73  std::vector<Real> _refResid;
74  std::vector<Real> _resid;
76 };
77 
78 #endif /* REFERENCERESIDUALPROBLEM_H */
std::vector< unsigned int > _solnVars
InputParameters validParams< ReferenceResidualProblem >()
virtual MooseNonlinearConvergenceReason checkNonlinearConvergence(std::string &msg, const PetscInt it, const Real xnorm, const Real snorm, const Real fnorm, const Real rtol, const Real stol, const Real abstol, const PetscInt nfuncs, const PetscInt max_funcs, const Real ref_resid, const Real div_threshold)
std::vector< std::string > _solnVarNames
bool checkConvergenceIndividVars(const Real fnorm, const Real abstol, const Real rtol, const Real ref_resid)
FEProblemBase derived class to enable convergence checking relative to a user-specified postprocessor...
std::vector< unsigned int > _refResidVars
std::vector< std::string > _refResidVarNames
ReferenceResidualProblem(const InputParameters &params)