113 #include "libmesh/exodusII_io.h" 114 #include "libmesh/quadrature.h" 115 #include "libmesh/coupling_matrix.h" 116 #include "libmesh/nonlinear_solver.h" 117 #include "libmesh/sparse_matrix.h" 118 #include "libmesh/string_to_enum.h" 119 #include "libmesh/fe_interface.h" 120 #include "libmesh/enum_norm_type.h" 121 #include "libmesh/petsc_solver_exception.h" 123 #include "metaphysicl/dualnumber.h" 144 params.
addParam<
unsigned int>(
"null_space_dimension", 0,
"The dimension of the nullspace");
146 "transpose_null_space_dimension", 0,
"The dimension of the transpose nullspace");
148 "near_null_space_dimension", 0,
"The dimension of the near nullspace");
151 "Whether or not to actually solve the Nonlinear system. " 152 "This is handy in the case that all you want to do is " 153 "execute AuxKernels, Transfers, etc. without actually " 155 params.
addParam<
bool>(
"use_nonlinear",
157 "Determines whether to use a Nonlinear vs a " 158 "Eigenvalue system (Automatically determined based " 160 params.
addParam<
bool>(
"error_on_jacobian_nonzero_reallocation",
161 "This causes PETSc to error if it had to reallocate memory in the Jacobian " 162 "matrix due to not having enough nonzeros");
163 params.
addParam<
bool>(
"ignore_zeros_in_jacobian",
165 "Do not explicitly store zero values in " 166 "the Jacobian matrix if true");
167 params.
addParam<
bool>(
"force_restart",
169 "EXPERIMENTAL: If true, a sub_app may use a " 170 "restart file instead of using of using the master " 174 "True to skip additional data in equation system for restart.",
175 "This parameter is no longer used, as we do not load additional " 176 "vectors by default with restart");
177 params.
addParam<
bool>(
"skip_nl_system_check",
179 "True to skip the NonlinearSystem check for work to do (e.g. Make sure " 180 "that there are variables to solve for).");
181 params.
addParam<
bool>(
"allow_initial_conditions_with_restart",
183 "True to allow the user to specify initial conditions when restarting. " 184 "Initial conditions can override any restarted field");
192 "block", {},
"Block IDs for the coordinate systems",
"Please use 'Mesh/coord_block' instead");
197 "Type of the coordinate system per block param",
198 "Please use 'Mesh/coord_type' instead");
201 "The rotation axis (X | Y) for axisymetric coordinates",
202 "Please use 'Mesh/rz_coord_axis' instead");
204 "kernel_coverage_check",
true,
"Set to false to disable kernel->subdomain coverage check");
206 "boundary_restricted_node_integrity_check",
208 "Set to false to disable checking of boundary restricted nodal object variable dependencies, " 209 "e.g. are the variable dependencies defined on the selected boundaries?");
210 params.
addParam<
bool>(
"boundary_restricted_elem_integrity_check",
212 "Set to false to disable checking of boundary restricted elemental object " 213 "variable dependencies, e.g. are the variable dependencies defined on the " 214 "selected boundaries?");
215 params.
addParam<
bool>(
"material_coverage_check",
217 "Set to false to disable material->subdomain coverage check");
218 params.
addParam<
bool>(
"fv_bcs_integrity_check",
220 "Set to false to disable checking of overlapping Dirichlet and Flux BCs " 221 "and/or multiple DirichletBCs per sideset");
224 "material_dependency_check",
true,
"Set to false to disable material dependency check");
225 params.
addParam<
bool>(
"parallel_barrier_messaging",
227 "Displays messaging from parallel " 228 "barrier notifications when executing " 229 "or transferring to/from Multiapps " 233 "verbose_setup",
false,
"Set to True to have the problem report on any object created");
234 params.
addParam<
bool>(
"verbose_multiapps",
236 "Set to True to enable verbose screen printing related to MultiApps");
238 params.
addParam<FileNameNoExtension>(
"restart_file_base",
239 "File base name used for restart (e.g. " 240 "<path>/<filebase> or <path>/LATEST to " 241 "grab the latest file available)");
243 params.
addParam<std::vector<std::vector<TagName>>>(
246 "Extra vectors to add to the system that can be filled by objects which compute residuals " 247 "and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which " 248 "nonlinear system the extra tag vectors should be added for");
250 params.
addParam<std::vector<std::vector<TagName>>>(
251 "extra_tag_matrices",
253 "Extra matrices to add to the system that can be filled " 254 "by objects which compute residuals and Jacobians " 255 "(Kernels, BCs, etc.) by setting tags on them. The outer index is for which " 256 "nonlinear system the extra tag vectors should be added for");
258 params.
addParam<std::vector<TagName>>(
259 "extra_tag_solutions",
261 "Extra solution vectors to add to the system that can be used by " 262 "objects for coupling variable values stored in them.");
264 params.
addParam<
bool>(
"previous_nl_solution_required",
266 "True to indicate that this calculation requires a solution vector for " 267 "storing the previous nonlinear iteration.");
269 params.
addParam<std::vector<NonlinearSystemName>>(
270 "nl_sys_names", std::vector<NonlinearSystemName>{
"nl0"},
"The nonlinear system names");
272 params.
addParam<
bool>(
"check_uo_aux_state",
274 "True to turn on a check that no state presents during the evaluation of " 275 "user objects and aux kernels");
282 "allow_invalid_solution",
284 "Set to true to allow convergence even though the solution has been marked as 'invalid'");
285 params.
addParam<
bool>(
"immediately_print_invalid_solution",
287 "Whether or not to report invalid solution warnings at the time the " 288 "warning is produced instead of after the calculation");
291 "identify_variable_groups_in_nl",
293 "Whether to identify variable groups in nonlinear systems. This affects dof ordering");
296 "regard_general_exceptions_as_errors",
298 "If we catch an exception during residual/Jacobian evaluaton for which we don't have " 299 "specific handling, immediately error instead of allowing the time step to be cut");
302 "skip_nl_system_check kernel_coverage_check boundary_restricted_node_integrity_check " 303 "boundary_restricted_elem_integrity_check material_coverage_check fv_bcs_integrity_check " 304 "material_dependency_check check_uo_aux_state error_on_jacobian_nonzero_reallocation",
305 "Simulation checks");
307 "ignore_zeros_in_jacobian",
308 "Nonlinear system(s)");
310 "restart_file_base force_restart allow_initial_conditions_with_restart",
"Restart");
314 "null_space_dimension transpose_null_space_dimension near_null_space_dimension",
315 "Null space removal");
319 "Solution validity control");
327 _mesh(*getCheckedPointerParam<
MooseMesh *>(
"mesh")),
329 "equation_systems", nullptr, _mesh)),
331 _solve(getParam<bool>(
"solve")),
333 _time(declareRestartableData<
Real>(
"time")),
334 _time_old(declareRestartableData<
Real>(
"time_old")),
335 _t_step(declareRecoverableData<
int>(
"t_step")),
336 _dt(declareRestartableData<
Real>(
"dt")),
337 _dt_old(declareRestartableData<
Real>(
"dt_old")),
338 _nl_sys_names(getParam<
std::vector<NonlinearSystemName>>(
"nl_sys_names")),
339 _num_nl_sys(_nl_sys_names.size()),
340 _nl(_num_nl_sys, nullptr),
341 _current_nl_sys(nullptr),
344 _mesh_divisions(true),
346 "material_props", &_mesh, _material_prop_registry)),
348 "bnd_material_props", &_mesh, _material_prop_registry)),
350 "neighbor_material_props", &_mesh, _material_prop_registry)),
351 _reporter_data(_app),
353 _all_user_objects(_app.getExecuteOnEnum()),
354 _multi_apps(_app.getExecuteOnEnum()),
355 _transient_multi_apps(_app.getExecuteOnEnum()),
356 _transfers(_app.getExecuteOnEnum(), false),
357 _to_multi_app_transfers(_app.getExecuteOnEnum(), false),
358 _from_multi_app_transfers(_app.getExecuteOnEnum(), false),
359 _between_multi_app_transfers(_app.getExecuteOnEnum(), false),
360 #ifdef LIBMESH_ENABLE_AMR
362 _cycles_completed(0),
364 _displaced_mesh(nullptr),
365 _geometric_search_data(*this, _mesh),
367 _reinit_displaced_elem(false),
368 _reinit_displaced_face(false),
369 _reinit_displaced_neighbor(false),
370 _input_file_saved(false),
372 _has_constraints(false),
373 _snesmf_reuse_base(true),
374 _skip_exception_check(false),
375 _snesmf_reuse_base_set_by_user(false),
376 _has_initialized_stateful(false),
377 _const_jacobian(false),
378 _has_jacobian(false),
379 _needs_old_newton_iter(false),
380 _has_nonlocal_coupling(false),
381 _calculate_jacobian_in_uo(false),
382 _kernel_coverage_check(getParam<bool>(
"kernel_coverage_check")),
383 _boundary_restricted_node_integrity_check(
384 getParam<bool>(
"boundary_restricted_node_integrity_check")),
385 _boundary_restricted_elem_integrity_check(
386 getParam<bool>(
"boundary_restricted_elem_integrity_check")),
387 _material_coverage_check(getParam<bool>(
"material_coverage_check")),
388 _fv_bcs_integrity_check(getParam<bool>(
"fv_bcs_integrity_check")),
389 _material_dependency_check(getParam<bool>(
"material_dependency_check")),
390 _uo_aux_state_check(getParam<bool>(
"check_uo_aux_state")),
391 _max_qps(
std::numeric_limits<unsigned
int>::
max()),
393 _has_time_integrator(false),
394 _has_exception(false),
395 _parallel_barrier_messaging(getParam<bool>(
"parallel_barrier_messaging")),
396 _verbose_setup(getParam<bool>(
"verbose_setup")),
397 _verbose_multiapps(getParam<bool>(
"verbose_multiapps")),
399 _control_warehouse(_app.getExecuteOnEnum(), false),
400 _is_petsc_options_inserted(false),
401 _line_search(nullptr),
402 _using_ad_mat_props(false),
403 _error_on_jacobian_nonzero_reallocation(
404 isParamValid(
"error_on_jacobian_nonzero_reallocation")
405 ? getParam<bool>(
"error_on_jacobian_nonzero_reallocation")
406 : _app.errorOnJacobianNonzeroReallocation()),
407 _ignore_zeros_in_jacobian(getParam<bool>(
"ignore_zeros_in_jacobian")),
408 _force_restart(getParam<bool>(
"force_restart")),
409 _allow_ics_during_restart(getParam<bool>(
"allow_initial_conditions_with_restart")),
410 _skip_nl_system_check(getParam<bool>(
"skip_nl_system_check")),
411 _fail_next_nonlinear_convergence_check(false),
412 _allow_invalid_solution(getParam<bool>(
"allow_invalid_solution")),
413 _immediately_print_invalid_solution(getParam<bool>(
"immediately_print_invalid_solution")),
414 _started_initial_setup(false),
415 _has_internal_edge_residual_objects(false),
416 _u_dot_requested(false),
417 _u_dotdot_requested(false),
418 _u_dot_old_requested(false),
419 _u_dotdot_old_requested(false),
422 _print_execution_on(),
423 _identify_variable_groups_in_nl(getParam<bool>(
"identify_variable_groups_in_nl")),
424 _regard_general_exceptions_as_errors(getParam<bool>(
"regard_general_exceptions_as_errors"))
429 ADReal::do_derivatives =
true;
470 getParam<MultiMooseEnum>(
"coord_type"));
476 std::string restart_file_base = getParam<FileNameNoExtension>(
"restart_file_base");
483 if (restart_file_base.size())
501 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0) 512 mooseWarning(
"Displaced mesh was requested but the displaced problem does not exist. " 513 "Regular mesh will be returned");
521 auto & vectors = getParam<std::vector<std::vector<TagName>>>(
"extra_tag_vectors");
523 for (
auto & vector : vectors[nl_sys_num])
526 _nl[nl_sys_num]->addVector(tag,
false,
GHOSTED);
530 auto & matrices = getParam<std::vector<std::vector<TagName>>>(
"extra_tag_matrices");
531 for (
const auto nl_sys_num :
index_range(matrices))
532 for (
auto & matrix : matrices[nl_sys_num])
535 _nl[nl_sys_num]->addMatrix(tag);
542 for (
auto & vector :
getParam<std::vector<TagName>>(
"extra_tag_solutions"))
545 for (
auto & nl :
_nl)
546 nl->addVector(tag,
false,
GHOSTED);
550 if (getParam<bool>(
"previous_nl_solution_required"))
558 for (
auto & nl :
_nl)
565 for (
auto & nl :
_nl)
566 nl->associateVectorToTag(*nl->system().current_local_solution.get(), tag);
567 _aux->associateVectorToTag(*
_aux->system().current_local_solution.get(), tag);
580 _assembly[i][j] = std::make_unique<Assembly>(*nls[j], i);
586 std::vector<std::shared_ptr<NonlinearSystemBase>> & nls)
588 TIME_SECTION(
"initNullSpaceVectors", 5,
"Initializing Null Space Vectors");
590 unsigned int dimNullSpace =
parameters.
get<
unsigned int>(
"null_space_dimension");
591 unsigned int dimTransposeNullSpace =
592 parameters.
get<
unsigned int>(
"transpose_null_space_dimension");
593 unsigned int dimNearNullSpace =
parameters.
get<
unsigned int>(
"near_null_space_dimension");
594 for (
unsigned int i = 0; i < dimNullSpace; ++i)
596 std::ostringstream oss;
600 for (
auto & nl : nls)
601 nl->addVector(
"NullSpace" + oss.str(),
false,
GHOSTED);
604 for (
unsigned int i = 0; i < dimTransposeNullSpace; ++i)
606 std::ostringstream oss;
610 for (
auto & nl : nls)
611 nl->addVector(
"TransposeNullSpace" + oss.str(),
false,
GHOSTED);
614 for (
unsigned int i = 0; i < dimNearNullSpace; ++i)
616 std::ostringstream oss;
620 for (
auto & nl : nls)
621 nl->addVector(
"NearNullSpace" + oss.str(),
false,
GHOSTED);
635 for (
unsigned int i = 0; i <
n_threads; i++)
651 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0) 661 TIME_SECTION(
"setCoordSystem", 5,
"Setting Coordinate System");
676 std::vector<const DofMap *> dof_maps(
es().n_systems());
679 const auto & sys =
es().get_system(i);
680 dof_maps[i] = &sys.get_dof_map();
683 std::make_unique<ConstElemRange>(
_mesh.
getMesh().multi_evaluable_elements_begin(dof_maps),
684 _mesh.
getMesh().multi_evaluable_elements_end(dof_maps));
694 std::vector<const DofMap *> dof_maps(
_nl.size());
696 dof_maps[i] = &
_nl[i]->dofMap();
698 std::make_unique<ConstElemRange>(
_mesh.
getMesh().multi_evaluable_elements_begin(dof_maps),
699 _mesh.
getMesh().multi_evaluable_elements_end(dof_maps));
708 TIME_SECTION(
"initialSetup", 2,
"Performing Initial Setup");
713 mooseError(
"Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
716 mooseWarning(
"MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter " 717 "is used. If you receive a terse MPI error during execution, remove this " 718 "parameter and rerun your simulation");
729 _nl[i]->initSolutionState();
733 _aux->initSolutionState();
746 TIME_SECTION(
"computingMaxDofs", 3,
"Computing Max Dofs Per Element");
750 max_var_n_dofs_per_elem = mvndpe.
max();
755 max_var_n_dofs_per_node = mvndpn.
max();
757 global_max_var_n_dofs_per_elem =
758 std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
762 TIME_SECTION(
"assignMaxDofs", 5,
"Assigning Maximum Dofs Per Elem");
764 nl.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
766 if (displaced_problem)
767 displaced_problem->nlSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
769 nl.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
770 if (displaced_problem)
771 displaced_problem->nlSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
776 TIME_SECTION(
"resizingVarValues", 5,
"Resizing Variable Values");
780 _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(
getMaxQps(), 0.));
800 props->setRecovering();
802 TIME_SECTION(
"restore", 3,
"Restoring from backup");
829 TIME_SECTION(
"copyingFromExodus", 3,
"Copying Variables From Exodus");
831 for (
auto & nl :
_nl)
832 nl->copyVars(*reader);
833 _aux->copyVars(*reader);
837 if (
_nl[0]->hasVarCopy() ||
_aux->hasVarCopy())
838 mooseError(
"Need Exodus reader to restart variables but the reader is not available\n" 839 "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an " 840 "Exodus mesh file and with use_for_exodus_restart equal to true");
856 mooseError(
"Stateful neighbor material properties do not work with mesh adaptivity");
872 "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
882 std::set<std::string> depend_objects_aux =
_aux->getDependObjects();
886 std::vector<UserObject *> userobjs;
891 for (
auto obj : userobjs)
904 TIME_SECTION(
"initializingFunctions", 5,
"Initializing Functions");
916 TIME_SECTION(
"initializingRandomObjects", 5,
"Initializing Random Objects");
928 TIME_SECTION(
"ICiniitalSetup", 5,
"Setting Up Initial Conditions");
942 TIME_SECTION(
"materialInitialSetup", 3,
"Setting Up Materials");
964 TIME_SECTION(
"computingInitialStatefulProps", 3,
"Computing Initial Material Values");
980 props->setRestartInPlace();
981 props->setRecovering();
992 #ifdef LIBMESH_ENABLE_AMR 998 mooseError(
"Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
1003 #endif // LIBMESH_ENABLE_AMR 1018 for (
auto & nl :
_nl)
1022 _aux->initialSetup();
1028 for (
auto & nl :
_nl)
1029 nl->setSolution(*(nl->system().current_local_solution.get()));
1053 for (
auto & nl :
_nl)
1055 auto ti = nl->getTimeIntegrator();
1059 TIME_SECTION(
"timeIntegratorInitialSetup", 5,
"Initializing Time Integrator");
1070 TIME_SECTION(
"initialSetupMultiApps", 2,
"Initializing MultiApps",
false);
1076 TIME_SECTION(
"initialSetupTransfers", 2,
"Initializing Transfers");
1082 for (
const auto & transfer : to_multi_app_objects)
1084 transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1085 transfer->initialSetup();
1090 for (
const auto & transfer : from_multi_app_objects)
1092 transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1093 transfer->initialSetup();
1098 for (
const auto & transfer : between_multi_app_objects)
1100 transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1101 transfer->initialSetup();
1107 TIME_SECTION(
"BoundaryRestrictedNodeIntegrityCheck", 5);
1112 Threads::parallel_reduce(bnd_nodes, bnict);
1116 for (
const auto & bnode : bnd_nodes)
1118 const auto boundary_id = bnode->_bnd_id;
1119 const Node *
const node = bnode->_node;
1126 const Elem *
const an_elem =
1127 _mesh.
getMesh().elem_ptr(libmesh_map_find(node_to_elem_map, node->id()).front());
1128 if (!an_elem->is_vertex(an_elem->get_node_index(node)))
1133 for (
auto & nl :
_nl)
1135 const auto & nodal_bcs = nl->getNodalBCWarehouse();
1136 if (!nodal_bcs.hasBoundaryObjects(boundary_id, 0))
1139 const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id, 0);
1140 for (
const auto & bnd_object : bnd_objects)
1143 if (!bnd_object->requiresGeometricSearch() &&
1144 bnd_object->checkVariableBoundaryIntegrity())
1146 std::set<MooseVariableFieldBase *> vars_to_omit = {
1151 *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1159 TIME_SECTION(
"BoundaryRestrictedElemIntegrityCheck", 5);
1164 Threads::parallel_reduce(bnd_elems, beict);
1173 mooseError(
"failed to converge initial MultiApp");
1205 TIME_SECTION(
"computeMaterials", 2,
"Computing Initial Material Properties");
1214 for (
unsigned int tid = 0; tid <
n_threads; tid++)
1232 TIME_SECTION(
"lineSearchInitialSetup", 5,
"Initializing Line Search");
1254 "\" has the same name as a scalar variable in the system.");
1264 MeshRefinement mesh_refinement(
_mesh);
1265 std::unique_ptr<MeshRefinement> displaced_mesh_refinement(
nullptr);
1267 displaced_mesh_refinement = std::make_unique<MeshRefinement>(*_displaced_mesh);
1281 mesh_refinement.uniformly_coarsen();
1283 displaced_mesh_refinement->uniformly_coarsen();
1313 es().reinit_systems();
1330 _aux->timestepSetup();
1331 for (
auto & nl :
_nl)
1332 nl->timestepSetup();
1345 std::vector<UserObject *> userobjs;
1347 for (
auto obj : userobjs)
1348 obj->timestepSetup();
1375 TIME_SECTION(
"checkNonlocalCoupling", 5,
"Checking Nonlocal Coupling");
1378 for (
auto & nl :
_nl)
1380 const auto & all_kernels = nl->getKernelWarehouse();
1381 const auto & kernels = all_kernels.getObjects(tid);
1382 for (
const auto & kernel : kernels)
1384 std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1386 if (nonlocal_kernel)
1394 nl->getIntegratedBCWarehouse();
1395 const auto & integrated_bcs = all_integrated_bcs.
getObjects(tid);
1396 for (
const auto & integrated_bc : integrated_bcs)
1398 std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1400 if (nonlocal_integrated_bc)
1413 std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1415 std::vector<ShapeElementUserObject *> objs;
1419 .condition<AttribThread>(tid)
1422 for (
const auto & uo : objs)
1425 const auto & mv_deps = uo->jacobianMooseVariables();
1426 uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1430 std::vector<ShapeSideUserObject *> objs;
1434 .condition<AttribThread>(tid)
1436 for (
const auto & uo : objs)
1439 const auto & mv_deps = uo->jacobianMooseVariables();
1440 uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1452 for (
unsigned int i = 0; i < moose_vars.size(); ++i)
1454 VariableName var_name = moose_vars[i]->name();
1455 auto & nl =
_nl[moose_vars[i]->sys().number()];
1456 nl->setVariableGlobalDoFs(var_name);
1467 _nl[i]->prepare(tid);
1472 _assembly[tid][i]->prepareJacobianBlock();
1494 for (
auto & nl :
_nl)
1495 nl->prepareFace(tid,
true);
1496 _aux->prepareFace(tid,
false);
1506 const std::vector<dof_id_type> & dof_indices,
1512 _nl[i]->prepare(tid);
1517 _assembly[tid][current_nl_sys_num]->prepareBlock(ivar, jvar, dof_indices);
1522 _assembly[tid][current_nl_sys_num]->prepareBlockNonlocal(
1544 _assembly[tid][i]->setCurrentSubdomainID(did);
1554 SubdomainID did = elem->neighbor_ptr(side)->subdomain_id();
1557 _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1570 _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1771 const DofMap & dof_map,
1772 std::vector<dof_id_type> & dof_indices,
1773 const std::set<TagID> & tags,
1796 _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
1802 jacobian, ivar, jvar, dof_map, dof_indices, jv.
allDofIndices(), tags, tid);
1811 const DofMap & dof_map,
1812 std::vector<dof_id_type> & dof_indices,
1813 std::vector<dof_id_type> & neighbor_dof_indices,
1814 const std::set<TagID> & tags,
1822 neighbor_dof_indices,
1827 jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, tags, tid);
1866 TIME_SECTION(
"ghostGhostedBoundaries", 3,
"Ghosting Ghosted Boundaries");
1878 "This function is deprecated and no longer performs any function. Please do not call it."));
1886 unsigned int n_points = points.size();
1903 _zero[tid].resize(max_qpts, 0);
1913 _assembly[tid][i]->reinitAtPhysical(elem, points);
1914 _nl[i]->prepare(tid);
1925 bool have_points = n_points > 0;
1939 for (
auto & nl :
_nl)
1940 nl->reinitElem(elem, tid);
1941 _aux->reinitElem(elem, tid);
1949 const std::vector<Point> & phys_points_in_elem,
1953 "Are you calling this method with a displaced mesh element?");
1957 _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
1958 _nl[i]->prepare(tid);
1977 _nl[i]->reinitElemFace(elem, side, bnd_id, tid);
1979 _aux->reinitElemFace(elem, side, bnd_id, tid);
1988 const std::vector<Point> *
const pts,
1989 const std::vector<Real> *
const weights)
2007 _nl[i]->reinitNode(node, tid);
2009 _aux->reinitNode(node, tid);
2021 _nl[i]->reinitNodeFace(node, bnd_id, tid);
2023 _aux->reinitNodeFace(node, bnd_id, tid);
2032 for (
auto & nl :
_nl)
2033 nl->reinitNodes(nodes, tid);
2034 _aux->reinitNodes(nodes, tid);
2043 for (
auto & nl :
_nl)
2044 nl->reinitNodesNeighbor(nodes, tid);
2045 _aux->reinitNodesNeighbor(nodes, tid);
2051 TIME_SECTION(
"reinitScalars", 3,
"Reinitializing Scalar Variables");
2056 for (
auto & nl :
_nl)
2057 nl->reinitScalars(tid, reinit_for_derivative_reordering);
2058 _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2078 const Elem * neighbor = elem->neighbor_ptr(side);
2079 unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2083 _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2084 _nl[i]->prepareNeighbor(tid);
2088 _aux->prepareNeighbor(tid);
2091 for (
auto & nl :
_nl)
2093 nl->reinitElemFace(elem, side, bnd_id, tid);
2094 nl->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2096 _aux->reinitElemFace(elem, side, bnd_id, tid);
2097 _aux->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2106 const auto & displaced_ref_pts =
_assembly[tid][0]->qRuleNeighbor()->get_points();
2126 auto & neighbor =
_assembly[tid][0]->neighbor();
2127 auto & neighbor_side =
_assembly[tid][0]->neighborSide();
2129 if (lower_d_elem_neighbor &&
2132 auto qps =
_assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2133 std::vector<Point> reference_points;
2134 FEInterface::inverse_map(
2135 lower_d_elem_neighbor->dim(), FEType(), lower_d_elem_neighbor, qps, reference_points);
2148 unsigned int neighbor_side,
2149 const std::vector<Point> & physical_points,
2153 "Are you calling this method with a displaced mesh element?");
2158 _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
2161 _nl[i]->prepareNeighbor(tid);
2163 _aux->prepareNeighbor(tid);
2169 for (
auto & nl :
_nl)
2170 nl->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2171 _aux->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2176 const std::vector<Point> & physical_points,
2180 "Are you calling this method with a displaced mesh element?");
2185 _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, physical_points);
2188 _nl[i]->prepareNeighbor(tid);
2190 _aux->prepareNeighbor(tid);
2196 for (
auto & nl :
_nl)
2197 nl->reinitNeighbor(neighbor, tid);
2198 _aux->reinitNeighbor(neighbor, tid);
2209 std::set<const Elem *> displaced_elements;
2214 for (
const auto & elem : displaced_elements)
2238 for (
auto & nl :
_nl)
2239 nl->subdomainSetup(subdomain, tid);
2253 const std::string & name,
2256 parallel_object_only();
2273 mooseError(
"Unrecognized function functor type");
2293 std::istringstream ss(
name);
2297 if (ss >> real_value && ss.eof())
2300 params.
set<
Real>(
"value") = real_value;
2301 addFunction(
"ConstantFunction", ss.str(), params);
2306 std::string vars =
"x,y,z,t,NaN,pi,e";
2307 if (fp.Parse(
name, vars) == -1)
2311 params.
set<std::string>(
"expression") =
name;
2330 const std::string & name,
2333 parallel_object_only();
2348 mooseError(
"No MeshDivision object named ",
name,
" of appropriate type");
2361 mooseDeprecated(
"FEProblemBase::getNonlinearSystem() is deprecated, please use " 2362 "FEProblemBase::getNonlinearSystemBase() \n");
2364 mooseAssert(sys_num <
_nl.size(),
"System number greater than the number of nonlinear systems");
2375 const std::string & name,
2385 std::vector<Distribution *> objs;
2389 .condition<AttribName>(
name)
2392 mooseError(
"Unable to find Distribution with name '" +
name +
"'");
2398 const std::string & name,
2402 for (
auto & sampler : samplers)
2409 std::vector<Sampler *> objs;
2413 .condition<AttribThread>(tid)
2418 "Unable to find Sampler with name '" +
name +
2419 "', if you are attempting to access this object in the constructor of another object then " 2420 "the object being retrieved must occur prior to the caller within the input file.");
2426 const FEType & type,
2429 for (
auto & nl :
_nl)
2433 std::string error_prefix =
"";
2436 curr_sys_ptr =
_aux.get();
2437 other_sys_ptr = nl.get();
2438 error_prefix =
"Aux";
2442 mooseError(
"Cannot have an auxiliary variable and a nonlinear variable with the same name: ",
2447 const Variable & var =
2448 curr_sys_ptr->
system().variable(curr_sys_ptr->
system().variable_number(var_name));
2449 if (var.type() !=
type)
2451 "Variable with name '",
2453 "' already exists but is of a differing type!");
2464 const std::string & var_name,
2467 parallel_object_only();
2469 auto fe_type = FEType(Utility::string_to_enum<Order>(params.
get<
MooseEnum>(
"order")),
2470 Utility::string_to_enum<FEFamily>(params.
get<
MooseEnum>(
"family")));
2478 const auto & nl_sys_name = params.
get<NonlinearSystemName>(
"nl_sys");
2479 std::istringstream ss(nl_sys_name);
2480 unsigned int nl_sys_num;
2481 if (!(ss >> nl_sys_num) || !ss.eof())
2484 logAdd(
"Variable", var_name, var_type);
2485 _nl[nl_sys_num]->addVariable(var_type, var_name, params);
2493 std::pair<bool, unsigned int>
2495 const bool error_if_not_found)
const 2500 mooseAssert(
_nl[nl_map_it->second]->hasVariable(var_name) ||
2501 _nl[nl_map_it->second]->hasScalarVariable(var_name),
2502 "If the variable is in our FEProblem nonlinear system map, then it must be in the " 2503 "nonlinear system we expect");
2504 else if (error_if_not_found)
2506 if (
_aux->hasVariable(var_name) ||
_aux->hasScalarVariable(var_name))
2509 " found. Did you specify an auxiliary variable when you meant to specify a " 2510 "nonlinear variable?");
2514 "'. It does not exist in the nonlinear system(s) or auxiliary system");
2522 const std::string & name,
2525 parallel_object_only();
2527 const auto nl_sys_num =
2557 const std::string & name,
2560 parallel_object_only();
2562 const auto nl_sys_num =
2591 const std::string & name,
2594 parallel_object_only();
2596 const auto nl_sys_num =
2625 const std::string & name,
2628 parallel_object_only();
2630 const auto nl_sys_num =
2660 const std::string & name,
2663 parallel_object_only();
2667 auto determine_var_param_name = [&
parameters,
this]()
2676 if (!has_secondary_var && !has_primary_var)
2678 "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
2681 return has_secondary_var ?
"secondary_variable" :
"primary_variable";
2685 const auto nl_sys_num =
2710 const std::string & var_name,
2713 parallel_object_only();
2715 auto fe_type = FEType(Utility::string_to_enum<Order>(params.
get<
MooseEnum>(
"order")),
2716 Utility::string_to_enum<FEFamily>(params.
get<
MooseEnum>(
"family")));
2724 logAdd(
"AuxVariable", var_name, var_type);
2725 _aux->addVariable(var_type, var_name, params);
2733 const FEType & type,
2734 const std::set<SubdomainID> *
const active_subdomains)
2736 parallel_object_only();
2738 mooseDeprecated(
"Please use the addAuxVariable(var_type, var_name, params) API instead");
2743 std::string var_type;
2745 var_type =
"MooseVariableConstMonomial";
2747 var_type =
"MooseVariableScalar";
2750 var_type =
"VectorMooseVariable";
2752 var_type =
"MooseVariable";
2760 if (active_subdomains)
2764 logAdd(
"AuxVariable", var_name, var_type);
2765 _aux->addVariable(var_type, var_name, params);
2772 const FEType & type,
2773 unsigned int components,
2774 const std::set<SubdomainID> *
const active_subdomains)
2776 parallel_object_only();
2778 mooseDeprecated(
"Please use the addAuxVariable(var_type, var_name, params) API instead");
2788 params.
set<
unsigned int>(
"components") = components;
2790 if (active_subdomains)
2794 logAdd(
"Variable", var_name,
"ArrayMooseVariable");
2795 _aux->addVariable(
"ArrayMooseVariable", var_name, params);
2804 const std::set<SubdomainID> *
const active_subdomains)
2806 parallel_object_only();
2808 mooseDeprecated(
"Please use the addAuxVariable(var_type, var_name, params) API instead");
2823 params.
set<std::vector<Real>>(
"scaling") = {1};
2824 if (active_subdomains)
2828 logAdd(
"ScalarVariable", var_name,
"MooseVariableScalar");
2829 _aux->addVariable(
"MooseVariableScalar", var_name, params);
2836 const std::string & name,
2839 parallel_object_only();
2846 if (!
parameters.
get<std::vector<BoundaryName>>(
"boundary").empty())
2874 const std::string & name,
2877 parallel_object_only();
2900 logAdd(
"AuxScalarKernel",
name, kernel_name);
2906 const std::string & name,
2909 parallel_object_only();
2911 const auto nl_sys_num =
2943 const std::string & name,
2946 parallel_object_only();
2948 const auto nl_sys_num =
2981 const std::string & name,
2995 const std::string & name,
3003 const std::string & name,
3008 addObject<FVInterfaceKernel>(
3016 const std::string & name,
3019 parallel_object_only();
3021 const auto nl_sys_num =
3046 logAdd(
"InterfaceKernel",
name, interface_kernel_name);
3054 const std::string & name,
3055 const VariableName & var_name)
3059 std::string restart_method =
"";
3062 "a checkpoint restart, by IC object '" + ic_name +
"' for variable '" +
name +
"'";
3068 restarted_vars.insert(restarted_vars.end(), nodal_vars.begin(), nodal_vars.end());
3069 restarted_vars.insert(restarted_vars.end(), global_vars.begin(), global_vars.end());
3071 if (std::find(restarted_vars.begin(), restarted_vars.end(), var_name) != restarted_vars.end())
3072 restart_method =
"an Exodus restart, by IC object '" + ic_name +
"' for variable '" +
name +
3073 "' that is also being restarted";
3075 if (!restart_method.empty())
3077 "Initial conditions have been specified during ",
3079 ".\nThis is only allowed if you specify 'allow_initial_conditions_with_restart' to " 3080 "the [Problem], as initial conditions can override restarted fields");
3086 const std::string & name,
3089 parallel_object_only();
3093 const std::string & var_name =
parameters.
get<VariableName>(
"variable");
3108 std::shared_ptr<InitialConditionBase> ic;
3109 if (dynamic_cast<MooseVariable *>(&var))
3111 else if (dynamic_cast<VectorMooseVariable *>(&var))
3113 else if (dynamic_cast<ArrayMooseVariable *>(&var))
3115 else if (dynamic_cast<MooseVariableFVReal *>(&var))
3118 mooseError(
"Your FE variable in initial condition ",
3120 " must be either of scalar or vector type");
3131 std::shared_ptr<ScalarInitialCondition> ic =
3139 "Variable '", var_name,
"' requested in initial condition '",
name,
"' does not exist.");
3144 const std::string & name,
3147 parallel_object_only();
3151 const std::string & var_name =
parameters.
get<VariableName>(
"variable");
3166 std::shared_ptr<FVInitialConditionBase> ic;
3167 if (dynamic_cast<MooseVariableFVReal *>(&var))
3171 "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3178 "' requested in finite volume initial condition '",
3180 "' does not exist.");
3186 TIME_SECTION(
"projectSolution", 2,
"Projecting Initial Solutions")
3192 Threads::parallel_reduce(elem_range, cic);
3196 using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
3200 Threads::parallel_reduce(elem_info_range, cfvic);
3204 for (
auto & nl :
_nl)
3205 nl->solution().close();
3206 _aux->solution().close();
3211 Threads::parallel_reduce(bnd_nodes, cbic);
3213 for (
auto & nl :
_nl)
3214 nl->solution().close();
3215 _aux->solution().close();
3223 for (
const auto & ic : ics)
3231 const unsigned int n_SCALAR_dofs = var.
dofIndices().size();
3232 for (
unsigned int i = 0; i < n_SCALAR_dofs; i++)
3241 for (
auto & nl :
_nl)
3243 nl->solution().close();
3244 nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3247 _aux->solution().close();
3248 _aux->solution().localize(*
_aux->sys().current_local_solution,
_aux->dofMap().get_send_list());
3256 Threads::parallel_reduce(elem_range, cic);
3259 for (
auto & nl :
_nl)
3260 nl->solution().close();
3261 _aux->solution().close();
3264 Threads::parallel_reduce(bnd_nodes, cbic);
3266 for (
auto & nl :
_nl)
3267 nl->solution().close();
3268 _aux->solution().close();
3276 for (
const auto & ic : ics)
3284 const unsigned int n_SCALAR_dofs = var.
dofIndices().size();
3285 for (
unsigned int i = 0; i < n_SCALAR_dofs; i++)
3294 for (
auto & nl :
_nl)
3296 nl->solution().close();
3297 nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3300 _aux->solution().close();
3301 _aux->solution().localize(*
_aux->sys().current_local_solution,
_aux->dofMap().get_send_list());
3304 std::shared_ptr<MaterialBase>
3313 name +=
"_neighbor";
3326 "), but its compute flag is set to true. This indicates that MOOSE is " 3327 "computing this property which may not be desired and produce un-expected " 3348 mooseError(
"FEProblemBase::getMaterialData(): Invalid MaterialDataType ",
type);
3353 const std::string & name,
3356 parallel_object_only();
3358 auto add_functor_materials = [&](
const auto &
parameters,
const auto &
name)
3363 std::shared_ptr<MaterialBase> material =
3365 logAdd(
"FunctorMaterial",
name, functor_material_name);
3377 add_functor_materials(disp_params,
name +
"_displaced");
3383 const std::string & name,
3391 const std::string & name,
3399 const std::string & mat_name,
3400 const std::string & name,
3403 parallel_object_only();
3428 std::shared_ptr<MaterialBase> material =
3431 bool discrete = !material->getParam<
bool>(
"compute");
3435 if (material->boundaryRestricted() ||
dynamic_cast<FunctorMaterial *
>(material.get()))
3441 for (
auto && warehouse : warehouses)
3442 warehouse->addObject(material, tid);
3454 std::string object_name;
3463 object_name =
name +
"_face";
3464 std::shared_ptr<MaterialBase> face_material =
3470 current_parameters.set<
bool>(
"_neighbor") =
true;
3471 object_name =
name +
"_neighbor";
3472 std::shared_ptr<MaterialBase> neighbor_material =
3481 for (
auto && warehouse : warehouses)
3482 warehouse->addObjects(material, neighbor_material, face_material, tid);
3485 const std::string & base =
parameters.
get<std::string>(
"_moose_base");
3487 const auto param_names =
3492 for (
const auto & p_name : param_names)
3495 p_name.parameter());
3497 p_name.parameter());
3499 p_name.parameter());
3501 primary_name, face_name,
false);
3503 primary_name, neighbor_name,
false);
3514 std::set<MooseVariableFEBase *> needed_moose_vars;
3515 std::unordered_set<unsigned int> needed_mat_props;
3524 for (
const auto id : ids)
3531 needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
3532 current_active_elemental_moose_variables.end());
3534 needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
3545 auto && elem =
_assembly[tid][0]->elem();
3546 unsigned int n_points =
_assembly[tid][0]->qRule()->n_points();
3549 material_data.
resize(n_points);
3553 material_data.swap(*elem);
3566 const bool swap_stateful,
3567 const std::deque<MaterialBase *> *
const reinit_mats)
3571 auto && elem =
_assembly[tid][0]->elem();
3572 unsigned int side =
_assembly[tid][0]->side();
3573 unsigned int n_points =
_assembly[tid][0]->qRuleFace()->n_points();
3576 bnd_material_data.
resize(n_points);
3578 if (swap_stateful && !bnd_material_data.isSwapped())
3579 bnd_material_data.swap(*elem, side);
3582 bnd_material_data.reset(
3586 bnd_material_data.reinit(*reinit_mats);
3588 bnd_material_data.reinit(
3596 const bool swap_stateful,
3597 const std::deque<MaterialBase *> *
const reinit_mats)
3604 const Elem * neighbor =
_assembly[tid][0]->neighbor();
3605 unsigned int neighbor_side = neighbor->which_neighbor_am_i(
_assembly[tid][0]->elem());
3607 mooseAssert(neighbor,
"neighbor should be non-null");
3608 mooseAssert(blk_id == neighbor->subdomain_id(),
3609 "The provided blk_id " << blk_id <<
" and neighbor subdomain ID " 3610 << neighbor->subdomain_id() <<
" do not match.");
3612 unsigned int n_points =
_assembly[tid][0]->qRuleNeighbor()->n_points();
3615 neighbor_material_data.
resize(n_points);
3619 neighbor_material_data.swap(*neighbor, neighbor_side);
3622 neighbor_material_data.reset(
3626 neighbor_material_data.reinit(*reinit_mats);
3628 neighbor_material_data.reinit(
3636 const bool swap_stateful,
3637 const std::deque<MaterialBase *> *
const reinit_mats)
3641 auto && elem =
_assembly[tid][0]->elem();
3642 unsigned int side =
_assembly[tid][0]->side();
3643 unsigned int n_points =
_assembly[tid][0]->qRuleFace()->n_points();
3646 bnd_material_data.
resize(n_points);
3648 if (swap_stateful && !bnd_material_data.isSwapped())
3649 bnd_material_data.swap(*elem, side);
3655 bnd_material_data.reinit(*reinit_mats);
3668 const Elem *
const & elem =
_assembly[tid][0]->elem();
3669 unsigned int side =
_assembly[tid][0]->side();
3670 unsigned int n_points =
_assembly[tid][0]->qRuleFace()->n_points();
3673 bnd_material_data.
resize(n_points);
3675 if (swap_stateful && !bnd_material_data.isSwapped())
3676 bnd_material_data.swap(*elem, side);
3686 auto && elem =
_assembly[tid][0]->elem();
3693 auto && elem =
_assembly[tid][0]->elem();
3694 unsigned int side =
_assembly[tid][0]->side();
3702 const Elem * neighbor =
_assembly[tid][0]->neighbor();
3703 unsigned int neighbor_side =
3717 neighbor_side =
_assembly[tid][0]->side();
3718 mooseAssert(neighbor,
"We should have an appropriate value for elem coming from Assembly");
3729 const std::string & name,
3730 const std::string & type)
const 3733 _console <<
"[DBG] Adding " << system <<
" '" <<
name <<
"' of type " <<
type << std::endl;
3738 const std::string & object_name,
3739 const std::string & var_param_name)
3741 const auto nl_sys_num =
3769 const std::string & name,
3776 "\" already exists. You may not add a Postprocessor by the same name.");
3783 const std::string & name,
3790 "\" already exists. You may not add a VectorPostprocessor by the same name.");
3797 const std::string & name,
3803 "\" already exists. You may not add a Reporter by the same name.");
3808 std::vector<std::shared_ptr<UserObject>>
3810 const std::string & name,
3813 parallel_object_only();
3815 std::vector<std::shared_ptr<UserObject>> uos;
3823 std::shared_ptr<UserObject> user_object =
3825 logAdd(
"UserObject",
name, user_object_name);
3826 uos.push_back(user_object);
3829 user_object->setPrimaryThreadCopy(uos[0].
get());
3850 if (euo || nuo || duo)
3860 if ((guo && !tguo) || muo)
3871 if (
const auto functor =
3885 std::vector<UserObject *> objs;
3889 .condition<AttribThread>(tid)
3893 mooseError(
"Unable to find user object with name '" +
name +
"'");
3894 mooseAssert(objs.size() == 1,
"Should only find one UO");
3901 std::vector<Positions *> objs;
3905 .condition<AttribName>(
name)
3908 mooseError(
"Unable to find Positions object with name '" +
name +
"'");
3909 mooseAssert(objs.size() == 1,
"Should only find one Positions");
3916 std::vector<UserObject *> objs;
3920 .condition<AttribThread>(0)
3923 return !objs.empty();
3934 std::size_t t_index)
const 3943 std::size_t t_index)
3952 mooseDeprecated(
"FEProblemBase::hasPostprocssor is being removed; use " 3953 "hasPostprocessorValueByName instead.");
3959 const std::string & vector_name,
3960 std::size_t t_index)
const 3968 const std::string & vector_name,
3970 std::size_t t_index)
3980 return getUserObject<VectorPostprocessor>(object_name, tid);
3988 const auto & objects = it.second.getActiveObjects();
3989 for (
const auto & obj : objects)
3990 obj->parentOutputPositionChanged();
4007 TIME_SECTION(
"computeIndicators", 1,
"Computing Indicators");
4011 const auto old_do_derivatives = ADReal::do_derivatives;
4012 ADReal::do_derivatives =
false;
4014 std::vector<std::string>
fields;
4018 for (
const auto & indicator : indicators)
4019 fields.push_back(indicator->name());
4023 for (
const auto & internal_indicator : internal_indicators)
4024 fields.push_back(internal_indicator->name());
4031 _aux->solution().close();
4036 _aux->solution().close();
4039 ADReal::do_derivatives = old_do_derivatives;
4048 TIME_SECTION(
"computeMarkers", 1,
"Computing Markers");
4050 std::vector<std::string>
fields;
4054 for (
const auto & marker : markers)
4055 fields.push_back(marker->name());
4064 for (
const auto & marker : markers)
4065 marker->markerSetup();
4071 _aux->solution().close();
4108 _aux->customSetup(exec_type);
4109 for (
auto & nl :
_nl)
4110 nl->customSetup(exec_type);
4122 std::vector<UserObject *> userobjs;
4124 for (
auto obj : userobjs)
4125 obj->customSetup(exec_type);
4170 std::unique_ptr<NumericVector<Number>> x =
_aux->currentSolution()->clone();
4178 const Real check_tol = 1e-8;
4180 const Real xnorm = x->l2_norm();
4181 *x -= *
_aux->currentSolution();
4182 if (x->l2_norm() > check_tol * xnorm)
4184 const auto & sys =
_aux->system();
4185 const unsigned int n_vars = sys.n_vars();
4186 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4190 ordered_map.emplace(vnorm, sys.variable_name(i));
4193 std::ostringstream oss;
4194 for (
const auto & [error_norm, var_name] : ordered_map)
4195 oss <<
" {" << var_name <<
", " << error_norm <<
"},\n";
4197 mooseError(
"Aux kernels, user objects appear to have states for aux variables on ",
4199 ".\nVariable error norms in descending order:\n",
4204 if (pp_values.size() != new_pp_values.size())
4205 mooseError(
"Second execution for uo/aux state check should not change the number of " 4206 "real reporter values");
4208 const Real ppnorm = pp_values.l2_norm();
4209 pp_values -= new_pp_values;
4210 if (pp_values.l2_norm() > check_tol * ppnorm)
4213 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4215 ordered_map.emplace(
std::abs(pp_values(i)), pp_names[i]);
4217 std::ostringstream oss;
4218 for (
const auto & [error_norm, pp_name] : ordered_map)
4219 oss <<
" {" << pp_name <<
", " << error_norm <<
"},\n";
4221 mooseError(
"Aux kernels, user objects appear to have states for real reporter values on ",
4223 ".\nErrors of real reporter values in descending order:\n",
4239 std::vector<UserObject *> objs;
4240 query.queryInto(objs);
4245 for (
auto obj : objs)
4246 if (obj->primaryThreadCopy())
4247 obj->primaryThreadCopy()->threadJoin(*obj);
4253 for (
auto obj : objs)
4255 if (isgen && dynamic_cast<ThreadedGeneralUserObject *>(obj))
4261 _console <<
"[DBG] Initializing, executing & finalizing general UO '" << obj->name()
4286 auto reporter =
dynamic_cast<Reporter *
>(obj);
4295 const std::string & name)
4302 .condition<AttribExecOns>(
type)
4323 TIME_SECTION(
"computeUserObjects", 1,
"Computing User Objects");
4334 std::vector<UserObject *> uos;
4336 std::set<int> execution_groups;
4337 for (
const auto & uo : uos)
4338 execution_groups.insert(uo->getParam<
int>(
"execution_order_group"));
4341 for (
const auto execution_group : execution_groups)
4345 std::vector<GeneralUserObject *> genobjs;
4348 std::vector<UserObject *> userobjs;
4354 .queryInto(userobjs);
4356 std::vector<UserObject *> tgobjs;
4361 std::vector<UserObject *> nodal;
4364 std::vector<MortarUserObject *> mortar;
4367 if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
4376 for (
auto obj : userobjs)
4377 obj->residualSetup();
4378 for (
auto obj : nodal)
4379 obj->residualSetup();
4380 for (
auto obj : mortar)
4381 obj->residualSetup();
4382 for (
auto obj : tgobjs)
4383 obj->residualSetup();
4384 for (
auto obj : genobjs)
4385 obj->residualSetup();
4389 for (
auto obj : userobjs)
4390 obj->jacobianSetup();
4391 for (
auto obj : nodal)
4392 obj->jacobianSetup();
4393 for (
auto obj : mortar)
4394 obj->jacobianSetup();
4395 for (
auto obj : tgobjs)
4396 obj->jacobianSetup();
4397 for (
auto obj : genobjs)
4398 obj->jacobianSetup();
4401 for (
auto obj : userobjs)
4405 if (!userobjs.empty())
4424 for (
const auto & uo : userobjs)
4425 if (
auto euo = dynamic_cast<const ElementUserObject *>(uo);
4426 euo && euo->hasWritableCoupledVariables())
4428 _aux->solution().close();
4429 _aux->system().update();
4437 for (
auto obj : nodal)
4447 for (
const auto & uo : nodal)
4448 if (
auto nuo = dynamic_cast<const NodalUserObject *>(uo);
4449 nuo && nuo->hasWritableCoupledVariables())
4451 _aux->solution().close();
4452 _aux->system().update();
4458 for (
auto obj : mortar)
4460 if (!mortar.empty())
4462 auto create_and_run_mortar_functors = [
this,
type, &mortar](
const bool displaced)
4466 for (
const auto & mortar_interface : mortar_interfaces)
4468 const auto primary_secondary_boundary_pair = mortar_interface.first;
4469 auto mortar_uos_to_execute =
4471 primary_secondary_boundary_pair.second,
4474 const auto & mortar_generation_object = mortar_interface.second;
4476 auto *
const subproblem = displaced
4478 : static_cast<SubProblem *>(
this);
4480 mortar_generation_object,
4484 subproblem->assembly(0, 0));
4490 create_and_run_mortar_functors(
false);
4492 create_and_run_mortar_functors(
true);
4494 for (
auto obj : mortar)
4499 for (
auto obj : tgobjs)
4501 std::vector<GeneralUserObject *> tguos_zero;
4505 .queryInto(tguos_zero);
4506 for (
auto obj : tguos_zero)
4508 std::vector<GeneralUserObject *> tguos;
4509 auto q =
query.clone()
4535 TIME_SECTION(
"executeControls", 1,
"Executing Controls");
4541 for (
const auto & it : controls_wh.getActiveObjects())
4546 std::vector<std::string> & dependent_controls = it->getDependencies();
4547 for (
const auto & depend_name : dependent_controls)
4549 if (controls_wh.hasActiveObject(depend_name))
4551 auto dep_control = controls_wh.getActiveObject(depend_name);
4552 resolver.
addEdge(dep_control, it);
4557 "\" was not created, did you make a " 4558 "spelling mistake or forget to include it " 4559 "in your input file?");
4565 if (!ordered_controls.empty())
4569 for (
const auto & control : ordered_controls)
4582 std::vector<Sampler *> objects;
4586 .condition<AttribThread>(tid)
4588 .queryInto(objects);
4590 if (!objects.empty())
4592 TIME_SECTION(
"executeSamplers", 1,
"Executing Samplers");
4593 FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
4594 FEProblemBase::objectExecuteHelper<Sampler>(objects);
4602 TIME_SECTION(
"updateActiveObjects", 5,
"Updating Active Objects");
4606 for (
auto & nl :
_nl)
4607 nl->updateActive(tid);
4608 _aux->updateActive(tid);
4635 TIME_SECTION(
"reinitBecauseOfGhostingOrNewGeomObjects",
4637 "Reinitializing Because of Geometric Search Objects");
4661 const std::string & name,
4664 parallel_object_only();
4666 const auto nl_sys_num =
4682 for (
auto & nl :
_nl)
4688 const std::string & name,
4691 parallel_object_only();
4717 std::shared_ptr<Indicator> indicator =
4720 std::shared_ptr<InternalSideIndicator> isi =
4731 const std::string & name,
4734 parallel_object_only();
4768 const std::string & name,
4771 parallel_object_only();
4800 multi_app->setupPositions();
4805 std::shared_ptr<TransientMultiApp> trans_multi_app =
4807 if (trans_multi_app)
4823 std::shared_ptr<MultiApp>
4834 std::string string_direction;
4836 string_direction =
" To ";
4837 else if (from_multiapp)
4838 string_direction =
" From ";
4840 string_direction =
" Between ";
4848 TIME_SECTION(
"execMultiAppTransfers", 1,
"Executing Transfers");
4855 <<
"MultiApps" << COLOR_DEFAULT <<
":" << std::endl;
4858 {
"Name",
"Type",
"From",
"To"});
4861 for (
const auto & transfer : transfers)
4865 table.addRow(multiapp_transfer->name(),
4866 multiapp_transfer->type(),
4867 multiapp_transfer->getFromName(),
4868 multiapp_transfer->getToName());
4875 for (
const auto & transfer : transfers)
4878 transfer->execute();
4885 << COLOR_DEFAULT << std::endl;
4892 << COLOR_DEFAULT << std::endl;
4896 std::vector<std::shared_ptr<Transfer>>
4907 std::vector<std::shared_ptr<Transfer>>
4933 const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
4937 for (
const auto & multi_app : multi_apps)
4938 multi_app->preTransfer(
_dt,
_time);
4947 if (multi_apps.size())
4949 TIME_SECTION(
"execMultiApps", 1,
"Executing MultiApps",
false);
4953 << COLOR_DEFAULT << std::endl;
4955 bool success =
true;
4957 for (
const auto & multi_app : multi_apps)
4959 success = multi_app->solveStep(
_dt,
_time, auto_advance);
4974 << COLOR_DEFAULT << std::endl;
4989 for (
const auto & multi_app : multi_apps)
4990 multi_app->finalize();
4998 for (
const auto & multi_app : multi_apps)
4999 multi_app->postExecute();
5007 if (multi_apps.size())
5008 for (
const auto & multi_app : multi_apps)
5009 multi_app->incrementTStep(
_time);
5017 if (multi_apps.size())
5020 _console << COLOR_CYAN <<
"\nAdvancing MultiApps on " <<
type.name() << COLOR_DEFAULT
5023 for (
const auto & multi_app : multi_apps)
5024 multi_app->finishStep(recurse_through_multiapp_levels);
5029 _console << COLOR_CYAN <<
"Finished Advancing MultiApps on " <<
type.name() <<
"\n" 5030 << COLOR_DEFAULT << std::endl;
5039 if (multi_apps.size())
5041 TIME_SECTION(
"backupMultiApps", 5,
"Backing Up MultiApp");
5044 _console << COLOR_CYAN <<
"\nBacking Up MultiApps on " <<
type.name() << COLOR_DEFAULT
5047 for (
const auto & multi_app : multi_apps)
5048 multi_app->backup();
5053 _console << COLOR_CYAN <<
"Finished Backing Up MultiApps on " <<
type.name() <<
"\n" 5054 << COLOR_DEFAULT << std::endl;
5063 if (multi_apps.size())
5068 _console << COLOR_CYAN <<
"\nRestoring Multiapps on " <<
type.name()
5069 <<
" because of solve failure!" << COLOR_DEFAULT << std::endl;
5071 _console << COLOR_CYAN <<
"\nRestoring MultiApps on " <<
type.name() << COLOR_DEFAULT
5075 for (
const auto & multi_app : multi_apps)
5076 multi_app->restore(force);
5081 _console << COLOR_CYAN <<
"Finished Restoring MultiApps on " <<
type.name() <<
"\n" 5082 << COLOR_DEFAULT << std::endl;
5093 for (
const auto & multi_app : multi_apps)
5094 smallest_dt =
std::min(smallest_dt, multi_app->computeDT());
5104 TIME_SECTION(
"execTransfers", 3,
"Executing Transfers");
5108 for (
const auto & transfer : transfers)
5109 transfer->execute();
5115 const std::string & name,
5118 parallel_object_only();
5149 std::shared_ptr<MultiApp> multiapp;
5160 exec_enum = multiapp->getParam<
ExecFlagEnum>(
"execute_on");
5168 std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5170 if (multi_app_transfer)
5186 for (
auto & nl :
_nl)
5187 if (nl->hasVariable(var_name))
5189 if (
_aux->hasVariable(var_name))
5197 const std::string & var_name,
5207 for (
auto & nl :
_nl)
5208 if (nl->hasVariable(var_name))
5209 return nl->getFieldVariable<
Real>(tid, var_name);
5210 if (
_aux->hasVariable(var_name))
5211 return _aux->getFieldVariable<
Real>(tid, var_name);
5219 for (
auto & nl :
_nl)
5220 if (nl->hasVariable(var_name))
5221 return nl->getActualFieldVariable<
Real>(tid, var_name);
5222 if (
_aux->hasVariable(var_name))
5223 return _aux->getActualFieldVariable<
Real>(tid, var_name);
5231 for (
auto & nl :
_nl)
5232 if (nl->hasVariable(var_name))
5234 if (
_aux->hasVariable(var_name))
5243 for (
auto & nl :
_nl)
5244 if (nl->hasVariable(var_name))
5246 if (
_aux->hasVariable(var_name))
5255 for (
auto & nl :
_nl)
5256 if (nl->hasScalarVariable(var_name))
5258 if (
_aux->hasScalarVariable(var_name))
5267 for (
auto & nl :
_nl)
5268 if (nl->hasScalarVariable(var_name))
5269 return nl->getScalarVariable(tid, var_name);
5270 if (
_aux->hasScalarVariable(var_name))
5271 return _aux->getScalarVariable(tid, var_name);
5281 return _nl[nl_sys_num]->system();
5282 else if (
_aux->hasVariable(var_name))
5283 return _aux->system();
5285 mooseError(
"Unable to find a system containing the variable " + var_name);
5387 mat->setActiveProperties(mat_prop_ids);
5389 mat->setActiveProperties(mat_prop_ids);
5391 mat->setActiveProperties(mat_prop_ids);
5411 #ifdef LIBMESH_ENABLE_AMR 5421 const std::string & redistributer_name,
5422 const bool use_displaced_mesh)
5426 redistribute_params.
set<std::string>(
"for_whom") = this->
name();
5430 redistribute_params.
set<
bool>(
"use_displaced_mesh") = use_displaced_mesh;
5433 std::shared_ptr<RedistributeProperties> redistributer =
5435 "RedistributeProperties", redistributer_name, redistribute_params);
5446 mesh.
getMesh().add_ghosting_functor(redistributer);
5449 add_redistributer(
_mesh,
"mesh_property_redistributer",
false);
5451 add_redistributer(
_displaced_problem->mesh(),
"displaced_mesh_property_redistributer",
true);
5453 #endif // LIBMESH_ENABLE_AMR 5473 mooseError(
"Max quadrature points per element assumptions made in some code (e.g. Coupleable ",
5474 "and MaterialPropertyInterface classes) have been violated.\n",
5475 "Complain to Moose developers to have constMaxQpsPerElem increased from ",
5483 _zero[tid].resize(max_qpts, 0);
5526 const bool allow_negative_qweights)
5531 order =
_nl[0]->getMinQuadratureOrder();
5533 if (order <
_nl[i]->getMinQuadratureOrder())
5534 order =
_nl[i]->getMinQuadratureOrder();
5535 if (order < _aux->getMinQuadratureOrder())
5536 order =
_aux->getMinQuadratureOrder();
5540 volume_order = order;
5548 type, order, volume_order, face_order, block, allow_negative_qweights);
5552 type, order, volume_order, face_order, block, allow_negative_qweights);
5563 mooseError(
"Someone told us (the FEProblemBase) to trust the user coupling matrix, but we " 5564 "haven't been provided a coupling matrix!");
5585 _cm[i] = std::move(cm);
5592 mooseError(
"Someone told us (the FEProblemBase) to trust the user coupling matrix, but we " 5593 "haven't been provided a coupling matrix!");
5601 TIME_SECTION(
"setNonlocalCouplingMatrix", 5,
"Setting Nonlocal Coupling Matrix");
5604 mooseError(
"Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support " 5605 "multiple nonlinear systems with nonlocal kernels.");
5609 auto & nl =
_nl[nl_sys_num];
5611 unsigned int n_vars = nl->nVariables();
5612 nonlocal_cm.resize(
n_vars);
5613 const auto & vars = nl->getVariables(0);
5616 for (
const auto & ivar : vars)
5618 for (
const auto & kernel : nonlocal_kernel)
5620 for (
unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5621 if (i == kernel->variable().number())
5622 for (
const auto & jvar : vars)
5627 unsigned int j = jvar->number();
5628 nonlocal_cm(i, j) = 1;
5632 for (
const auto & integrated_bc : nonlocal_integrated_bc)
5634 for (
unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5635 if (i == integrated_bc->variable().number())
5636 for (
const auto & jvar : vars)
5641 unsigned int j = jvar->number();
5642 nonlocal_cm(i, j) = 1;
5652 const unsigned int jvar,
5653 const unsigned int nl_sys)
const 5655 return (*
_cm[nl_sys])(ivar, jvar);
5658 std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
5661 return _assembly[tid][nl_sys]->couplingEntries();
5664 std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
5667 return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
5676 TIME_SECTION(
"init", 2,
"Initializing");
5692 unsigned int n_vars = nl->nVariables();
5694 TIME_SECTION(
"fillCouplingMatrix", 3,
"Filling Coupling Matrix");
5699 cm = std::make_unique<CouplingMatrix>(
n_vars);
5700 for (
unsigned int i = 0; i <
n_vars; i++)
5706 cm = std::make_unique<CouplingMatrix>(
n_vars);
5707 for (
unsigned int i = 0; i <
n_vars; i++)
5708 for (
unsigned int j = 0; j <
n_vars; j++)
5718 nl->dofMap()._dof_coupling = cm.get();
5724 nl->dofMap()._dof_coupling =
nullptr;
5726 nl->dofMap().attach_extra_sparsity_function(&
extraSparsity, nl.get());
5727 nl->dofMap().attach_extra_send_list_function(&
extraSendList, nl.get());
5731 mooseError(
"No variables specified in the FEProblemBase '",
name(),
"'.");
5746 for (
auto & nl :
_nl)
5749 nl->turnOffJacobian();
5766 TIME_SECTION(
"EquationSystems::Init", 2,
"Initializing Equation Systems");
5775 for (
auto & nl :
_nl)
5792 std::istringstream ss(nl_sys_name);
5793 unsigned int nl_sys_num;
5794 if (!(ss >> nl_sys_num) || !ss.eof())
5803 TIME_SECTION(
"solve", 1,
"Solving",
false);
5813 #if PETSC_RELEASE_LESS_THAN(3, 12, 0) 5855 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0) 5874 TIME_SECTION(
"checkExceptionAndStopSolve", 5);
5895 <<
"To recover, the solution will fail and then be re-attempted with a reduced time " 5906 _aux->solution().close();
5920 mooseError(
"The following parallel-communicated exception was detected during " +
5923 "\nBecause this did not occur during residual evaluation, there" 5924 " is no way to handle this, so the solution is aborting.\n");
5932 ADReal::do_derivatives =
true;
5956 return _nl[nl_sys_num]->converged();
5964 return _nl[nl_sys_num]->nNonlinearIterations();
5970 return _nl[nl_sys_num]->nLinearIterations();
5976 return _nl[nl_sys_num]->finalNonlinearResidual();
5982 return _nl[nl_sys_num]->computingInitialResidual();
5988 TIME_SECTION(
"copySolutionsBackwards", 3,
"Copying Solutions Backward");
5990 for (
auto & nl :
_nl)
5991 nl->copySolutionsBackwards();
5992 _aux->copySolutionsBackwards();
5998 TIME_SECTION(
"advanceState", 5,
"Advancing State");
6000 for (
auto & nl :
_nl)
6001 nl->copyOldSolutions();
6002 _aux->copyOldSolutions();
6026 TIME_SECTION(
"restoreSolutions", 5,
"Restoring Solutions");
6028 for (
auto & nl :
_nl)
6029 nl->restoreSolutions();
6030 _aux->restoreSolutions();
6039 TIME_SECTION(
"saveOldSolutions", 5,
"Saving Old Solutions");
6041 for (
auto & nl :
_nl)
6042 nl->saveOldSolutions();
6043 _aux->saveOldSolutions();
6049 TIME_SECTION(
"restoreOldSolutions", 5,
"Restoring Old Solutions");
6051 for (
auto & nl :
_nl)
6052 nl->restoreOldSolutions();
6053 _aux->restoreOldSolutions();
6059 TIME_SECTION(
"outputStep", 1,
"Outputting");
6063 for (
auto & nl :
_nl)
6095 TIME_SECTION(
"onTimestepBegin", 2);
6097 for (
auto & nl :
_nl)
6098 nl->onTimestepBegin();
6114 switch (state.
state)
6123 mooseError(
"Unhandled state ", state.
state,
" in FEProblemBase::getTimeFromStateArg");
6129 const std::string & name,
6132 parallel_object_only();
6137 for (
auto & nl :
_nl)
6144 _aux->addDotVectors();
6145 for (
auto & nl :
_nl)
6147 nl->addDotVectors();
6149 auto tag_udot = nl->getTimeIntegrator()->uDotFactorTag();
6150 if (!nl->hasVector(tag_udot))
6151 nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
6152 auto tag_udotdot = nl->getTimeIntegrator()->uDotDotFactorTag();
6154 nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
6160 const std::string & name,
6163 parallel_object_only();
6169 for (
auto & nl :
_nl)
6170 nl->setPredictor(predictor);
6176 TIME_SECTION(
"computeResidualL2Norm", 2,
"Computing L2 Norm of Residual");
6179 mooseError(
"Multiple nonlinear systems in the same input are not currently supported when " 6180 "performing fixed point iterations in multi-app contexts");
6185 return _nl[0]->RHS().l2_norm();
6193 parallel_object_only();
6195 TIME_SECTION(
"computeResidualSys", 5);
6213 const unsigned int nl_sys_num)
6255 for (
auto & tag : tags)
6273 for (
auto index :
make_range(matrix.row_start(), matrix.row_stop()))
6274 matrix.add(index, index, 0);
6277 _aux->zeroVariablesForResidual();
6301 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6306 _aux->residualSetup();
6323 for (
auto & nl :
_nl)
6324 nl->computeTimeDerivatives();
6385 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6386 "contact the MOOSE team for assistance.");
6393 const std::set<TagID> & tags)
6395 parallel_object_only();
6397 TIME_SECTION(
"computeResidualInternal", 1);
6418 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6419 "contact the MOOSE team for assistance.");
6428 TIME_SECTION(
"computeResidualType", 5);
6449 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6450 "contact the MOOSE team for assistance.");
6457 auto create_exception_message =
6458 [&calling_method](
const std::string & exception_type,
const auto & exception)
6460 return std::string(
"A " + exception_type +
" was raised during FEProblemBase::" +
6461 calling_method +
"\n" + std::string(exception.what()));
6470 setException(create_exception_message(
"libMesh::LogicError", e));
6474 setException(create_exception_message(
"MooseException", e));
6476 catch (
const MetaPhysicL::LogicError & e)
6492 mooseError(create_exception_message(
"libMesh::PetscSolverException", e));
6494 catch (
const std::exception & e)
6496 const auto message = create_exception_message(
"std::exception", e);
6509 parallel_object_only();
6515 TIME_SECTION(
"computeResidualTags", 5,
"Computing Residual");
6517 ADReal::do_derivatives =
false;
6521 _aux->zeroVariablesForResidual();
6535 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6540 _aux->residualSetup();
6557 for (
auto & nl :
_nl)
6558 nl->computeTimeDerivatives();
6615 const unsigned int nl_sys_num)
6622 for (
auto & tag : tags)
6631 const std::set<TagID> & tags)
6633 TIME_SECTION(
"computeJacobianInternal", 1);
6653 TIME_SECTION(
"computeJacobianTags", 5,
"Computing Jacobian");
6655 for (
auto tag : tags)
6664 for (
auto index :
make_range(matrix.row_start(), matrix.row_stop()))
6665 matrix.add(index, index, 0);
6668 _aux->zeroVariablesForJacobian();
6684 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6689 _aux->jacobianSetup();
6697 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6751 const unsigned int nl_sys_num)
6753 TIME_SECTION(
"computeTransientImplicitJacobian", 2);
6775 JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
6776 std::vector<JacobianBlock *> blocks = {&jac_block};
6791 "I expect these system numbers to be the same");
6796 TIME_SECTION(
"computeBounds", 1,
"Computing Bounds");
6805 _aux->residualSetup();
6830 "I expect these system numbers to be the same");
6833 for (
unsigned int i = 0; i <
subspaceDim(
"NearNullSpace"); ++i)
6835 std::stringstream postfix;
6836 postfix <<
"_" << i;
6837 std::string modename =
"NearNullSpace" + postfix.str();
6847 "I expect these system numbers to be the same");
6849 for (
unsigned int i = 0; i <
subspaceDim(
"NullSpace"); ++i)
6851 std::stringstream postfix;
6852 postfix <<
"_" << i;
6862 "I expect these system numbers to be the same");
6864 for (
unsigned int i = 0; i <
subspaceDim(
"TransposeNullSpace"); ++i)
6866 std::stringstream postfix;
6867 postfix <<
"_" << i;
6877 bool & changed_search_direction,
6878 bool & changed_new_soln)
6881 "I expect these system numbers to be the same");
6892 TIME_SECTION(
"computePostCheck", 2,
"Computing Post Check");
6907 std::unique_ptr<NumericVector<Number>> ghosted_solution =
6908 sys.current_local_solution->zero_clone(),
6909 ghosted_search_direction =
6910 sys.current_local_solution->zero_clone();
6913 *ghosted_solution = new_soln;
6914 *ghosted_search_direction = search_direction;
6925 new_soln = old_soln;
6926 new_soln.
add(-damping, search_direction);
6927 changed_new_soln =
true;
6934 if (changed_new_soln)
6935 *ghosted_solution = new_soln;
6937 bool updated_solution =
updateSolution(new_soln, *ghosted_solution);
6938 if (updated_solution)
6939 changed_new_soln =
true;
6946 _aux->setPreviousNewtonSolution();
6950 changed_search_direction =
false;
6964 TIME_SECTION(
"computeDamping", 1,
"Computing Damping");
7005 parallel_object_only();
7014 TIME_SECTION(
"updateGeometricSearch", 3,
"Updating Geometric Search");
7025 TIME_SECTION(
"updateMortarMesh", 5,
"Updating Mortar Mesh");
7034 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7035 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7039 const bool correct_edge_dropping,
7040 const Real minimum_projection_angle)
7046 primary_secondary_subdomain_pair,
7051 correct_edge_dropping,
7052 minimum_projection_angle);
7055 primary_secondary_subdomain_pair,
7060 correct_edge_dropping,
7061 minimum_projection_angle);
7066 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7067 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7068 bool on_displaced)
const 7071 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7076 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7077 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7081 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7095 TIME_SECTION(
"possiblyRebuildGeomSearchPatches", 5,
"Rebuilding Geometric Search Patches");
7129 libmesh_fallthrough();
7135 _console <<
"\n\nUpdating geometric search patches\n" << std::endl;
7151 #ifdef LIBMESH_ENABLE_AMR 7161 mooseError(
"HFEM does not support mesh adaptivity currently.");
7163 TIME_SECTION(
"initialAdaptMesh", 2,
"Performing Initial Adaptivity");
7165 for (
unsigned int i = 0; i < n; i++)
7181 _console <<
"Mesh unchanged, skipping remaining steps..." << std::endl;
7197 TIME_SECTION(
"adaptMesh", 3,
"Adapting Mesh");
7201 bool mesh_changed =
false;
7203 for (
unsigned int i = 0; i < cycles_per_step; ++i)
7207 mooseError(
"HFEM does not support mesh adaptivity currently.");
7213 bool mesh_changed_this_step;
7216 if (mesh_changed_this_step)
7218 mesh_changed =
true;
7225 _console <<
"Mesh unchanged, skipping remaining steps..." << std::endl;
7236 es().reinit_systems();
7238 return mesh_changed;
7240 #endif // LIBMESH_ENABLE_AMR 7254 data[tid] = &storage.getMaterialData(tid);
7261 for (
unsigned int i = 0; i <
n_threads; ++i)
7273 TIME_SECTION(
"updateMeshXFEM", 5,
"Updating XFEM");
7275 bool updated =
false;
7278 if (
_xfem->updateHeal())
7295 TIME_SECTION(
"meshChanged", 3,
"Handling Mesh Changes");
7303 TIME_SECTION(
"meshChangedHelper", 5);
7321 if (intermediate_change)
7322 es().reinit_solutions();
7380 Threads::parallel_reduce(range, pmp);
7388 for (
const auto & elem : range)
7401 Threads::parallel_reduce(range, pmp);
7405 for (
const auto & elem : range)
7408 for (
auto && child : coarsened_children)
7425 for (
auto & nl :
_nl)
7427 _aux->update(
false);
7442 Threads::parallel_reduce(elem_range, cmt);
7444 cmt(elem_range,
true);
7450 TIME_SECTION(
"checkProblemIntegrity", 5);
7457 for (
auto & nl :
_nl)
7458 nl->checkKernelCoverage(mesh_subdomains);
7462 #ifdef LIBMESH_ENABLE_AMR 7467 _console <<
"Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n" 7472 std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
7480 bool check_material_coverage =
false;
7482 for (
const auto &
id : ids)
7484 local_mesh_subs.erase(
id);
7485 check_material_coverage =
true;
7490 for (
auto subdomain_id : mortar_subdomain_ids)
7491 local_mesh_subs.erase(subdomain_id);
7494 if (check_material_coverage && !local_mesh_subs.empty())
7496 std::stringstream extra_subdomain_ids;
7498 std::copy(local_mesh_subs.begin(),
7499 local_mesh_subs.end(),
7500 std::ostream_iterator<unsigned int>(extra_subdomain_ids,
" "));
7502 mooseError(
"The following blocks from your input mesh do not contain an active material: " +
7503 extra_subdomain_ids.str() +
7504 "\nWhen ANY mesh block contains a Material object, " 7505 "all blocks must contain a Material object.\n");
7515 for (
const auto & material : materials)
7516 material->checkStatefulSanity();
7546 bool mesh_has_second_order_elements =
false;
7550 if (elem->default_order() ==
SECOND)
7552 mesh_has_second_order_elements =
true;
7562 if (mesh_has_second_order_elements)
7564 const std::vector<std::string> & displacement_variables =
7567 for (
const auto & var_name : displacement_variables)
7575 mooseError(
"Error: mesh has SECOND order elements, so all displacement variables must be " 7587 std::set<SubdomainID> user_objects_blocks;
7591 std::set<std::string> names;
7593 std::vector<UserObject *> objects;
7596 for (
const auto & obj : objects)
7597 names.insert(obj->name());
7600 std::set<SubdomainID> difference;
7601 std::set_difference(user_objects_blocks.begin(),
7602 user_objects_blocks.end(),
7603 mesh_subdomains.begin(),
7604 mesh_subdomains.end(),
7605 std::inserter(difference, difference.end()));
7607 if (!difference.empty())
7609 std::ostringstream oss;
7610 oss <<
"One or more UserObjects is referencing a nonexistent block:\n";
7611 for (
const auto &
id : difference)
7619 const std::map<
SubdomainID, std::vector<std::shared_ptr<MaterialBase>>> & materials_map)
7621 for (
const auto & it : materials_map)
7624 std::set<std::string> block_depend_props, block_supplied_props;
7626 for (
const auto & mat1 : it.second)
7628 const std::set<std::string> & depend_props = mat1->getRequestedItems();
7629 block_depend_props.insert(depend_props.begin(), depend_props.end());
7631 auto & alldeps = mat1->getMatPropDependencies();
7632 for (
auto & dep : alldeps)
7634 block_depend_props.insert(*
name);
7637 for (
const auto & mat2 : it.second)
7639 const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
7640 block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
7649 std::set<std::string> difference;
7650 std::set_difference(block_depend_props.begin(),
7651 block_depend_props.end(),
7652 block_supplied_props.begin(),
7653 block_supplied_props.end(),
7654 std::inserter(difference, difference.end()));
7656 if (!difference.empty())
7658 std::ostringstream oss;
7659 oss <<
"One or more Material Properties were not supplied on block ";
7661 if (subdomain_name.length() > 0)
7662 oss << subdomain_name <<
" (" << it.first <<
")";
7666 for (
const auto &
name : difference)
7667 oss <<
name <<
"\n";
7673 for (
const auto & it : materials_map)
7675 const auto & materials = it.second;
7676 std::set<std::string> inner_supplied, outer_supplied;
7678 for (
const auto & outer_mat : materials)
7681 outer_supplied = outer_mat->getSuppliedItems();
7682 inner_supplied.clear();
7685 std::map<std::string, std::set<std::string>> prop_to_mat;
7686 for (
const auto &
name : outer_supplied)
7687 prop_to_mat[
name].insert(outer_mat->name());
7689 for (
const auto & inner_mat : materials)
7691 if (outer_mat == inner_mat)
7695 auto outer_mat_type = outer_mat->type();
7696 auto inner_mat_type = inner_mat->type();
7701 if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
7702 inner_mat_type != inner_mat->type())
7705 inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
7706 inner_mat->getSuppliedItems().end());
7708 for (
const auto & inner_supplied_name : inner_supplied)
7709 prop_to_mat[inner_supplied_name].insert(inner_mat->name());
7713 std::set<std::string> intersection;
7714 std::set_intersection(outer_supplied.begin(),
7715 outer_supplied.end(),
7716 inner_supplied.begin(),
7717 inner_supplied.end(),
7718 std::inserter(intersection, intersection.end()));
7720 if (!intersection.empty())
7722 std::ostringstream oss;
7723 oss <<
"The following material properties are declared on block " << it.first
7724 <<
" by multiple materials:\n";
7726 <<
"Material Objects\n";
7727 for (
const auto & outer_name : intersection)
7730 for (
const auto & inner_name : prop_to_mat[outer_name])
7731 oss << inner_name <<
" ";
7753 mooseInfo(
"Restart file ", file_name,
" is NOT being used since we are performing recovery.");
7759 mooseInfo(
"Using ", file_name,
" for restart.");
7763 std::vector<VariableName>
7766 std::vector<VariableName> names;
7768 for (
auto & nl :
_nl)
7770 const std::vector<VariableName> & nl_var_names = nl->getVariableNames();
7771 names.insert(names.end(), nl_var_names.begin(), nl_var_names.end());
7774 const std::vector<VariableName> & aux_var_names =
_aux->getVariableNames();
7775 names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
7790 const PetscInt nfuncs,
7791 const PetscInt max_funcs,
7792 const Real initial_residual_before_preset_bcs,
7793 const Real div_threshold)
7795 TIME_SECTION(
"checkNonlinearConvergence", 5,
"Checking Nonlinear Convergence");
7831 std::ostringstream oss;
7834 oss <<
"Failed to converge, function norm is NaN\n";
7839 oss <<
"Converged due to function norm " << fnorm <<
" < " << abstol <<
'\n';
7842 else if (nfuncs >= max_funcs)
7844 oss <<
"Exceeded maximum number of function evaluations: " << nfuncs <<
" > " << max_funcs
7850 oss <<
"Nonlinear solve was blowing up!\n";
7859 ? initial_residual_before_preset_bcs
7863 else if (snorm < stol * xnorm)
7865 oss <<
"Converged due to small update length: " << snorm <<
" < " << stol <<
" * " << xnorm
7869 else if (divtol > 0 && fnorm > the_residual * divtol)
7871 oss <<
"Diverged due to initial residual " << the_residual <<
" > divergence tolerance " 7872 << divtol <<
" * initial residual " << the_residual <<
'\n';
7877 oss <<
"Diverged due to residual " << fnorm <<
" > absolute divergence tolerance " 7883 oss <<
"Diverged due to maximum nonlinear residual pingpong achieved" <<
'\n';
7901 const Real the_residual,
7904 std::ostringstream & oss)
7908 if (fnorm <= the_residual * rtol)
7910 oss <<
"Converged due to function norm " << fnorm <<
" < relative tolerance (" << rtol <<
")\n";
7934 auto random_data_ptr = insert_pair.first->second.get();
7944 bnd_mat_side_cache =
false;
7946 if (
_aux->needMaterialOnSide(bnd_id))
7948 bnd_mat_side_cache =
true;
7952 for (
auto & nl :
_nl)
7953 if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
7955 bnd_mat_side_cache =
true;
7966 bnd_mat_side_cache =
true;
7980 interface_mat_side_cache =
false;
7982 for (
auto & nl :
_nl)
7983 if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
7985 interface_mat_side_cache =
true;
7996 interface_mat_side_cache =
true;
8001 interface_mat_side_cache =
true;
8015 for (
auto & nl :
_nl)
8016 if (nl->needSubdomainMaterialOnSide(subdomain_id, tid))
8047 mooseError(
"Previous nonlinear solution is required but not added through " 8048 "Problem/previous_nl_solution_required=true");
8065 const std::string & object_name,
8068 parallel_object_only();
8075 mooseError(
"The name '", object_name,
"' is a reserved name for output objects");
8079 if (output_warehouse.
hasOutput(object_name))
8080 mooseError(
"An output object named '", object_name,
"' already exists");
8086 std::vector<std::string> exclude;
8087 if (object_type ==
"Console")
8089 exclude.push_back(
"execute_on");
8097 else if (object_type ==
"Checkpoint")
8098 exclude.push_back(
"execute_on");
8106 if (object_type ==
"XDR")
8108 else if (object_type ==
"XDA")
8112 if (object_name ==
"auto_recovery_checkpoint")
8117 logAdd(
"Output", object_name, object_type);
8132 mooseAssert(sys_num <
_nl.size(),
"System number greater than the number of nonlinear systems");
8133 return *
_nl[sys_num];
8139 return *
_nl[sys_num];
8157 parallel_object_only();
8201 const std::vector<Point> *
const pts,
8202 const std::vector<Real> *
const weights,
8214 unsigned int neighbor_side,
8217 const std::vector<Point> *
const pts,
8218 const std::vector<Real> *
const weights,
8222 neighbor_elem, neighbor_side, bnd_id, tolerance, pts, weights, tid);
8237 std::vector<std::shared_ptr<MaterialBase>> & face_materials,
8238 std::vector<std::shared_ptr<MaterialBase>> & neighbor_materials,
8239 std::set<MooseVariableFieldBase *> & variables,
8244 auto & this_face_mats =
8246 for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
8247 if (face_mat->ghostable())
8249 mooseAssert(!face_mat->hasStatefulProperties(),
8250 "Finite volume materials do not currently support stateful properties.");
8251 face_materials.push_back(face_mat);
8252 auto & var_deps = face_mat->getMooseVariableDependencies();
8253 for (
auto * var : var_deps)
8257 "Ghostable materials should only have finite volume variables coupled into them.");
8258 variables.insert(var);
8265 auto & this_neighbor_mats =
8267 for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
8268 if (neighbor_mat->ghostable())
8270 mooseAssert(!neighbor_mat->hasStatefulProperties(),
8271 "Finite volume materials do not currently support stateful properties.");
8272 neighbor_materials.push_back(neighbor_mat);
8274 auto & var_deps = neighbor_mat->getMooseVariableDependencies();
8275 for (
auto * var : var_deps)
8279 "Ghostable materials should only have finite volume variables coupled into them.");
8280 auto pr = variables.insert(var);
8281 mooseAssert(!pr.second,
8282 "We should not have inserted any new variables dependencies from our " 8283 "neighbor materials that didn't exist for our face materials");
8292 const unsigned int nqp,
8306 _nl[i]->residualSetup();
8320 _nl[i]->jacobianSetup();
8352 std::vector<MortarUserObject *>
8355 const bool displaced,
8356 const std::vector<MortarUserObject *> & mortar_uo_superset)
8358 std::vector<MortarUserObject *> mortar_uos;
8360 : static_cast<SubProblem *>(
this);
8361 for (
auto *
const obj : mortar_uo_superset)
8362 if (obj->onInterface(primary_boundary_id, secondary_boundary_id) &&
8363 (&obj->getSubProblem() == subproblem))
8364 mortar_uos.push_back(obj);
8369 std::vector<MortarUserObject *>
8372 const bool displaced)
8374 std::vector<MortarUserObject *> mortar_uos;
8378 .queryInto(mortar_uos);
8379 return getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced, mortar_uos);
8385 const bool displaced)
8387 const auto mortar_uos =
8389 for (
auto *
const mortar_uo : mortar_uos)
8391 mortar_uo->setNormals();
8392 mortar_uo->reinit();
8402 _displaced_problem->doingPRefinement(doing_p_refinement, disable_p_refinement_for_families);
ADRealVectorValue ADRealGradient
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
This class determines the maximum number of Quadrature Points and Shape Functions used for a given si...
virtual void addInterfaceMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.
std::string indent(unsigned int spaces)
Create empty string for indenting.
std::vector< Point > _point_zero
Interface for objects that need parallel consistent random numbers without patterns over the course o...
void updateVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
Update variable dependency vector.
virtual void addCachedResidual(const THREAD_ID tid)
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
virtual void addFVInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
Add an initial condition for a finite volume variables.
bool adaptMesh(std::string marker_name=std::string())
Adapts the mesh based on the error estimator used.
void sort(THREAD_ID tid=0)
Sort the objects using the DependencyResolver.
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters ¶meters)
bool initialAdaptMesh()
Used during initial adaptivity.
virtual void residualSetup(THREAD_ID tid=0) const
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
void setActiveMaterialProperties(const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
Record and set the material properties required by the current computing thread.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
const bool _regard_general_exceptions_as_errors
If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling...
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
void timestepSetup() override
virtual void addSampler(const std::string &type, const std::string &name, InputParameters ¶meters)
The following functions will enable MOOSE to have the capability to import Samplers.
bool _skip_exception_check
If or not skip 'exception and stop solve'.
bool isFiniteVolumeInfoDirty() const
Helper class for holding the preconditioning blocks to fill.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
virtual void computeJacobianSys(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
Form a Jacobian matrix.
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
virtual void addDamper(const std::string &damper_name, const std::string &name, InputParameters ¶meters)
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
void getFVMatsAndDependencies(SubdomainID block_id, std::vector< std::shared_ptr< MaterialBase >> &face_materials, std::vector< std::shared_ptr< MaterialBase >> &neighbor_materials, std::set< MooseVariableFieldBase *> &variables, const THREAD_ID tid)
Get the materials and variables potentially needed for FV.
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
void shift()
Shift the material properties in time.
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override
Base class for function objects.
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
void fill_data(std::map< processor_id_type, std::vector< std::set< unsigned int >>> &data, int M)
virtual void addTransfer(const std::string &transfer_name, const std::string &name, InputParameters ¶meters)
Add a Transfer to the problem.
virtual System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
A MultiMooseEnum object to hold "execute_on" flags.
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
MooseVariableFieldBase & getVariableHelper(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
Helper function called by getVariable that handles the logic for checking whether Variables of the re...
virtual void addResidualLower(const THREAD_ID tid) override
A class for creating restricted objects.
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
virtual void addJacobianLowerD(const THREAD_ID tid) override
Factory & _factory
The Factory for building objects.
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) override
MaterialPropertyStorage & _bnd_material_props
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
void setNonlocalCouplingMatrix()
Set custom coupling matrix for variables requiring nonlocal contribution.
Threads::spin_mutex get_function_mutex
void initialSetup()
Calls the initialSetup function for each of the output objects.
virtual Real & time() const
SolverParams _solver_params
virtual const char * what() const
Get out the error message.
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
SolverParams & solverParams()
Get the solver parameters.
virtual void addJacobianBlockTags(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase >>> &materials_map)
Helper method for checking Material object dependency.
virtual void cacheResidualNeighbor(const THREAD_ID tid) override
int _nl_forced_its
the number of forced nonlinear iterations
ExecFlagType _current_execute_on_flag
Current execute_on flag.
void clearCurrentResidualVectorTags()
Clear the current residual vector tag data structure.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
const unsigned int invalid_uint
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
RelationshipManagerType
Main types of Relationship Managers.
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
virtual void checkExceptionAndStopSolve(bool print_message=true)
Check to see if an exception has occurred on any processor and, if possible, force the solve to fail...
void meshChangedHelper(bool intermediate_change=false)
Helper method to update some or all data after a mesh change.
const std::set< BoundaryID > & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundary ids associated with the given subdomain id.
void mooseDeprecated(Args &&... args) const
const std::string & name() const
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
virtual bool converged(const unsigned int nl_sys_num)
Eventually we want to convert this virtual over to taking a nonlinear system number argument...
Class for stuff related to variables.
MooseAppCoordTransform & coordTransform()
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &, bool on_displaced) const
Getter to retrieve the AutomaticMortarGeneration object corresponding to the boundary and subdomain k...
virtual void reinitElemFaceRef(const Elem *elem, unsigned int side, BoundaryID bnd_id, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
reinitialize FE objects on a given element on a given side at a given set of reference points and the...
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
Real computeDamping(const NumericVector< Number > &solution, const NumericVector< Number > &update)
Compute damping.
virtual void reinitNode(const Node *node, const THREAD_ID tid) override
virtual std::size_t numNonlinearSystems() const override
Base class for implementing interface user objects.
virtual void setPreviousNewtonSolution(const NumericVector< Number > &soln)
virtual Elem * elemPtr(const dof_id_type i)
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
NumericVector< Number > & solution()
bool hasObjects(THREAD_ID tid=0) const
Convenience functions for determining if objects exist.
bool _has_jacobian
Indicates if the Jacobian was computed.
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
static void uniformRefine(MooseMesh *mesh, unsigned int level=libMesh::invalid_uint)
Performs uniform refinement of the passed Mesh object.
virtual void computeNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
bool _has_dampers
Whether or not this system has any Dampers associated with it.
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap()
If not already created, creates a map from every node to all active semilocal elements to which they ...
virtual Distribution & getDistribution(const std::string &name)
void swapBack(const Elem &elem, unsigned int side=0)
material properties for given element (and possible side)
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
virtual void setSolution(const NumericVector< Number > &soln)
This is the base class for Samplers as used within the Stochastic Tools module.
Base class for predictors.
bool areCoupled(const unsigned int ivar, const unsigned int jvar, const unsigned int nl_sys_num) const
void setPostprocessorValueByName(const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
Set the value of a PostprocessorValue.
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) override
virtual void postExecute()
Method called at the end of the simulation.
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
unsigned int number() const
Get variable number coming from libMesh.
void eraseProperty(const Elem *elem)
Remove the property storage and element pointer from internal data structures Use this when elements ...
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
void joinAndFinalize(TheWarehouse::Query query, bool isgen=false)
bool hasInitialBackup() const
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
void mooseInfo(Args &&... args) const
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0)
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
unsigned int _cycles_completed
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
virtual void init() override
void add(std::shared_ptr< MooseObject > obj)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
virtual void setResidualNeighbor(NumericVector< Number > &residual, const THREAD_ID tid) override
virtual void getDiracElements(std::set< const Elem *> &elems) override
Fills "elems" with the elements that should be looped over for Dirac Kernels.
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFieldBase *> &moose_vars, const THREAD_ID tid)
Set the MOOSE variables to be reinited on each element.
void parentOutputPositionChanged()
Calls parentOutputPositionChanged() on all sub apps.
void setupDM()
Setup the PETSc DM object (when appropriate)
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
virtual void addInterfaceKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual void lineSearch()
execute MOOSE line search
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
unsigned int getCyclesPerStep() const
Pull out the number of cycles_per_step previously set through the AdaptivityAction.
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
NonlocalIntegratedBC is used for solving integral terms in integro-differential equations.
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
void updateErrorVectors()
Update the ErrorVectors that have been requested through calls to getErrorVector().
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.
void trustUserCouplingMatrix()
Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a ...
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
This is a template class that implements the workhorse compute and computeNodal methods.
virtual void stopSolve(const ExecFlagType &exec_flag)=0
Quit the current solve as soon as possible.
void addMeshDivision(const std::string &type, const std::string &name, InputParameters ¶ms)
Add a MeshDivision.
const ExecFlagType EXEC_NONE
virtual void computeMarkers()
void reportMooseObjectDependency(MooseObject *a, MooseObject *b)
Register a MOOSE object dependency so we can either order operations properly or report when we canno...
void residualSetup() override
MaterialDataType
MaterialData types.
void computeUserObjectsInternal(const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
TagID nonTimeVectorTag() const override
A class for "pretty printing" a table of data.
virtual void addCachedJacobian(const THREAD_ID tid)
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
virtual void residualSetup()
Positions objects are under the hood Reporters.
void reinitMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID...
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
virtual void updateActiveObjects()
Update the active objects in the warehouses.
Stores the stateful material properties computed by materials.
virtual bool checkRelativeConvergence(const PetscInt it, const Real fnorm, const Real the_residual, const Real rtol, const Real abstol, std::ostringstream &oss)
Check the relative convergence of the nonlinear solution.
virtual void computeIndicatorsAndMarkers()
void reinitMaterialsBoundary(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on a boundary
virtual void addJacobianOffDiagScalar(unsigned int ivar, const THREAD_ID tid=0)
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
virtual void addJacobian(const THREAD_ID tid) override
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
add a functor to the problem functor container
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
virtual void addAuxScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void customSetup(const ExecFlagType &exec_type, THREAD_ID tid=0) const
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
unsigned int multiAppLevel() const
The MultiApp Level.
bool isReservedName(const std::string &name)
Test if the given name is reserved.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
bool globalADIndexing()
Whether we are using global AD indexing.
bool hasOutput(const std::string &name) const
Returns true if the output object exists.
Base class for MOOSE-based applications.
PetscOptions _petsc_option_data_base
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
processor_id_type rank() const
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
virtual void createQRules(QuadratureType type, Order order, Order volume_order=INVALID_ORDER, Order face_order=INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
const Parallel::Communicator & comm() const
virtual void computeBounds(NonlinearImplicitSystem &sys, NumericVector< Number > &lower, NumericVector< Number > &upper)
RealTensorValue RealTensor
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
MultiApp Implementation for Transient Apps.
void resizeMaterialData(Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid)
Resize material data.
void finishMultiAppStep(ExecFlagType type, bool recurse_through_multiapp_levels=false)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters ¶meters)
virtual void timestepSetup(THREAD_ID tid=0) const
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
void customSetup(const ExecFlagType &exec_type)
Calls the setup function for each of the output objects.
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
virtual void onTimestepEnd() override
virtual void addNodalKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
All Distributions should inherit from this class.
void setCurrentDirection(const int direction)
Set this Transfer to be executed in a given direction.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
std::vector< VectorVariableCurl > _vector_curl_zero
virtual bool updateSolution(NumericVector< Number > &vec_solution, NumericVector< Number > &ghosted_solution)
Update the solution.
static void selectVectorTagsFromSystem(const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
Select the vector tags which belong to a specific system.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
bool _has_exception
Whether or not an exception has occurred.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
void registerRandomInterface(RandomInterface &random_interface, const std::string &name)
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
This class provides an interface for common operations on field variables of both FE and FV types wit...
const Parallel::Communicator & _communicator
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void jacobianSetup()
void clearActiveMaterialProperties(const THREAD_ID tid)
Clear the active material properties.
virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const override
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling 'computeDT')
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
MaterialWarehouse _interface_materials
Real getStartTime() const
Thread to compute threaded general user objects.
virtual void computeJacobianTag(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag)
Form a Jacobian matrix for a given tag.
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const
void setCurrentExecuteOnFlag(const ExecFlagType &)
void setCurrentlyComputingResidualAndJacobian(bool currently_computing_residual_and_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Base class for a system (of equations)
const ExecFlagType EXEC_ALWAYS
This user object allows related evaluations on elements, boundaries, internal sides, interfaces in one single place.
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
Canonical method for adding an auxiliary variable.
std::pair< typename M::iterator, bool > moose_try_emplace(M &m, const typename M::key_type &k, Args &&... args)
Function to mirror the behavior of the C++17 std::map::try_emplace() method (no hint).
Base class for MeshDivision objects.
bool computingNonlinearResid() const
Returns true if the problem is in the process of computing the nonlinear residual.
virtual void addFVInterfaceKernel(const std::string &fv_ik_name, const std::string &name, InputParameters ¶meters)
MeshDivision & getMeshDivision(const std::string &name, const THREAD_ID tid=0) const
Get a MeshDivision.
bool isRestarting() const
Whether or not this is a "restart" calculation.
void petscSetOptions(const PetscOptions &po, const SolverParams &solver_params)
A function for setting the PETSc options in PETSc from the options supplied to MOOSE.
Base class for creating new nodally-based mortar user objects.
Reporter objects allow for the declaration of arbitrary data types that are aggregate values for a si...
const Positions & getPositionsObject(const std::string &name) const
Get the Positions object by its name.
ConstNodeRange * getLocalNodeRange()
FEProblemBase(const InputParameters ¶meters)
void addEdge(const T &a, const T &b)
Add an edge between nodes 'a' and 'b'.
std::string convertLatestCheckpoint(std::string orig)
Replaces "LATEST" placeholders with the latest checkpoint file name.
bool isOn()
Is adaptivity on?
void computeResidualTags(const std::set< TagID > &tags)
Form multiple tag-associated residual vectors for all the given tags.
virtual void cacheJacobianNeighbor(const THREAD_ID tid) override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
virtual const Node & nodeRef(const dof_id_type i) const
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
ExecFlagEnum _print_execution_on
When to print the execution of loops.
std::vector< CouplingMatrix > _nonlocal_cm
virtual const std::string & name() const
Get the name of the class.
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
virtual void solve(const unsigned int nl_sys_num)
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid) override
Set the current lower dimensional element.
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Real computeMultiAppsDT(ExecFlagType type)
Find the smallest timestep over all MultiApps.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
void reinitMaterialsFace(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on element faces
Scope guard for starting and stopping Floating Point Exception Trapping.
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
void forceOutput()
Indicates that the next call to outputStep should be forced This is private, users should utilize FEP...
StoredRange< MeshBase::const_element_iterator, const Elem *> ConstElemRange
auto max(const L &left, const R &right)
virtual void newAssemblyArray(std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
virtual void reinitElemNeighborAndLowerD(const Elem *elem, unsigned int side, const THREAD_ID tid) override
AuxGroup
Flag for AuxKernel related execution type.
virtual Elem * queryElemPtr(const dof_id_type i)
virtual void addMarker(const std::string &marker_name, const std::string &name, InputParameters ¶meters)
void updateGhostedElems()
Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch...
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
virtual Real computeDamping(const NumericVector< Number > &soln, const NumericVector< Number > &update)
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const unsigned int nl_sys_num)
Form a Jacobian matrix with the default tag (system).
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
Return all automatic mortar generation objects on either the displaced or undisplaced mesh...
A ReporterName that represents a VectorPostprocessor.
bool needsPreviousNewtonIteration() const
Check to see whether we need to compute the variable values of the previous Newton iterate...
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters ¶meters)
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
virtual EquationSystems & es() override
This class is a container/interface for the objects involved in automatic generation of mortar spaces...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const bool _skip_nl_system_check
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
bool hasObjects() const
Returns whether we have any active AutomaticMortarGeneration objects.
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void jacobianSetup(THREAD_ID tid=0) const
ScalarInitialConditionWarehouse _scalar_ics
Nonlinear system to be solved.
bool getExodusFileRestart() const
Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh...
virtual void swapBackMaterialsFace(const THREAD_ID tid)
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
virtual void addDistribution(const std::string &type, const std::string &name, InputParameters ¶meters)
The following functions will enable MOOSE to have the capability to import distributions.
Real _nl_abs_div_tol
the absolute non linear divergence tolerance
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
A user object that runs over all the nodes and does an aggregation step to compute a single value...
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
virtual void customSetup(const ExecFlagType &exec_type)
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Based class for output objects.
const VectorPostprocessorValue & getVectorPostprocessorValueByName(const std::string &object_name, const std::string &vector_name, std::size_t t_index=0) const
Get a read-only reference to the vector value associated with the VectorPostprocessor.
virtual bool nlConverged(const unsigned int nl_sys_num) override
virtual void addPredictor(const std::string &type, const std::string &name, InputParameters ¶meters)
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
virtual void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks, const unsigned int nl_sys_num)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
virtual void copySolutionsBackwards()
bool _calculate_jacobian_in_uo
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) override
unsigned int _n_max_nl_pingpong
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const override
void addItem(const T &value)
Add an independent item to the set.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool automaticScaling() const
Automatic scaling getter.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
std::vector< VariablePhiGradient > _grad_phi_zero
void initialSetup(THREAD_ID tid)
Initial setup.
virtual void addCachedResidualDirectly(NumericVector< Number > &residual, const THREAD_ID tid)
Allows for all the residual contributions that are currently cached to be added directly into the vec...
bool hasJacobian() const
Returns _has_jacobian.
void createTagSolutions()
Create extra tagged solution vectors.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
processor_id_type n_processors() const
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
void computeResidualAndJacobianTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Form possibly multiple tag-associated vectors and matrices.
void extraSparsity(SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *context)
Free function used for a libMesh callback.
void handleException(const std::string &calling_method)
Handle exceptions.
virtual std::vector< VariableName > getVariableNames()
Returns a list of all the variables in the problem (both from the NL and Aux systems.
ReporterData _reporter_data
virtual void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, BoundaryID bnd_id, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0)
reinitialize FE objects on a given neighbor element on a given side at a given set of reference point...
void uniformRefine()
uniformly refine the problem mesh(es).
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
virtual void computeResidualTag(const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
Form a residual vector for a given tag.
FunctorMaterials compute functor material properties.
const std::string _type
The type of this class.
std::vector< std::shared_ptr< Transfer > > getTransfers(ExecFlagType type, Transfer::DIRECTION direction) const
Get Transfers by ExecFlagType and direction.
virtual void setResidual(NumericVector< Number > &residual, const THREAD_ID tid) override
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
bool havePRefinement() const
Query whether p-refinement has been requested at any point during the simulation. ...
bool getRecomputeMarkersFlag() const
Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.
const bool & _solve
Whether or not to actually solve the nonlinear system.
DenseVector< Real > getAllRealReporterValues() const
Get all real reporter values including postprocessor and vector postprocessor values into a dense vec...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
virtual void nonlinearConvergenceSetup()
Perform steps required before checking nonlinear convergence.
std::set< SubdomainID > getActiveBlocks(THREAD_ID tid=0) const
Return a set of active SubdomainsIDs.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
Interface for notifications that the mesh has changed.
void computeTimeDerivatives(bool jacobian_calculation=false)
Computes the time derivative vector.
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &subdomain_key, SubProblem &subproblem, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
Create mortar generation object.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
void computeResidualAndJacobian(const NumericVector< Number > &soln, NumericVector< Number > &residual, SparseMatrix< Number > &jacobian)
Form a residual and Jacobian with default tags.
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
void initialSetup()
Initial setup.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
void min(const T &r, T &o, Request &req) const
bool _fail_next_nonlinear_convergence_check
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
bool needSubdomainMaterialOnSide(SubdomainID subdomain_id, const THREAD_ID tid)
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN, bool dont_indent_first_line=true, const std::string &post_prefix=": ")
Indents the supplied message given the prefix and color.
TheWarehouse & theWarehouse() const
virtual void computeResidualType(const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
Form a residual vector for a given tag and "residual" tag.
void createTagVectors()
Create extra tagged vectors and matrices.
void reinitMaterialsNeighbor(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on the neighboring element face
Moose::CouplingType _coupling
Type of variable coupling.
Every object that can be built by the factory should be derived from this class.
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
virtual bool shouldUpdateSolution()
Check to see whether the problem should update the solution.
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
void extraSendList(std::vector< dof_id_type > &send_list, void *context)
///< Type of coordinate system
virtual void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID bnd_id, const THREAD_ID tid) override
void addObjects(std::shared_ptr< MaterialBase > block, std::shared_ptr< MaterialBase > neighbor, std::shared_ptr< MaterialBase > face, THREAD_ID tid=0)
A special method unique to this class for adding Block, Neighbor, and Face material objects...
std::vector< std::string > getAllRealReporterFullNames() const
Get full names of all real reporter values Note: For a postprocessor, the full name is the postproces...
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Real getTimeFromStateArg(const Moose::StateArg &state) const
Returns the time associated with the requested state.
const ExecFlagType EXEC_TIMESTEP_BEGIN
std::shared_ptr< T > getObject(const std::string &name, THREAD_ID tid=0) const
void executeSamplers(const ExecFlagType &exec_type)
Performs setup and execute calls for Sampler objects.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
unsigned int _current_nl_its
std::optional< std::string > queryStatefulPropName(const unsigned int id) const
virtual void reinitNeighborPhys(const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
void addOutput(const std::string &, const std::string &, InputParameters &)
Adds an Output object.
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
boundary_id_type BoundaryID
void setCouplingMatrix(std::unique_ptr< CouplingMatrix > cm, const unsigned int nl_sys_num)
Set custom coupling matrix.
void boundaryIntegrityCheckError(const MooseObject &object, const std::set< MooseVariableFieldBase *> &variables, const BoundaryName &boundary_name)
Compose boundary restricted error message for the provided object, variables, and boundary_name if th...
const bool _allow_ics_during_restart
bool constJacobian() const
Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the pr...
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) override
void computeJacobianTags(const std::set< TagID > &tags)
Computes multiple (tag associated) Jacobian matricese.
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.
virtual void timestepSetup(THREAD_ID tid=0) const
void checkNonlocalCoupling()
VarKindType
Framework-wide stuff.
NonlinearSystemBase & currentNonlinearSystem()
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
Jacobian-Free Newton Krylov.
void groupUserObjects(TheWarehouse &w, AuxiliarySystem &aux, const ExecFlagEnum &execute_flags, const std::vector< T *> &objs, const std::set< std::string > &ic_deps)
virtual void predictorCleanup(NumericVector< Number > &ghosted_solution)
Perform cleanup tasks after application of predictor to solution vector.
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
virtual void addFunction(const std::string &type, const std::string &name, InputParameters ¶meters)
Real PostprocessorValue
various MOOSE typedefs
virtual void addJacobianNeighbor(const THREAD_ID tid) override
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void setRestart(bool value)
Sets the restart/recover flags.
AttribBoundaries tracks all boundary IDs associated with an object.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
virtual void associateMatrixToTag(SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
virtual void addVectorPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
virtual unsigned int currentNlSysNum() const override
virtual void computeIndicators()
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
const bool _boundary_restricted_node_integrity_check
whether to perform checking of boundary restricted nodal object variable dependencies, e.g.
virtual void meshChanged() override
Update data after a mesh change.
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
virtual void updateActive(THREAD_ID tid=0)
Update the active status of Kernels.
virtual bool updateMeshXFEM()
Update the mesh due to changing XFEM cuts.
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const override
Return the nonlinear system object as a base class reference given the system number.
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...
virtual void restoreSolutions()
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void addAnyRedistributers()
const std::string & type() const
Get the type of this class.
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.
virtual void checkBlockMatProps()
Checks block material properties integrity.
void restoreFromInitialBackup(const bool for_restart)
Restores from a "initial" backup, that is, one set in _initial_backup.
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
void initialSetup() override
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void reinit()
Completely redo all geometric search objects.
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
virtual const SystemBase & systemBaseAuxiliary() const override
Return the auxiliary system object as a base class reference.
void checkUserObjectJacobianRequirement(THREAD_ID tid)
MooseVariableFieldBase & getActualFieldVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariableField which may be in any system...
void finalize(const std::string &object_name)
Helper function for performing post calculation actions via the ReporterContext objects.
void addObject(std::shared_ptr< InitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
virtual void computePostCheck(NonlinearImplicitSystem &sys, const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
virtual void addTimeIntegrator(const std::string &type, const std::string &name, InputParameters ¶meters)
virtual void cacheResidual(const THREAD_ID tid) override
const bool _force_restart
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
QueryCache clone() const
clone creates and returns an independent copy of the query in its current state.
const std::set< SubdomainID > & getMortarSubdomainIDs() const
Returns the mortar covered subdomains.
virtual void reinitElemFaceRef(const Elem *elem, unsigned int side, BoundaryID bnd_id, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0)
reinitialize FE objects on a given element on a given side at a given set of reference points and the...
void forceOutput()
Indicates that the next call to outputStep should be forced.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
std::vector< VariablePhiSecond > _second_phi_zero
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
bool _started_initial_setup
At or beyond initialSteup stage.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
virtual MooseNonlinearConvergenceReason checkNonlinearConvergence(std::string &msg, const PetscInt it, const Real xnorm, const Real snorm, const Real fnorm, const Real rtol, const Real divtol, const Real stol, const Real abstol, const PetscInt nfuncs, const PetscInt max_funcs, const Real initial_residual_before_preset_bcs, const Real div_threshold)
Check for convergence of the nonlinear solution.
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
virtual void addResidual(const THREAD_ID tid) override
virtual void addResidualNeighbor(const THREAD_ID tid) override
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
Set the coordinate system for the provided blocks to coord_sys.
void initElementStatefulProps(const ConstElemRange &elem_range, const bool threaded)
Initialize stateful properties for elements in a specific elem_range This is needed when elements/bou...
Base class for all Postprocessors.
virtual System & system()=0
Get the reference to the libMesh system.
void clearPoints()
Remove all of the current points and elements.
MooseApp & _app
The MOOSE application this is associated with.
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) override
void maxloc(T &r, unsigned int &max_id) const
unsigned int number() const
Gets the number of this system.
virtual void addAuxArrayVariable(const std::string &var_name, const FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
bool _verbose_setup
Whether or not to be verbose during setup.
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
const ExecFlagType EXEC_LINEAR
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
std::string stringify(const T &t)
conversion to string
std::string _exception_message
The error message to go with an exception.
virtual void checkProblemIntegrity()
Method called to perform a series of sanity checks before a simulation is run.
void setReporterValue(const ReporterName &reporter_name, const T &value, const std::size_t time_index=0)
Method for setting Reporter values that already exist.
Class for storing and utilizing output objects.
AuxiliarySystem & getAuxiliarySystem()
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods.
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
libMesh::TensorValue< ADReal > ADRealTensorValue
virtual void addConstraint(const std::string &c_name, const std::string &name, InputParameters ¶meters)
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
MooseObjectWarehouse< Indicator > _indicators
virtual void addMultiApp(const std::string &multi_app_name, const std::string &name, InputParameters ¶meters)
Add a MultiApp to the problem.
virtual void prepareAssembly(const THREAD_ID tid) override
bool haveADObjects() const
Method for reading wehther we have any ad objects.
bool _checking_uo_aux_state
Flag used to indicate whether we are doing the uo/aux state check in execute.
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
MeshBase::element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
InitialConditions are objects that set the initial value of variables.
Base class for user objects executed on all element sides internal to one or more blocks...
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the system, where a tag is represented by a map from name to ID...
virtual void initNullSpaceVectors(const InputParameters ¶meters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid) override
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
virtual void clearDiracInfo() override
Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in...
virtual void addIndicator(const std::string &indicator_name, const std::string &name, InputParameters ¶meters)
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
virtual void solve() override=0
Solve the system (using libMesh magic)
GeometricSearchType
Used to select groups of geometric search objects to update.
void backupMultiApps(ExecFlagType type)
Backup the MultiApps associated with the ExecFlagType.
A ReporterName that represents a Postprocessor.
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
Canonical method for adding a non-linear variable.
bool doingPRefinement() const
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
virtual void jacobianSetup(THREAD_ID tid=0) const
void updateBoundaryMatPropDependency(std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void uniformRefineWithProjection()
Performs uniform refinement on the meshes in the current object.
TagID residualVectorTag() const override
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void addDisplacedProblem(std::shared_ptr< DisplacedProblem > displaced_problem)
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
void setVectorPostprocessorValueByName(const std::string &object_name, const std::string &vector_name, const VectorPostprocessorValue &value, std::size_t t_index=0)
Set the value of a VectorPostprocessor vector.
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods that handle the extra neighbor and face objects...
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
bool hasStatefulProperties() const
void residualSetup()
Calls the residualSetup function for each of the output objects.
virtual NonlinearSystem & getNonlinearSystem(const unsigned int sys_num)
void solveSetup()
Calls the timestepSetup function for each of the output objects.
void sort(THREAD_ID tid=0)
virtual bool reinitDirac(const Elem *elem, const THREAD_ID tid) override
Returns true if the Problem has Dirac kernels it needs to compute on elem.
MooseAppCoordTransform & coordTransform()
virtual void computeJacobianInternal(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
virtual void cacheResidual(const THREAD_ID tid)
virtual void timestepSetup()
MooseNonlinearConvergenceReason
Enumeration for nonlinear convergence reasons.
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
const ExecFlagType EXEC_PRE_DISPLACE
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
bool _compute_initial_residual_before_preset_bcs
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
const ExecFlagType EXEC_POSTCHECK
PetscErrorCode PetscInt const PetscInt fields[]
void projectInitialConditionOnCustomRange(ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range)
Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boun...
const ExecFlagType EXEC_NONLINEAR
std::vector< Real > VectorPostprocessorValue
virtual void updateMortarMesh()
void copyValuesBack()
At the end of a timestep this method is called to copy the values back in time in preparation for the...
void update()
Builds mortar segment meshes for each mortar interface.
const std::vector< const Elem * > & coarsenedElementChildren(const Elem *elem) const
Get the newly removed children element ids for an element that was just coarsened.
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
std::set< TagID > _fe_matrix_tags
const ExecuteMooseObjectWarehouse< Transfer > & getMultiAppTransferWarehouse(Transfer::DIRECTION direction) const
Return the complete warehouse for MultiAppTransfer object for the given direction.
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Provides a way for users to bail out of the current solve.
virtual void addReporter(const std::string &type, const std::string &name, InputParameters ¶meters)
Add a Reporter object to the simulation.
virtual void swapBackMaterials(const THREAD_ID tid)
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
MaterialWarehouse _discrete_materials
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
void updateBlockMatPropDependency(SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
virtual void initialSetup()
virtual void addDGKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid) override
sets the current boundary ID in assembly
virtual void addAuxScalarVariable(const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
Generic class for solving transient nonlinear problems.
virtual void preProblemInit()
Perform initializations during executing actions right before init_problem task.
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
void clearCurrentJacobianVectorTags()
Clear the current Jacobian vector tag data structure ...
const InputParameters * getCommonParameters() const
Get a reference to the common output parameters.
TagID timeVectorTag() const override
Ideally, we should not need this API.
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Class for containing MooseEnum item information.
std::shared_ptr< MaterialBase > getMaterial(std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
Return a pointer to a MaterialBase object.
virtual void swap(NumericVector< Number > &v)
bool hasActiveObject(const std::string &name, THREAD_ID tid=0) const
Convenience functions for checking/getting specific objects.
std::vector< VariableGradient > _grad_zero
bool hasActiveObjects(THREAD_ID tid=0) const
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
void max(const T &r, T &o, Request &req) const
void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
Return the undisplaced or displaced mortar generation object associated with the provided boundaries ...
void setLoadAllVectors(const bool load_all_vectors)
Sets whether or not all vectors are to be loaded.
Class for threaded computation of UserObjects.
void setRandomDataPointer(RandomData *random_data)
Base class for all MultiAppTransfer objects.
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
void execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction)
Execute MultiAppTransfers associated with execution flag and direction.
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Wrapper class that owns a libMesh EquationSystem and adds advanced restart capability to it...
void restoreMultiApps(ExecFlagType type, bool force=false)
Restore the MultiApps associated with the ExecFlagType.
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
void subdomainSetup()
Calls the subdomainSetup function for each of the output objects.
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
virtual void computeAuxiliaryKernels(const ExecFlagType &type)
Call compute methods on AuxKernels.
void addMaterialPropertyStorage(MaterialPropertyStorage &mat_props)
Pushes the given pair ( mat_data , mat_props ) onto our list of _materials data to redistribute each ...
void customSetup(const ExecFlagType &exec_type) override
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
void initNonlocalCoupling()
Create pair of variables requiring nonlocal jacobian contributions.
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters ¶meters)
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
bool hasStartTime() const
virtual void onTimestepBegin() override
Nonlinear system to be solved.
void checkDuplicatePostprocessorVariableNames()
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
void addOutput(std::shared_ptr< Output > output)
Adds an existing output object to the warehouse.
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
std::vector< VariableValue > _scalar_zero
virtual Real computeResidualL2Norm()
Computes the residual using whatever is sitting in the current solution vector then returns the L2 no...
void update(GeometricSearchType type=ALL)
Update all of the search objects.
void incrementMultiAppTStep(ExecFlagType type)
Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.
Class for scalar variables (they are different).
IntRange< T > make_range(T beg, T end)
const bool _material_dependency_check
Determines whether a check to verify material dependencies on every subdomain.
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
virtual MooseMesh & mesh() override
NonlocalKernel is used for solving integral terms in integro-differential equations.
virtual void subdomainSetup(THREAD_ID tid=0) const
std::vector< VariableValue > _zero
const ExecFlagType EXEC_SAME_AS_MULTIAPP
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
std::set< TagID > _fe_vector_tags
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void addObjectParamsHelper(InputParameters ¶ms, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
void mooseConsole()
Send current output buffer to Console output objects.
std::set< std::string > getDependObjects() const
Get a list of dependent UserObjects for this exec type.
MaterialData & getMaterialData(const THREAD_ID tid)
bool hasPostprocessor(const std::string &name) const
Deprecated.
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
const InputParameters & parameters() const
Get the parameters of the object.
State argument for evaluating functors.
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
virtual Real & timeOld() const
Proxy for accessing MaterialPropertyStorage.
std::vector< VectorVariableValue > _vector_zero
bool hasMultiApp(const std::string &name) const
virtual bool computingInitialResidual(const unsigned int nl_sys_num) const override
Returns true if the problem is in the process of computing it's initial residual. ...
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
virtual void cacheResidualNeighbor(const THREAD_ID tid)
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
void checkICRestartError(const std::string &ic_name, const std::string &name, const VariableName &var_name)
Checks if the variable of the initial condition is getting restarted and errors for specific cases...
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
const TagName SOLUTION_TAG
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
A class for storing an input parameter name.
static InputParameters validParams()
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
virtual void addScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
elem_info_iterator ownedElemInfoEnd()
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.
virtual void set(const numeric_index_type i, const Number value)=0
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
void bumpAllQRuleOrder(Order order, SubdomainID block)
virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const override
bool isAdaptivityDue()
Query if an adaptivity step should be performed at the current time / time step.
MaterialPropertyStorage & _neighbor_material_props
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.
const ConstElemRange & getEvaluableElementRange()
In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}.
static InputParameters validParams()
unsigned int _n_nl_pingpong
maximum numbver
bool _currently_computing_residual
Whether the residual is being evaluated.
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested ArrayMooseVariable which may be in any system...
const ExecFlagType EXEC_SUBDOMAIN
bool _has_constraints
Whether or not this system has any Constraints.
virtual bool isTransient() const override
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
void notifyWhenMeshChanges(MeshChangedInterface *mci)
Register an object that derives from MeshChangedInterface to be notified when the mesh changes...
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened...
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.
virtual void executeAllObjects(const ExecFlagType &exec_type)
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
void check() const
Perform integrity check for get/declare calls.
std::set< std::string > getPostprocessorNames() const
Return a list of all postprocessor names.
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor. ...
virtual void computeJacobianBlock(SparseMatrix< Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
Really not a good idea to use this.
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.
virtual void prepareShapes(unsigned int var, const THREAD_ID tid) override
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
void reinitMaterialsInterface(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
bool _const_jacobian
true if the Jacobian is constant
Real _initial_residual_after_preset_bcs
virtual void computeUserObjectByName(const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
Compute an user object with the given name.
virtual void possiblyRebuildGeomSearchPatches()
virtual void add(const numeric_index_type i, const Number value)=0
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Class that represents the dependecy as a graph.
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
A MultiApp represents one or more MOOSE applications that are running simultaneously.
const TagName PREVIOUS_NL_SOLUTION_TAG
void updateBoundaryVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
processor_id_type processor_id() const
Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num) override
void addObject(std::shared_ptr< FVInitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
std::vector< T * > & queryIntoUnsorted(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
const ConstElemRange & getNonlinearEvaluableElementRange()
A class for storing the names of MooseObject by tag and object name.
MaterialPropertyStorage & _material_props
Base class for Postprocessors that produce a vector of values.
void prepareMaterials(const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
Add the MooseVariables and the material properties that the current materials depend on to the depend...
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
virtual void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, BoundaryID bnd_id, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
reinitialize FE objects on a given neighbor element on a given side at a given set of reference point...
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
Adaptivity & adaptivity()
bool hasActiveMaterialProperties(const THREAD_ID tid) const
Method to check whether or not a list of active material roperties has been set.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
bool isRecovering() const
Whether or not this is a "recover" calculation.
SystemBase & sys()
Get the system this variable is part of.
virtual void cacheJacobian(const THREAD_ID tid) override
auto min(const L &left, const R &right)
void jacobianSetup() override
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
virtual void reinitOffDiagScalars(const THREAD_ID tid) override
virtual void reinitElemPhys(const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
virtual void computeResidualSys(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.
virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override
virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid) override
MooseObjectWarehouse< Marker > _markers
FVInitialConditionWarehouse _fv_ics
void setVerboseProblem(bool verbose)
Make the problem be verbose.
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
MaterialBases compute MaterialProperties.
virtual void initialAdaptMesh()
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
virtual void addResidualScalar(const THREAD_ID tid=0)
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.
This is a template class that implements the workhorse compute and computeNodal methods.
Order _max_scalar_order
Maximum scalar variable order.
MaterialWarehouse _all_materials
void bumpVolumeQRuleOrder(Order order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
const MeshBase::element_iterator activeLocalElementsEnd()
virtual void addCachedResidual(const THREAD_ID tid) override
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
void ErrorVector unsigned int
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.
auto index_range(const T &sizable)
Base class for user-specific data.
void timestepSetup()
Calls the timestepSetup function for each of the output objects.
void allowOutput(bool state)
Ability to enable/disable all output calls.
virtual void cacheJacobian(const THREAD_ID tid)
virtual Sampler & getSampler(const std::string &name, const THREAD_ID tid=0)
std::map< NonlinearVariableName, unsigned int > _nl_var_to_sys_num
Map from nonlinear variable name to nonlinear system number.
virtual void outputStep(ExecFlagType type)
Output the current step.
std::unique_ptr< ConstElemRange > _nl_evaluable_local_elem_range
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const override
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
virtual void computeTransposeNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
static InputParameters validParams()
RedistributeProperties is used for its redistribute() callback, which ensures that any stateful prope...
unsigned int state
The state.
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.
virtual void computeNearNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
MooseMesh * _displaced_mesh
void resize(unsigned int n_qpoints)
Resize the data to hold properties for n_qpoints quadrature points.
bool _has_mortar
Whether the simulation requires mortar coupling.
Order getMaxScalarOrder() const
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
virtual void computeResidualInternal(const NumericVector< Number > &soln, NumericVector< Number > &residual, const std::set< TagID > &tags)
Form a residual vector for a set of tags.
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override
MaterialWarehouse _materials
virtual void addJacobianScalar(const THREAD_ID tid=0)
virtual void addDiracKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
An instance of this object type has one copy per thread that runs on each thread. ...
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested VectorMooseVariable which may be in any system...
std::shared_ptr< LineSearch > _line_search
void initXFEM(std::shared_ptr< XFEMInterface > xfem)
Create XFEM controller object.
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Base class for all Transfer objects.
virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
virtual void addCachedJacobian(const THREAD_ID tid) override
virtual void residualSetup(THREAD_ID tid=0) const
virtual void sizeZeroes(unsigned int size, const THREAD_ID tid)
std::vector< Real > _real_zero
Convenience zeros.
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL
bool _verbose_multiapps
Whether or not to be verbose with multiapps.
Key structure for APIs manipulating global vectors/matrices.