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 23 of file GaussContForcing.h.

Constructor & Destructor Documentation

◆ GaussContForcing()

GaussContForcing::GaussContForcing ( const InputParameters &  parameters)

Definition at line 29 of file GaussContForcing.C.

30  : Kernel(parameters),
31  _amplitude(getParam<Real>("amplitude")),
32  _x_center(getParam<Real>("x_center")),
33  _y_center(getParam<Real>("y_center")),
34  _z_center(getParam<Real>("z_center")),
35  _x_spread(getParam<Real>("x_spread")),
36  _y_spread(getParam<Real>("y_spread")),
37  _z_spread(getParam<Real>("z_spread")),
38  _x_min(_x_center - (3.0 * _x_spread)),
39  _x_max(_x_center + (3.0 * _x_spread)),
40  _y_min(_y_center - (3.0 * _y_spread)),
41  _y_max(_y_center + (3.0 * _y_spread)),
42  _z_min(_z_center - (3.0 * _z_spread)),
43  _z_max(_z_center + (3.0 * _z_spread))
44 {
45 }
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

◆ computeQpResidual()

Real GaussContForcing::computeQpResidual ( )
protectedvirtual

Definition at line 48 of file GaussContForcing.C.

49 {
50  Real x = _q_point[_qp](0);
51  Real y = _q_point[_qp](1);
52  Real z = _q_point[_qp](2);
53 
54  if (x >= _x_min && x <= _x_max && y >= _y_min && y <= _y_max && z >= _z_min && z <= _z_max)
55  return -_test[_i][_qp] * _amplitude *
56  std::exp(-(((x - _x_center) * (x - _x_center)) / (2.0 * _x_spread * _x_spread) +
57  ((y - _y_center) * (y - _y_center)) / (2.0 * _y_spread * _y_spread) +
58  ((z - _z_center) * (z - _z_center)) / (2.0 * _z_spread * _z_spread)));
59  else
60  return 0;
61 }
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

◆ _amplitude

const Real GaussContForcing::_amplitude
protected

Definition at line 31 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _x_center

const Real GaussContForcing::_x_center
protected

Definition at line 32 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _x_max

const Real GaussContForcing::_x_max
protected

Definition at line 41 of file GaussContForcing.h.

◆ _x_min

const Real GaussContForcing::_x_min
protected

Definition at line 40 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _x_spread

const Real GaussContForcing::_x_spread
protected

Definition at line 36 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _y_center

const Real GaussContForcing::_y_center
protected

Definition at line 33 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _y_max

const Real GaussContForcing::_y_max
protected

Definition at line 43 of file GaussContForcing.h.

◆ _y_min

const Real GaussContForcing::_y_min
protected

Definition at line 42 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _y_spread

const Real GaussContForcing::_y_spread
protected

Definition at line 37 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _z_center

const Real GaussContForcing::_z_center
protected

Definition at line 34 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _z_max

const Real GaussContForcing::_z_max
protected

Definition at line 45 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _z_min

const Real GaussContForcing::_z_min
protected

Definition at line 44 of file GaussContForcing.h.

Referenced by computeQpResidual().

◆ _z_spread

const Real GaussContForcing::_z_spread
protected

Definition at line 38 of file GaussContForcing.h.

Referenced by computeQpResidual().


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