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

Set a material property to the norm of the gradient of a non-linear variable. More...

#include <VariableGradientMaterial.h>

Inheritance diagram for VariableGradientMaterial:
[legend]

Public Member Functions

 VariableGradientMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

const VariableGradient & _grad
 
MaterialProperty< Real > & _prop
 

Detailed Description

Set a material property to the norm of the gradient of a non-linear variable.

Definition at line 23 of file VariableGradientMaterial.h.

Constructor & Destructor Documentation

◆ VariableGradientMaterial()

VariableGradientMaterial::VariableGradientMaterial ( const InputParameters &  parameters)

Definition at line 25 of file VariableGradientMaterial.C.

26  : Material(parameters),
27  _grad(coupledGradient("variable")),
28  _prop(declareProperty<Real>(getParam<MaterialPropertyName>("prop")))
29 {
30 }
MaterialProperty< Real > & _prop
const VariableGradient & _grad

Member Function Documentation

◆ computeQpProperties()

void VariableGradientMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 33 of file VariableGradientMaterial.C.

34 {
35  _prop[_qp] = _grad[_qp].norm();
36 }
MaterialProperty< Real > & _prop
const VariableGradient & _grad

Member Data Documentation

◆ _grad

const VariableGradient& VariableGradientMaterial::_grad
protected

Definition at line 31 of file VariableGradientMaterial.h.

Referenced by computeQpProperties().

◆ _prop

MaterialProperty<Real>& VariableGradientMaterial::_prop
protected

Definition at line 32 of file VariableGradientMaterial.h.

Referenced by computeQpProperties().


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