42 _mesh(_subproblem.
mesh()),
43 _qrule(_assembly.qRule()),
44 _q_point(_assembly.qPoints())
46 std::vector<std::string> material_property_names = getParam<std::vector<std::string>>(
"property");
47 for (
unsigned int i = 0; i < material_property_names.size(); ++i)
49 if (!hasGenericMaterialProperty<Real, is_ad>(material_property_names[i]))
50 mooseError(
"The material property '" + material_property_names[i] +
"' does not exist.");
52 &getGenericMaterialProperty<Real, is_ad>(material_property_names[i]));
69 std::vector<Real>
values(_material_properties.size());
71 std::unordered_set<unsigned int> needed_mat_props;
72 const auto & mp_deps = getMatPropDependencies();
73 needed_mat_props.insert(mp_deps.begin(), mp_deps.end());
74 _fe_problem.setActiveMaterialProperties(needed_mat_props, _tid);
76 const ConstElemRange & elem_range = *(_mesh.getActiveLocalElementRange());
77 for (
typename ConstElemRange::const_iterator el = elem_range.begin(); el != elem_range.end();
80 const Elem * elem = *el;
82 if (elem->processor_id() != processor_id())
85 if (!hasBlocks(elem->subdomain_id()))
88 _subproblem.setCurrentSubdomainID(elem, _tid);
89 _subproblem.prepare(elem, _tid);
90 _subproblem.reinitElem(elem, _tid);
95 _fe_problem.reinitMaterials(elem->subdomain_id(), _tid);
97 for (
unsigned int qp = 0; qp < _qrule->n_points(); ++qp)
99 for (
unsigned int j = 0; j < _material_properties.size(); ++j)
103 addSample(_q_point[qp], _q_point[qp](0),
values);
106 _fe_problem.clearActiveMaterialProperties(_tid);
static InputParameters validParams()