https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ModularGapConductanceConstraint.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
11#include "GapFluxModelBase.h"
13#include "ADUtils.h"
15
16#include "MooseError.h"
17
18#include "libmesh/parallel_algebra.h"
19
21
24{
27 "Computes the residual and Jacobian contributions for the 'Lagrange Multiplier' "
28 "implementation of the thermal contact problem. For more information, see the "
29 "detailed description here: http://tinyurl.com/gmmhbe9");
30 params.addParam<std::vector<UserObjectName>>("gap_flux_models",
31 "List of GapFluxModel user objects");
32 params.addCoupledVar("displacements", "Displacement variables");
33
34 // The nodal normal at a secondary node depends on every face incident to it. When the
35 // displacements are solved with the temperature, the Jacobian therefore couples the secondary
36 // face point neighbors. The variables exist by the time the coupling functors are added.
38 "AugmentSparsityOnInterface",
39 Moose::RelationshipManagerType::COUPLING,
40 [](const InputParameters & obj_params, InputParameters & rm_params)
41 {
42 rm_params.set<bool>("use_displaced_mesh") = obj_params.get<bool>("use_displaced_mesh");
43 rm_params.set<BoundaryName>("secondary_boundary") =
44 obj_params.get<BoundaryName>("secondary_boundary");
45 rm_params.set<BoundaryName>("primary_boundary") =
46 obj_params.get<BoundaryName>("primary_boundary");
47 rm_params.set<SubdomainName>("secondary_subdomain") =
48 obj_params.get<SubdomainName>("secondary_subdomain");
49 rm_params.set<SubdomainName>("primary_subdomain") =
50 obj_params.get<SubdomainName>("primary_subdomain");
51 rm_params.set<bool>("ghost_higher_d_neighbors") =
52 obj_params.get<bool>("ghost_higher_d_neighbors");
53 // Relationship manager callbacks also run before the problem and its variables exist
54 const auto & problem =
55 obj_params.get<MooseApp *>(MooseBase::app_param)->actionWarehouse().problemBase();
56 if (!problem || !obj_params.isParamValid("displacements") ||
57 !obj_params.isParamValid("secondary_variable"))
58 return;
59 const auto & temperature = obj_params.get<VariableName>("secondary_variable");
60 const auto displacements = obj_params.getVecMooseType("displacements");
61 if (!problem->hasVariable(temperature))
62 return;
63 for (const auto & disp : displacements)
64 if (!problem->hasVariable(disp))
65 return;
66 rm_params.set<bool>("ghost_point_neighbors") =
67 displacementsShareSystem(*problem, temperature, displacements);
68 });
69
70 MooseEnum gap_geometry_type("AUTO PLATE CYLINDER SPHERE", "AUTO");
71 params.addParam<MooseEnum>(
72 "gap_geometry_type",
73 gap_geometry_type,
74 "Gap calculation type. The geometry type is used to compute "
75 "gap distances and scale fluxes to ensure energy balance. If AUTO is selected, the gap "
76 "geometry is automatically set via the mesh coordinate system.");
77 params.addRangeCheckedParam<Real>("max_gap", 1.0e6, "max_gap>=0", "A maximum gap size");
78 params.addParam<RealVectorValue>("cylinder_axis_point_1",
79 "Start point for line defining cylindrical axis");
80 params.addParam<RealVectorValue>("cylinder_axis_point_2",
81 "End point for line defining cylindrical axis");
82 params.addParam<RealVectorValue>("sphere_origin", "Origin for sphere geometry");
83
84 // We should default use_displaced_mesh to true. If no displaced mesh exists
85 // FEProblemBase::addConstraint will automatically correct it to false. However,
86 // this will still prompt a call from AugmentSparsityOnInterface to get a displaced
87 // mortar interface since object._use_displaced_mesh = true.
88
89 // These parameter groups have to match the MortarGapHeatTransferAction's
90 params.addParamNamesToGroup("gap_flux_models", "Gap flux models");
92 "gap_geometry_type max_gap cylinder_axis_point_1 cylinder_axis_point_2 sphere_origin",
93 "Gap geometry");
94
95 return params;
96}
97
99 : ADMortarConstraint(parameters),
100 _gap_flux_model_names(getParam<std::vector<UserObjectName>>("gap_flux_models")),
101 _disp_name(parameters.getVecMooseType("displacements")),
102 _n_disp(_disp_name.size()),
103 _disp_secondary(_n_disp),
104 _disp_primary(_n_disp),
105 _gap_geometry_type(getParam<MooseEnum>("gap_geometry_type").getEnum<GapGeometry>()),
106 _gap_width(0.0),
107 _surface_integration_factor(1.0),
108 _p1(declareRestartableData<Point>("cylinder_axis_point_1", Point(0, 1, 0))),
109 _p2(declareRestartableData<Point>("cylinder_axis_point_2", Point(0, 0, 0))),
110 _r1(0),
111 _r2(0),
112 _max_gap(getParam<Real>("max_gap")),
113 _adjusted_length(0.0),
114 _disp_x_var(getVar("displacements", 0)),
115 _disp_y_var(getVar("displacements", 1)),
116 _disp_z_var(_n_disp == 3 ? getVar("displacements", 2) : nullptr),
117 _nodal_frames(std::array<const MooseVariable *, 3>{{_disp_x_var, _disp_y_var, _disp_z_var}}),
118 // Displacements solved in another system or as auxiliary variables enter the gap width with
119 // the stored normals only
120 _normal_derivatives(_displaced && _n_disp &&
122 {{_disp_x_var, _disp_y_var, _disp_z_var}}, _sys))
123{
124 if (!interpolateNormals())
125 paramError("interpolate_normals",
126 "The gap width is evaluated at quadrature points and requires interpolated "
127 "normals.");
128
129 if (_n_disp && !getParam<bool>("use_displaced_mesh"))
130 paramWarning("displacements",
131 "You are coupling displacement variables but are evaluating the gap width on the "
132 "undisplaced mesh. This is probably a mistake.");
133
134 for (unsigned int i = 0; i < _n_disp; ++i)
135 {
136 auto & disp_var = _subproblem.getStandardVariable(_tid, _disp_name[i]);
137 _disp_secondary[i] = &disp_var.adSln();
138 _disp_primary[i] = &disp_var.adSlnNeighbor();
139 }
140
141 const auto use_displaced_mesh = getParam<bool>("use_displaced_mesh");
142
143 for (const auto & name : _gap_flux_model_names)
144 {
145 const auto & gap_model = getUserObjectByName<GapFluxModelBase>(name);
146
147 // This constraint explicitly calls the gap flux model user objects to
148 // obtain contributions to its residuals. It therefore depends on all
149 // variables and material properties, that these gap flux models use, to be
150 // computed and up to date. To ensure that we collect all variable and
151 // material property dependencies of these models and declare them as
152 // dependencies of this constraint object. This turns an implicit, hidden
153 // dependency into an explicit dependency that MOOSE will automatically fulfill.
154
155 // pass variable dependencies through
156 const auto & var_dependencies = gap_model.getMooseVariableDependencies();
157 for (const auto & var : var_dependencies)
159
160 // pass material property dependencies through
161 const auto & mat_dependencies = gap_model.getMatPropDependencies();
162 _material_property_dependencies.insert(mat_dependencies.begin(), mat_dependencies.end());
163
164 // ensure that the constraint and the flux models operate on the same mesh
165 if (gap_model.parameters().get<bool>("use_displaced_mesh") != use_displaced_mesh)
167 "use_displaced_mesh",
168 "The gap flux model '",
169 name,
170 "' should operate on the same mesh (displaced/undisplaced) as the constraint object");
171
172 gap_model.checkConstraint(*this);
173
174 // add gap model to list
175 _gap_flux_models.push_back(&gap_model);
176 }
177}
178
179void
186
187void
194
195const ADRealVectorValue &
197{
198 // The secondary face quadrature points are those of the current mortar segment
200 {
201 const bool do_derivatives = _normal_derivatives && Moose::doDerivatives(_subproblem, _sys);
203 amg(), *_lower_secondary_elem, _qrule_face->get_points(), _normals, do_derivatives);
205 }
206 return _qp_normals[_qp];
207}
208
209void
211{
213 const auto & subdomainIDs = _mesh.meshSubdomains();
214
215 // make sure all subdomains are using the same coordinate system
216 Moose::CoordinateSystemType coord_system = feProblem().getCoordSystem(*subdomainIDs.begin());
217 for (auto subdomain : subdomainIDs)
218 if (feProblem().getCoordSystem(subdomain) != coord_system)
219 mooseError("ModularGapConductanceConstraint requires all subdomains to have the same "
220 "coordinate system.");
221
222 // Select proper coordinate system and geometry (plate, cylinder, sphere)
224 _pars, coord_system, feProblem().getAxisymmetricRadialCoord(), _gap_geometry_type);
225}
226
227void
229 const InputParameters & params,
230 const Moose::CoordinateSystemType coord_sys,
231 unsigned int axisymmetric_radial_coord,
232 GapGeometry & gap_geometry_type)
233{
234
235 // Determine what type of gap geometry we are dealing with
236 // Either user input or from system's coordinate systems
237 if (gap_geometry_type == GapGeometry::AUTO)
238 {
239 if (coord_sys == Moose::COORD_XYZ)
240 gap_geometry_type = GapGeometry::PLATE;
241 else if (coord_sys == Moose::COORD_RZ)
242 gap_geometry_type = GapGeometry::CYLINDER;
243 else if (coord_sys == Moose::COORD_RSPHERICAL)
244 gap_geometry_type = GapGeometry::SPHERE;
245 else
246 mooseError("Internal Error");
247 }
248
249 if (params.isParamValid("cylinder_axis_point_1") != params.isParamValid("cylinder_axis_point_2"))
251 "cylinder_axis_point_1",
252 "Either specify both `cylinder_axis_point_1` and `cylinder_axis_point_2` or neither.");
253
254 // Check consistency of geometry information
255 // Inform the user of needed input according to gap geometry (if not PLATE)
256 if (gap_geometry_type == GapGeometry::PLATE)
257 {
258 if (coord_sys == Moose::COORD_RSPHERICAL)
259 paramError("gap_geometry_type",
260 "'gap_geometry_type = PLATE' cannot be used with models having a spherical "
261 "coordinate system.");
262 }
263 else if (gap_geometry_type == GapGeometry::CYLINDER)
264 {
265 if (coord_sys == Moose::COORD_XYZ)
266 {
267 if (params.isParamValid("cylinder_axis_point_1") &&
268 params.isParamValid("cylinder_axis_point_2"))
269 {
270 _p1 = params.get<RealVectorValue>("cylinder_axis_point_1");
271 _p2 = params.get<RealVectorValue>("cylinder_axis_point_2");
272 }
273 else if (_mesh.dimension() == 3)
274 paramError("gap_geometry_type",
275 "For 'gap_geometry_type = CYLINDER' to be used with a Cartesian model in 3D, "
276 "'cylinder_axis_point_1' and 'cylinder_axis_point_2' must be specified.");
277 else
278 {
281 "ModularGapConductanceConstraint '", name(), "' deduced cylinder axis as ", _p1, _p2);
282 }
283 }
284 else if (coord_sys == Moose::COORD_RZ)
285 {
286 if (params.isParamValid("cylinder_axis_point_1") ||
287 params.isParamValid("cylinder_axis_point_2"))
288 paramError("cylinder_axis_point_1",
289 "The 'cylinder_axis_point_1' and 'cylinder_axis_point_2' cannot be specified "
290 "with axisymmetric models. The y-axis is used as the cylindrical axis of "
291 "symmetry.");
292
293 if (axisymmetric_radial_coord == 0) // R-Z problem
294 {
295 _p1 = Point(0, 0, 0);
296 _p2 = Point(0, 1, 0);
297 }
298 else // Z-R problem
299 {
300 _p1 = Point(0, 0, 0);
301 _p2 = Point(1, 0, 0);
302 }
303 }
304 else if (coord_sys == Moose::COORD_RSPHERICAL)
305 paramError("gap_geometry_type",
306 "'gap_geometry_type = CYLINDER' cannot be used with models having a spherical "
307 "coordinate system.");
308 }
309 else if (gap_geometry_type == GapGeometry::SPHERE)
310 {
311 if (coord_sys == Moose::COORD_XYZ || coord_sys == Moose::COORD_RZ)
312 {
313 if (params.isParamValid("sphere_origin"))
314 _p1 = params.get<RealVectorValue>("sphere_origin");
315 else if (coord_sys == Moose::COORD_XYZ)
316 {
319 "ModularGapConductanceConstraint '", name(), "' deduced sphere origin as ", _p1);
320 }
321 else
322 paramError("gap_geometry_type",
323 "For 'gap_geometry_type = SPHERE' to be used with an axisymmetric "
324 "model, 'sphere_origin' must be specified.");
325 }
326 else if (coord_sys == Moose::COORD_RSPHERICAL)
327 {
328 if (params.isParamValid("sphere_origin"))
329 paramError("sphere_origin",
330 "The 'sphere_origin' cannot be specified with spherical models. x=0 is used "
331 "as the spherical origin.");
332 _p1 = Point(0, 0, 0);
333 }
334 }
335}
336
337ADReal
339{
340
341 ADReal surface_integration_factor = 1.0;
342
344 surface_integration_factor = 0.5 * (_r1 + _r2) / _radius;
346 surface_integration_factor = 0.25 * (_r1 + _r2) * (_r1 + _r2) / (_radius * _radius);
347
348 return surface_integration_factor;
349}
350
351ADReal
353{
354 using std::log, std::min;
355
357 {
358 const auto denominator = _radius * log(_r2 / _r1);
359 return min(denominator, _max_gap);
360 }
362 {
363 const auto denominator = _radius * _radius * ((1.0 / _r1) - (1.0 / _r2));
364 return min(denominator, _max_gap);
365 }
366 else
367 return min(_r2 - _r1, _max_gap);
368}
369
370void
372{
373 const Point & current_point = _q_point[_qp];
374
376 {
377 // The vector _p1 + t*(_p2-_p1) defines the cylindrical axis. The point along this
378 // axis closest to current_point is found by the following for t:
379 const Point p2p1(_p2 - _p1);
380 const Point p1pc(_p1 - current_point);
381 const Real t = -(p1pc * p2p1) / p2p1.norm_sq();
382
383 // The nearest point on the cylindrical axis to current_point is p.
384 const Point p(_p1 + t * p2p1);
385 Point rad_vec(current_point - p);
386 Real rad = rad_vec.norm();
387 rad_vec /= rad;
388 Real rad_dot_norm = rad_vec * _normals[_qp];
389
390 if (rad_dot_norm > 0)
391 {
392 _r1 = rad;
393 _r2 = rad + gap_length;
394 _radius = _r1;
395 }
396 else if (rad_dot_norm < 0)
397 {
398 _r1 = rad - gap_length;
399 _r2 = rad;
400 _radius = _r2;
401 }
402 else
403 mooseError("Issue with cylindrical flux calculation normals.\n");
404 }
406 {
407 const Point origin_to_curr_point(current_point - _p1);
408 const Real normal_dot = origin_to_curr_point * _normals[_qp];
409 const Real curr_point_radius = origin_to_curr_point.norm();
410 if (normal_dot > 0) // on inside surface
411 {
412 _r1 = curr_point_radius;
413 _r2 = curr_point_radius + gap_length;
414 _radius = _r1;
415 }
416 else if (normal_dot < 0) // on outside surface
417 {
418 _r1 = curr_point_radius - gap_length;
419 _r2 = curr_point_radius;
420 _radius = _r2;
421 }
422 else
423 mooseError("Issue with spherical flux calculation normals. \n");
424 }
425 else
426 {
427 _r2 = gap_length;
428 _r1 = 0;
429 _radius = 0;
430 }
431}
432
433ADReal
435{
436 switch (mortar_type)
437 {
438 case Moose::MortarType::Primary:
439 return _lambda[_qp] * _test_primary[_i][_qp];
440
441 case Moose::MortarType::Secondary:
442 return -_lambda[_qp] * _test_secondary[_i][_qp];
443
444 case Moose::MortarType::Lower:
445 {
446 // we are creating an AD version of phys points primary and secondary here...
447 ADRealVectorValue ad_phys_points_primary = _phys_points_primary[_qp];
448 ADRealVectorValue ad_phys_points_secondary = _phys_points_secondary[_qp];
449
450 // ...which uses the derivative vector of the primary and secondary displacements as
451 // an approximation of the true phys points derivatives when the mesh is displacing
452 if (_displaced && _n_disp)
453 {
454 // Trim interior node variable derivatives
455 const auto & primary_ip_lowerd_map = amg().getPrimaryIpToLowerElementMap(
459 const auto & secondary_ip_lowerd_map =
461
462 std::array<const MooseVariable *, 3> var_array{{_disp_x_var, _disp_y_var, _disp_z_var}};
463 std::array<ADReal, 3> primary_disp;
464 std::array<ADReal, 3> secondary_disp;
465
466 for (unsigned int i = 0; i < _n_disp; ++i)
467 {
468 primary_disp[i] = (*_disp_primary[i])[_qp];
469 secondary_disp[i] = (*_disp_secondary[i])[_qp];
470 }
471
472 trimInteriorNodeDerivatives(primary_ip_lowerd_map, var_array, primary_disp, false);
473 trimInteriorNodeDerivatives(secondary_ip_lowerd_map, var_array, secondary_disp, true);
474
475 // Populate quantities with trimmed derivatives
476 for (unsigned int i = 0; i < _n_disp; ++i)
477 {
478 ad_phys_points_primary(i).derivatives() = primary_disp[i].derivatives();
479 ad_phys_points_secondary(i).derivatives() = secondary_disp[i].derivatives();
480 }
481 }
482
483 // compute an ADReal gap width to pass to each gap flux model
484 _gap_width = (ad_phys_points_primary - ad_phys_points_secondary) * qpNormal();
485
486 // First, compute radii with _gap_width
488
489 // With radii, compute adjusted gap length for conduction
491
492 // Ensure energy balance for non-flat (non-PLATE) general geometries when using radiation
494
495 // The Lagrange multiplier _is_ the gap flux
496 return (_lambda[_qp] - computeGapFlux()) * _test[_i][_qp];
497 }
498
499 default:
500 return 0;
501 }
502}
503
504bool
506 const FEProblemBase & problem,
507 const VariableName & temperature,
508 const std::vector<std::string> & displacements)
509{
510 const auto temperature_sys = problem.systemNumForVariable(temperature);
511 for (const auto & disp : displacements)
512 if (problem.systemNumForVariable(disp) != temperature_sys)
513 return false;
514 return true;
515}
516
517ADReal
519{
520 // Sum up all flux contributions from all supplied gap flux models
521 ADReal flux = 0.0;
522 for (const auto & model : _gap_flux_models)
523 flux += model->computeFluxInternal(*this);
524 return flux;
525}
526
527void
529{
530 Point position;
531 Real area = 0.0;
532 const auto my_pid = processor_id();
533
534 // build side element list as (element, side, id) tuples
535 const auto bnd = _mesh.buildActiveSideList();
536
537 std::unique_ptr<const Elem> side_ptr;
538 for (auto [elem_id, side, id] : bnd)
539 if (id == _primary_id)
540 {
541 const auto * elem = _mesh.elemPtr(elem_id);
542 if (elem->processor_id() != my_pid)
543 continue;
544
545 // update side_ptr
546 elem->side_ptr(side_ptr, side);
547
548 // area of the (linearized) side
549 const auto side_area = side_ptr->volume();
550
551 // position of the side
552 const auto side_position = side_ptr->true_centroid();
553
554 // sum up
555 position += side_position * side_area;
556 area += side_area;
557 }
558
559 // parallel communication
560 _communicator.sum(position);
561 _communicator.sum(area);
562
563 // set axis
564 if (area == 0.0)
565 {
567 paramError("gap_geometry_type",
568 "Unable to decuce cylinder axis automatically, please specify "
569 "'cylinder_axis_point_1' and 'cylinder_axis_point_2'.");
571 paramError("gap_geometry_type",
572 "Unable to decuce sphere origin automatically, please specify "
573 "'sphere_origin'.");
574 else
575 mooseError("Internal error.");
576 }
577
578 _p1 = position / area;
579 _p2 = _p1 + Point(0, 0, 1);
580}
DualNumber< Real, DNDerivativeType, true > ADReal
const Real p
const PertinentGeochemicalSystem model(database, {"H2O", "H+", "HCO3-", "O2(aq)", "Ca++", ">(s)FeOH", "radius_neg1", "radius_neg1.5"}, {"Calcite"}, {}, {"Calcite_asdf"}, {"CH4(aq)"}, {">(s)FeOCa+"}, "O2(aq)", "e-")
registerMooseObject("HeatTransferApp", ModularGapConductanceConstraint)
void mooseInfoRepeated(Args &&... args)
const ADVariableValue & _lambda
static InputParameters validParams()
std::map< unsigned int, unsigned int > getSecondaryIpToLowerElementMap(const Elem &lower_secondary_elem) const
std::map< unsigned int, unsigned int > getPrimaryIpToLowerElementMap(const Elem &primary_elem, const Elem &primary_elem_ip, const Elem &lower_secondary_elem) const
static const Elem & primaryInteriorParentOrSelf(const Elem &lower_primary_elem)
unsigned int _qp
unsigned int _i
unsigned int systemNumForVariable(const VariableName &variable_name) const
std::vector< std::string > getVecMooseType(const std::string &name) const
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
void addRelationshipManager(const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
bool isParamValid(const std::string &name) const
std::unordered_set< unsigned int > _material_property_dependencies
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
const MooseVariable *const _disp_x_var
x-displacement variable
void computeGapRadii(const ADReal &gap_length)
Computes radii as a function of point and geometry.
const MooseVariable *const _disp_z_var
z-displacement variable
std::vector< const GapFluxModelBase * > _gap_flux_models
Gap flux models.
virtual ADReal computeQpResidual(Moose::MortarType mortar_type) override
Computes the residual for the LM equation, lambda = (k/l)*(T^(1) - PT^(2)).
const Elem * _qp_normals_msm_elem
The mortar segment whose quadrature points _qp_normals belong to.
ModularGapConductanceConstraint(const InputParameters &parameters)
ADReal _gap_width
Gap width to pass into flux models.
ADReal _surface_integration_factor
Factor to preserve energy balance (due to mismatch in primary/secondary differential surface sizes)
std::vector< const ADVariableValue * > _disp_secondary
Point & _p1
Points for geometric definitions.
Moose::Mortar::ADNodalFrames _nodal_frames
Secondary nodal normals with their displacement derivatives.
std::vector< UserObjectName > _gap_flux_model_names
Gap flux model names.
static bool displacementsShareSystem(const FEProblemBase &problem, const VariableName &temperature, const std::vector< std::string > &displacements)
std::vector< const ADVariableValue * > _disp_primary
const bool _normal_derivatives
Whether the displacement derivatives of the normals can be included, i.e.
ADReal _r1
Radii for quadrature points.
const MooseVariable *const _disp_y_var
y-displacement variable
virtual void setGapGeometryParameters(const InputParameters &params, const Moose::CoordinateSystemType coord_sys, unsigned int axisymmetric_radial_coord, GapGeometry &gap_geometry_type)
const std::vector< std::string > _disp_name
Displacement variables.
GapGeometry
Gap geometry (user input or internally overwritten)
enum ModularGapConductanceConstraint::GapGeometry _gap_geometry_type
void deduceGeometryParameters()
Automatically set up axis/center for 2D cartesian problems with cylindrical/spherical gap geometry.
std::vector< ADRealVectorValue > _qp_normals
The normals at the quadrature points of _qp_normals_msm_elem.
void paramWarning(const std::string &param, Args... args) const
const std::string & name() const
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
const InputParameters & _pars
static const std::string app_param
virtual unsigned int dimension() const
virtual Elem * elemPtr(const dof_id_type i)
const std::set< SubdomainID > & meshSubdomains() const
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
void addMooseVariableDependency(MooseVariableFieldBase *var)
const ADTemplateVariableValue< OutputType > & adSln() const override
std::vector< ADRealVectorValue > interpolatedNormals(const AutomaticMortarGeneration &amg, const Elem &secondary_elem, const std::vector< Point > &xi_pts, const std::vector< Point > &stored_normals, bool do_derivatives)
const VariableTestValue & _test_secondary
const FEProblemBase & feProblem() const
const VariableTestValue & _test
const std::vector< Point > & _q_point
const VariableTestValue & _test_primary
const bool _displaced
Elem const *const & _lower_secondary_elem
const libMesh::QBase *const & _qrule_face
const AutomaticMortarGeneration & amg() const
const BoundaryID _primary_id
Elem const *const & _lower_primary_elem
const MooseArray< Point > & _phys_points_secondary
const Elem *const & _msm_elem
const MooseArray< Point > & _phys_points_primary
std::vector< Point > _normals
static void trimInteriorNodeDerivatives(const std::map< unsigned int, unsigned int > &primary_ip_lowerd_map, const Variables &moose_var, DualNumbers &ad_vars, const bool is_secondary)
bool interpolateNormals() const
MooseMesh & _mesh
SubProblem & _subproblem
SystemBase & _sys
virtual void residualSetup()
virtual void jacobianSetup()
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
const Parallel::Communicator & _communicator
processor_id_type processor_id() const
const std::vector< Point > & get_points() const
bool supportsNodalNormalDerivatives(const std::array< const MooseVariable *, 3 > &disp_vars, const SystemBase &sys)
bool doDerivatives(const SubProblem &subproblem, const SystemBase &sys)
CoordinateSystemType
COORD_RSPHERICAL