https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
18template <bool is_ad>
21{
22public:
24
26
27 virtual std::size_t getVectorPropertySize(const MaterialPropertyName & prop_name) const override;
28
29protected:
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
GenericConstantStdVectorMaterialTempl< false > GenericConstantStdVectorMaterial
GenericConstantStdVectorMaterialTempl< true > ADGenericConstantStdVectorMaterial
Material to create constant properties with the variable-size std::vector<Real> type.
const std::vector< std::string > & _prop_names
The names of the constant vector material properties.
const std::vector< std::vector< Real > > & _prop_values
The vector values of each vector material property.
virtual void computeQpProperties() override
Users must override this method.
std::size_t _num_props
The number of constant vector material properties defined.
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
std::vector< GenericMaterialProperty< std::vector< Real >, is_ad > * > _properties
A vector of pointers to the material properties.
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.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Materials compute MaterialProperties.
Definition Material.h:36
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Interface class to return the size of material properties that do not have a fixed size.