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 
15 template <>
18 {
20  return params;
21 }
22 
24  : GeneralPostprocessor(params), _trex(dynamic_cast<Transient *>(_app.getExecutioner()))
25 {
26  if (!_trex)
27  mooseError("RelativeSolutionDifferenceNorm postprocessor is only for transient calculations");
28 }
29 
30 Real
32 {
34 }
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:30
virtual Real getValue() override
Returns the relative solution norm taken from the transient executioner.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< GeneralPostprocessor >()
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
RelativeSolutionDifferenceNorm(const InputParameters &parameters)
Class constructor.
Gets the relative solution norm from the transient executioner.
registerMooseObject("MooseApp", RelativeSolutionDifferenceNorm)
InputParameters validParams< RelativeSolutionDifferenceNorm >()
Transient * _trex
Transient executioner.
virtual Real relativeSolutionDifferenceNorm()
The relative L2 norm of the difference between solution and old solution vector.
Definition: Transient.C:693