www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeJacobianThread Class Reference

#include <ComputeJacobianThread.h>

Inheritance diagram for ComputeJacobianThread:
[legend]

Public Member Functions

 ComputeJacobianThread (FEProblemBase &fe_problem, const std::set< TagID > &tags)
 
 ComputeJacobianThread (ComputeJacobianThread &x, Threads::split split)
 
virtual ~ComputeJacobianThread ()
 
virtual void postElement (const Elem *) override
 Called after the element assembly is done (including surface assembling) More...
 
void join (const ComputeJacobianThread &)
 
virtual void operator() (const ConstElemRange &range, bool bypass_threading=false) override
 
virtual void subdomainChanged () override
 Called every time the current subdomain changes (i.e. More...
 
virtual void onElement (const Elem *elem) override
 Assembly of the element (not including surface assembly) More...
 
virtual void onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
 Called when doing boundary assembling. More...
 
virtual void onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id) override
 Called when doing interface assembling. More...
 
virtual void onInternalSide (const Elem *elem, unsigned int side) override
 Called when doing internal edge assembling. More...
 
virtual void post () override
 Called after the element range loop. More...
 
virtual void caughtMooseException (MooseException &e) override
 Called if a MooseException is caught anywhere during the computation. More...
 
virtual bool keepGoing () override
 Whether or not the loop should continue. More...
 
virtual void preElement (const Elem *elem) override
 Called before the element assembly. More...
 
virtual void preInternalSide (const Elem *elem, unsigned int side) override
 Called before evaluations on an element internal side. More...
 
virtual void preBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
 Called before the boundary assembly. More...
 
virtual void neighborSubdomainChanged () override
 Called every time the neighbor subdomain changes (i.e. More...
 
virtual void pre ()
 Called before the element range loop. More...
 
virtual void postInternalSide (const Elem *elem, unsigned int side)
 Called after evaluations on an element internal side. More...
 

Protected Member Functions

void determineObjectWarehouses () override
 Determine the objects we will actually compute based on vector/matrix tag information. More...
 
void accumulateNeighbor () override
 Add neighbor residual/Jacobian into assembly global data. More...
 
virtual void accumulateNeighborLower () override
 Add neighbor and lower residual/Jacobian into assembly global data. More...
 
virtual void accumulateLower () override
 Add lower-d residual/Jacobian into assembly global data. More...
 
virtual void accumulate () override
 Add element residual/Jacobian into assembly global data. More...
 
virtual void compute (ResidualObject &) override
 Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived class. More...
 
void compute (KernelBase &kernel) override
 
void compute (FVElementalKernel &kernel) override
 
void compute (IntegratedBCBase &bc) override
 
void compute (DGKernelBase &dg, const Elem *neighbor) override
 
void compute (InterfaceKernelBase &ik) override
 
std::string objectType () const override
 Return what the loops is meant to compute. More...
 
void printGeneralExecutionInformation () const override
 Print information about the loop, mostly order of execution of objects. More...
 
void printBlockExecutionInformation () const override
 Print list of specific objects executed on each block and in which order. More...
 
void printBoundaryExecutionInformation (const unsigned int bid) const override
 Print list of specific objects executed on each boundary and in which order. More...
 
void printExecutionOrdering (const std::vector< T * > &objs, const bool print_header=true, const std::string &line_prefix="[DBG]") const
 Routine to output the ordering of objects within a vector of pointers to these objects. More...
 
void printExecutionOrdering (const std::vector< std::shared_ptr< T >> &objs_ptrs, const bool print_header=true, const std::string &line_prefix="[DBG]") const
 
void resetExecPrintedSets () const
 Resets the set of blocks and boundaries visited. More...
 
virtual void computeOnElement ()
 
virtual void computeOnBoundary (BoundaryID bnd_id, const Elem *lower_d_elem)
 
virtual void computeOnInterface (BoundaryID bnd_id)
 
virtual void computeOnInternalFace (const Elem *neighbor)
 

Protected Attributes

const std::set< TagID > & _tags
 
NonlinearSystemBase_nl
 
unsigned int _num_cached
 
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
 Reference to BC storage structures. More...
 
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
 
MooseObjectTagWarehouse< DGKernelBase > & _dg_kernels
 Reference to DGKernel storage structure. More...
 
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse
 
MooseObjectTagWarehouse< InterfaceKernelBase > & _interface_kernels
 Reference to interface kernel storage structure. More...
 
MooseObjectWarehouse< InterfaceKernelBase > * _ik_warehouse
 
std::vector< FVElementalKernel * > _fv_kernels
 Current subdomain FVElementalKernels. More...
 
const bool _has_active_objects
 Whether there are any active residual objects; otherwise we will do an early return. More...
 
FEProblemBase_fe_problem
 
MooseMesh_mesh
 
THREAD_ID _tid
 
SubdomainID _subdomain
 The subdomain for the current element. More...
 
SubdomainID _old_subdomain
 The subdomain for the last element. More...
 
SubdomainID _neighbor_subdomain
 The subdomain for the current neighbor. More...
 
SubdomainID _old_neighbor_subdomain
 The subdomain for the last neighbor. More...
 
std::set< SubdomainID_blocks_exec_printed
 Keep track of which blocks were visited. More...
 
std::set< BoundaryID_boundaries_exec_printed
 Keep track of which boundaries were visited. More...
 
MooseObjectTagWarehouse< KernelBase > & _kernels
 
MooseObjectWarehouse< KernelBase > * _tag_kernels
 

Detailed Description

Definition at line 26 of file ComputeJacobianThread.h.

Constructor & Destructor Documentation

◆ ComputeJacobianThread() [1/2]

ComputeJacobianThread::ComputeJacobianThread ( FEProblemBase fe_problem,
const std::set< TagID > &  tags 
)

Definition at line 26 of file ComputeJacobianThread.C.

28  : NonlinearThread(fe_problem), _tags(tags)
29 {
30 }
const std::set< TagID > & _tags
NonlinearThread(FEProblemBase &fe_problem)

◆ ComputeJacobianThread() [2/2]

ComputeJacobianThread::ComputeJacobianThread ( ComputeJacobianThread x,
Threads::split  split 
)

Definition at line 33 of file ComputeJacobianThread.C.

35 {
36 }
const std::set< TagID > & _tags
NonlinearThread(FEProblemBase &fe_problem)
tbb::split split

◆ ~ComputeJacobianThread()

ComputeJacobianThread::~ComputeJacobianThread ( )
virtual

Definition at line 38 of file ComputeJacobianThread.C.

38 {}

Member Function Documentation

◆ accumulate()

virtual void ComputeJacobianThread::accumulate ( )
inlineoverrideprotectedvirtual

Add element residual/Jacobian into assembly global data.

Implements NonlinearThread.

Definition at line 47 of file ComputeJacobianThread.h.

47 {};

◆ accumulateLower()

void ComputeJacobianThread::accumulateLower ( )
overrideprotectedvirtual

Add lower-d residual/Jacobian into assembly global data.

Implements NonlinearThread.

Definition at line 129 of file ComputeJacobianThread.C.

130 {
132 }
virtual void addJacobianLowerD(const THREAD_ID tid) override

◆ accumulateNeighbor()

void ComputeJacobianThread::accumulateNeighbor ( )
overrideprotectedvirtual

Add neighbor residual/Jacobian into assembly global data.

Implements NonlinearThread.

Definition at line 141 of file ComputeJacobianThread.C.

142 {
144 }
virtual void addJacobianNeighbor(const THREAD_ID tid) override

◆ accumulateNeighborLower()

void ComputeJacobianThread::accumulateNeighborLower ( )
overrideprotectedvirtual

Add neighbor and lower residual/Jacobian into assembly global data.

Implements NonlinearThread.

Definition at line 135 of file ComputeJacobianThread.C.

136 {
138 }
virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override

◆ caughtMooseException()

void ThreadedElementLoop< ConstElemRange >::caughtMooseException ( MooseException e)
overridevirtualinherited

Called if a MooseException is caught anywhere during the computation.

The single input parameter taken is a MooseException object.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 101 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

102 {
103  Threads::spin_mutex::scoped_lock lock(threaded_element_mutex);
104 
105  std::string what(e.what());
107 }
virtual const char * what() const
Get out the error message.
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
static Threads::spin_mutex threaded_element_mutex
This mutex is used by all derived classes of the ThreadedElementLoop.

◆ compute() [1/6]

virtual void ComputeJacobianThread::compute ( ResidualObject ro)
inlineoverrideprotectedvirtual

Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived class.

Implements NonlinearThread.

Definition at line 49 of file ComputeJacobianThread.h.

49 { mooseError("Not implemented"); };
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284

◆ compute() [2/6]

void ComputeJacobianThread::compute ( KernelBase kernel)
overrideprotectedvirtual

Defaults to forwarding to the residual object class

Reimplemented from NonlinearThread.

Definition at line 41 of file ComputeJacobianThread.C.

42 {
43  if (kernel.isImplicit())
44  {
45  kernel.prepareShapes(kernel.variable().number());
46  kernel.computeJacobian();
48  mooseError("Nonlocal kernels only supported for non-diagonal coupling. Please specify an SMP "
49  "preconditioner, with appropriate row-column coupling or specify full = true.");
50  }
51 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
unsigned int number() const
Get variable number coming from libMesh.
virtual void prepareShapes(unsigned int var_num)
Prepare shape functions.
void computingScalingJacobian(bool computing_scaling_jacobian)
Setter for whether we&#39;re computing the scaling jacobian.
virtual bool checkNonlocalCouplingRequirement()
Definition: SubProblem.h:88
virtual void computeJacobian()=0
Compute this object&#39;s contribution to the diagonal Jacobian entries.
virtual const MooseVariableBase & variable() const =0
Returns the variable that this object operates on.

◆ compute() [3/6]

void ComputeJacobianThread::compute ( FVElementalKernel kernel)
overrideprotectedvirtual

Reimplemented from NonlinearThread.

Definition at line 54 of file ComputeJacobianThread.C.

55 {
56  if (fvkernel.isImplicit())
57  fvkernel.computeJacobian();
58 }

◆ compute() [4/6]

void ComputeJacobianThread::compute ( IntegratedBCBase bc)
overrideprotectedvirtual

Reimplemented from NonlinearThread.

Definition at line 61 of file ComputeJacobianThread.C.

62 {
63  if (bc.shouldApply() && bc.isImplicit())
64  {
65  bc.prepareShapes(bc.variable().number());
66  bc.computeJacobian();
68  mooseError("Nonlocal boundary conditions only supported for non-diagonal coupling. Please "
69  "specify an SMP preconditioner, with appropriate row-column coupling or specify "
70  "full = true.");
71  }
72 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
unsigned int number() const
Get variable number coming from libMesh.
void computingScalingJacobian(bool computing_scaling_jacobian)
Setter for whether we&#39;re computing the scaling jacobian.
virtual bool checkNonlocalCouplingRequirement()
Definition: SubProblem.h:88
virtual void computeJacobian()=0
Compute this object&#39;s contribution to the diagonal Jacobian entries.
void prepareShapes(unsigned int var_num) override final
Prepare shape functions.
virtual bool shouldApply()
Hook for turning the boundary condition on and off.
virtual const MooseVariableBase & variable() const =0
Returns the variable that this object operates on.

◆ compute() [5/6]

void ComputeJacobianThread::compute ( DGKernelBase dg,
const Elem *  neighbor 
)
overrideprotectedvirtual

Reimplemented from NonlinearThread.

Definition at line 75 of file ComputeJacobianThread.C.

76 {
77  if (dg.isImplicit())
78  {
79  dg.prepareShapes(dg.variable().number());
81  if (dg.hasBlocks(neighbor->subdomain_id()))
82  dg.computeJacobian();
83  }
84 }
unsigned int number() const
Get variable number coming from libMesh.
virtual void computeJacobian() override
Computes the jacobian for the current side.
Definition: DGKernelBase.C:138
void prepareNeighborShapes(unsigned int var_num)
Prepare neighbor shape functions.
void prepareShapes(unsigned int var_num) override final
Prepare shape functions.
Definition: DGKernelBase.C:208
virtual const MooseVariableBase & variable() const =0
Returns the variable that this object operates on.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.

◆ compute() [6/6]

void ComputeJacobianThread::compute ( InterfaceKernelBase ik)
overrideprotectedvirtual

Reimplemented from NonlinearThread.

Definition at line 87 of file ComputeJacobianThread.C.

88 {
89  if (intk.isImplicit())
90  {
91  intk.prepareShapes(intk.variable().number());
92  intk.prepareNeighborShapes(intk.neighborVariable().number());
93  intk.computeJacobian();
94  }
95 }

◆ computeOnBoundary()

void NonlinearThread::computeOnBoundary ( BoundaryID  bnd_id,
const Elem *  lower_d_elem 
)
protectedvirtualinherited

Reimplemented in ComputeFullJacobianThread.

Definition at line 186 of file NonlinearThread.C.

Referenced by NonlinearThread::onBoundary().

187 {
188  const auto & bcs = _ibc_warehouse->getActiveBoundaryObjects(bnd_id, _tid);
189  for (const auto & bc : bcs)
190  if (bc->shouldApply())
191  compute(*bc);
192 }
virtual void compute(ResidualObject &ro)=0
Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived clas...
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse

◆ computeOnElement()

void NonlinearThread::computeOnElement ( )
protectedvirtualinherited

Base class version just calls compute on each object for the element

Reimplemented in ComputeFullJacobianThread, and ComputeJacobianForScalingThread.

Definition at line 140 of file NonlinearThread.C.

Referenced by ComputeJacobianForScalingThread::computeOnElement(), and NonlinearThread::onElement().

141 {
143  {
144  const auto & kernels = _tag_kernels->getActiveBlockObjects(_subdomain, _tid);
145  for (const auto & kernel : kernels)
146  compute(*kernel);
147  }
148 
149  if (_fe_problem.haveFV())
150  for (auto kernel : _fv_kernels)
151  compute(*kernel);
152 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
virtual void compute(ResidualObject &ro)=0
Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived clas...
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
SubdomainID _subdomain
The subdomain for the current element.
MooseObjectWarehouse< KernelBase > * _tag_kernels
std::vector< FVElementalKernel * > _fv_kernels
Current subdomain FVElementalKernels.

◆ computeOnInterface()

void NonlinearThread::computeOnInterface ( BoundaryID  bnd_id)
protectedvirtualinherited

Reimplemented in ComputeFullJacobianThread.

Definition at line 234 of file NonlinearThread.C.

Referenced by NonlinearThread::onInterface().

235 {
236  const auto & int_ks = _ik_warehouse->getActiveBoundaryObjects(bnd_id, _tid);
237  for (const auto & interface_kernel : int_ks)
238  compute(*interface_kernel);
239 }
virtual void compute(ResidualObject &ro)=0
Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived clas...
MooseObjectWarehouse< InterfaceKernelBase > * _ik_warehouse
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const

◆ computeOnInternalFace()

void NonlinearThread::computeOnInternalFace ( const Elem *  neighbor)
protectedvirtualinherited

Reimplemented in ComputeFullJacobianThread.

Definition at line 269 of file NonlinearThread.C.

Referenced by NonlinearThread::onInternalSide().

270 {
271  const auto & dgks = _dg_warehouse->getActiveBlockObjects(_subdomain, _tid);
272  for (const auto & dg_kernel : dgks)
273  if (dg_kernel->hasBlocks(neighbor->subdomain_id()))
274  compute(*dg_kernel, neighbor);
275 }
virtual void compute(ResidualObject &ro)=0
Will dispatch to computeResidual/computeJacobian/computeResidualAndJacobian based on the derived clas...
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
SubdomainID _subdomain
The subdomain for the current element.
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse

◆ determineObjectWarehouses()

void ComputeJacobianThread::determineObjectWarehouses ( )
overrideprotectedvirtual

Determine the objects we will actually compute based on vector/matrix tag information.

Implements NonlinearThread.

Definition at line 98 of file ComputeJacobianThread.C.

99 {
100  // If users pass a empty vector or a full size of vector,
101  // we take all kernels
102  if (!_tags.size() || _tags.size() == _fe_problem.numMatrixTags())
103  {
108  }
109  // If we have one tag only,
110  // We call tag based storage
111  else if (_tags.size() == 1)
112  {
117  }
118  // This one may be expensive, and hopefully we do not use it so often
119  else
120  {
125  }
126 }
MooseObjectWarehouse< InterfaceKernelBase > * _ik_warehouse
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
Reference to BC storage structures.
const std::set< TagID > & _tags
MooseObjectTagWarehouse< KernelBase > & _kernels
MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given matrix tag...
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:210
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
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...
MooseObjectTagWarehouse< InterfaceKernelBase > & _interface_kernels
Reference to interface kernel storage structure.
MooseObjectWarehouse< KernelBase > * _tag_kernels
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse
MooseObjectTagWarehouse< DGKernelBase > & _dg_kernels
Reference to DGKernel storage structure.

◆ join()

void ComputeJacobianThread::join ( const ComputeJacobianThread )

Definition at line 160 of file ComputeJacobianThread.C.

161 {
162 }

◆ keepGoing()

virtual bool ThreadedElementLoop< ConstElemRange >::keepGoing ( )
inlineoverridevirtualinherited

Whether or not the loop should continue.

Returns
true to keep going, false to stop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 44 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

44 { return !_fe_problem.hasException(); }
virtual bool hasException()
Whether or not an exception has occurred.

◆ neighborSubdomainChanged()

void ThreadedElementLoop< ConstElemRange >::neighborSubdomainChanged ( )
overridevirtualinherited

Called every time the neighbor subdomain changes (i.e.

the subdomain of this neighbor is not the same as the subdomain of the last neighbor). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 135 of file ThreadedElementLoop.h.

136 {
139 }
Base class for assembly-like calculations.
virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid)

◆ objectType()

std::string ComputeJacobianThread::objectType ( ) const
inlineoverrideprotectedvirtual

Return what the loops is meant to compute.

Reimplemented from NonlinearThread.

Definition at line 56 of file ComputeJacobianThread.h.

56 { return "Jacobian"; }

◆ onBoundary()

void NonlinearThread::onBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
const Elem *  lower_d_elem = nullptr 
)
overridevirtualinherited

Called when doing boundary assembling.

Parameters
elem- The element we are checking is on the boundary.
side- The side of the element in question.
bnd_id- ID of the boundary we are at
lower_d_elem- Lower dimensional element (e.g. Mortar)

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 155 of file NonlinearThread.C.

159 {
161  {
162  _fe_problem.reinitElemFace(elem, side, bnd_id, _tid);
163 
164  // Needed to use lower-dimensional variables on Materials
165  if (lower_d_elem)
166  _fe_problem.reinitLowerDElem(lower_d_elem, _tid);
167 
168  // Set up Sentinel class so that, even if reinitMaterialsFace() throws, we
169  // still remember to swap back during stack unwinding.
171 
172  _fe_problem.reinitMaterialsFace(elem->subdomain_id(), _tid);
174 
175  computeOnBoundary(bnd_id, lower_d_elem);
176 
177  if (lower_d_elem)
178  {
179  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
180  accumulateLower();
181  }
182  }
183 }
virtual void accumulateLower()=0
Add lower-d residual/Jacobian into assembly global data.
virtual void computeOnBoundary(BoundaryID bnd_id, const Elem *lower_d_elem)
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
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
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void swapBackMaterialsFace(const THREAD_ID tid)
virtual void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID bnd_id, const THREAD_ID tid) override
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
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
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onElement()

void NonlinearThread::onElement ( const Elem *  elem)
overridevirtualinherited

Assembly of the element (not including surface assembly)

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 121 of file NonlinearThread.C.

Referenced by ComputeJacobianForScalingThread::operator()().

122 {
123  _fe_problem.prepare(elem, _tid);
124  _fe_problem.reinitElem(elem, _tid);
125 
126  // Set up Sentinel class so that, even if reinitMaterials() throws, we
127  // still remember to swap back during stack unwinding.
129 
131 
132  if (dynamic_cast<ComputeJacobianThread *>(this))
133  if (_nl.getScalarVariables(_tid).size() > 0)
135 
137 }
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:737
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
virtual void computeOnElement()
NonlinearSystemBase & _nl
virtual void swapBackMaterials(const THREAD_ID tid)
void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
SubdomainID _subdomain
The subdomain for the current element.
virtual void reinitOffDiagScalars(const THREAD_ID tid) override
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onInterface()

void NonlinearThread::onInterface ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
overridevirtualinherited

Called when doing interface assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'
bnd_id- ID of the interface we are at

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 195 of file NonlinearThread.C.

196 {
198  {
199 
200  // Pointer to the neighbor we are currently working on.
201  const Elem * neighbor = elem->neighbor_ptr(side);
202 
203  if (neighbor->active())
204  {
205  _fe_problem.reinitNeighbor(elem, side, _tid);
206 
207  // Set up Sentinels so that, even if one of the reinitMaterialsXXX() calls throws, we
208  // still remember to swap back during stack unwinding. Note that face, boundary, and interface
209  // all operate with the same MaterialData object
211  _fe_problem.reinitMaterialsFace(elem->subdomain_id(), _tid);
213 
215  _fe_problem.reinitMaterialsNeighbor(neighbor->subdomain_id(), _tid);
216 
217  // Has to happen after face and neighbor properties have been computed. Note that we don't use
218  // a sentinel here because FEProblem::swapBackMaterialsFace is going to handle face materials,
219  // boundary materials, and interface materials (e.g. it queries the boundary material data
220  // with the current element and side
222 
223  computeOnInterface(bnd_id);
224 
225  {
226  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
228  }
229  }
230  }
231 }
MooseObjectWarehouse< InterfaceKernelBase > * _ik_warehouse
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
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
virtual void accumulateNeighbor()=0
Add neighbor residual/Jacobian into assembly global data.
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void swapBackMaterialsFace(const THREAD_ID tid)
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
virtual void computeOnInterface(BoundaryID bnd_id)
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
void reinitMaterialsInterface(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onInternalSide()

void NonlinearThread::onInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtualinherited

Called when doing internal edge assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 242 of file NonlinearThread.C.

243 {
245  {
246  // Pointer to the neighbor we are currently working on.
247  const Elem * neighbor = elem->neighbor_ptr(side);
248 
250 
251  // Set up Sentinels so that, even if one of the reinitMaterialsXXX() calls throws, we
252  // still remember to swap back during stack unwinding.
254  _fe_problem.reinitMaterialsFace(elem->subdomain_id(), _tid);
255 
257  _fe_problem.reinitMaterialsNeighbor(neighbor->subdomain_id(), _tid);
258 
259  computeOnInternalFace(neighbor);
260 
261  {
262  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
264  }
265  }
266 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
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
virtual void reinitElemNeighborAndLowerD(const Elem *elem, unsigned int side, const THREAD_ID tid) override
virtual void swapBackMaterialsFace(const THREAD_ID tid)
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
virtual void computeOnInternalFace(const Elem *neighbor)
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
virtual void accumulateNeighborLower()=0
Add neighbor and lower residual/Jacobian into assembly global data.
SubdomainID _subdomain
The subdomain for the current element.
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ operator()()

void NonlinearThread::operator() ( const ConstElemRange range,
bool  bypass_threading = false 
)
overridevirtualinherited

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Reimplemented in ComputeJacobianForScalingThread.

Definition at line 57 of file NonlinearThread.C.

58 {
60  ThreadedElementLoop<ConstElemRange>::operator()(range, bypass_threading);
61 }
const bool _has_active_objects
Whether there are any active residual objects; otherwise we will do an early return.
virtual void operator()(const RangeType &range, bool bypass_threading=false)

◆ post()

void NonlinearThread::post ( )
overridevirtualinherited

Called after the element range loop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 314 of file NonlinearThread.C.

Referenced by ComputeJacobianForScalingThread::operator()().

315 {
318 }
void clearActiveMaterialProperties(const THREAD_ID tid)
Clear the active material properties.
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.

◆ postElement()

void ComputeJacobianThread::postElement ( const Elem *  elem)
overridevirtual

Called after the element assembly is done (including surface assembling)

Parameters
elem- active element

Reimplemented from NonlinearThread.

Reimplemented in ComputeJacobianBlocksThread.

Definition at line 147 of file ComputeJacobianThread.C.

Referenced by ComputeJacobianForScalingThread::operator()().

148 {
150  _num_cached++;
151 
152  if (_num_cached % 20 == 0)
153  {
154  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
156  }
157 }
unsigned int _num_cached
virtual void cacheJacobian(const THREAD_ID tid) override
virtual void addCachedJacobian(const THREAD_ID tid) override

◆ postInternalSide()

void ThreadedElementLoopBase< ConstElemRange >::postInternalSide ( const Elem *  elem,
unsigned int  side 
)
virtualinherited

Called after evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented in ComputeJacobianBlocksThread.

Definition at line 372 of file ThreadedElementLoopBase.h.

373 {
374 }

◆ pre()

void ThreadedElementLoopBase< ConstElemRange >::pre ( )
virtualinherited

Called before the element range loop.

Definition at line 318 of file ThreadedElementLoopBase.h.

Referenced by ComputeJacobianForScalingThread::operator()().

319 {
320 }

◆ preBoundary()

void ThreadedElementLoop< ConstElemRange >::preBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
const Elem *  lower_d_elem = nullptr 
)
overridevirtualinherited

Called before the boundary assembly.

Parameters
elem- The element we are checking is on the boundary.
side- The side of the element in question.
bnd_id- ID of the boundary we are at
lower_d_elem- Lower dimensional element (e.g. Mortar)

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 125 of file ThreadedElementLoop.h.

129 {
131 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid) override
sets the current boundary ID in assembly
Base class for assembly-like calculations.

◆ preElement()

void ThreadedElementLoop< ConstElemRange >::preElement ( const Elem *  elem)
overridevirtualinherited

Called before the element assembly.

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 111 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

112 {
114 }
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid) override
Base class for assembly-like calculations.

◆ preInternalSide()

void ThreadedElementLoop< ConstElemRange >::preInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtualinherited

Called before evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 118 of file ThreadedElementLoop.h.

119 {
121 }
Base class for assembly-like calculations.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override

◆ printBlockExecutionInformation()

void NonlinearThread::printBlockExecutionInformation ( ) const
overrideprotectedvirtualinherited

Print list of specific objects executed on each block and in which order.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 341 of file NonlinearThread.C.

342 {
343  // Number of objects executing is approximated by size of warehouses
344  const int num_objects = _kernels.size() + _fv_kernels.size() + _integrated_bcs.size() +
346  const auto & console = _fe_problem.console();
347  const auto block_name = _mesh.getSubdomainName(_subdomain);
348 
349  if (_fe_problem.shouldPrintExecution(_tid) && num_objects > 0)
350  {
351  if (_blocks_exec_printed.count(_subdomain))
352  return;
353  console << "[DBG] Ordering of " + objectType() + " Objects on block " << block_name << " ("
354  << _subdomain << ")" << std::endl;
356  {
357  console << "[DBG] Ordering of kernels:" << std::endl;
358  console << _kernels.activeObjectsToFormattedString() << std::endl;
359  }
360  if (_fv_kernels.size())
361  {
362  console << "[DBG] Ordering of FV elemental kernels:" << std::endl;
363  std::string fvkernels =
364  std::accumulate(_fv_kernels.begin() + 1,
365  _fv_kernels.end(),
366  _fv_kernels[0]->name(),
367  [](const std::string & str_out, FVElementalKernel * kernel)
368  { return str_out + " " + kernel->name(); });
369  console << ConsoleUtils::formatString(fvkernels, "[DBG]") << std::endl;
370  }
372  {
373  console << "[DBG] Ordering of DG kernels:" << std::endl;
374  console << _dg_kernels.activeObjectsToFormattedString() << std::endl;
375  }
376  }
377  else if (_fe_problem.shouldPrintExecution(_tid) && num_objects == 0 &&
379  console << "[DBG] No Active " + objectType() + " Objects on block " << block_name << " ("
380  << _subdomain << ")" << std::endl;
381 
383 }
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...
unsigned int size(THREAD_ID tid=0) const
Return how many kernels we store in the current warehouse.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
Reference to BC storage structures.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1537
FVElemental is used for calculating residual contributions from volume integral terms of a PDE where ...
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
MooseObjectTagWarehouse< KernelBase > & _kernels
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...
Definition: ConsoleUtils.C:422
virtual std::string objectType() const
Return what the loops is meant to compute.
std::set< SubdomainID > _blocks_exec_printed
Keep track of which blocks were visited.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
MooseObjectTagWarehouse< InterfaceKernelBase > & _interface_kernels
Reference to interface kernel storage structure.
SubdomainID _subdomain
The subdomain for the current element.
std::vector< FVElementalKernel * > _fv_kernels
Current subdomain FVElementalKernels.
MooseObjectTagWarehouse< DGKernelBase > & _dg_kernels
Reference to DGKernel storage structure.

◆ printBoundaryExecutionInformation()

void NonlinearThread::printBoundaryExecutionInformation ( const unsigned int  bid) const
overrideprotectedvirtualinherited

Print list of specific objects executed on each boundary and in which order.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 386 of file NonlinearThread.C.

387 {
391  return;
392 
393  const auto & console = _fe_problem.console();
394  const auto b_name = _mesh.getBoundaryName(bid);
395  console << "[DBG] Ordering of " + objectType() + " Objects on boundary " << b_name << " (" << bid
396  << ")" << std::endl;
397 
399  {
400  console << "[DBG] Ordering of integrated boundary conditions:" << std::endl;
401  console << _integrated_bcs.activeObjectsToFormattedString() << std::endl;
402  }
403 
404  // We have not checked if we have a neighbor. This could be premature for saying we are executing
405  // interface kernels. However, we should assume the execution will happen on another side of the
406  // same boundary
408  {
409  console << "[DBG] Ordering of interface kernels:" << std::endl;
410  console << _interface_kernels.activeObjectsToFormattedString() << std::endl;
411  }
412 
413  _boundaries_exec_printed.insert(bid);
414 }
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...
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
Reference to BC storage structures.
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
Definition: MooseMesh.C:1566
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
virtual std::string objectType() const
Return what the loops is meant to compute.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
std::set< BoundaryID > _boundaries_exec_printed
Keep track of which boundaries were visited.
MooseObjectTagWarehouse< InterfaceKernelBase > & _interface_kernels
Reference to interface kernel storage structure.

◆ printExecutionOrdering() [1/2]

void ThreadedElementLoop< ConstElemRange >::printExecutionOrdering ( const std::vector< T *> &  objs,
const bool  print_header = true,
const std::string &  line_prefix = "[DBG]" 
) const
protectedinherited

Routine to output the ordering of objects within a vector of pointers to these objects.

These objects must implement the name() routine, and it must return a string or compatible type.

Template Parameters
Tthe object type
Parameters
objsthe vector with all the objects (should be pointers)
objects_typethe name of the type of objects. Defaults to the CPP object name
print_headerwhether to print a header about the timing of execution and the type of objects

Definition at line 144 of file ThreadedElementLoop.h.

147 {
148  if (!objs.size())
149  return;
150 
151  auto & console = _fe_problem.console();
152  const auto objects_type = MooseUtils::prettyCppType(objs[0]);
153  std::vector<MooseObject *> moose_objs;
154  for (auto obj_ptr : objs)
155  moose_objs.push_back(dynamic_cast<MooseObject *>(obj_ptr));
156  const auto names = ConsoleUtils::mooseObjectVectorToString(moose_objs);
157 
158  // Print string with a DBG prefix and with sufficient line breaks
159  std::string message = print_header ? "Executing " + objects_type + " on " +
161  : "";
162  message += (print_header ? "Order of execution:\n" : "") + names;
163  console << ConsoleUtils::formatString(message, line_prefix) << std::endl;
164 }
std::string mooseObjectVectorToString(const std::vector< MooseObject *> &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
Definition: ConsoleUtils.C:438
const std::string & name() const
Definition: MooseEnumItem.h:35
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
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...
Definition: ConsoleUtils.C:422
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
std::string prettyCppType(const std::string &cpp_type)
Definition: MooseUtils.C:1235

◆ printExecutionOrdering() [2/2]

void ThreadedElementLoop< ConstElemRange >::printExecutionOrdering ( const std::vector< std::shared_ptr< T >> &  objs_ptrs,
const bool  print_header = true,
const std::string &  line_prefix = "[DBG]" 
) const
protectedinherited

Definition at line 169 of file ThreadedElementLoop.h.

173 {
174  std::vector<T *> regular_ptrs;
175  for (auto shared_ptr : objs_ptrs)
176  regular_ptrs.push_back(shared_ptr.get());
177  printExecutionOrdering<T>(regular_ptrs, print_header, line_prefix);
178 }

◆ printGeneralExecutionInformation()

void NonlinearThread::printGeneralExecutionInformation ( ) const
overrideprotectedvirtualinherited

Print information about the loop, mostly order of execution of objects.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 321 of file NonlinearThread.C.

322 {
324  {
325  const auto & console = _fe_problem.console();
326  const auto execute_on = _fe_problem.getCurrentExecuteOnFlag();
327  console << "[DBG] Beginning elemental loop to compute " + objectType() + " on " << execute_on
328  << std::endl;
329  mooseDoOnce(
330  console << "[DBG] Execution order on each element:" << std::endl;
331  console << "[DBG] - kernels on element quadrature points" << std::endl;
332  console << "[DBG] - finite volume elemental kernels on element" << std::endl;
333  console << "[DBG] - integrated boundary conditions on element side quadrature points"
334  << std::endl;
335  console << "[DBG] - DG kernels on element side quadrature points" << std::endl;
336  console << "[DBG] - interface kernels on element side quadrature points" << std::endl;);
337  }
338 }
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.
virtual std::string objectType() const
Return what the loops is meant to compute.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48

◆ resetExecPrintedSets()

void ThreadedElementLoopBase< ConstElemRange >::resetExecPrintedSets ( ) const
protectedinherited

Resets the set of blocks and boundaries visited.

Definition at line 429 of file ThreadedElementLoopBase.h.

430 {
431  _blocks_exec_printed.clear();
432  _boundaries_exec_printed.clear();
433 }
std::set< SubdomainID > _blocks_exec_printed
Keep track of which blocks were visited.
std::set< BoundaryID > _boundaries_exec_printed
Keep track of which boundaries were visited.

◆ subdomainChanged()

void NonlinearThread::subdomainChanged ( )
overridevirtualinherited

Called every time the current subdomain changes (i.e.

the subdomain of this element is not the same as the subdomain of the last element). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 64 of file NonlinearThread.C.

Referenced by ComputeJacobianForScalingThread::operator()().

65 {
66  // This should come first to setup the residual objects before we do dependency determination of
67  // material properties and variables
69 
71 
72  // Update variable Dependencies
73  std::set<MooseVariableFEBase *> needed_moose_vars;
78 
79  // Update FE variable coupleable vector tags
80  std::set<TagID> needed_fe_var_vector_tags;
82  _subdomain, needed_fe_var_vector_tags, _tid);
84  _subdomain, needed_fe_var_vector_tags, _tid);
86  _subdomain, needed_fe_var_vector_tags, _tid);
87 
88  // Update material dependencies
89  std::unordered_set<unsigned int> needed_mat_props;
94 
95  if (_fe_problem.haveFV())
96  {
97  // Re-query the finite volume elemental kernels
98  _fv_kernels.clear();
100  .query()
101  .template condition<AttribSysNum>(_nl.number())
102  .template condition<AttribSystem>("FVElementalKernel")
103  .template condition<AttribSubdomains>(_subdomain)
104  .template condition<AttribThread>(_tid)
106  for (const auto fv_kernel : _fv_kernels)
107  {
108  const auto & fv_mv_deps = fv_kernel->getMooseVariableDependencies();
109  needed_moose_vars.insert(fv_mv_deps.begin(), fv_mv_deps.end());
110  const auto & fv_mp_deps = fv_kernel->getMatPropDependencies();
111  needed_mat_props.insert(fv_mp_deps.begin(), fv_mp_deps.end());
112  }
113  }
114 
116  _fe_problem.setActiveFEVariableCoupleableVectorTags(needed_fe_var_vector_tags, _tid);
117  _fe_problem.prepareMaterials(needed_mat_props, _subdomain, _tid);
118 }
MooseObjectWarehouse< InterfaceKernelBase > * _ik_warehouse
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311
const MaterialWarehouse & getMaterialWarehouse() const
void updateBlockVariableDependency(SubdomainID id, std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
TheWarehouse & theWarehouse() const
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
NonlinearSystemBase & _nl
void updateBoundaryMatPropDependency(std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
void updateBlockMatPropDependency(SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void updateBlockFEVariableCoupledVectorTagDependency(SubdomainID id, std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
Update FE variable coupleable vector tag vector.
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
virtual void determineObjectWarehouses()=0
Determine the objects we will actually compute based on vector/matrix tag information.
SubdomainID _subdomain
The subdomain for the current element.
MooseObjectWarehouse< KernelBase > * _tag_kernels
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
void updateBoundaryVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
std::vector< FVElementalKernel * > _fv_kernels
Current subdomain FVElementalKernels.
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...

Member Data Documentation

◆ _blocks_exec_printed

std::set<SubdomainID> ThreadedElementLoopBase< ConstElemRange >::_blocks_exec_printed
mutableprotectedinherited

◆ _boundaries_exec_printed

std::set<BoundaryID> ThreadedElementLoopBase< ConstElemRange >::_boundaries_exec_printed
mutableprotectedinherited

Keep track of which boundaries were visited.

Definition at line 182 of file ThreadedElementLoopBase.h.

Referenced by NonlinearThread::printBoundaryExecutionInformation().

◆ _dg_kernels

MooseObjectTagWarehouse<DGKernelBase>& NonlinearThread::_dg_kernels
protectedinherited

◆ _dg_warehouse

MooseObjectWarehouse<DGKernelBase>* NonlinearThread::_dg_warehouse
protectedinherited

◆ _fe_problem

FEProblemBase& ThreadedElementLoop< ConstElemRange >::_fe_problem
protectedinherited

Definition at line 58 of file ThreadedElementLoop.h.

Referenced by ComputeResidualThread::accumulate(), ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), accumulateLower(), ComputeResidualThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), accumulateNeighbor(), ComputeResidualThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::accumulateNeighborLower(), accumulateNeighborLower(), compute(), ComputeFullJacobianThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualThread::determineObjectWarehouses(), determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), ComputeElemDampingThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), NonlinearThread::post(), ComputeUserObjectsThread::post(), postElement(), ComputeJacobianBlocksThread::postElement(), ComputeJacobianBlocksThread::postInternalSide(), ComputeUserObjectsThread::printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

◆ _fv_kernels

std::vector<FVElementalKernel *> NonlinearThread::_fv_kernels
protectedinherited

◆ _has_active_objects

const bool NonlinearThread::_has_active_objects
protectedinherited

Whether there are any active residual objects; otherwise we will do an early return.

Definition at line 142 of file NonlinearThread.h.

Referenced by NonlinearThread::operator()().

◆ _ibc_warehouse

MooseObjectWarehouse<IntegratedBCBase>* NonlinearThread::_ibc_warehouse
protectedinherited

◆ _ik_warehouse

MooseObjectWarehouse<InterfaceKernelBase>* NonlinearThread::_ik_warehouse
protectedinherited

◆ _integrated_bcs

MooseObjectTagWarehouse<IntegratedBCBase>& NonlinearThread::_integrated_bcs
protectedinherited

◆ _interface_kernels

MooseObjectTagWarehouse<InterfaceKernelBase>& NonlinearThread::_interface_kernels
protectedinherited

◆ _kernels

MooseObjectTagWarehouse<KernelBase>& NonlinearThread::_kernels
protectedinherited

◆ _mesh

MooseMesh& ThreadedElementLoopBase< ConstElemRange >::_mesh
protectedinherited

◆ _neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_neighbor_subdomain
protectedinherited

The subdomain for the current neighbor.

Definition at line 164 of file ThreadedElementLoopBase.h.

Referenced by ComputeJacobianForScalingThread::operator()().

◆ _nl

NonlinearSystemBase& NonlinearThread::_nl
protectedinherited

◆ _num_cached

unsigned int NonlinearThread::_num_cached
protectedinherited

◆ _old_neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_neighbor_subdomain
protectedinherited

The subdomain for the last neighbor.

Definition at line 167 of file ThreadedElementLoopBase.h.

◆ _old_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_subdomain
protectedinherited

The subdomain for the last element.

Definition at line 161 of file ThreadedElementLoopBase.h.

Referenced by ComputeJacobianForScalingThread::operator()().

◆ _subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_subdomain
protectedinherited

◆ _tag_kernels

MooseObjectWarehouse<KernelBase>* NonlinearThread::_tag_kernels
protectedinherited

◆ _tags

const std::set<TagID>& ComputeJacobianThread::_tags
protected

◆ _tid

THREAD_ID ThreadedElementLoopBase< ConstElemRange >::_tid
protectedinherited

Definition at line 155 of file ThreadedElementLoopBase.h.

Referenced by ComputeResidualThread::accumulate(), ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), accumulateLower(), ComputeResidualThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), accumulateNeighbor(), ComputeResidualThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::accumulateNeighborLower(), accumulateNeighborLower(), ComputeFullJacobianThread::computeOnBoundary(), NonlinearThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), NonlinearThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInternalFace(), NonlinearThread::computeOnInternalFace(), ComputeResidualThread::determineObjectWarehouses(), determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeMaterialsObjectThread::onBoundary(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMaterialsObjectThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeMaterialsObjectThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), ComputeJacobianForScalingThread::operator()(), ComputeMaterialsObjectThread::post(), ComputeMarkerThread::post(), ComputeIndicatorThread::post(), NonlinearThread::post(), ComputeUserObjectsThread::post(), postElement(), ComputeJacobianBlocksThread::postElement(), ComputeJacobianBlocksThread::postInternalSide(), ComputeMarkerThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeUserObjectsThread::printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::queryBoundary(), ComputeUserObjectsThread::querySubdomain(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().


The documentation for this class was generated from the following files: