www.mooseframework.org
TwoMaterialPropertyInterface.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
23 {
24 public:
25  TwoMaterialPropertyInterface(const MooseObject * moose_object,
26  const std::set<SubdomainID> & blocks_ids,
27  const std::set<BoundaryID> & boundary_ids);
28 
30 
36  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 
71  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>
79  const MaterialProperty<T> & getNeighborMaterialPropertyByName(const std::string & name,
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 
91 protected:
93 };
std::string name(const ElemQuality q)
const MaterialProperty< T > & getNeighborMaterialPropertyOlder(const std::string &name)
const MaterialProperty< T > & getNeighborMaterialPropertyOld(const std::string &name)
const MaterialProperty< T > & getNeighborMaterialProperty(const std::string &name, const unsigned int state=0)
const MaterialProperty< T > & getNeighborMaterialPropertyByName(const std::string &name, const unsigned int state=0)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
TwoMaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &blocks_ids, const std::set< BoundaryID > &boundary_ids)
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
const ADMaterialProperty< T > & getNeighborADMaterialPropertyByName(const std::string &name)
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
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 GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialPropertyByName(const std::string &name, const unsigned int state=0)
Retrieve the neighbor property named "name" without any deduction.
An interface for accessing Materials.
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
const ADMaterialProperty< T > & getNeighborADMaterialProperty(const std::string &name)