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

#include <PresetVelocity.h>

Inheritance diagram for PresetVelocity:
[legend]

Public Member Functions

 PresetVelocity (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpValue ()
 

Protected Attributes

const VariableValue & _u_old
 
const Real _velocity
 
Function & _function
 

Detailed Description

Definition at line 12 of file PresetVelocity.h.

Constructor & Destructor Documentation

PresetVelocity::PresetVelocity ( const InputParameters &  parameters)

Definition at line 21 of file PresetVelocity.C.

22  : PresetNodalBC(parameters),
23  _u_old(valueOld()),
24  _velocity(parameters.get<Real>("velocity")),
25  _function(getFunction("function"))
26 {
27 }
Function & _function
const VariableValue & _u_old
const Real _velocity

Member Function Documentation

Real PresetVelocity::computeQpValue ( )
protectedvirtual

Definition at line 30 of file PresetVelocity.C.

31 {
32  Real v2 = _function.value(_t, *_current_node);
33  Real v1 = _function.value(_t - _dt, *_current_node);
34  Real vel = _velocity * 0.5 * (v1 + v2);
35 
36  return _u_old[_qp] + _dt * vel;
37 }
Function & _function
const VariableValue & _u_old
const Real _velocity

Member Data Documentation

Function& PresetVelocity::_function
protected

Definition at line 22 of file PresetVelocity.h.

Referenced by computeQpValue().

const VariableValue& PresetVelocity::_u_old
protected

Definition at line 20 of file PresetVelocity.h.

Referenced by computeQpValue().

const Real PresetVelocity::_velocity
protected

Definition at line 21 of file PresetVelocity.h.

Referenced by computeQpValue().


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