https://mooseframework.inl.gov
ThreeMaterialPropertyInterface.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
15 class MaterialData;
16 
25 {
26 public:
27  ThreeMaterialPropertyInterface(const MooseObject * moose_object,
28  const std::set<SubdomainID> & blocks_ids,
29  const std::set<BoundaryID> & boundary_ids);
30 
32 
36  template <typename T>
37  const MaterialProperty<T> & getFaceMaterialProperty(const std::string & name);
38 
42  template <typename T>
43  const MaterialProperty<T> & getFaceMaterialPropertyByName(const std::string & name);
44 
48  template <typename T>
49  const ADMaterialProperty<T> & getFaceADMaterialProperty(const std::string & name);
50 
51  template <typename T>
52  const MaterialProperty<T> & getFaceMaterialPropertyOld(const std::string & name);
53 
54  template <typename T>
55  const MaterialProperty<T> & getFaceMaterialPropertyOlder(const std::string & name);
56 
60  template <typename T, bool is_ad>
61  const auto & getGenericFaceMaterialProperty(const std::string & name)
62  {
63  if constexpr (is_ad)
64  return getFaceADMaterialProperty<T>(name);
65  else
66  return getFaceMaterialProperty<T>(name);
67  }
68 
69 protected:
71 };
72 
73 template <typename T>
74 const MaterialProperty<T> &
76 {
77  return getMaterialProperty<T>(name, _face_material_data);
78 }
79 
80 template <typename T>
81 const MaterialProperty<T> &
83 {
84  return getMaterialPropertyByName<T>(name, _face_material_data);
85 }
86 
87 template <typename T>
90 {
91  return getADMaterialProperty<T>(name, _face_material_data);
92 }
93 
94 template <typename T>
95 const MaterialProperty<T> &
97 {
98  return getMaterialPropertyOld<T>(name, _face_material_data);
99 }
100 
101 template <typename T>
102 const MaterialProperty<T> &
104 {
105  return getMaterialPropertyOlder<T>(name, _face_material_data);
106 }
std::string name(const ElemQuality q)
const MaterialProperty< T > & getFaceMaterialPropertyOlder(const std::string &name)
const ADMaterialProperty< T > & getFaceADMaterialProperty(const std::string &name)
Retrieve the ADMaterialProperty named "name".
const auto & getGenericFaceMaterialProperty(const std::string &name)
Retrieve the face material property whether AD or not.
const MaterialProperty< T > & getFaceMaterialProperty(const std::string &name)
Retrieve the property deduced from the name name.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MaterialProperty< T > & getFaceMaterialPropertyOld(const std::string &name)
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
This interface is designed currently for DomainUserObject where material properties on element...
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject, where material properties on a side of both its primary side (face) and its secondary side (neighbor) all required.
Proxy for accessing MaterialPropertyStorage.
Definition: MaterialData.h:33
ThreeMaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &blocks_ids, const std::set< BoundaryID > &boundary_ids)
const MaterialProperty< T > & getFaceMaterialPropertyByName(const std::string &name)
Retrieve the property named "name" without any deduction.