15 #include "libmesh/quadrature.h" 23 ret.
set<std::vector<BoundaryName>>(
"boundary") = {
24 params_in.
get<BoundaryName>(
"secondary_boundary")};
29 template <
typename ComputeValueType>
35 params.
set<
bool>(
"ghost_point_neighbors") =
true;
39 "incremental",
false,
"Whether to accumulate mortar auxiliary kernel value");
49 template <
typename ComputeValueType>
54 _displaced(this->template getParam<bool>(
"use_displaced_mesh")),
55 _fe_problem(*this->template getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base")),
57 _incremental(this->template getParam<bool>(
"incremental")),
59 _test_lower(_var.phiLower()),
60 _coord_msm(_assembly.mortarCoordTransformation())
64 "MortarNodalAuxKernel derived classes populate nodal aux variables only.");
67 template <
typename ComputeValueType>
71 std::array<const MortarNodalAuxKernelTempl<ComputeValueType> *, 1> consumers = {{
this}};
77 _secondary_ip_sub_to_mats,
78 _primary_ip_sub_to_mats,
79 _secondary_boundary_mats);
82 template <
typename ComputeValueType>
86 if (!_var.isNodalDefined())
89 ComputeValueType
value(0);
90 Real total_volume = 0;
92 const auto & its = amg().secondariesToMortarSegments(*_current_node);
94 auto act_functor = [&
value, &total_volume,
this]()
98 value += computeValue();
99 total_volume += _msm_volume;
102 std::array<MortarNodalAuxKernelTempl<ComputeValueType> *, 1> consumers = {{
this}};
112 _secondary_ip_sub_to_mats,
113 _primary_ip_sub_to_mats,
114 _secondary_boundary_mats,
125 if (MooseUtils::relativeFuzzyEqual(total_volume, 0.0))
128 value /= total_volume;
132 _var.setNodalValue(
value);
135 mooseAssert(_u_old.size() == 1,
136 "Expected 1 value in MortarNodalAuxKernel, but got " << _u_old.size());
137 _var.setNodalValue(
value + _u_old[0]);
141 template <
typename ComputeValueType>
146 "not clear where this should be implemented in the compute loop. If you want to implement " 147 "this function, please contact a MOOSE developer and tell them your use case");
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void precalculateValue() override final
This callback is used for AuxKernelTempls that need to perform a per-element calculation.
void setupMortarMaterials(const Consumers &consumers, FEProblemBase &fe_problem, const AutomaticMortarGeneration &amg, const THREAD_ID tid, std::map< SubdomainID, std::deque< MaterialBase *>> &secondary_ip_sub_to_mats, std::map< SubdomainID, std::deque< MaterialBase *>> &primary_ip_sub_to_mats, std::deque< MaterialBase *> &secondary_boundary_mats)
This function creates containers of materials necessary to execute the mortar method for a supplied s...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void compute() override
Computes the value and stores it in the solution vector.
static InputParameters validParams()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
An interface for accessing mortar mesh data.
MortarNodalAuxKernelTempl(const InputParameters ¶meters)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
Base class for creating new nodally-based mortar auxiliary kernels.
void loopOverMortarSegments(const Iterators &secondary_elems_to_mortar_segments, Assembly &assembly, SubProblem &subproblem, FEProblemBase &fe_problem, const AutomaticMortarGeneration &amg, const bool displaced, const Consumers &consumers, const THREAD_ID tid, const std::map< SubdomainID, std::deque< MaterialBase *>> &secondary_ip_sub_to_mats, const std::map< SubdomainID, std::deque< MaterialBase *>> &primary_ip_sub_to_mats, const std::deque< MaterialBase *> &secondary_boundary_mats, const ActionFunctor act, const bool reinit_mortar_user_objects)
This method will loop over pairs of secondary elements and their corresponding mortar segments...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
static InputParameters validParams()
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
bool isNodal() const
Nodal or elemental kernel?