https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
 
void join (const ComputeMortarNodalAuxBndThread &)
 
void operator() (const ConstBndNodeRange &range)
 
virtual void pre ()
 Called before the node range loop.
 
virtual void post ()
 Called after the node range loop.
 
virtual void onNode (ConstBndNodeRange::const_iterator &node_it)
 Called for each node.
 
virtual void postNode (ConstBndNodeRange::const_iterator &node_it)
 Called after the node assembly is done (including surface assembling)
 
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.
 

Protected Member Functions

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

Protected Attributes

AuxiliarySystem_aux_sys
 The auxiliary system.
 
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.
 
const std::size_t _object_container_index
 The index at which we should index the aux kernel containers, e.g.
 
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}
AuxiliarySystem & _aux_sys
The auxiliary system.
const MooseObjectWarehouse< AuxKernelType > & _storage
Storage object containing active AuxKernel objects.
const std::size_t _object_container_index
The index at which we should index the aux kernel containers, e.g.
const BoundaryID _bnd_id
The boundary ID for whose nodes we will evaluate the aux kernel on.
AuxiliarySystem & getAuxiliarySystem()

◆ ComputeMortarNodalAuxBndThread() [2/2]

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

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 };
static Threads::spin_mutex threaded_node_mutex
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class,...
virtual const char * what() const
Get out the error message.

◆ 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() [1/2]

Called for each node.

Definition at line 43 of file ThreadedNodeLoop.h.

137{
138}

◆ onNode() [2/2]

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

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}
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
Base class for creating new nodally-based mortar auxiliary kernels.
NumericVector< Number > & solution()
Definition SystemBase.h:203
processor_id_type processor_id() const
BoundaryID _bnd_id
boundary id for the node
Definition BndNode.h:26
libMesh::Node * _node
pointer to the node
Definition BndNode.h:24

◆ operator()()

void ThreadedNodeLoop< ConstBndNodeRange , ConstBndNodeRange::const_iterator >::operator() ( const ConstBndNodeRange range)
inherited

Definition at line 28 of file ThreadedNodeLoop.h.

95{
96 try
97 {
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}
Provides a way for users to bail out of the current solve.
virtual void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
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.
virtual bool keepGoing()
Whether or not the loop should continue.
virtual void caughtMooseException(MooseException &e)
Called if a MooseException is caught anywhere during the computation.
const_iterator begin() const
const_iterator end() const

◆ post()

Called after the node range loop.

Definition at line 38 of file ThreadedNodeLoop.h.

131{
132}

◆ postNode()

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

Parameters
node- active node

Definition at line 50 of file ThreadedNodeLoop.h.

143{
144}

◆ pre()

Called before the node range loop.

Reimplemented in ComputeNodalKernelBCJacobiansThread, and ComputeNodalKernelBcsThread.

Definition at line 33 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 ComputeNodalAuxBcsThread< AuxKernelType >, ComputeNodalKernelBCJacobiansThread, 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

Definition at line 72 of file ThreadedNodeLoop.h.

◆ _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

Definition at line 73 of file ThreadedNodeLoop.h.


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