https://mooseframework.inl.gov
GenericConstantStdVectorMaterial.h
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 #pragma once
11 
12 #include "Material.h"
14 
18 template <bool is_ad>
21 {
22 public:
24 
26 
27  virtual std::size_t getVectorPropertySize(const MaterialPropertyName & prop_name) const override;
28 
29 protected:
30  virtual void initQpStatefulProperties() override;
31  virtual void computeQpProperties() override;
32 
34  const std::vector<std::string> & _prop_names;
35 
37  const std::vector<std::vector<Real>> & _prop_values;
38 
40  std::size_t _num_props;
41 
43  std::vector<GenericMaterialProperty<std::vector<Real>, is_ad> *> _properties;
44 };
45 
const std::vector< std::string > & _prop_names
The names of the constant vector material properties.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.
GenericConstantStdVectorMaterialTempl< false > GenericConstantStdVectorMaterial
const std::vector< std::vector< Real > > & _prop_values
The vector values of each vector material property.
std::vector< GenericMaterialProperty< std::vector< Real >, is_ad > * > _properties
A vector of pointers to the material properties.
virtual void computeQpProperties() override
Users must override this method.
Material to create constant properties with the variable-size std::vector<Real> type.
virtual std::size_t getVectorPropertySize(const MaterialPropertyName &prop_name) const override
Return the size of the variable size vector material property that the material defines.
GenericConstantStdVectorMaterialTempl(const InputParameters &parameters)
Materials compute MaterialProperties.
Definition: Material.h:34
Interface class to return the size of material properties that do not have a fixed size...
std::size_t _num_props
The number of constant vector material properties defined.
GenericConstantStdVectorMaterialTempl< true > ADGenericConstantStdVectorMaterial