www.mooseframework.org
RelativeSolutionDifferenceNorm.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 #include "Transient.h"
12 
14 
17 {
19 
20  params.addClassDescription(
21  "Computes the relative norm of the solution difference of two consecutive time steps.");
22 
23  return params;
24 }
25 
27  : GeneralPostprocessor(params), _trex(dynamic_cast<Transient *>(_app.getExecutioner()))
28 {
29  if (!_trex)
30  mooseError("RelativeSolutionDifferenceNorm postprocessor is only for transient calculations");
31 }
32 
33 Real
35 {
37 }
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:26
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...
static InputParameters validParams()
RelativeSolutionDifferenceNorm(const InputParameters &parameters)
Class constructor.
Gets the relative solution norm from the transient executioner.
registerMooseObject("MooseApp", RelativeSolutionDifferenceNorm)
virtual Real getValue() const override
Returns the relative solution norm taken from the transient executioner.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Transient * _trex
Transient executioner.
virtual Real relativeSolutionDifferenceNorm()
The relative L2 norm of the difference between solution and old solution vector.
Definition: Transient.C:717
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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...