https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeMortarNodalAuxBndThread.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "libmesh/threads.h"
11
12// MOOSE includes
14#include "AuxiliarySystem.h"
15#include "FEProblem.h"
17
18template <typename AuxKernelType>
20 FEProblemBase & fe_problem,
22 const BoundaryID bnd_id,
23 const std::size_t object_container_index)
24 : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(fe_problem),
25 _aux_sys(fe_problem.getAuxiliarySystem()),
26 _storage(storage),
27 _bnd_id(bnd_id),
28 _object_container_index(object_container_index)
29{
30}
31
32// Splitting Constructor
33template <typename AuxKernelType>
36 : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(x, split),
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}
43
44template <typename AuxKernelType>
45void
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 {
57 const auto & kernel = _storage.getActiveBoundaryObjects(_bnd_id, _tid)[_object_container_index];
58 mooseAssert(dynamic_cast<MortarNodalAuxKernel *>(kernel.get()),
59 "This should be a mortar nodal aux kernel");
60 _fe_problem.reinitNodeFace(node, _bnd_id, _tid);
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}
69
70template <typename AuxKernelType>
71void
75
boundary_id_type BoundaryID
This class evaluates a single mortar nodal aux kernel.
void join(const ComputeMortarNodalAuxBndThread &)
ComputeMortarNodalAuxBndThread(FEProblemBase &fe_problem, const MooseObjectWarehouse< AuxKernelType > &storage, BoundaryID bnd_id, std::size_t object_container_index)
void onNode(ConstBndNodeRange::const_iterator &node_it) override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
A storage container for MooseObjects that inherit from SetupInterface.
Base class for creating new nodally-based mortar auxiliary kernels.
vec_type::const_iterator const_iterator
BoundaryID _bnd_id
boundary id for the node
Definition BndNode.h:26
libMesh::Node * _node
pointer to the node
Definition BndNode.h:24