https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VectorFromComponentVariablesMaterial.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
14
15template <bool is_ad>
18{
20 params.addClassDescription("Computes a vector material property from coupled variables");
21 params.addRequiredParam<MaterialPropertyName>(
22 "vector_prop_name", "The name to give the declared vector material property");
23 params.addRequiredCoupledVar("u", "x-component");
24 params.addCoupledVar("v", 0, "y-component");
25 params.addCoupledVar("w", 0, "z-component");
26 return params;
27}
28
29template <bool is_ad>
31 const InputParameters & parameters)
32 : Material(parameters),
33 _vector(declareGenericProperty<RealVectorValue, is_ad>("vector_prop_name")),
34 _u(coupledGenericValue<is_ad>("u")),
35 _v(isCoupled("v") ? coupledGenericValue<is_ad>("v") : genericZeroValue<is_ad>()),
36 _w(isCoupled("w") ? coupledGenericValue<is_ad>("w") : genericZeroValue<is_ad>())
37{
38}
39
40template <bool is_ad>
41void
46
Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
Definition MooseTypes.h:702
registerMooseObject("MooseApp", VectorFromComponentVariablesMaterial)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Materials compute MaterialProperties.
Definition Material.h:36
static InputParameters validParams()
Definition Material.C:14
Computes a vector material property from coupled variables.
virtual void computeQpProperties() override
Users must override this method.
VectorFromComponentVariablesMaterialTempl(const InputParameters &parameters)