https://mooseframework.inl.gov
NumFixedPointIterations.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // MOOSE includes
12 #include "MooseApp.h"
13 #include "Executioner.h"
14 
17  NumPicardIterations,
18  "06/30/2021 24:00",
20 
23 {
25  params.addClassDescription(
26  "Returns the number of fixed point iterations taken by the executioner.");
27  params.addParam<bool>("get_index_instead_of_count",
28  false,
29  "If true, get the current fixed point iteration index instead of the "
30  "number of fixed point iterations taken, shifting by -1");
31  return params;
32 }
33 
35  : GeneralPostprocessor(parameters),
36  _count_shift(getParam<bool>("get_index_instead_of_count") ? -1 : 0)
37 {
38 }
39 
40 Real
42 {
44 }
NumFixedPointIterations(const InputParameters &parameters)
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
Returns the number of fixed point iterations taken by the Executioner as a Postprocessor.
static InputParameters validParams()
const int _count_shift
Amount by which to shift the count.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
unsigned int numFixedPointIts() const
Get the number of fixed point iterations performed Because this returns the number of fixed point ite...
registerMooseObjectRenamed("MooseApp", NumPicardIterations, "06/30/2021 24:00", NumFixedPointIterations)
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:2142
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FixedPointSolve & fixedPointSolve()
Definition: Executioner.h:124
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
registerMooseObject("MooseApp", NumFixedPointIterations)