https://mooseframework.inl.gov
ThreeMaterialPropertyInterface.C
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 
11 #include "MaterialData.h"
12 #include "InputParameters.h"
13 #include "FEProblemBase.h"
14 
17 {
18  // Objects inheriting from ThreeMaterialPropertyInterface rely on Boundary MaterialData
20  // We want the properties returned by getMaterialProperty* to be the volumetric ones
21  params.set<Moose::MaterialDataType>("_material_data_type") = Moose::BLOCK_MATERIAL_DATA;
22  return params;
23 }
24 
26  const MooseObject * moose_object,
27  const std::set<SubdomainID> & blocks_ids,
28  const std::set<BoundaryID> & boundary_ids)
29  : TwoMaterialPropertyInterface(moose_object, blocks_ids, boundary_ids),
30  _face_material_data(
31  _mi_feproblem.getMaterialData(Moose::FACE_MATERIAL_DATA, _mi_params.get<THREAD_ID>("_tid")))
32 {
33 }
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1155
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:691
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
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.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
ThreeMaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &blocks_ids, const std::set< BoundaryID > &boundary_ids)
unsigned int THREAD_ID
Definition: MooseTypes.h:209