24 #include "libmesh/libmesh_exceptions.h" 25 #include "libmesh/elem.h" 31 class MooseVariableFVBase;
54 std::function<void()>
_f;
59 _f = std::move(other._f);
74 template <
typename RangeType>
79 const unsigned int nl_system_num,
80 const std::set<TagID> & tags,
87 virtual void operator()(
const RangeType & range,
bool bypass_threading =
false);
119 std::string what(e.
what());
182 template <
typename RangeType>
184 const unsigned int nl_system_num,
185 const std::set<TagID> & tags,
186 const bool on_displaced)
187 : _fe_problem(fe_problem),
188 _mesh(fe_problem.
mesh()),
190 _nl_system_num(nl_system_num),
191 _on_displaced(on_displaced),
192 _subproblem(_on_displaced ? static_cast<
SubProblem &>(*_fe_problem.getDisplacedProblem())
200 template <
typename RangeType>
202 : _fe_problem(x._fe_problem),
205 _nl_system_num(x._nl_system_num),
206 _on_displaced(x._on_displaced),
207 _subproblem(x._subproblem),
209 _incoming_throw_on_error(false)
213 template <
typename RangeType>
220 if (!_error_message.empty())
225 template <
typename RangeType>
239 template <
typename RangeType>
247 std::vector<FVKernel *> kernels;
248 _fe_problem.theWarehouse()
250 .template condition<AttribSysNum>(_nl_system_num)
251 .
template condition<AttribSystem>(
"FVFluxKernel")
252 .template condition<AttribDisplaced>(_on_displaced)
254 if (kernels.size() == 0)
262 _tid = bypass_threading ? 0 : puid.
id;
265 printGeneralExecutionInformation();
270 typename RangeType::const_iterator faceinfo = range.begin();
271 for (faceinfo = range.begin(); faceinfo != range.end(); ++faceinfo)
273 const Elem & elem = (*faceinfo)->elem();
275 _fe_problem.setCurrentSubdomainID(&elem, _tid);
277 _old_subdomain = _subdomain;
278 _subdomain = elem.subdomain_id();
279 if (_subdomain != _old_subdomain)
282 printBlockExecutionInformation();
285 _old_neighbor_subdomain = _neighbor_subdomain;
286 if (
const Elem *
const neighbor = (*faceinfo)->neighborPtr())
288 _fe_problem.setNeighborSubdomainID(neighbor, _tid);
289 _neighbor_subdomain = neighbor->subdomain_id();
294 if (_neighbor_subdomain != _old_neighbor_subdomain)
296 neighborSubdomainChanged();
298 printBlockExecutionInformation();
306 postFace(**faceinfo);
308 const std::set<BoundaryID> boundary_ids = (*faceinfo)->boundaryIDs();
309 for (
auto & it : boundary_ids)
311 printBoundaryExecutionInformation(it);
315 postFace(**faceinfo);
321 resetExecutionPrinting();
323 catch (MetaPhysicL::LogicError & e)
327 catch (std::exception & e)
331 if (!strstr(e.what(),
"Jacobian") && !strstr(e.what(),
"singular") &&
332 !strstr(e.what(),
"det != 0"))
335 mooseException(
"We caught a libMesh degeneracy exception in ComputeFVFluxThread:\n",
341 caughtMooseException(e);
343 catch (std::runtime_error & e)
345 _error_message = e.what();
352 template <
typename RangeType,
typename AttributeTagType>
357 const unsigned int nl_system_num,
358 const std::set<TagID> & tags,
366 virtual void pre()
override;
367 virtual void post()
override;
420 std::pair<SubdomainName, SubdomainName>
getBlockNames()
const;
446 template <
typename RangeType,
typename AttributeTagType>
448 unsigned int nl_system_num,
449 const std::set<TagID> & tags,
451 :
ThreadedFaceLoop<RangeType>(fe_problem, nl_system_num, tags, on_displaced),
452 _scaling_jacobian(fe_problem.computingScalingJacobian()),
453 _scaling_residual(fe_problem.computingScalingResidual())
457 template <
typename RangeType,
typename AttributeTagType>
461 _fv_vars(x._fv_vars),
462 _scaling_jacobian(x._scaling_jacobian),
463 _scaling_residual(x._scaling_residual)
467 template <
typename RangeType,
typename AttributeTagType>
472 template <
typename RangeType,
typename AttributeTagType>
480 this->_subproblem.reinitFVFace(_tid, fi);
494 for (
auto var : _fv_vars)
495 var->computeFaceValues(fi);
499 for (std::shared_ptr<MaterialBase> mat : _elem_face_mats)
501 mat->setFaceInfo(fi);
502 mat->computeProperties();
507 _fe_problem.resizeMaterialData(
510 for (std::shared_ptr<MaterialBase> mat : _neigh_face_mats)
512 mat->setFaceInfo(fi);
513 mat->computeProperties();
518 template <
typename RangeType,
typename AttributeTagType>
524 for (
auto *
const k : _fv_flux_kernels)
528 template <
typename RangeType,
typename AttributeTagType>
532 if (_scaling_jacobian || _scaling_residual)
535 std::vector<FVFluxBC *> bcs;
536 _fe_problem.theWarehouse()
538 .template condition<AttribSysNum>(_nl_system_num)
539 .
template condition<AttribSystem>(
"FVFluxBC")
540 .template condition<AttribDisplaced>(_on_displaced)
541 .
template condition<AttribThread>(_tid)
542 .template condition<AttributeTagType>(_tags)
543 .
template condition<AttribBoundaries>(bnd_id)
546 for (
auto *
const bc : bcs)
549 std::vector<FVInterfaceKernel *> iks;
550 _fe_problem.theWarehouse()
552 .template condition<AttribSysNum>(_nl_system_num)
553 .
template condition<AttribSystem>(
"FVInterfaceKernel")
554 .template condition<AttribDisplaced>(_on_displaced)
555 .
template condition<AttribThread>(_tid)
556 .template condition<AttributeTagType>(_tags)
557 .
template condition<AttribBoundaries>(bnd_id)
560 for (
auto *
const ik : iks)
564 template <
typename RangeType,
typename AttributeTagType>
569 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
572 _fe_problem.clearActiveElementalMooseVariables(_tid);
573 _fe_problem.clearActiveMaterialProperties(_tid);
576 template <
typename RangeType,
typename AttributeTagType>
583 std::set_union(_elem_sub_fv_vars.begin(),
584 _elem_sub_fv_vars.end(),
585 _neigh_sub_fv_vars.begin(),
586 _neigh_sub_fv_vars.end(),
587 std::inserter(_fv_vars, _fv_vars.begin()));
592 const bool same_kernels = _elem_sub_fv_flux_kernels == _neigh_sub_fv_flux_kernels;
594 _fv_flux_kernels = _elem_sub_fv_flux_kernels;
596 std::set_union(_elem_sub_fv_flux_kernels.begin(),
597 _elem_sub_fv_flux_kernels.end(),
598 _neigh_sub_fv_flux_kernels.begin(),
599 _neigh_sub_fv_flux_kernels.end(),
600 std::inserter(_fv_flux_kernels, _fv_flux_kernels.begin()));
601 const bool need_ghosting = !same_kernels;
606 _elem_face_mats = _elem_sub_elem_face_mats;
611 for (std::shared_ptr<MaterialBase> neigh_sub_elem_face_mat : _neigh_sub_elem_face_mats)
612 if (
std::find(_elem_sub_elem_face_mats.begin(),
613 _elem_sub_elem_face_mats.end(),
614 neigh_sub_elem_face_mat) == _elem_sub_elem_face_mats.end())
615 _elem_face_mats.push_back(neigh_sub_elem_face_mat);
620 _neigh_face_mats = _neigh_sub_neigh_face_mats;
625 for (std::shared_ptr<MaterialBase> elem_sub_neigh_face_mat : _elem_sub_neigh_face_mats)
626 if (
std::find(_neigh_sub_neigh_face_mats.begin(),
627 _neigh_sub_neigh_face_mats.end(),
628 elem_sub_neigh_face_mat) == _neigh_sub_neigh_face_mats.end())
629 _neigh_face_mats.push_back(elem_sub_neigh_face_mat);
632 template <
typename RangeType,
typename AttributeTagType>
640 _elem_sub_fv_vars.clear();
643 _fv_flux_kernels.clear();
644 _elem_sub_fv_flux_kernels.clear();
647 _elem_face_mats.clear();
648 _elem_sub_elem_face_mats.clear();
651 _neigh_face_mats.clear();
652 _elem_sub_neigh_face_mats.clear();
658 std::vector<FVFluxKernel *> kernels;
659 _fe_problem.theWarehouse()
661 .template condition<AttribSysNum>(_nl_system_num)
662 .
template condition<AttribSystem>(
"FVFluxKernel")
663 .template condition<AttribDisplaced>(_on_displaced)
664 .
template condition<AttribSubdomains>(_subdomain)
665 .template condition<AttribThread>(_tid)
666 .
template condition<AttributeTagType>(_tags)
669 _elem_sub_fv_flux_kernels = std::set<FVFluxKernel *>(kernels.begin(), kernels.end());
671 for (
auto * k : _elem_sub_fv_flux_kernels)
677 const auto & deps = k->getMooseVariableDependencies();
678 for (
auto var : deps)
680 mooseAssert(var->isFV(),
681 "We do not currently support coupling of FE variables into FV objects");
682 _elem_sub_fv_vars.insert(var);
686 _fe_problem.getFVMatsAndDependencies(
687 _subdomain, _elem_sub_elem_face_mats, _elem_sub_neigh_face_mats, _elem_sub_fv_vars, _tid);
689 finalizeContainers();
692 template <
typename RangeType,
typename AttributeTagType>
700 _neigh_sub_fv_vars.clear();
703 _fv_flux_kernels.clear();
704 _neigh_sub_fv_flux_kernels.clear();
707 _elem_face_mats.clear();
708 _neigh_sub_elem_face_mats.clear();
711 _neigh_face_mats.clear();
712 _neigh_sub_neigh_face_mats.clear();
718 std::vector<FVFluxKernel *> kernels;
719 _fe_problem.theWarehouse()
721 .template condition<AttribSysNum>(_nl_system_num)
722 .
template condition<AttribSystem>(
"FVFluxKernel")
723 .template condition<AttribDisplaced>(_on_displaced)
724 .
template condition<AttribSubdomains>(_neighbor_subdomain)
725 .template condition<AttribThread>(_tid)
726 .
template condition<AttributeTagType>(_tags)
729 _neigh_sub_fv_flux_kernels = std::set<FVFluxKernel *>(kernels.begin(), kernels.end());
731 for (
auto * k : _neigh_sub_fv_flux_kernels)
737 const auto & deps = k->getMooseVariableDependencies();
738 for (
auto var : deps)
740 mooseAssert(var->isFV(),
741 "We do not currently support coupling of FE variables into FV objects");
742 _neigh_sub_fv_vars.insert(var);
746 _fe_problem.getFVMatsAndDependencies(_neighbor_subdomain,
747 _neigh_sub_elem_face_mats,
748 _neigh_sub_neigh_face_mats,
752 finalizeContainers();
755 template <
typename RangeType,
typename AttributeTagType>
759 std::vector<FVFluxBC *> bcs;
760 _fe_problem.theWarehouse()
762 .template condition<AttribSysNum>(_nl_system_num)
763 .
template condition<AttribSystem>(
"FVFluxBC")
764 .template condition<AttribDisplaced>(_on_displaced)
765 .
template condition<AttribThread>(_tid)
766 .template condition<AttributeTagType>(_tags)
769 std::vector<FVInterfaceKernel *> iks;
770 _fe_problem.theWarehouse()
772 .template condition<AttribSysNum>(_nl_system_num)
773 .
template condition<AttribSystem>(
"FVInterfaceKernel")
774 .template condition<AttribDisplaced>(_on_displaced)
775 .
template condition<AttribThread>(_tid)
776 .template condition<AttributeTagType>(_tags)
779 std::vector<FVFluxKernel *> kernels;
780 _fe_problem.theWarehouse()
782 .template condition<AttribSysNum>(_nl_system_num)
783 .
template condition<AttribSystem>(
"FVFluxKernel")
784 .template condition<AttribDisplaced>(_on_displaced)
785 .
template condition<AttribThread>(_tid)
786 .template condition<AttributeTagType>(_tags)
789 for (
auto *
const bc : bcs)
791 for (
auto *
const ik : iks)
793 for (
auto *
const kernel : kernels)
798 _elem_sub_fv_vars.clear();
799 _neigh_sub_fv_vars.clear();
802 _fv_flux_kernels.clear();
803 _elem_sub_fv_flux_kernels.clear();
804 _neigh_sub_fv_flux_kernels.clear();
807 _elem_face_mats.clear();
808 _elem_sub_elem_face_mats.clear();
809 _neigh_sub_elem_face_mats.clear();
812 _neigh_face_mats.clear();
813 _elem_sub_neigh_face_mats.clear();
814 _neigh_sub_neigh_face_mats.clear();
817 template <
typename RangeType>
822 const unsigned int nl_system_num,
823 const std::set<TagID> & tags,
841 template <
typename RangeType>
844 const unsigned int nl_system_num,
845 const std::set<TagID> & tags,
851 template <
typename RangeType>
858 template <
typename RangeType>
864 this->_subproblem.SubProblem::cacheResidual(_tid);
865 this->_subproblem.SubProblem::cacheResidualNeighbor(_tid);
867 this->_subproblem.SubProblem::addCachedResidual(_tid);
870 template <
typename RangeType>
875 const unsigned int nl_system_num,
876 const std::set<TagID> & tags,
892 template <
typename RangeType>
895 const unsigned int nl_system_num,
896 const std::set<TagID> & tags,
902 template <
typename RangeType>
909 template <
typename RangeType>
917 if (_num_cached % 20 == 0)
919 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
920 this->_subproblem.SubProblem::addCachedJacobian(_tid);
924 template <
typename RangeType>
929 const unsigned int nl_system_num,
930 const std::set<TagID> & vector_tags,
931 const std::set<TagID> & ,
954 template <
typename RangeType>
956 const unsigned int nl_system_num,
957 const std::set<TagID> & vector_tags,
958 const std::set<TagID> & ,
961 fe_problem, nl_system_num, vector_tags, on_displaced)
965 template <
typename RangeType>
972 template <
typename RangeType>
978 this->_subproblem.SubProblem::cacheResidual(_tid);
979 this->_subproblem.SubProblem::cacheResidualNeighbor(_tid);
983 if (_num_cached % 20 == 0)
985 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
986 this->_subproblem.SubProblem::addCachedResidual(_tid);
987 this->_subproblem.SubProblem::addCachedJacobian(_tid);
991 template <
typename RangeType,
typename AttributeTagType>
995 if (!_fe_problem.shouldPrintExecution(_tid))
997 auto & console = _fe_problem.console();
998 auto execute_on = _fe_problem.getCurrentExecuteOnFlag();
999 console <<
"[DBG] Beginning finite volume flux objects loop on " << execute_on << std::endl;
1000 mooseDoOnce(console <<
"[DBG] Loop on faces (FaceInfo), objects ordered on each face: " 1002 console <<
"[DBG] - (finite volume) flux kernels" << std::endl;
1003 console <<
"[DBG] - (finite volume) flux boundary conditions" << std::endl;
1004 console <<
"[DBG] - (finite volume) interface kernels" << std::endl;);
1007 template <
typename RangeType,
typename AttributeTagType>
1011 if (!_fe_problem.shouldPrintExecution(_tid) || !_fv_flux_kernels.size())
1015 const auto block_pair = std::make_pair(_subdomain, _neighbor_subdomain);
1016 const auto block_pair_names = this->getBlockNames();
1017 if (_blocks_exec_printed.count(block_pair))
1019 auto & console = _fe_problem.console();
1020 console <<
"[DBG] Flux kernels on block " << block_pair_names.first;
1022 console <<
" and neighbor " << block_pair_names.second << std::endl;
1024 console <<
" with no neighbor block" << std::endl;
1027 std::vector<MooseObject *> fv_flux_kernels;
1028 for (
const auto & fv_kernel : _fv_flux_kernels)
1029 fv_flux_kernels.push_back(dynamic_cast<MooseObject *>(fv_kernel));
1033 _blocks_exec_printed.insert(block_pair);
1036 template <
typename RangeType,
typename AttributeTagType>
1041 if (!_fe_problem.shouldPrintExecution(_tid))
1043 if (_boundaries_exec_printed.count(bnd_id))
1045 std::vector<MooseObject *> bcs;
1046 _fe_problem.theWarehouse()
1048 .template condition<AttribSystem>(
"FVFluxBC")
1049 .
template condition<AttribDisplaced>(_on_displaced)
1050 .template condition<AttribThread>(_tid)
1051 .
template condition<AttributeTagType>(_tags)
1052 .template condition<AttribBoundaries>(bnd_id)
1055 std::vector<MooseObject *> iks;
1056 _fe_problem.theWarehouse()
1058 .template condition<AttribSystem>(
"FVInterfaceKernel")
1059 .
template condition<AttribDisplaced>(_on_displaced)
1060 .template condition<AttribThread>(_tid)
1061 .
template condition<AttributeTagType>(_tags)
1062 .template condition<AttribBoundaries>(bnd_id)
1065 const auto block_pair_names = this->getBlockNames();
1068 auto & console = _fe_problem.console();
1069 console <<
"[DBG] FVBCs on boundary " << bnd_id <<
" between subdomain " 1070 << block_pair_names.first;
1072 console <<
" and neighbor " << block_pair_names.second << std::endl;
1074 console <<
" and the exterior of the mesh " << std::endl;
1080 auto & console = _fe_problem.console();
1081 console <<
"[DBG] FVIKs on boundary " << bnd_id <<
" between subdomain " 1082 << block_pair_names.first;
1084 console <<
" and neighbor " << block_pair_names.second << std::endl;
1086 console <<
" and the exterior of the mesh " << std::endl;
1090 _boundaries_exec_printed.insert(bnd_id);
1093 template <
typename RangeType,
typename AttributeTagType>
1094 std::pair<SubdomainName, SubdomainName>
1097 auto block_names = std::make_pair(_mesh.getSubdomainName(_subdomain),
1098 _mesh.getSubdomainName(_neighbor_subdomain));
1099 if (block_names.first ==
"")
1101 if (block_names.second ==
"")
void setup(SetupInterface &obj) override
call either residualSetup or jacobianSetup depending on what derived class of this class is instantia...
void compute(FVFaceResidualObject &ro, const FaceInfo &fi) override
call either computeResidual, computeJacobian, or computeResidualAndJacobian on the provided residual ...
virtual ~ComputeFVFluxThread()
virtual void post() override
This is called once after all face-looping is finished.
void postFace(const FaceInfo &fi) override
This is called once for each face after all face and boundary callbacks have been finished for that f...
std::vector< std::shared_ptr< MaterialBase > > _neigh_face_mats
const bool _incoming_throw_on_error
The value of Moose::_throw_on_error at the time of construction.
std::string mooseObjectVectorToString(const std::vector< MooseObject *> &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
virtual void neighborSubdomainChanged() override
Called every time the neighbor subdomain changes (i.e.
virtual void computeResidualAndJacobian(const FaceInfo &fi)=0
Compute the residual and Jacobian on the supplied face.
void setup(SetupInterface &obj) override
call either residualSetup or jacobianSetup depending on what derived class of this class is instantia...
const unsigned int _nl_system_num
std::set< FVFluxKernel * > _neigh_sub_fv_flux_kernels
ComputeFVFluxRJThread(FEProblemBase &fe_problem, const unsigned int nl_system_num, const std::set< TagID > &vector_tags, const std::set< TagID > &, bool on_displaced)
virtual const char * what() const
Get out the error message.
std::vector< std::shared_ptr< MaterialBase > > _neigh_sub_neigh_face_mats
std::string _error_message
Holds caught runtime error messages.
std::set< BoundaryID > _boundaries_exec_printed
Set to keep track of boundaries for which we have printed the execution pattern.
virtual void computeResidual(const FaceInfo &fi)=0
Compute the residual on the supplied face.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::vector< std::shared_ptr< MaterialBase > > _elem_sub_neigh_face_mats
virtual void computeJacobian(const FaceInfo &fi)=0
Compute the jacobian on the supplied face.
const bool _zeroth_copy
Whether this is the zeroth threaded copy of this body.
void compute(FVFaceResidualObject &ro, const FaceInfo &fi) override
call either computeResidual, computeJacobian, or computeResidualAndJacobian on the provided residual ...
FEProblemBase & _fe_problem
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
SubdomainID _subdomain
The subdomain for the current element.
virtual void postFace(const FaceInfo &)
This is called once for each face after all face and boundary callbacks have been finished for that f...
virtual void printBoundaryExecutionInformation(const BoundaryID bnd_id) const override
Print ordering of objects exected on each boundary.
void resetExecutionPrinting()
Reset lists of blocks and boundaries for which execution printing has been done.
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
std::vector< std::shared_ptr< MaterialBase > > _neigh_sub_elem_face_mats
std::set< MooseVariableFieldBase * > _neigh_sub_fv_vars
Interface class for a finite volume residual object whose residuals are based on faces.
void postFace(const FaceInfo &fi) override
This is called once for each face after all face and boundary callbacks have been finished for that f...
virtual void onBoundary(const FaceInfo &fi, BoundaryID boundary) override
This is called once for every face that is on a boundary after onFace is called for the face...
void compute(FVFaceResidualObject &ro, const FaceInfo &fi) override
call either computeResidual, computeJacobian, or computeResidualAndJacobian on the provided residual ...
ThreadedFaceLoop(FEProblemBase &fe_problem, const unsigned int nl_system_num, const std::set< TagID > &tags, bool on_displaced)
ComputeFVFluxThread(FEProblemBase &fe_problem, const unsigned int nl_system_num, const std::set< TagID > &tags, bool on_displaced)
virtual void post()
This is called once after all face-looping is finished.
virtual void printBoundaryExecutionInformation(const BoundaryID) const
Print ordering of objects exected on each boundary.
std::function< void()> _f
std::pair< SubdomainName, SubdomainName > getBlockNames() const
Utility to get the subdomain names from the ids.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void compute(FVFaceResidualObject &ro, const FaceInfo &fi)=0
call either computeResidual, computeJacobian, or computeResidualAndJacobian on the provided residual ...
const std::set< TagID > & _tags
SubdomainID _neighbor_subdomain
The subdomain for the current neighbor.
const SubdomainID INVALID_BLOCK_ID
virtual void neighborSubdomainChanged()
Called every time the neighbor subdomain changes (i.e.
virtual void onBoundary(const FaceInfo &fi, BoundaryID boundary)=0
This is called once for every face that is on a boundary after onFace is called for the face...
This data structure is used to store geometric and variable related metadata about each cell face in ...
Base class for assembly-like calculations.
const Elem * neighborPtr() const
ComputeFVFluxResidualThread(FEProblemBase &fe_problem, const unsigned int nl_system_num, const std::set< TagID > &tags, bool on_displaced)
virtual ~ThreadedFaceLoop()
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
boundary_id_type BoundaryID
This works like the Sentinel helper classes in MOOSE, except it is more flexible and concise to use...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
ComputeFVFluxJacobianThread(FEProblemBase &fe_problem, const unsigned int nl_system_num, const std::set< TagID > &tags, bool on_displaced)
OnScopeExit(OnScopeExit &&other)
std::vector< std::shared_ptr< MaterialBase > > _elem_face_mats
Element face materials.
SubProblem & _subproblem
FEProblemBase or DisplacedProblem depending on _on_displaced.
virtual void printGeneralExecutionInformation() const
Print list of object types executed and in which order.
std::vector< std::shared_ptr< MaterialBase > > _elem_sub_elem_face_mats
std::string stringify(const T &t)
conversion to string
virtual void pre()
This is called once before all face-looping.
virtual void onFace(const FaceInfo &fi)=0
virtual void printGeneralExecutionInformation() const override
Print list of object types executed and in which order.
std::set< FVFluxKernel * > _fv_flux_kernels
FVFluxKernels.
std::set< MooseVariableFieldBase * > _elem_sub_fv_vars
virtual void operator()(const RangeType &range, bool bypass_threading=false)
std::set< MooseVariableFieldBase * > _fv_vars
Variables.
bool onBoundary(const SubdomainRestrictable &obj, const FaceInfo &fi)
Return whether the supplied face is on a boundary of the object's execution.
std::set< FVFluxKernel * > _elem_sub_fv_flux_kernels
void postFace(const FaceInfo &fi) override
This is called once for each face after all face and boundary callbacks have been finished for that f...
This loops over a set of mesh faces (i.e.
void addCached() override
call either addCachedJacobian or addCachedResidual or both depending on what derived class of this cl...
Provides a way for users to bail out of the current solve.
virtual void setup(SetupInterface &obj)=0
call either residualSetup or jacobianSetup depending on what derived class of this class is instantia...
void setup(SetupInterface &obj) override
call either residualSetup or jacobianSetup depending on what derived class of this class is instantia...
Generic class for solving transient nonlinear problems.
void caughtMooseException(MooseException &e)
Called if a MooseException is caught anywhere during the computation.
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
const bool _scaling_residual
void finalizeContainers()
OnScopeExit & operator=(OnScopeExit &&other)
void setup(EquationSystems &systems, Mesh &mesh, GetPot &args)
virtual void subdomainChanged()
Called every time the current subdomain changes (i.e.
const bool _on_displaced
Whether this loop is operating on the displaced mesh.
static Threads::spin_mutex threaded_element_mutex
This mutex is used by all derived classes of the ThreadedElementLoop.
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
virtual void onFace(const FaceInfo &fi) override
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void join(const ThreadedFaceLoop &y)
void addCached() override
call either addCachedJacobian or addCachedResidual or both depending on what derived class of this cl...
const bool _scaling_jacobian
void reinitVariables(const FaceInfo &fi)
virtual void printBlockExecutionInformation() const
Print ordering of objects executed on each block.
virtual void addCached()=0
call either addCachedJacobian or addCachedResidual or both depending on what derived class of this cl...
virtual void jacobianSetup()
Gets called just before the Jacobian is computed and before this object is asked to do its job...
virtual void pre() override
This is called once before all face-looping.
OnScopeExit(std::function< void()> f) noexcept
virtual void residualSetup()
Gets called just before the residual is computed and before this object is asked to do its job...
virtual void printBlockExecutionInformation() const override
Print ordering of objects executed on each block.
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
std::set< std::pair< const SubdomainID, const SubdomainID > > _blocks_exec_printed
Set to keep track of blocks for which we have printed the execution pattern.
SubdomainID _old_subdomain
The subdomain for the last element.
SubdomainID _old_neighbor_subdomain
The subdomain for the last neighbor.
virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
void addCached() override
call either addCachedJacobian or addCachedResidual or both depending on what derived class of this cl...