https://mooseframework.inl.gov
Loading...
Searching...
No Matches
src
postprocessors
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
11
#include "
NumFixedPointIterations.h
"
12
#include "
MooseApp.h
"
13
#include "
Executioner.h
"
14
15
registerMooseObject
(
"MooseApp"
,
NumFixedPointIterations
);
16
registerMooseObjectRenamed
(
"MooseApp"
,
17
NumPicardIterations,
18
"06/30/2021 24:00"
,
19
NumFixedPointIterations
);
20
21
InputParameters
22
NumFixedPointIterations::validParams
()
23
{
24
InputParameters
params =
GeneralPostprocessor::validParams
();
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
34
NumFixedPointIterations::NumFixedPointIterations
(
const
InputParameters
& parameters)
35
:
GeneralPostprocessor
(parameters),
36
_count_shift(getParam<bool>(
"get_index_instead_of_count"
) ? -1 : 0)
37
{
38
}
39
40
Real
41
NumFixedPointIterations::getValue
()
const
42
{
43
return
_app
.
getExecutioner
()->
fixedPointSolve
().
numFixedPointIts
() +
_count_shift
;
44
}
Executioner.h
MooseApp.h
registerMooseObjectRenamed
registerMooseObjectRenamed("MooseApp", NumPicardIterations, "06/30/2021 24:00", NumFixedPointIterations)
registerMooseObject
registerMooseObject("MooseApp", NumFixedPointIterations)
NumFixedPointIterations.h
Executioner::fixedPointSolve
FixedPointSolve & fixedPointSolve()
Definition
Executioner.h:124
FixedPointSolve::numFixedPointIts
unsigned int numFixedPointIts() const
Get the number of fixed point iterations performed Because this returns the number of fixed point ite...
Definition
FixedPointSolve.h:58
GeneralPostprocessor
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
Definition
GeneralPostprocessor.h:22
GeneralPostprocessor::validParams
static InputParameters validParams()
Definition
GeneralPostprocessor.C:13
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition
InputParameters.h:68
InputParameters::addParam
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.
Definition
InputParameters.h:1832
InputParameters::addClassDescription
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.
Definition
InputParameters.C:81
MooseApp::getExecutioner
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition
MooseApp.C:2015
MooseObject::_app
MooseApp & _app
The MOOSE application this is associated with.
Definition
MooseBase.h:375
NumFixedPointIterations
Returns the number of fixed point iterations taken by the Executioner as a Postprocessor.
Definition
NumFixedPointIterations.h:19
NumFixedPointIterations::_count_shift
const int _count_shift
Amount by which to shift the count.
Definition
NumFixedPointIterations.h:32
NumFixedPointIterations::getValue
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
Definition
NumFixedPointIterations.C:41
NumFixedPointIterations::NumFixedPointIterations
NumFixedPointIterations(const InputParameters ¶meters)
Definition
NumFixedPointIterations.C:34
NumFixedPointIterations::validParams
static InputParameters validParams()
Definition
NumFixedPointIterations.C:22
Generated on Fri Aug 21 2026 13:33:59 for https://mooseframework.inl.gov by
1.9.8