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.");
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 =
3883 std::vector<UserObject *> objs;
3887 .condition<AttribThread>(tid)
3891 mooseError(
"Unable to find user object with name '" +
name +
"'");
3892 mooseAssert(objs.size() == 1,
"Should only find one UO");
3899 std::vector<Positions *> objs;
3903 .condition<AttribName>(
name)
3906 mooseError(
"Unable to find Positions object with name '" +
name +
"'");
3907 mooseAssert(objs.size() == 1,
"Should only find one Positions");
3914 std::vector<UserObject *> objs;
3918 .condition<AttribThread>(0)
3921 return !objs.empty();
3932 std::size_t t_index)
const 3941 std::size_t t_index)
3950 mooseDeprecated(
"FEProblemBase::hasPostprocssor is being removed; use " 3951 "hasPostprocessorValueByName instead.");
3957 const std::string & vector_name,
3958 std::size_t t_index)
const 3966 const std::string & vector_name,
3968 std::size_t t_index)
3978 return getUserObject<VectorPostprocessor>(object_name, tid);
3986 const auto & objects = it.second.getActiveObjects();
3987 for (
const auto & obj : objects)
3988 obj->parentOutputPositionChanged();
4005 TIME_SECTION(
"computeIndicators", 1,
"Computing Indicators");
4009 const auto old_do_derivatives = ADReal::do_derivatives;
4010 ADReal::do_derivatives =
false;
4012 std::vector<std::string>
fields;
4016 for (
const auto & indicator : indicators)
4017 fields.push_back(indicator->name());
4021 for (
const auto & internal_indicator : internal_indicators)
4022 fields.push_back(internal_indicator->name());
4029 _aux->solution().close();
4034 _aux->solution().close();
4037 ADReal::do_derivatives = old_do_derivatives;
4046 TIME_SECTION(
"computeMarkers", 1,
"Computing Markers");
4048 std::vector<std::string>
fields;
4052 for (
const auto & marker : markers)
4053 fields.push_back(marker->name());
4062 for (
const auto & marker : markers)
4063 marker->markerSetup();
4069 _aux->solution().close();
4106 _aux->customSetup(exec_type);
4107 for (
auto & nl :
_nl)
4108 nl->customSetup(exec_type);
4120 std::vector<UserObject *> userobjs;
4122 for (
auto obj : userobjs)
4123 obj->customSetup(exec_type);
4168 std::unique_ptr<NumericVector<Number>> x =
_aux->currentSolution()->clone();
4176 const Real check_tol = 1e-8;
4178 const Real xnorm = x->l2_norm();
4179 *x -= *
_aux->currentSolution();
4180 if (x->l2_norm() > check_tol * xnorm)
4182 const auto & sys =
_aux->system();
4183 const unsigned int n_vars = sys.n_vars();
4184 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4188 ordered_map.emplace(vnorm, sys.variable_name(i));
4191 std::ostringstream oss;
4192 for (
const auto & [error_norm, var_name] : ordered_map)
4193 oss <<
" {" << var_name <<
", " << error_norm <<
"},\n";
4195 mooseError(
"Aux kernels, user objects appear to have states for aux variables on ",
4197 ".\nVariable error norms in descending order:\n",
4202 if (pp_values.size() != new_pp_values.size())
4203 mooseError(
"Second execution for uo/aux state check should not change the number of " 4204 "real reporter values");
4206 const Real ppnorm = pp_values.l2_norm();
4207 pp_values -= new_pp_values;
4208 if (pp_values.l2_norm() > check_tol * ppnorm)
4211 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4213 ordered_map.emplace(
std::abs(pp_values(i)), pp_names[i]);
4215 std::ostringstream oss;
4216 for (
const auto & [error_norm, pp_name] : ordered_map)
4217 oss <<
" {" << pp_name <<
", " << error_norm <<
"},\n";
4219 mooseError(
"Aux kernels, user objects appear to have states for real reporter values on ",
4221 ".\nErrors of real reporter values in descending order:\n",
4237 std::vector<UserObject *> objs;
4238 query.queryInto(objs);
4243 for (
auto obj : objs)
4244 if (obj->primaryThreadCopy())
4245 obj->primaryThreadCopy()->threadJoin(*obj);
4251 for (
auto obj : objs)
4253 if (isgen && dynamic_cast<ThreadedGeneralUserObject *>(obj))
4259 _console <<
"[DBG] Initializing, executing & finalizing general UO '" << obj->name()
4284 auto reporter =
dynamic_cast<Reporter *
>(obj);
4293 const std::string & name)
4300 .condition<AttribExecOns>(
type)
4321 TIME_SECTION(
"computeUserObjects", 1,
"Computing User Objects");
4332 std::vector<UserObject *> uos;
4334 std::set<int> execution_groups;
4335 for (
const auto & uo : uos)
4336 execution_groups.insert(uo->getParam<
int>(
"execution_order_group"));
4339 for (
const auto execution_group : execution_groups)
4343 std::vector<GeneralUserObject *> genobjs;
4346 std::vector<UserObject *> userobjs;
4352 .queryInto(userobjs);
4354 std::vector<UserObject *> tgobjs;
4359 std::vector<UserObject *> nodal;
4362 std::vector<MortarUserObject *> mortar;
4365 if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
4374 for (
auto obj : userobjs)
4375 obj->residualSetup();
4376 for (
auto obj : nodal)
4377 obj->residualSetup();
4378 for (
auto obj : mortar)
4379 obj->residualSetup();
4380 for (
auto obj : tgobjs)
4381 obj->residualSetup();
4382 for (
auto obj : genobjs)
4383 obj->residualSetup();
4387 for (
auto obj : userobjs)
4388 obj->jacobianSetup();
4389 for (
auto obj : nodal)
4390 obj->jacobianSetup();
4391 for (
auto obj : mortar)
4392 obj->jacobianSetup();
4393 for (
auto obj : tgobjs)
4394 obj->jacobianSetup();
4395 for (
auto obj : genobjs)
4396 obj->jacobianSetup();
4399 for (
auto obj : userobjs)
4403 if (!userobjs.empty())
4422 for (
const auto & uo : userobjs)
4423 if (
auto euo = dynamic_cast<const ElementUserObject *>(uo);
4424 euo && euo->hasWritableCoupledVariables())
4426 _aux->solution().close();
4427 _aux->system().update();
4435 for (
auto obj : nodal)
4445 for (
const auto & uo : nodal)
4446 if (
auto nuo = dynamic_cast<const NodalUserObject *>(uo);
4447 nuo && nuo->hasWritableCoupledVariables())
4449 _aux->solution().close();
4450 _aux->system().update();
4456 for (
auto obj : mortar)
4458 if (!mortar.empty())
4460 auto create_and_run_mortar_functors = [
this,
type, &mortar](
const bool displaced)
4464 for (
const auto & mortar_interface : mortar_interfaces)
4466 const auto primary_secondary_boundary_pair = mortar_interface.first;
4467 auto mortar_uos_to_execute =
4469 primary_secondary_boundary_pair.second,
4472 const auto & mortar_generation_object = mortar_interface.second;
4474 auto *
const subproblem = displaced
4476 : static_cast<SubProblem *>(
this);
4478 mortar_generation_object,
4482 subproblem->assembly(0, 0));
4488 create_and_run_mortar_functors(
false);
4490 create_and_run_mortar_functors(
true);
4492 for (
auto obj : mortar)
4497 for (
auto obj : tgobjs)
4499 std::vector<GeneralUserObject *> tguos_zero;
4503 .queryInto(tguos_zero);
4504 for (
auto obj : tguos_zero)
4506 std::vector<GeneralUserObject *> tguos;
4507 auto q =
query.clone()
4533 TIME_SECTION(
"executeControls", 1,
"Executing Controls");
4539 for (
const auto & it : controls_wh.getActiveObjects())
4544 std::vector<std::string> & dependent_controls = it->getDependencies();
4545 for (
const auto & depend_name : dependent_controls)
4547 if (controls_wh.hasActiveObject(depend_name))
4549 auto dep_control = controls_wh.getActiveObject(depend_name);
4550 resolver.
addEdge(dep_control, it);
4555 "\" was not created, did you make a " 4556 "spelling mistake or forget to include it " 4557 "in your input file?");
4563 if (!ordered_controls.empty())
4567 for (
const auto & control : ordered_controls)
4580 std::vector<Sampler *> objects;
4584 .condition<AttribThread>(tid)
4586 .queryInto(objects);
4588 if (!objects.empty())
4590 TIME_SECTION(
"executeSamplers", 1,
"Executing Samplers");
4591 FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
4592 FEProblemBase::objectExecuteHelper<Sampler>(objects);
4600 TIME_SECTION(
"updateActiveObjects", 5,
"Updating Active Objects");
4604 for (
auto & nl :
_nl)
4605 nl->updateActive(tid);
4606 _aux->updateActive(tid);
4633 TIME_SECTION(
"reinitBecauseOfGhostingOrNewGeomObjects",
4635 "Reinitializing Because of Geometric Search Objects");
4659 const std::string & name,
4662 parallel_object_only();
4664 const auto nl_sys_num =
4680 for (
auto & nl :
_nl)
4686 const std::string & name,
4689 parallel_object_only();
4715 std::shared_ptr<Indicator> indicator =
4718 std::shared_ptr<InternalSideIndicator> isi =
4729 const std::string & name,
4732 parallel_object_only();
4766 const std::string & name,
4769 parallel_object_only();
4798 multi_app->setupPositions();
4803 std::shared_ptr<TransientMultiApp> trans_multi_app =
4805 if (trans_multi_app)
4821 std::shared_ptr<MultiApp>
4832 std::string string_direction;
4834 string_direction =
" To ";
4835 else if (from_multiapp)
4836 string_direction =
" From ";
4838 string_direction =
" Between ";
4846 TIME_SECTION(
"execMultiAppTransfers", 1,
"Executing Transfers");
4853 <<
"MultiApps" << COLOR_DEFAULT <<
":" << std::endl;
4856 {
"Name",
"Type",
"From",
"To"});
4859 for (
const auto & transfer : transfers)
4863 table.addRow(multiapp_transfer->name(),
4864 multiapp_transfer->type(),
4865 multiapp_transfer->getFromName(),
4866 multiapp_transfer->getToName());
4873 for (
const auto & transfer : transfers)
4876 transfer->execute();
4883 << COLOR_DEFAULT << std::endl;
4890 << COLOR_DEFAULT << std::endl;
4894 std::vector<std::shared_ptr<Transfer>>
4905 std::vector<std::shared_ptr<Transfer>>
4931 const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
4935 for (
const auto & multi_app : multi_apps)
4936 multi_app->preTransfer(
_dt,
_time);
4945 if (multi_apps.size())
4947 TIME_SECTION(
"execMultiApps", 1,
"Executing MultiApps",
false);
4951 << COLOR_DEFAULT << std::endl;
4953 bool success =
true;
4955 for (
const auto & multi_app : multi_apps)
4957 success = multi_app->solveStep(
_dt,
_time, auto_advance);
4972 << COLOR_DEFAULT << std::endl;
4987 for (
const auto & multi_app : multi_apps)
4988 multi_app->finalize();
4996 for (
const auto & multi_app : multi_apps)
4997 multi_app->postExecute();
5005 if (multi_apps.size())
5006 for (
const auto & multi_app : multi_apps)
5007 multi_app->incrementTStep(
_time);
5015 if (multi_apps.size())
5018 _console << COLOR_CYAN <<
"\nAdvancing MultiApps on " <<
type.name() << COLOR_DEFAULT
5021 for (
const auto & multi_app : multi_apps)
5022 multi_app->finishStep(recurse_through_multiapp_levels);
5027 _console << COLOR_CYAN <<
"Finished Advancing MultiApps on " <<
type.name() <<
"\n" 5028 << COLOR_DEFAULT << std::endl;
5037 if (multi_apps.size())
5039 TIME_SECTION(
"backupMultiApps", 5,
"Backing Up MultiApp");
5042 _console << COLOR_CYAN <<
"\nBacking Up MultiApps on " <<
type.name() << COLOR_DEFAULT
5045 for (
const auto & multi_app : multi_apps)
5046 multi_app->backup();
5051 _console << COLOR_CYAN <<
"Finished Backing Up MultiApps on " <<
type.name() <<
"\n" 5052 << COLOR_DEFAULT << std::endl;
5061 if (multi_apps.size())
5066 _console << COLOR_CYAN <<
"\nRestoring Multiapps on " <<
type.name()
5067 <<
" because of solve failure!" << COLOR_DEFAULT << std::endl;
5069 _console << COLOR_CYAN <<
"\nRestoring MultiApps on " <<
type.name() << COLOR_DEFAULT
5073 for (
const auto & multi_app : multi_apps)
5074 multi_app->restore(force);
5079 _console << COLOR_CYAN <<
"Finished Restoring MultiApps on " <<
type.name() <<
"\n" 5080 << COLOR_DEFAULT << std::endl;
5091 for (
const auto & multi_app : multi_apps)
5092 smallest_dt =
std::min(smallest_dt, multi_app->computeDT());
5102 TIME_SECTION(
"execTransfers", 3,
"Executing Transfers");
5106 for (
const auto & transfer : transfers)
5107 transfer->execute();
5113 const std::string & name,
5116 parallel_object_only();
5147 std::shared_ptr<MultiApp> multiapp;
5158 exec_enum = multiapp->getParam<
ExecFlagEnum>(
"execute_on");
5166 std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5168 if (multi_app_transfer)
5184 for (
auto & nl :
_nl)
5185 if (nl->hasVariable(var_name))
5187 if (
_aux->hasVariable(var_name))
5195 const std::string & var_name,
5205 for (
auto & nl :
_nl)
5206 if (nl->hasVariable(var_name))
5207 return nl->getFieldVariable<
Real>(tid, var_name);
5208 if (
_aux->hasVariable(var_name))
5209 return _aux->getFieldVariable<
Real>(tid, var_name);
5217 for (
auto & nl :
_nl)
5218 if (nl->hasVariable(var_name))
5219 return nl->getActualFieldVariable<
Real>(tid, var_name);
5220 if (
_aux->hasVariable(var_name))
5221 return _aux->getActualFieldVariable<
Real>(tid, var_name);
5229 for (
auto & nl :
_nl)
5230 if (nl->hasVariable(var_name))
5232 if (
_aux->hasVariable(var_name))
5241 for (
auto & nl :
_nl)
5242 if (nl->hasVariable(var_name))
5244 if (
_aux->hasVariable(var_name))
5253 for (
auto & nl :
_nl)
5254 if (nl->hasScalarVariable(var_name))
5256 if (
_aux->hasScalarVariable(var_name))
5265 for (
auto & nl :
_nl)
5266 if (nl->hasScalarVariable(var_name))
5267 return nl->getScalarVariable(tid, var_name);
5268 if (
_aux->hasScalarVariable(var_name))
5269 return _aux->getScalarVariable(tid, var_name);
5279 return _nl[nl_sys_num]->system();
5280 else if (
_aux->hasVariable(var_name))
5281 return _aux->system();
5283 mooseError(
"Unable to find a system containing the variable " + var_name);
5385 mat->setActiveProperties(mat_prop_ids);
5387 mat->setActiveProperties(mat_prop_ids);
5389 mat->setActiveProperties(mat_prop_ids);
5409 #ifdef LIBMESH_ENABLE_AMR 5419 const std::string & redistributer_name,
5420 const bool use_displaced_mesh)
5424 redistribute_params.
set<std::string>(
"for_whom") = this->
name();
5428 redistribute_params.
set<
bool>(
"use_displaced_mesh") = use_displaced_mesh;
5430 std::shared_ptr<RedistributeProperties> redistributer =
5432 "RedistributeProperties", redistributer_name, redistribute_params);
5443 mesh.
getMesh().add_ghosting_functor(redistributer);
5446 add_redistributer(
_mesh,
"mesh_property_redistributer",
false);
5448 add_redistributer(
_displaced_problem->mesh(),
"displaced_mesh_property_redistributer",
true);
5450 #endif // LIBMESH_ENABLE_AMR 5470 mooseError(
"Max quadrature points per element assumptions made in some code (e.g. Coupleable ",
5471 "and MaterialPropertyInterface classes) have been violated.\n",
5472 "Complain to Moose developers to have constMaxQpsPerElem increased from ",
5480 _zero[tid].resize(max_qpts, 0);
5523 const bool allow_negative_qweights)
5528 order =
_nl[0]->getMinQuadratureOrder();
5530 if (order <
_nl[i]->getMinQuadratureOrder())
5531 order =
_nl[i]->getMinQuadratureOrder();
5532 if (order < _aux->getMinQuadratureOrder())
5533 order =
_aux->getMinQuadratureOrder();
5537 volume_order = order;
5545 type, order, volume_order, face_order, block, allow_negative_qweights);
5549 type, order, volume_order, face_order, block, allow_negative_qweights);
5560 mooseError(
"Someone told us (the FEProblemBase) to trust the user coupling matrix, but we " 5561 "haven't been provided a coupling matrix!");
5582 _cm[i] = std::move(cm);
5589 mooseError(
"Someone told us (the FEProblemBase) to trust the user coupling matrix, but we " 5590 "haven't been provided a coupling matrix!");
5598 TIME_SECTION(
"setNonlocalCouplingMatrix", 5,
"Setting Nonlocal Coupling Matrix");
5601 mooseError(
"Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support " 5602 "multiple nonlinear systems with nonlocal kernels.");
5606 auto & nl =
_nl[nl_sys_num];
5608 unsigned int n_vars = nl->nVariables();
5609 nonlocal_cm.resize(
n_vars);
5610 const auto & vars = nl->getVariables(0);
5613 for (
const auto & ivar : vars)
5615 for (
const auto & kernel : nonlocal_kernel)
5617 for (
unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5618 if (i == kernel->variable().number())
5619 for (
const auto & jvar : vars)
5624 unsigned int j = jvar->number();
5625 nonlocal_cm(i, j) = 1;
5629 for (
const auto & integrated_bc : nonlocal_integrated_bc)
5631 for (
unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5632 if (i == integrated_bc->variable().number())
5633 for (
const auto & jvar : vars)
5638 unsigned int j = jvar->number();
5639 nonlocal_cm(i, j) = 1;
5649 const unsigned int jvar,
5650 const unsigned int nl_sys)
const 5652 return (*
_cm[nl_sys])(ivar, jvar);
5655 std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
5658 return _assembly[tid][nl_sys]->couplingEntries();
5661 std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
5664 return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
5673 TIME_SECTION(
"init", 2,
"Initializing");
5689 unsigned int n_vars = nl->nVariables();
5691 TIME_SECTION(
"fillCouplingMatrix", 3,
"Filling Coupling Matrix");
5696 cm = std::make_unique<CouplingMatrix>(
n_vars);
5697 for (
unsigned int i = 0; i <
n_vars; i++)
5703 cm = std::make_unique<CouplingMatrix>(
n_vars);
5704 for (
unsigned int i = 0; i <
n_vars; i++)
5705 for (
unsigned int j = 0; j <
n_vars; j++)
5715 nl->dofMap()._dof_coupling = cm.get();
5721 nl->dofMap()._dof_coupling =
nullptr;
5723 nl->dofMap().attach_extra_sparsity_function(&
extraSparsity, nl.get());
5724 nl->dofMap().attach_extra_send_list_function(&
extraSendList, nl.get());
5728 mooseError(
"No variables specified in the FEProblemBase '",
name(),
"'.");
5743 for (
auto & nl :
_nl)
5746 nl->turnOffJacobian();
5763 TIME_SECTION(
"EquationSystems::Init", 2,
"Initializing Equation Systems");
5772 for (
auto & nl :
_nl)
5789 std::istringstream ss(nl_sys_name);
5790 unsigned int nl_sys_num;
5791 if (!(ss >> nl_sys_num) || !ss.eof())
5800 TIME_SECTION(
"solve", 1,
"Solving",
false);
5810 #if PETSC_RELEASE_LESS_THAN(3, 12, 0) 5852 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0) 5871 TIME_SECTION(
"checkExceptionAndStopSolve", 5);
5892 <<
"To recover, the solution will fail and then be re-attempted with a reduced time " 5903 _aux->solution().close();
5917 mooseError(
"The following parallel-communicated exception was detected during " +
5920 "\nBecause this did not occur during residual evaluation, there" 5921 " is no way to handle this, so the solution is aborting.\n");
5929 ADReal::do_derivatives =
true;
5953 return _nl[nl_sys_num]->converged();
5961 return _nl[nl_sys_num]->nNonlinearIterations();
5967 return _nl[nl_sys_num]->nLinearIterations();
5973 return _nl[nl_sys_num]->finalNonlinearResidual();
5979 return _nl[nl_sys_num]->computingInitialResidual();
5985 TIME_SECTION(
"copySolutionsBackwards", 3,
"Copying Solutions Backward");
5987 for (
auto & nl :
_nl)
5988 nl->copySolutionsBackwards();
5989 _aux->copySolutionsBackwards();
5995 TIME_SECTION(
"advanceState", 5,
"Advancing State");
5997 for (
auto & nl :
_nl)
5998 nl->copyOldSolutions();
5999 _aux->copyOldSolutions();
6023 TIME_SECTION(
"restoreSolutions", 5,
"Restoring Solutions");
6025 for (
auto & nl :
_nl)
6026 nl->restoreSolutions();
6027 _aux->restoreSolutions();
6036 TIME_SECTION(
"saveOldSolutions", 5,
"Saving Old Solutions");
6038 for (
auto & nl :
_nl)
6039 nl->saveOldSolutions();
6040 _aux->saveOldSolutions();
6046 TIME_SECTION(
"restoreOldSolutions", 5,
"Restoring Old Solutions");
6048 for (
auto & nl :
_nl)
6049 nl->restoreOldSolutions();
6050 _aux->restoreOldSolutions();
6056 TIME_SECTION(
"outputStep", 1,
"Outputting");
6060 for (
auto & nl :
_nl)
6092 TIME_SECTION(
"onTimestepBegin", 2);
6094 for (
auto & nl :
_nl)
6095 nl->onTimestepBegin();
6111 switch (state.
state)
6120 mooseError(
"Unhandled state ", state.
state,
" in FEProblemBase::getTimeFromStateArg");
6126 const std::string & name,
6129 parallel_object_only();
6134 for (
auto & nl :
_nl)
6141 _aux->addDotVectors();
6142 for (
auto & nl :
_nl)
6144 nl->addDotVectors();
6146 auto tag_udot = nl->getTimeIntegrator()->uDotFactorTag();
6147 if (!nl->hasVector(tag_udot))
6148 nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
6149 auto tag_udotdot = nl->getTimeIntegrator()->uDotDotFactorTag();
6151 nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
6157 const std::string & name,
6160 parallel_object_only();
6166 for (
auto & nl :
_nl)
6167 nl->setPredictor(predictor);
6173 TIME_SECTION(
"computeResidualL2Norm", 2,
"Computing L2 Norm of Residual");
6176 mooseError(
"Multiple nonlinear systems in the same input are not currently supported when " 6177 "performing fixed point iterations in multi-app contexts");
6182 return _nl[0]->RHS().l2_norm();
6190 parallel_object_only();
6192 TIME_SECTION(
"computeResidualSys", 5);
6210 const unsigned int nl_sys_num)
6252 for (
auto & tag : tags)
6270 for (
auto index :
make_range(matrix.row_start(), matrix.row_stop()))
6271 matrix.add(index, index, 0);
6274 _aux->zeroVariablesForResidual();
6298 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6303 _aux->residualSetup();
6320 for (
auto & nl :
_nl)
6321 nl->computeTimeDerivatives();
6382 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6383 "contact the MOOSE team for assistance.");
6390 const std::set<TagID> & tags)
6392 parallel_object_only();
6394 TIME_SECTION(
"computeResidualInternal", 1);
6415 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6416 "contact the MOOSE team for assistance.");
6425 TIME_SECTION(
"computeResidualType", 5);
6446 mooseError(
"An unhandled MooseException was raised during residual computation. Please " 6447 "contact the MOOSE team for assistance.");
6454 auto create_exception_message =
6455 [&calling_method](
const std::string & exception_type,
const auto & exception)
6457 return std::string(
"A " + exception_type +
" was raised during FEProblemBase::" +
6458 calling_method +
"\n" + std::string(exception.what()));
6467 setException(create_exception_message(
"libMesh::LogicError", e));
6471 setException(create_exception_message(
"MooseException", e));
6473 catch (
const MetaPhysicL::LogicError & e)
6489 mooseError(create_exception_message(
"libMesh::PetscSolverException", e));
6491 catch (
const std::exception & e)
6493 const auto message = create_exception_message(
"std::exception", e);
6506 parallel_object_only();
6512 TIME_SECTION(
"computeResidualTags", 5,
"Computing Residual");
6514 ADReal::do_derivatives =
false;
6518 _aux->zeroVariablesForResidual();
6532 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6537 _aux->residualSetup();
6554 for (
auto & nl :
_nl)
6555 nl->computeTimeDerivatives();
6612 const unsigned int nl_sys_num)
6619 for (
auto & tag : tags)
6628 const std::set<TagID> & tags)
6630 TIME_SECTION(
"computeJacobianInternal", 1);
6650 TIME_SECTION(
"computeJacobianTags", 5,
"Computing Jacobian");
6652 for (
auto tag : tags)
6661 for (
auto index :
make_range(matrix.row_start(), matrix.row_stop()))
6662 matrix.add(index, index, 0);
6665 _aux->zeroVariablesForJacobian();
6681 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6686 _aux->jacobianSetup();
6694 for (
unsigned int tid = 0; tid <
n_threads; tid++)
6748 const unsigned int nl_sys_num)
6750 TIME_SECTION(
"computeTransientImplicitJacobian", 2);
6772 JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
6773 std::vector<JacobianBlock *> blocks = {&jac_block};
6788 "I expect these system numbers to be the same");
6793 TIME_SECTION(
"computeBounds", 1,
"Computing Bounds");
6802 _aux->residualSetup();
6827 "I expect these system numbers to be the same");
6830 for (
unsigned int i = 0; i <
subspaceDim(
"NearNullSpace"); ++i)
6832 std::stringstream postfix;
6833 postfix <<
"_" << i;
6834 std::string modename =
"NearNullSpace" + postfix.str();
6844 "I expect these system numbers to be the same");
6846 for (
unsigned int i = 0; i <
subspaceDim(
"NullSpace"); ++i)
6848 std::stringstream postfix;
6849 postfix <<
"_" << i;
6859 "I expect these system numbers to be the same");
6861 for (
unsigned int i = 0; i <
subspaceDim(
"TransposeNullSpace"); ++i)
6863 std::stringstream postfix;
6864 postfix <<
"_" << i;
6874 bool & changed_search_direction,
6875 bool & changed_new_soln)
6878 "I expect these system numbers to be the same");
6889 TIME_SECTION(
"computePostCheck", 2,
"Computing Post Check");
6904 std::unique_ptr<NumericVector<Number>> ghosted_solution =
6905 sys.current_local_solution->zero_clone(),
6906 ghosted_search_direction =
6907 sys.current_local_solution->zero_clone();
6910 *ghosted_solution = new_soln;
6911 *ghosted_search_direction = search_direction;
6922 new_soln = old_soln;
6923 new_soln.
add(-damping, search_direction);
6924 changed_new_soln =
true;
6931 if (changed_new_soln)
6932 *ghosted_solution = new_soln;
6934 bool updated_solution =
updateSolution(new_soln, *ghosted_solution);
6935 if (updated_solution)
6936 changed_new_soln =
true;
6943 _aux->setPreviousNewtonSolution();
6947 changed_search_direction =
false;
6961 TIME_SECTION(
"computeDamping", 1,
"Computing Damping");
7002 parallel_object_only();
7011 TIME_SECTION(
"updateGeometricSearch", 3,
"Updating Geometric Search");
7022 TIME_SECTION(
"updateMortarMesh", 5,
"Updating Mortar Mesh");
7031 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7032 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7036 const bool correct_edge_dropping,
7037 const Real minimum_projection_angle)
7043 primary_secondary_subdomain_pair,
7048 correct_edge_dropping,
7049 minimum_projection_angle);
7052 primary_secondary_subdomain_pair,
7057 correct_edge_dropping,
7058 minimum_projection_angle);
7063 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7064 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7065 bool on_displaced)
const 7068 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7073 const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
7074 const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
7078 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7092 TIME_SECTION(
"possiblyRebuildGeomSearchPatches", 5,
"Rebuilding Geometric Search Patches");
7126 libmesh_fallthrough();
7132 _console <<
"\n\nUpdating geometric search patches\n" << std::endl;
7148 #ifdef LIBMESH_ENABLE_AMR 7158 mooseError(
"HFEM does not support mesh adaptivity currently.");
7160 TIME_SECTION(
"initialAdaptMesh", 2,
"Performing Initial Adaptivity");
7162 for (
unsigned int i = 0; i < n; i++)
7178 _console <<
"Mesh unchanged, skipping remaining steps..." << std::endl;
7194 TIME_SECTION(
"adaptMesh", 3,
"Adapting Mesh");
7198 bool mesh_changed =
false;
7200 for (
unsigned int i = 0; i < cycles_per_step; ++i)
7204 mooseError(
"HFEM does not support mesh adaptivity currently.");
7210 bool mesh_changed_this_step;
7213 if (mesh_changed_this_step)
7215 mesh_changed =
true;
7222 _console <<
"Mesh unchanged, skipping remaining steps..." << std::endl;
7233 es().reinit_systems();
7235 return mesh_changed;
7237 #endif // LIBMESH_ENABLE_AMR 7251 data[tid] = &storage.getMaterialData(tid);
7258 for (
unsigned int i = 0; i <
n_threads; ++i)
7270 TIME_SECTION(
"updateMeshXFEM", 5,
"Updating XFEM");
7272 bool updated =
false;
7275 if (
_xfem->updateHeal())
7292 TIME_SECTION(
"meshChanged", 3,
"Handling Mesh Changes");
7300 TIME_SECTION(
"meshChangedHelper", 5);
7318 if (intermediate_change)
7319 es().reinit_solutions();
7377 Threads::parallel_reduce(range, pmp);
7385 for (
const auto & elem : range)
7398 Threads::parallel_reduce(range, pmp);
7402 for (
const auto & elem : range)
7405 for (
auto && child : coarsened_children)
7422 for (
auto & nl :
_nl)
7424 _aux->update(
false);
7439 Threads::parallel_reduce(elem_range, cmt);
7441 cmt(elem_range,
true);
7447 TIME_SECTION(
"checkProblemIntegrity", 5);
7454 for (
auto & nl :
_nl)
7455 nl->checkKernelCoverage(mesh_subdomains);
7459 #ifdef LIBMESH_ENABLE_AMR 7464 _console <<
"Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n" 7469 std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
7477 bool check_material_coverage =
false;
7479 for (
const auto &
id : ids)
7481 local_mesh_subs.erase(
id);
7482 check_material_coverage =
true;
7487 for (
auto subdomain_id : mortar_subdomain_ids)
7488 local_mesh_subs.erase(subdomain_id);
7491 if (check_material_coverage && !local_mesh_subs.empty())
7493 std::stringstream extra_subdomain_ids;
7495 std::copy(local_mesh_subs.begin(),
7496 local_mesh_subs.end(),
7497 std::ostream_iterator<unsigned int>(extra_subdomain_ids,
" "));
7499 mooseError(
"The following blocks from your input mesh do not contain an active material: " +
7500 extra_subdomain_ids.str() +
7501 "\nWhen ANY mesh block contains a Material object, " 7502 "all blocks must contain a Material object.\n");
7512 for (
const auto & material : materials)
7513 material->checkStatefulSanity();
7543 bool mesh_has_second_order_elements =
false;
7547 if (elem->default_order() ==
SECOND)
7549 mesh_has_second_order_elements =
true;
7559 if (mesh_has_second_order_elements)
7561 const std::vector<std::string> & displacement_variables =
7564 for (
const auto & var_name : displacement_variables)
7572 mooseError(
"Error: mesh has SECOND order elements, so all displacement variables must be " 7584 std::set<SubdomainID> user_objects_blocks;
7588 std::set<std::string> names;
7590 std::vector<UserObject *> objects;
7593 for (
const auto & obj : objects)
7594 names.insert(obj->name());
7597 std::set<SubdomainID> difference;
7598 std::set_difference(user_objects_blocks.begin(),
7599 user_objects_blocks.end(),
7600 mesh_subdomains.begin(),
7601 mesh_subdomains.end(),
7602 std::inserter(difference, difference.end()));
7604 if (!difference.empty())
7606 std::ostringstream oss;
7607 oss <<
"One or more UserObjects is referencing a nonexistent block:\n";
7608 for (
const auto &
id : difference)
7616 const std::map<
SubdomainID, std::vector<std::shared_ptr<MaterialBase>>> & materials_map)
7618 for (
const auto & it : materials_map)
7621 std::set<std::string> block_depend_props, block_supplied_props;
7623 for (
const auto & mat1 : it.second)
7625 const std::set<std::string> & depend_props = mat1->getRequestedItems();
7626 block_depend_props.insert(depend_props.begin(), depend_props.end());
7628 auto & alldeps = mat1->getMatPropDependencies();
7629 for (
auto & dep : alldeps)
7631 block_depend_props.insert(*
name);
7634 for (
const auto & mat2 : it.second)
7636 const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
7637 block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
7646 std::set<std::string> difference;
7647 std::set_difference(block_depend_props.begin(),
7648 block_depend_props.end(),
7649 block_supplied_props.begin(),
7650 block_supplied_props.end(),
7651 std::inserter(difference, difference.end()));
7653 if (!difference.empty())
7655 std::ostringstream oss;
7656 oss <<
"One or more Material Properties were not supplied on block ";
7658 if (subdomain_name.length() > 0)
7659 oss << subdomain_name <<
" (" << it.first <<
")";
7663 for (
const auto &
name : difference)
7664 oss <<
name <<
"\n";
7670 for (
const auto & it : materials_map)
7672 const auto & materials = it.second;
7673 std::set<std::string> inner_supplied, outer_supplied;
7675 for (
const auto & outer_mat : materials)
7678 outer_supplied = outer_mat->getSuppliedItems();
7679 inner_supplied.clear();
7682 std::map<std::string, std::set<std::string>> prop_to_mat;
7683 for (
const auto &
name : outer_supplied)
7684 prop_to_mat[
name].insert(outer_mat->name());
7686 for (
const auto & inner_mat : materials)
7688 if (outer_mat == inner_mat)
7692 auto outer_mat_type = outer_mat->type();
7693 auto inner_mat_type = inner_mat->type();
7698 if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
7699 inner_mat_type != inner_mat->type())
7702 inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
7703 inner_mat->getSuppliedItems().end());
7705 for (
const auto & inner_supplied_name : inner_supplied)
7706 prop_to_mat[inner_supplied_name].insert(inner_mat->name());
7710 std::set<std::string> intersection;
7711 std::set_intersection(outer_supplied.begin(),
7712 outer_supplied.end(),
7713 inner_supplied.begin(),
7714 inner_supplied.end(),
7715 std::inserter(intersection, intersection.end()));
7717 if (!intersection.empty())
7719 std::ostringstream oss;
7720 oss <<
"The following material properties are declared on block " << it.first
7721 <<
" by multiple materials:\n";
7723 <<
"Material Objects\n";
7724 for (
const auto & outer_name : intersection)
7727 for (
const auto & inner_name : prop_to_mat[outer_name])
7728 oss << inner_name <<
" ";
7750 mooseInfo(
"Restart file ", file_name,
" is NOT being used since we are performing recovery.");
7756 mooseInfo(
"Using ", file_name,
" for restart.");
7760 std::vector<VariableName>
7763 std::vector<VariableName> names;
7765 for (
auto & nl :
_nl)
7767 const std::vector<VariableName> & nl_var_names = nl->getVariableNames();
7768 names.insert(names.end(), nl_var_names.begin(), nl_var_names.end());
7771 const std::vector<VariableName> & aux_var_names =
_aux->getVariableNames();
7772 names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
7787 const PetscInt nfuncs,
7788 const PetscInt max_funcs,
7789 const Real initial_residual_before_preset_bcs,
7790 const Real div_threshold)
7792 TIME_SECTION(
"checkNonlinearConvergence", 5,
"Checking Nonlinear Convergence");
7828 std::ostringstream oss;
7831 oss <<
"Failed to converge, function norm is NaN\n";
7836 oss <<
"Converged due to function norm " << fnorm <<
" < " << abstol <<
'\n';
7839 else if (nfuncs >= max_funcs)
7841 oss <<
"Exceeded maximum number of function evaluations: " << nfuncs <<
" > " << max_funcs
7847 oss <<
"Nonlinear solve was blowing up!\n";
7856 ? initial_residual_before_preset_bcs
7860 else if (snorm < stol * xnorm)
7862 oss <<
"Converged due to small update length: " << snorm <<
" < " << stol <<
" * " << xnorm
7866 else if (divtol > 0 && fnorm > the_residual * divtol)
7868 oss <<
"Diverged due to initial residual " << the_residual <<
" > divergence tolerance " 7869 << divtol <<
" * initial residual " << the_residual <<
'\n';
7874 oss <<
"Diverged due to residual " << fnorm <<
" > absolute divergence tolerance " 7880 oss <<
"Diverged due to maximum nonlinear residual pingpong achieved" <<
'\n';
7898 const Real the_residual,
7901 std::ostringstream & oss)
7905 if (fnorm <= the_residual * rtol)
7907 oss <<
"Converged due to function norm " << fnorm <<
" < relative tolerance (" << rtol <<
")\n";
7931 auto random_data_ptr = insert_pair.first->second.get();
7941 bnd_mat_side_cache =
false;
7943 if (
_aux->needMaterialOnSide(bnd_id))
7945 bnd_mat_side_cache =
true;
7949 for (
auto & nl :
_nl)
7950 if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
7952 bnd_mat_side_cache =
true;
7963 bnd_mat_side_cache =
true;
7977 interface_mat_side_cache =
false;
7979 for (
auto & nl :
_nl)
7980 if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
7982 interface_mat_side_cache =
true;
7993 interface_mat_side_cache =
true;
7998 interface_mat_side_cache =
true;
8012 for (
auto & nl :
_nl)
8013 if (nl->needSubdomainMaterialOnSide(subdomain_id, tid))
8044 mooseError(
"Previous nonlinear solution is required but not added through " 8045 "Problem/previous_nl_solution_required=true");
8062 const std::string & object_name,
8065 parallel_object_only();
8072 mooseError(
"The name '", object_name,
"' is a reserved name for output objects");
8076 if (output_warehouse.
hasOutput(object_name))
8077 mooseError(
"An output object named '", object_name,
"' already exists");
8083 std::vector<std::string> exclude;
8084 if (object_type ==
"Console")
8086 exclude.push_back(
"execute_on");
8094 else if (object_type ==
"Checkpoint")
8095 exclude.push_back(
"execute_on");
8103 if (object_type ==
"XDR")
8105 else if (object_type ==
"XDA")
8109 if (object_name ==
"auto_recovery_checkpoint")
8114 logAdd(
"Output", object_name, object_type);
8129 mooseAssert(sys_num <
_nl.size(),
"System number greater than the number of nonlinear systems");
8130 return *
_nl[sys_num];
8136 return *
_nl[sys_num];
8154 parallel_object_only();
8198 const std::vector<Point> *
const pts,
8199 const std::vector<Real> *
const weights,
8211 unsigned int neighbor_side,
8214 const std::vector<Point> *
const pts,
8215 const std::vector<Real> *
const weights,
8219 neighbor_elem, neighbor_side, bnd_id, tolerance, pts, weights, tid);
8234 std::vector<std::shared_ptr<MaterialBase>> & face_materials,
8235 std::vector<std::shared_ptr<MaterialBase>> & neighbor_materials,
8236 std::set<MooseVariableFieldBase *> & variables,
8241 auto & this_face_mats =
8243 for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
8244 if (face_mat->ghostable())
8246 mooseAssert(!face_mat->hasStatefulProperties(),
8247 "Finite volume materials do not currently support stateful properties.");
8248 face_materials.push_back(face_mat);
8249 auto & var_deps = face_mat->getMooseVariableDependencies();
8250 for (
auto * var : var_deps)
8254 "Ghostable materials should only have finite volume variables coupled into them.");
8255 variables.insert(var);
8262 auto & this_neighbor_mats =
8264 for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
8265 if (neighbor_mat->ghostable())
8267 mooseAssert(!neighbor_mat->hasStatefulProperties(),
8268 "Finite volume materials do not currently support stateful properties.");
8269 neighbor_materials.push_back(neighbor_mat);
8271 auto & var_deps = neighbor_mat->getMooseVariableDependencies();
8272 for (
auto * var : var_deps)
8276 "Ghostable materials should only have finite volume variables coupled into them.");
8277 auto pr = variables.insert(var);
8278 mooseAssert(!pr.second,
8279 "We should not have inserted any new variables dependencies from our " 8280 "neighbor materials that didn't exist for our face materials");
8289 const unsigned int nqp,
8303 _nl[i]->residualSetup();
8317 _nl[i]->jacobianSetup();
8349 std::vector<MortarUserObject *>
8352 const bool displaced,
8353 const std::vector<MortarUserObject *> & mortar_uo_superset)
8355 std::vector<MortarUserObject *> mortar_uos;
8357 : static_cast<SubProblem *>(
this);
8358 for (
auto *
const obj : mortar_uo_superset)
8359 if (obj->onInterface(primary_boundary_id, secondary_boundary_id) &&
8360 (&obj->getSubProblem() == subproblem))
8361 mortar_uos.push_back(obj);
8366 std::vector<MortarUserObject *>
8369 const bool displaced)
8371 std::vector<MortarUserObject *> mortar_uos;
8375 .queryInto(mortar_uos);
8376 return getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced, mortar_uos);
8382 const bool displaced)
8384 const auto mortar_uos =
8386 for (
auto *
const mortar_uo : mortar_uos)
8388 mortar_uo->setNormals();
8389 mortar_uo->reinit();
8399 _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 std::string & name() const
Get the name of the object.
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.
virtual void addUserObject(const std::string &user_object_name, const std::string &name, InputParameters ¶meters)
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
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.
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.
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.
const std::string & _type
The type of this class.
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.