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

Makes initial condition which creates a linear ramp of the given variable on the x-axis with specified side values. More...

#include <RampIC.h>

Inheritance diagram for RampIC:
[legend]

Public Member Functions

 RampIC (const InputParameters &parameters)
 

Protected Member Functions

virtual Real value (const Point &p)
 The value of the variable at a point. More...
 
virtual RealGradient gradient (const Point &)
 The value of the gradient at a point. More...
 

Protected Attributes

const Real _xlength
 
const Real _xmin
 
const Real _value_left
 
const Real _value_right
 

Detailed Description

Makes initial condition which creates a linear ramp of the given variable on the x-axis with specified side values.

Definition at line 22 of file RampIC.h.

Constructor & Destructor Documentation

RampIC::RampIC ( const InputParameters &  parameters)

Definition at line 24 of file RampIC.C.

25  : InitialCondition(parameters),
26  _xlength(_fe_problem.mesh().dimensionWidth(0)),
27  _xmin(_fe_problem.mesh().getMinInDimension(0)),
28  _value_left(getParam<Real>("value_left")),
29  _value_right(getParam<Real>("value_right"))
30 {
31 }
const Real _value_left
Definition: RampIC.h:40
const Real _value_right
Definition: RampIC.h:41
const Real _xmin
Definition: RampIC.h:39
const Real _xlength
Definition: RampIC.h:38

Member Function Documentation

RealGradient RampIC::gradient ( const Point &  )
protectedvirtual

The value of the gradient at a point.

Definition at line 40 of file RampIC.C.

41 {
42  return (_value_right - _value_left) / _xlength;
43 }
const Real _value_left
Definition: RampIC.h:40
const Real _value_right
Definition: RampIC.h:41
const Real _xlength
Definition: RampIC.h:38
Real RampIC::value ( const Point &  p)
protectedvirtual

The value of the variable at a point.

Definition at line 34 of file RampIC.C.

35 {
36  return (_value_right - _value_left) / _xlength * (p(0) - _xmin) + _value_left;
37 }
const Real _value_left
Definition: RampIC.h:40
const Real _value_right
Definition: RampIC.h:41
const Real _xmin
Definition: RampIC.h:39
const Real _xlength
Definition: RampIC.h:38

Member Data Documentation

const Real RampIC::_value_left
protected

Definition at line 40 of file RampIC.h.

Referenced by gradient(), and value().

const Real RampIC::_value_right
protected

Definition at line 41 of file RampIC.h.

Referenced by gradient(), and value().

const Real RampIC::_xlength
protected

Definition at line 38 of file RampIC.h.

Referenced by gradient(), and value().

const Real RampIC::_xmin
protected

Definition at line 39 of file RampIC.h.

Referenced by value().


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