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

#include <CoefDiffusion.h>

Inheritance diagram for CoefDiffusion:
[legend]

Public Member Functions

 CoefDiffusion (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 

Private Attributes

const Real _coef
 
Function *const _func
 

Detailed Description

Definition at line 22 of file CoefDiffusion.h.

Constructor & Destructor Documentation

◆ CoefDiffusion()

CoefDiffusion::CoefDiffusion ( const InputParameters &  parameters)

Definition at line 28 of file CoefDiffusion.C.

29  : Kernel(parameters),
30  _coef(getParam<Real>("coef")),
31  _func(parameters.isParamValid("function") ? &getFunction("function") : NULL)
32 {
33 }
const Real _coef
Definition: CoefDiffusion.h:32
Function *const _func
Definition: CoefDiffusion.h:33

Member Function Documentation

◆ computeQpJacobian()

Real CoefDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 47 of file CoefDiffusion.C.

48 {
49  Real diffusivity = _coef;
50 
51  if (_func)
52  diffusivity += _func->value(_t, _q_point[_qp]);
53 
54  return diffusivity * _grad_test[_i][_qp] * _grad_phi[_j][_qp];
55 }
const Real _coef
Definition: CoefDiffusion.h:32
Function *const _func
Definition: CoefDiffusion.h:33

◆ computeQpResidual()

Real CoefDiffusion::computeQpResidual ( )
protectedvirtual

Definition at line 36 of file CoefDiffusion.C.

37 {
38  Real diffusivity = _coef;
39 
40  if (_func)
41  diffusivity += _func->value(_t, _q_point[_qp]);
42 
43  return diffusivity * _grad_test[_i][_qp] * _grad_u[_qp];
44 }
const Real _coef
Definition: CoefDiffusion.h:32
Function *const _func
Definition: CoefDiffusion.h:33

Member Data Documentation

◆ _coef

const Real CoefDiffusion::_coef
private

Definition at line 32 of file CoefDiffusion.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _func

Function* const CoefDiffusion::_func
private

Definition at line 33 of file CoefDiffusion.h.

Referenced by computeQpJacobian(), and computeQpResidual().


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