https://mooseframework.inl.gov
ComponentMaterialPropertyInterface.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 "ActionComponent.h"
13 #include "InputParameters.h"
14 #include "MooseTypes.h"
15 
24 {
25 public:
27 
29 
31  bool hasProperty(const std::string & property_name) const;
33  const MooseFunctorName & getPropertyValue(const std::string & property_name,
34  const std::string & requestor_name) const;
35 
36 protected:
37  virtual void addMaterials() override;
38 
40  const std::vector<std::string> _property_names;
42  const std::vector<MooseFunctorName> _property_functors;
44  const bool _use_ad_for_props;
45 };
bool hasProperty(const std::string &property_name) const
Whether the component has a property with that name.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< std::string > _property_names
Names of the material properties.
Base class for components that are defined using an action.
const MooseFunctorName & getPropertyValue(const std::string &property_name, const std::string &requestor_name) const
Return the name of the functor for that property.
ComponentMaterialPropertyInterface(const InputParameters &params)
const std::vector< MooseFunctorName > _property_functors
Functor values of the material properties.
Helper class to help Components define the material properties the Physics may need from the paramete...
virtual void addMaterials() override
Used to add materials or functor materials on a component.
const bool _use_ad_for_props
Whether to use automatic differentiation when defining properties.