19 #include "libmesh/threads.h" 24 const std::set<TagID> & tags)
26 _fe_problem(fe_problem),
27 _aux_sys(fe_problem.getAuxiliarySystem()),
29 _nodal_kernels(nodal_kernels),
38 _fe_problem(x._fe_problem),
41 _nodal_kernels(x._nodal_kernels),
53 else if (
_tags.size() == 1)
62 const Node * node = *node_it;
64 std::set<const NodalKernelBase *> nks_executed;
73 for (
const auto block : block_ids)
76 std::set<TagID> needed_fe_var_vector_tags;
78 block, needed_fe_var_vector_tags,
_tid);
82 for (
const auto & nodal_kernel : objects)
83 if (nks_executed.emplace(nodal_kernel.get()).second)
85 nodal_kernel->setSubdomains(block_ids);
86 nodal_kernel->computeResidual();
95 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
113 console <<
"[DBG] Computing nodal kernels contribution to residual on nodes on " << execute_on
115 console <<
"[DBG] Nodes at boundaries between blocks will execute lower block ID first" 117 console <<
"[DBG] Ordering of the nodal kernels on nodes they are defined on:" << std::endl;
std::string activeObjectsToFormattedString(THREAD_ID tid=0, const std::string &prefix="[DBG]") const
Output the active content of the warehouse to a string, meant to be output to the console...
FEProblemBase & _fe_problem
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
virtual void reinitNode(const Node *node, const THREAD_ID tid) override
void join(const ComputeNodalKernelsThread &)
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
virtual void onNode(ConstNodeRange::const_iterator &node_it) override
MooseObjectWarehouse< T > & getVectorTagsObjectWarehouse(const std::set< TagID > &tags, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object at least has one of the given vector ta...
const std::set< SubdomainID > & getNodeBlockIds(const Node &node) const
Return list of blocks to which the given node belongs.
MooseObjectWarehouse< NodalKernelBase > * _nkernel_warehouse
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::set< TagID > & _tags
AuxiliarySystem & _aux_sys
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
ComputeNodalKernelsThread(FEProblemBase &fe_problem, MooseObjectTagWarehouse< NodalKernelBase > &nodal_kernels, const std::set< TagID > &tags)
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
virtual void pre() override
Called before the node range loop.
const ConsoleStream & console() const
Return console handle.
void updateBlockFEVariableCoupledVectorTagDependency(SubdomainID id, std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
Update FE variable coupleable vector tag vector.
bool hasActiveObjects(THREAD_ID tid=0) const
vec_type::const_iterator const_iterator
unsigned int _num_cached
Number of contributions cached up.
virtual unsigned int numVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
The total number of tags, which can be limited to the tag type.
MooseObjectWarehouse< T > & getVectorTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given vector tag...
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
void printGeneralExecutionInformation() const override
Print execution order of object types in the loop.
virtual void addCachedResidual(const THREAD_ID tid) override
MooseObjectTagWarehouse< NodalKernelBase > & _nodal_kernels