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 25 of file Grad2ParsedFunction.h.

Constructor & Destructor Documentation

Grad2ParsedFunction::Grad2ParsedFunction ( const InputParameters &  parameters)

Definition at line 25 of file Grad2ParsedFunction.C.

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

Member Function Documentation

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

Definition at line 34 of file Grad2ParsedFunction.C.

35 {
36  return (_function_ptr->evaluate<Real>(t, p + _direction) -
37  2 * _function_ptr->evaluate<Real>(t, p) +
38  _function_ptr->evaluate<Real>(t, p - _direction)) /
39  _len2;
40 }
RealVectorValue _direction
central difference direction
Real _len2
|_direction|^2

Member Data Documentation

RealVectorValue Grad2ParsedFunction::_direction
protected

central difference direction

Definition at line 34 of file Grad2ParsedFunction.h.

Referenced by Grad2ParsedFunction(), and value().

Real Grad2ParsedFunction::_len2
protected

|_direction|^2

Definition at line 37 of file Grad2ParsedFunction.h.

Referenced by Grad2ParsedFunction(), and value().


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