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

Note: This class is duplicated from moose_test. More...

#include <GaussContForcing.h>

Inheritance diagram for GaussContForcing:
[legend]

Public Member Functions

 GaussContForcing (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const Real _amplitude
 
const Real _x_center
 
const Real _y_center
 
const Real _z_center
 
const Real _x_spread
 
const Real _y_spread
 
const Real _z_spread
 
const Real _x_min
 
const Real _x_max
 
const Real _y_min
 
const Real _y_max
 
const Real _z_min
 
const Real _z_max
 

Detailed Description

Note: This class is duplicated from moose_test.

It is useful for testing

Definition at line 20 of file GaussContForcing.h.

Constructor & Destructor Documentation

GaussContForcing::GaussContForcing ( const InputParameters &  parameters)

Definition at line 24 of file GaussContForcing.C.

25  : Kernel(parameters),
26  _amplitude(getParam<Real>("amplitude")),
27  _x_center(getParam<Real>("x_center")),
28  _y_center(getParam<Real>("y_center")),
29  _z_center(getParam<Real>("z_center")),
30  _x_spread(getParam<Real>("x_spread")),
31  _y_spread(getParam<Real>("y_spread")),
32  _z_spread(getParam<Real>("z_spread")),
33  _x_min(_x_center - (3.0 * _x_spread)),
34  _x_max(_x_center + (3.0 * _x_spread)),
35  _y_min(_y_center - (3.0 * _y_spread)),
36  _y_max(_y_center + (3.0 * _y_spread)),
37  _z_min(_z_center - (3.0 * _z_spread)),
38  _z_max(_z_center + (3.0 * _z_spread))
39 {
40 }
const Real _y_center
const Real _z_center
const Real _amplitude
const Real _x_spread
const Real _y_spread
const Real _z_spread
const Real _x_center

Member Function Documentation

Real GaussContForcing::computeQpResidual ( )
protectedvirtual

Definition at line 43 of file GaussContForcing.C.

44 {
45  Real x = _q_point[_qp](0);
46  Real y = _q_point[_qp](1);
47  Real z = _q_point[_qp](2);
48 
49  if (x >= _x_min && x <= _x_max && y >= _y_min && y <= _y_max && z >= _z_min && z <= _z_max)
50  return -_test[_i][_qp] * _amplitude *
51  std::exp(-(((x - _x_center) * (x - _x_center)) / (2.0 * _x_spread * _x_spread) +
52  ((y - _y_center) * (y - _y_center)) / (2.0 * _y_spread * _y_spread) +
53  ((z - _z_center) * (z - _z_center)) / (2.0 * _z_spread * _z_spread)));
54  else
55  return 0;
56 }
const Real _y_center
const Real _z_center
const Real _amplitude
const Real _x_spread
const Real _y_spread
const Real _z_spread
const Real _x_center

Member Data Documentation

const Real GaussContForcing::_amplitude
protected

Definition at line 28 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_x_center
protected

Definition at line 29 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_x_max
protected

Definition at line 38 of file GaussContForcing.h.

const Real GaussContForcing::_x_min
protected

Definition at line 37 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_x_spread
protected

Definition at line 33 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_y_center
protected

Definition at line 30 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_y_max
protected

Definition at line 40 of file GaussContForcing.h.

const Real GaussContForcing::_y_min
protected

Definition at line 39 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_y_spread
protected

Definition at line 34 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_z_center
protected

Definition at line 31 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_z_max
protected

Definition at line 42 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_z_min
protected

Definition at line 41 of file GaussContForcing.h.

Referenced by computeQpResidual().

const Real GaussContForcing::_z_spread
protected

Definition at line 35 of file GaussContForcing.h.

Referenced by computeQpResidual().


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