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

returns the central difference approx to the derivative (direction.nabla)^2 function viz (f(t, p + direction) - 2*f(t, p) + f(t, p - direction))/|direction|^2 This derives from MooseParsedFunction, so it already knows about a function More...

#include <Grad2ParsedFunction.h>

Inheritance diagram for Grad2ParsedFunction:
[legend]

Public Member Functions

 Grad2ParsedFunction (const InputParameters &parameters)
 
virtual Real value (Real t, const Point &pt)
 

Protected Attributes

RealVectorValue _direction
 central difference direction More...
 
Real _len2
 |_direction|^2 More...
 

Detailed Description

returns the central difference approx to the derivative (direction.nabla)^2 function viz (f(t, p + direction) - 2*f(t, p) + f(t, p - direction))/|direction|^2 This derives from MooseParsedFunction, so it already knows about a function

Definition at line 27 of file Grad2ParsedFunction.h.

Constructor & Destructor Documentation

◆ Grad2ParsedFunction()

Grad2ParsedFunction::Grad2ParsedFunction ( const InputParameters &  parameters)

Definition at line 29 of file Grad2ParsedFunction.C.

30  : MooseParsedFunction(parameters), _direction(getParam<RealVectorValue>("direction"))
31 {
33  if (_len2 == 0)
34  mooseError("The direction in the Grad2ParsedFunction must have positive length.");
35 }
RealVectorValue _direction
central difference direction
Real _len2
|_direction|^2

Member Function Documentation

◆ value()

Real Grad2ParsedFunction::value ( Real  t,
const Point &  pt 
)
virtual

Definition at line 38 of file Grad2ParsedFunction.C.

39 {
40  return (_function_ptr->evaluate<Real>(t, p + _direction) -
41  2 * _function_ptr->evaluate<Real>(t, p) +
42  _function_ptr->evaluate<Real>(t, p - _direction)) /
43  _len2;
44 }
RealVectorValue _direction
central difference direction
Real _len2
|_direction|^2

Member Data Documentation

◆ _direction

RealVectorValue Grad2ParsedFunction::_direction
protected

central difference direction

Definition at line 36 of file Grad2ParsedFunction.h.

Referenced by Grad2ParsedFunction(), and value().

◆ _len2

Real Grad2ParsedFunction::_len2
protected

|_direction|^2

Definition at line 39 of file Grad2ParsedFunction.h.

Referenced by Grad2ParsedFunction(), and value().


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