https://mooseframework.inl.gov
Loading...
Searching...
No Matches
IterationInfo.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#include "IterationInfo.h"
11#include "SubProblem.h"
12#include "Transient.h"
13
15
18{
20 params.addClassDescription("Report the time and iteration information for the simulation.");
21
22 MultiMooseEnum items(
23 "time timestep num_linear_iterations num_nonlinear_iterations num_fixed_point_iterations");
25 "items",
26 items,
27 "The iteration information to output, if nothing is provided everything will be output.");
28 params.addParam<NonlinearSystemName>(
29 "nl_sys", "nl0", "The nonlinear system that this should report iteration info for.");
30 return params;
31}
32
34 : GeneralReporter(parameters),
35 _items(getParam<MultiMooseEnum>("items")),
36 _time_value(declareHelper<Real>("time", _dummy_real)),
37 _time_step_value(declareHelper<unsigned int>("timestep", _dummy_unsigned_int)),
38 _num_linear(declareHelper<unsigned int>("num_linear_iterations", _dummy_unsigned_int)),
39 _num_nonlinear(declareHelper<unsigned int>("num_nonlinear_iterations", _dummy_unsigned_int)),
40 _num_fixed_point(
41 declareHelper<unsigned int>("num_fixed_point_iterations", _dummy_unsigned_int)),
42 _nl_sys_num(_subproblem.nlSysNum(getParam<NonlinearSystemName>("nl_sys")))
43{
44}
45
46void
registerMooseObject("MooseApp", IterationInfo)
void ErrorVector unsigned int
FixedPointSolve & fixedPointSolve()
unsigned int numFixedPointIts() const
Get the number of fixed point iterations performed Because this returns the number of fixed point ite...
Reporter object that has a single execution of the "execute" method for each execute flag.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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.
Report the time and iteration information for the simulation.
virtual void execute() override
Execute method.
IterationInfo(const InputParameters &parameters)
static InputParameters validParams()
unsigned int & _num_nonlinear
unsigned int & _num_fixed_point
const unsigned int _nl_sys_num
The nonlinear system that this should report iteration info for.
unsigned int & _num_linear
unsigned int & _time_step_value
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2015
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const
Definition SubProblem.C:767
virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const
Definition SubProblem.C:761
int & _t_step
The number of the time step.
SubProblem & _subproblem
Reference to the Subproblem for this user object.