https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VariableGradientMaterial.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
16{
18 params.addClassDescription("Compute the norm of the gradient of a variable");
19 params.addCoupledVar("variable", "Variable to compute the gradient magnitude of");
20 params.addRequiredParam<MaterialPropertyName>(
21 "prop", "Material property to store the gradient magnitude in");
22 return params;
23}
24
26 : Material(parameters),
27 _grad(coupledGradient("variable")),
28 _prop(declareProperty<Real>(getParam<MaterialPropertyName>("prop")))
29{
30}
31
32void
registerMooseObject("PhaseFieldApp", VariableGradientMaterial)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
Set a material property to the norm of the gradient of a non-linear variable.
MaterialProperty< Real > & _prop
VariableGradientMaterial(const InputParameters &parameters)
static InputParameters validParams()
const VariableGradient & _grad