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);
158 console <<
"[DBG] Computing nodal kernel & boundary conditions contribution to the Jacobian on "
160 << execute_on << std::endl;
161 console <<
"[DBG] Ordering on boundaries they are defined on:" << std::endl;
boundary_id_type BoundaryID
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
unsigned int _num_cached
Number of contributions cached up.
virtual void onNode(ConstBndNodeRange::const_iterator &node_it) override
void printGeneralExecutionInformation() const override
Print information about the loop, mostly order of execution of objects.
const std::set< TagID > & _tags
NonlinearSystemBase & _nl
FEProblemBase & _fe_problem
virtual void pre() override
Called before the node range loop.
MooseObjectWarehouse< NodalKernelBase > * _nkernel_warehouse
void join(const ComputeNodalKernelBCJacobiansThread &)
AuxiliarySystem & _aux_sys
MooseObjectTagWarehouse< NodalKernelBase > & _nodal_kernels
ComputeNodalKernelBCJacobiansThread(FEProblemBase &fe_problem, NonlinearSystemBase &nl, MooseObjectTagWarehouse< NodalKernelBase > &nodal_kernels, const std::set< TagID > &tags)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void addCachedJacobian(const THREAD_ID tid) override
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
A storage container for MooseObjects that inherit from SetupInterface.
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.
MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given matrix tag.
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.
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
unsigned int number() const
Get variable number coming from libMesh.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Nonlinear system to be solved.
const ConsoleStream & console() const
Return console handle.
virtual unsigned int numMatrixTags() const
The total number of tags.
unsigned int number() const
Gets the number of this system.
processor_id_type processor_id() const
vec_type::const_iterator const_iterator
BoundaryID _bnd_id
boundary id for the node
libMesh::Node * _node
pointer to the node
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.