13 #include "MooseObject.h"
14 #include "MaterialBase.h"
15 #include "MooseMesh.h"
16 #include "FEProblemBase.h"
17 #include "InputParameters.h"
18 #include "BlockRestrictable.h"
21 : _gc_params(moose_object->parameters()),
22 _gc_feproblem(_gc_params.get<FEProblemBase *>(
"_fe_problem_base")),
23 _gc_block_restrict(dynamic_cast<BlockRestrictable *>(moose_object))
32 mooseError(
"hasGuaranteedMaterialProperty() needs to be called in initialSetup()");
35 const auto & warehouse =
_gc_feproblem->getMaterialWarehouse();
43 for (
const auto &
id : ids)
46 if (warehouse.hasActiveBlockObjects(
id))
48 const std::vector<std::shared_ptr<MaterialBase>> & mats = warehouse.getActiveBlockObjects(
id);
49 for (
const auto & mat : mats)
51 const auto & mat_props = mat->getSuppliedItems();
52 if (mat_props.count(prop_name))
54 auto guarantee_mat = dynamic_cast<GuaranteeProvider *>(mat.get());
55 if (guarantee_mat && !guarantee_mat->hasGuarantee(prop_name, guarantee))