https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TwoMaterialPropertyInterface.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
13
14// Forward Declarations
15class MaterialData;
16
23{
24public:
25 TwoMaterialPropertyInterface(const MooseObject * moose_object,
26 const std::set<SubdomainID> & blocks_ids,
27 const std::set<BoundaryID> & boundary_ids);
28
30
37 template <typename T, bool is_ad>
39 getGenericNeighborMaterialProperty(const std::string & name, const unsigned int state = 0)
40 {
41 return getGenericMaterialProperty<T, is_ad>(name, _neighbor_material_data, state);
42 }
43 template <typename T>
44 const MaterialProperty<T> & getNeighborMaterialProperty(const std::string & name,
45 const unsigned int state = 0)
46 {
47 return getGenericNeighborMaterialProperty<T, false>(name, state);
48 }
49 template <typename T>
50 const ADMaterialProperty<T> & getNeighborADMaterialProperty(const std::string & name)
51 {
52 return getGenericNeighborMaterialProperty<T, true>(name, 0);
53 }
54 template <typename T>
55 const MaterialProperty<T> & getNeighborMaterialPropertyOld(const std::string & name)
56 {
57 return getGenericNeighborMaterialProperty<T, false>(name, 1);
58 }
59 template <typename T>
60 const MaterialProperty<T> & getNeighborMaterialPropertyOlder(const std::string & name)
61 {
62 return getGenericNeighborMaterialProperty<T, false>(name, 2);
63 }
65
72 template <typename T, bool is_ad>
74 getGenericNeighborMaterialPropertyByName(const std::string & name, const unsigned int state = 0)
75 {
76 return getGenericMaterialPropertyByName<T, is_ad>(name, _neighbor_material_data, state);
77 }
78 template <typename T>
80 const unsigned int state = 0)
81 {
82 return getGenericNeighborMaterialPropertyByName<T, false>(name, state);
83 }
84 template <typename T>
86 {
87 return getGenericNeighborMaterialPropertyByName<T, true>(name, 0);
88 }
90
91protected:
93};
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Proxy for accessing MaterialPropertyStorage.
An interface for accessing Materials.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject,...
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialPropertyByName(const std::string &name, const unsigned int state=0)
Retrieve the neighbor property named "name" without any deduction.
const MaterialProperty< T > & getNeighborMaterialPropertyOlder(const std::string &name)
const MaterialProperty< T > & getNeighborMaterialPropertyByName(const std::string &name, const unsigned int state=0)
const MaterialProperty< T > & getNeighborMaterialPropertyOld(const std::string &name)
const MaterialProperty< T > & getNeighborMaterialProperty(const std::string &name, const unsigned int state=0)
const ADMaterialProperty< T > & getNeighborADMaterialPropertyByName(const std::string &name)
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialProperty(const std::string &name, const unsigned int state=0)
Retrieve the neighbor property deduced from the name name.
const ADMaterialProperty< T > & getNeighborADMaterialProperty(const std::string &name)