14 #include "libmesh/quadrature.h" 22 ret.
set<std::vector<BoundaryName>>(
"boundary") = {
23 params_in.
get<BoundaryName>(
"secondary_boundary")};
28 template <
typename ComputeValueType>
34 params.
set<
bool>(
"ghost_point_neighbors") =
true;
38 "incremental",
false,
"Whether to accumulate mortar auxiliary kernel value");
48 template <
typename ComputeValueType>
53 _displaced(this->template getParam<bool>(
"use_displaced_mesh")),
54 _fe_problem(*this->template getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base")),
56 _incremental(this->template getParam<bool>(
"incremental")),
58 _test_lower(_var.phiLower()),
59 _coord_msm(_assembly.mortarCoordTransformation())
63 "MortarNodalAuxKernel derived classes populate nodal aux variables only.");
66 template <
typename ComputeValueType>
70 std::array<const MortarNodalAuxKernelTempl<ComputeValueType> *, 1> consumers = {{
this}};
76 _secondary_ip_sub_to_mats,
77 _primary_ip_sub_to_mats,
78 _secondary_boundary_mats);
81 template <
typename ComputeValueType>
85 if (!_var.isNodalDefined())
88 ComputeValueType
value(0);
89 Real total_volume = 0;
91 const auto & its = amg().secondariesToMortarSegments(*_current_node);
93 auto act_functor = [&
value, &total_volume,
this]()
97 value += computeValue();
98 total_volume += _msm_volume;
101 std::array<MortarNodalAuxKernelTempl<ComputeValueType> *, 1> consumers = {{
this}};
111 _secondary_ip_sub_to_mats,
112 _primary_ip_sub_to_mats,
113 _secondary_boundary_mats,
127 value /= total_volume;
131 _var.setNodalValue(
value);
134 mooseAssert(_u_old.size() == 1,
135 "Expected 1 value in MortarNodalAuxKernel, but got " << _u_old.size());
136 _var.setNodalValue(
value + _u_old[0]);
140 template <
typename ComputeValueType>
145 "not clear where this should be implemented in the compute loop. If you want to implement " 146 "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
bool relativeFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
static InputParameters validParams()
static InputParameters validParams()
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
bool isNodal() const
Nodal or elemental kernel?