20 #include "libmesh/threads.h" 26 const std::set<TagID> & tags)
28 _fe_problem(fe_problem),
30 _aux_sys(fe_problem.getAuxiliarySystem()),
32 _nodal_kernels(nodal_kernels),
41 _fe_problem(x._fe_problem),
45 _nodal_kernels(x._nodal_kernels),
57 else if (
_tags.size() == 1)
66 const BndNode * bnode = *node_it;
71 for (
const auto & it : ce)
76 unsigned int ivar = ivariable.
number();
77 unsigned int jvar = jvariable.
number();
80 std::vector<std::shared_ptr<NodalKernelBase>> active_involved_kernels;
86 for (
const auto & nodal_kernel : objects)
88 if (nodal_kernel->variable().number() == ivar)
92 if (nodal_kernel->variable().number() == jvar)
94 active_involved_kernels.push_back(nodal_kernel);
99 const std::vector<MooseVariableFEBase *> & coupled_vars =
100 nodal_kernel->getCoupledMooseVars();
101 for (
const auto & var : coupled_vars)
103 if (var->number() == jvar)
105 active_involved_kernels.push_back(nodal_kernel);
114 if (!active_involved_kernels.empty())
122 Node * node = bnode->
_node;
126 for (
const auto & nodal_kernel : active_involved_kernels)
129 nodal_kernel->computeOffDiagJacobian(jvar);
140 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
160 console <<
"[DBG] Computing nodal kernel & boundary conditions contribution to the Jacobian on " 162 << execute_on << std::endl;
163 console <<
"[DBG] Ordering on boundaries 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...
NonlinearSystemBase & _nl
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
static const std::set< SubdomainID > undefined_subdomain_connection
A static member that can be used when the connection of a node to subdomains is unknown.
unsigned int number() const
Get variable number coming from libMesh.
virtual void pre() override
Called before the node range loop.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
FEProblemBase & _fe_problem
This class provides an interface for common operations on field variables of both FE and FV types wit...
AuxiliarySystem & _aux_sys
BoundaryID _bnd_id
boundary id for the node
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
Nonlinear system to be solved.
const std::set< TagID > & _tags
virtual void onNode(ConstBndNodeRange::const_iterator &node_it) override
Called for each node.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
void join(const ComputeNodalKernelBCJacobiansThread &)
boundary_id_type BoundaryID
unsigned int _num_cached
Number of contributions cached up.
MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given matrix tag...
unsigned int number() const
Gets the number of this system.
MooseObjectWarehouse< NodalKernelBase > * _nkernel_warehouse
libMesh::Node * _node
pointer to the node
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
virtual unsigned int numMatrixTags() const
The total number of tags.
void printGeneralExecutionInformation() const override
Print information about the loop, mostly order of execution of objects.
const ConsoleStream & console() const
Return console handle.
vec_type::const_iterator const_iterator
MooseObjectWarehouse< T > & getMatrixTagsObjectWarehouse(const std::set< TagID > &tags, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has one of the given matrix tags...
ComputeNodalKernelBCJacobiansThread(FEProblemBase &fe_problem, NonlinearSystemBase &nl, MooseObjectTagWarehouse< NodalKernelBase > &nodal_kernels, const std::set< TagID > &tags)
processor_id_type processor_id() const
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
MooseObjectTagWarehouse< NodalKernelBase > & _nodal_kernels
virtual void addCachedJacobian(const THREAD_ID tid) override