https://mooseframework.inl.gov
GenericConstantArray.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 
10 #include "GenericConstantArray.h"
11 
12 #include "libmesh/quadrature.h"
13 
15 
18 {
19 
21  params.addRequiredParam<std::string>("prop_name",
22  "The name of the property this material will have");
23  params.addRequiredParam<RealEigenVector>("prop_value",
24  "The values associated with the named property");
25  params.declareControllable("prop_value");
26  params.addClassDescription(
27  "A material evaluating one material property in type of RealEigenVector");
28  params.set<MooseEnum>("constant_on") = "SUBDOMAIN";
29  return params;
30 }
31 
33  : Material(parameters),
34  _prop_name(getParam<std::string>("prop_name")),
35  _prop_value(getParam<RealEigenVector>("prop_value")),
36  _property(declareProperty<RealEigenVector>(_prop_name))
37 {
38 }
39 
40 void
42 {
44 }
45 
46 void
48 {
50 }
GenericConstantArray(const InputParameters &parameters)
MaterialProperty< RealEigenVector > & _property
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...
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...
unsigned int _qp
Definition: MaterialBase.h:320
static InputParameters validParams()
Definition: Material.C:14
static InputParameters validParams()
const RealEigenVector & _prop_value
registerMooseObject("MooseApp", GenericConstantArray)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
Materials compute MaterialProperties.
Definition: Material.h:34
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...
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
virtual void computeQpProperties() override
Users must override this method.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.