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

Constructor & Destructor Documentation

◆ RampIC()

RampIC::RampIC ( const InputParameters &  parameters)

Definition at line 28 of file RampIC.C.

29  : InitialCondition(parameters),
30  _xlength(_fe_problem.mesh().dimensionWidth(0)),
31  _xmin(_fe_problem.mesh().getMinInDimension(0)),
32  _value_left(getParam<Real>("value_left")),
33  _value_right(getParam<Real>("value_right"))
34 {
35 }
const Real _value_left
Definition: RampIC.h:43
const Real _value_right
Definition: RampIC.h:44
const Real _xmin
Definition: RampIC.h:42
const Real _xlength
Definition: RampIC.h:41

Member Function Documentation

◆ gradient()

RealGradient RampIC::gradient ( const Point &  )
protectedvirtual

The value of the gradient at a point.

Definition at line 44 of file RampIC.C.

45 {
46  return (_value_right - _value_left) / _xlength;
47 }
const Real _value_left
Definition: RampIC.h:43
const Real _value_right
Definition: RampIC.h:44
const Real _xlength
Definition: RampIC.h:41

◆ value()

Real RampIC::value ( const Point &  p)
protectedvirtual

The value of the variable at a point.

Definition at line 38 of file RampIC.C.

39 {
40  return (_value_right - _value_left) / _xlength * (p(0) - _xmin) + _value_left;
41 }
const Real _value_left
Definition: RampIC.h:43
const Real _value_right
Definition: RampIC.h:44
const Real _xmin
Definition: RampIC.h:42
const Real _xlength
Definition: RampIC.h:41

Member Data Documentation

◆ _value_left

const Real RampIC::_value_left
protected

Definition at line 43 of file RampIC.h.

Referenced by gradient(), and value().

◆ _value_right

const Real RampIC::_value_right
protected

Definition at line 44 of file RampIC.h.

Referenced by gradient(), and value().

◆ _xlength

const Real RampIC::_xlength
protected

Definition at line 41 of file RampIC.h.

Referenced by gradient(), and value().

◆ _xmin

const Real RampIC::_xmin
protected

Definition at line 42 of file RampIC.h.

Referenced by value().


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