https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeMortarNodalAuxBndThread< AuxKernelType > Class Template Reference

This class evaluates a single mortar nodal aux kernel. More...

#include <ComputeMortarNodalAuxBndThread.h>

Inheritance diagram for ComputeMortarNodalAuxBndThread< AuxKernelType >:
[legend]

Public Member Functions

 ComputeMortarNodalAuxBndThread (FEProblemBase &fe_problem, const MooseObjectWarehouse< AuxKernelType > &storage, BoundaryID bnd_id, std::size_t object_container_index)
 
 ComputeMortarNodalAuxBndThread (ComputeMortarNodalAuxBndThread &x, Threads::split split)
 
void onNode (ConstBndNodeRange::const_iterator &node_it) override
 Called for each node. More...
 
void join (const ComputeMortarNodalAuxBndThread &)
 
void operator() (const ConstBndNodeRange &range)
 
virtual void pre ()
 Called before the node range loop. More...
 
virtual void post ()
 Called after the node range loop. More...
 
virtual void postNode (ConstBndNodeRange::const_iterator &node_it)
 Called after the node assembly is done (including surface assembling) More...
 
virtual void caughtMooseException (MooseException &e)
 Called if a MooseException is caught anywhere during the computation. More...
 
virtual bool keepGoing ()
 Whether or not the loop should continue. More...
 

Protected Member Functions

virtual void printGeneralExecutionInformation () const
 Print information about the loop, mostly order of execution of objects. More...
 

Protected Attributes

AuxiliarySystem_aux_sys
 The auxiliary system. More...
 
const MooseObjectWarehouse< AuxKernelType > & _storage
 Storage object containing active AuxKernel objects. More...
 
const BoundaryID _bnd_id
 The boundary ID for whose nodes we will evaluate the aux kernel on. More...
 
const std::size_t _object_container_index
 The index at which we should index the aux kernel containers, e.g. More...
 
FEProblemBase_fe_problem
 
THREAD_ID _tid
 

Detailed Description

template<typename AuxKernelType>
class ComputeMortarNodalAuxBndThread< AuxKernelType >

This class evaluates a single mortar nodal aux kernel.

Definition at line 23 of file ComputeMortarNodalAuxBndThread.h.

Constructor & Destructor Documentation

◆ ComputeMortarNodalAuxBndThread() [1/2]

template<typename AuxKernelType >
ComputeMortarNodalAuxBndThread< AuxKernelType >::ComputeMortarNodalAuxBndThread ( FEProblemBase fe_problem,
const MooseObjectWarehouse< AuxKernelType > &  storage,
BoundaryID  bnd_id,
std::size_t  object_container_index 
)

Definition at line 19 of file ComputeMortarNodalAuxBndThread.C.

25  _aux_sys(fe_problem.getAuxiliarySystem()),
26  _storage(storage),
27  _bnd_id(bnd_id),
28  _object_container_index(object_container_index)
29 {
30 }
const std::size_t _object_container_index
The index at which we should index the aux kernel containers, e.g.
AuxiliarySystem & getAuxiliarySystem()
const MooseObjectWarehouse< AuxKernelType > & _storage
Storage object containing active AuxKernel objects.
const BoundaryID _bnd_id
The boundary ID for whose nodes we will evaluate the aux kernel on.
AuxiliarySystem & _aux_sys
The auxiliary system.

◆ ComputeMortarNodalAuxBndThread() [2/2]

template<typename AuxKernelType >
ComputeMortarNodalAuxBndThread< AuxKernelType >::ComputeMortarNodalAuxBndThread ( ComputeMortarNodalAuxBndThread< AuxKernelType > &  x,
Threads::split  split 
)

Definition at line 34 of file ComputeMortarNodalAuxBndThread.C.

37  _aux_sys(x._aux_sys),
38  _storage(x._storage),
39  _bnd_id(x._bnd_id),
40  _object_container_index(x._object_container_index)
41 {
42 }
const std::size_t _object_container_index
The index at which we should index the aux kernel containers, e.g.
tbb::split split
const MooseObjectWarehouse< AuxKernelType > & _storage
Storage object containing active AuxKernel objects.
const BoundaryID _bnd_id
The boundary ID for whose nodes we will evaluate the aux kernel on.
AuxiliarySystem & _aux_sys
The auxiliary system.

Member Function Documentation

◆ caughtMooseException()

virtual void ThreadedNodeLoop< ConstBndNodeRange , ConstBndNodeRange::const_iterator >::caughtMooseException ( MooseException e)
inlinevirtualinherited

Called if a MooseException is caught anywhere during the computation.

The single input parameter taken is a MooseException object.

Definition at line 56 of file ThreadedNodeLoop.h.

57  {
58  Threads::spin_mutex::scoped_lock lock(threaded_node_mutex);
59 
60  std::string what(e.what());
62  };
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_node_mutex

◆ join()

template<typename AuxKernelType >
void ComputeMortarNodalAuxBndThread< AuxKernelType >::join ( const ComputeMortarNodalAuxBndThread< AuxKernelType > &  )

Definition at line 72 of file ComputeMortarNodalAuxBndThread.C.

73 {
74 }

◆ keepGoing()

virtual bool ThreadedNodeLoop< ConstBndNodeRange , ConstBndNodeRange::const_iterator >::keepGoing ( )
inlinevirtualinherited

Whether or not the loop should continue.

Returns
true to keep going, false to stop.

Definition at line 69 of file ThreadedNodeLoop.h.

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

◆ onNode()

template<typename AuxKernelType >
void ComputeMortarNodalAuxBndThread< AuxKernelType >::onNode ( ConstBndNodeRange::const_iterator node_it)
overridevirtual

Called for each node.

Reimplemented from ThreadedNodeLoop< ConstBndNodeRange, ConstBndNodeRange::const_iterator >.

Definition at line 46 of file ComputeMortarNodalAuxBndThread.C.

47 {
48  const BndNode * bnode = *node_it;
49 
50  if (bnode->_bnd_id != _bnd_id)
51  return;
52 
53  Node * node = bnode->_node;
54 
55  if (node->processor_id() == _fe_problem.processor_id())
56  {
58  mooseAssert(dynamic_cast<MortarNodalAuxKernel *>(kernel.get()),
59  "This should be a mortar nodal aux kernel");
61  kernel->compute();
62  // This is the same conditional check that the aux kernel performs internally before calling
63  // computeValue and _var.setNodalValue. We don't want to attempt to insert into the solution if
64  // we don't actually have any dofs on this node
65  if (kernel->variable().isNodalDefined())
66  kernel->variable().insert(_aux_sys.solution());
67  }
68 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
BoundaryID _bnd_id
boundary id for the node
Definition: BndNode.h:26
const std::size_t _object_container_index
The index at which we should index the aux kernel containers, e.g.
libMesh::Node * _node
pointer to the node
Definition: BndNode.h:24
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
const MooseObjectWarehouse< AuxKernelType > & _storage
Storage object containing active AuxKernel objects.
const BoundaryID _bnd_id
The boundary ID for whose nodes we will evaluate the aux kernel on.
processor_id_type processor_id() const
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
AuxiliarySystem & _aux_sys
The auxiliary system.

◆ operator()()

Definition at line 94 of file ThreadedNodeLoop.h.

95 {
96  try
97  {
98  ParallelUniqueId puid;
99  _tid = puid.id;
100 
101  pre();
103 
104  for (IteratorType nd = range.begin(); nd != range.end(); ++nd)
105  {
106  if (!keepGoing())
107  break;
108 
109  onNode(nd);
110 
111  postNode(nd);
112  }
113 
114  post();
115  }
116  catch (MooseException & e)
117  {
119  }
120 }
virtual void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
virtual void caughtMooseException(MooseException &e)
Called if a MooseException is caught anywhere during the computation.
virtual bool keepGoing()
Whether or not the loop should continue.
const_iterator end() const
Provides a way for users to bail out of the current solve.
const_iterator begin() const
virtual void postNode(ConstBndNodeRange::const_iterator &node_it)
Called after the node assembly is done (including surface assembling)
virtual void onNode(ConstBndNodeRange::const_iterator &node_it)
Called for each node.

◆ post()

Called after the node range loop.

Definition at line 130 of file ThreadedNodeLoop.h.

131 {
132 }

◆ postNode()

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

Parameters
node- active node

Definition at line 142 of file ThreadedNodeLoop.h.

143 {
144 }

◆ pre()

Called before the node range loop.

Reimplemented in ComputeNodalKernelBCJacobiansThread, and ComputeNodalKernelBcsThread.

Definition at line 124 of file ThreadedNodeLoop.h.

125 {
126 }

◆ printGeneralExecutionInformation()

virtual void ThreadedNodeLoop< ConstBndNodeRange , ConstBndNodeRange::const_iterator >::printGeneralExecutionInformation ( ) const
inlineprotectedvirtualinherited

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

Reimplemented in ComputeNodalKernelBCJacobiansThread, ComputeNodalAuxBcsThread< AuxKernelType >, and ComputeNodalKernelBcsThread.

Definition at line 76 of file ThreadedNodeLoop.h.

76 {}

Member Data Documentation

◆ _aux_sys

template<typename AuxKernelType>
AuxiliarySystem& ComputeMortarNodalAuxBndThread< AuxKernelType >::_aux_sys
protected

The auxiliary system.

Definition at line 39 of file ComputeMortarNodalAuxBndThread.h.

◆ _bnd_id

template<typename AuxKernelType>
const BoundaryID ComputeMortarNodalAuxBndThread< AuxKernelType >::_bnd_id
protected

The boundary ID for whose nodes we will evaluate the aux kernel on.

Definition at line 45 of file ComputeMortarNodalAuxBndThread.h.

◆ _fe_problem

◆ _object_container_index

template<typename AuxKernelType>
const std::size_t ComputeMortarNodalAuxBndThread< AuxKernelType >::_object_container_index
protected

The index at which we should index the aux kernel containers, e.g.

this data member helper ensures we get the correct mortar nodal aux kernel to evaluate

Definition at line 49 of file ComputeMortarNodalAuxBndThread.h.

◆ _storage

template<typename AuxKernelType>
const MooseObjectWarehouse<AuxKernelType>& ComputeMortarNodalAuxBndThread< AuxKernelType >::_storage
protected

Storage object containing active AuxKernel objects.

Definition at line 42 of file ComputeMortarNodalAuxBndThread.h.

◆ _tid


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