www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
LevelSetOlssonTerminator Class Reference

Terminates the solve based on the criteria defined in Olsson et. More...

#include <LevelSetOlssonTerminator.h>

Inheritance diagram for LevelSetOlssonTerminator:
[legend]

Public Member Functions

 LevelSetOlssonTerminator (const InputParameters &parameters)
 
virtual void execute () override
 
virtual void initialize () override
 
virtual void finalize () override
 

Protected Attributes

NumericVector< Number > & _solution_diff
 The difference of current and old solutions. More...
 
const Real & _tol
 The steady-state convergence tolerance. More...
 
const int & _min_t_steps
 The required minimum number of timesteps. More...
 

Detailed Description

Terminates the solve based on the criteria defined in Olsson et.

al. (2007).

Definition at line 23 of file LevelSetOlssonTerminator.h.

Constructor & Destructor Documentation

LevelSetOlssonTerminator::LevelSetOlssonTerminator ( const InputParameters &  parameters)

Definition at line 24 of file LevelSetOlssonTerminator.C.

25  : GeneralUserObject(params),
26  _solution_diff(_fe_problem.getNonlinearSystem().addVector("solution_diff", false, PARALLEL)),
27  _tol(getParam<Real>("tol")),
28  _min_t_steps(getParam<int>("min_steps"))
29 {
30 }
const Real & _tol
The steady-state convergence tolerance.
NumericVector< Number > & _solution_diff
The difference of current and old solutions.
const int & _min_t_steps
The required minimum number of timesteps.

Member Function Documentation

void LevelSetOlssonTerminator::execute ( )
overridevirtual

Definition at line 33 of file LevelSetOlssonTerminator.C.

34 {
35  _solution_diff = *_fe_problem.getNonlinearSystem().currentSolution();
36  _solution_diff -= _fe_problem.getNonlinearSystem().solutionOld();
37  Real delta = _solution_diff.l2_norm() / _dt;
38  _console << "Computed convergence criteria: " << delta << std::endl;
39 
40  if (_fe_problem.timeStep() < _min_t_steps)
41  return;
42  else if (delta < _tol)
43  _fe_problem.terminateSolve();
44 }
const Real & _tol
The steady-state convergence tolerance.
NumericVector< Number > & _solution_diff
The difference of current and old solutions.
const int & _min_t_steps
The required minimum number of timesteps.
virtual void LevelSetOlssonTerminator::finalize ( )
inlineoverridevirtual

Definition at line 29 of file LevelSetOlssonTerminator.h.

29 {}
virtual void LevelSetOlssonTerminator::initialize ( )
inlineoverridevirtual

Definition at line 28 of file LevelSetOlssonTerminator.h.

28 {}

Member Data Documentation

const int& LevelSetOlssonTerminator::_min_t_steps
protected

The required minimum number of timesteps.

Definition at line 39 of file LevelSetOlssonTerminator.h.

Referenced by execute().

NumericVector<Number>& LevelSetOlssonTerminator::_solution_diff
protected

The difference of current and old solutions.

Definition at line 33 of file LevelSetOlssonTerminator.h.

Referenced by execute().

const Real& LevelSetOlssonTerminator::_tol
protected

The steady-state convergence tolerance.

Definition at line 36 of file LevelSetOlssonTerminator.h.

Referenced by execute().


The documentation for this class was generated from the following files: