Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
GenericConstantRealVectorValue.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 
15 template <bool is_ad>
18 {
20  params.addClassDescription("Object for declaring a constant 3-vector as a material property.");
21  params.addRequiredParam<RealVectorValue>("vector_values", "Values defining the constant vector");
22  params.addRequiredParam<MaterialPropertyName>(
23  "vector_name", "Name of the vector material property to be created");
24  params.set<MooseEnum>("constant_on") = "SUBDOMAIN";
25  return params;
26 }
27 
28 template <bool is_ad>
30  const InputParameters & parameters)
31  : Material(parameters),
32  _vector(getParam<RealVectorValue>("vector_values")),
33  _prop(declareGenericProperty<RealVectorValue, is_ad>(
34  getParam<MaterialPropertyName>("vector_name")))
35 {
36 }
37 
38 template <bool is_ad>
39 void
41 {
43 }
44 
45 template <bool is_ad>
46 void
48 {
49  _prop[_qp] = _vector;
50 }
51 
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Declares a constant material property of type RealVectorValue.
GenericConstantRealVectorValueTempl(const InputParameters &parameters)
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...
static InputParameters validParams()
Definition: Material.C:14
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
registerMooseObject("MooseApp", GenericConstantRealVectorValue)
Materials compute MaterialProperties.
Definition: Material.h:34
virtual void computeQpProperties() override
Users must override this method.
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...
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.