54 _fe_problem.subdomainSetup(_subdomain, _tid);
56 std::set<MooseVariableFEBase *> needed_moose_vars;
57 std::unordered_set<unsigned int> needed_mat_props;
58 std::set<TagID> needed_fe_var_matrix_tags;
59 std::set<TagID> needed_fe_var_vector_tags;
61 _fe_problem.getMaterialWarehouse().updateBlockFEVariableCoupledVectorTagDependency(
62 _subdomain, needed_fe_var_vector_tags, _tid);
63 if (_aux_kernels.hasActiveBlockObjects(_subdomain, _tid))
65 const std::vector<std::shared_ptr<AuxKernelType>> & kernels =
66 _aux_kernels.getActiveBlockObjects(_subdomain, _tid);
67 for (
const auto & aux : kernels)
69 aux->subdomainSetup();
70 const auto & mv_deps = aux->getMooseVariableDependencies();
71 const auto & mp_deps = aux->getMatPropDependencies();
72 needed_moose_vars.insert(mv_deps.begin(), mv_deps.end());
73 needed_mat_props.insert(mp_deps.begin(), mp_deps.end());
75 auto & fe_var_coup_vtags = aux->getFEVariableCoupleableVectorTags();
76 needed_fe_var_vector_tags.insert(fe_var_coup_vtags.begin(), fe_var_coup_vtags.end());
78 auto & fe_var_coup_mtags = aux->getFEVariableCoupleableMatrixTags();
79 needed_fe_var_matrix_tags.insert(fe_var_coup_mtags.begin(), fe_var_coup_mtags.end());
83 _fe_problem.setActiveElementalMooseVariables(needed_moose_vars, _tid);
84 _fe_problem.prepareMaterials(needed_mat_props, _subdomain, _tid);
85 _fe_problem.setActiveFEVariableCoupleableMatrixTags(needed_fe_var_matrix_tags, _tid);
86 _fe_problem.setActiveFEVariableCoupleableVectorTags(needed_fe_var_vector_tags, _tid);
93 if (_aux_kernels.hasActiveBlockObjects(_subdomain, _tid))
95 const std::vector<std::shared_ptr<AuxKernelType>> & kernels =
96 _aux_kernels.getActiveBlockObjects(_subdomain, _tid);
97 _fe_problem.prepare(elem, _tid);
98 _fe_problem.reinitElem(elem, _tid);
105 _fe_problem.reinitMaterials(elem->subdomain_id(), _tid);
107 for (
const auto & aux : kernels)
110 aux->variable().insert(_aux_sys.solution());
113 if (aux->hasWritableCoupledVariables())
115 for (
auto * var : aux->getWritableCoupledVariables())
116 var->insert(_aux_sys.solution());
118 _fe_problem.reinitElem(elem, _tid);
157 if (!_fe_problem.shouldPrintExecution(_tid) || _blocks_exec_printed.count(_subdomain) ||
158 !_aux_kernels.hasActiveBlockObjects(_subdomain, _tid))
161 const auto & console = _fe_problem.console();
162 const auto & kernels = _aux_kernels.getActiveBlockObjects(_subdomain, _tid);
163 console <<
"[DBG] Ordering of AuxKernels on block " << _subdomain << std::endl;
164 printExecutionOrdering<AuxKernelType>(kernels,
false);
165 _blocks_exec_printed.insert(_subdomain);