https://mooseframework.inl.gov
GenericConstant2DArray.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 "GenericConstant2DArray.h"
11 
13 
16 {
17 
19  params.addRequiredParam<std::string>("prop_name",
20  "The names of the properties this material will have");
21  params.addRequiredParam<RealEigenMatrix>("prop_value",
22  "The values associated with the named properties");
23  params.declareControllable("prop_value");
24  params.addClassDescription(
25  "A material evaluating one material property in type of RealEigenMatrix");
26  params.set<MooseEnum>("constant_on") = "SUBDOMAIN";
27  return params;
28 }
29 
31  : Material(parameters),
32  _prop_name(getParam<std::string>("prop_name")),
33  _prop_value(getParam<RealEigenMatrix>("prop_value")),
34  _property(declareProperty<RealEigenMatrix>(_prop_name))
35 {
36 }
37 
38 void
40 {
42 }
43 
44 void
46 {
48 }
const RealEigenMatrix & _prop_value
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...
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
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...
GenericConstant2DArray(const InputParameters &parameters)
static InputParameters validParams()
unsigned int _qp
Definition: MaterialBase.h:320
MaterialProperty< RealEigenMatrix > & _property
static InputParameters validParams()
Definition: Material.C:14
registerMooseObject("MooseApp", GenericConstant2DArray)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
Definition: MooseTypes.h:149
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...
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.