https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
MortarConsumerInterface Class Reference

An interface for accessing mortar mesh data. More...

#include <MortarConsumerInterface.h>

Inheritance diagram for MortarConsumerInterface:
[legend]

Public Member Functions

 MortarConsumerInterface (const MooseObject *moose_object)
 
SubdomainID primarySubdomain () const
 
SubdomainID secondarySubdomain () const
 
bool onInterface (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id) const
 

Static Public Member Functions

static InputParameters validParams ()
 
static InputParameters triangulationParams ()
 

Protected Member Functions

const std::set< SubdomainID > & getHigherDimSubdomainIDs () const
 
const std::set< BoundaryID > & getBoundaryIDs () const
 
const AutomaticMortarGeneration & amg () const
 Retrieve the automatic mortar generation object associated with this constraint.
 
bool interpolateNormals () const
 Whether to interpolate the nodal normals (e.g.
 
void checkPetrovGalerkinQuadraticFaces (const MooseObject &moose_object, const MooseVariableFieldBase &lm_var) const
 Report an error if Petrov-Galerkin weights the gap of a SECOND order dual Lagrange multiplier with the standard basis on QUAD8 or TRI6 secondary faces.
 

Static Protected Member Functions

static void trimDerivative (dof_id_type remove_derivative_index, ADReal &dual_number)
 Get rid of AD derivative entries by dof index.
 
template<typename Variables , typename DualNumbers >
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)
 Get rid of interior node variable's derivatives.
 

Protected Attributes

FEProblemBase & _mci_fe_problem
 
SubProblem & _mci_subproblem
 
const THREAD_ID _mci_tid
 
MooseMesh & _mci_mesh
 Mesh to query for boundary and subdomain ID information.
 
Assembly & _mci_assembly
 
const MortarInterfaceWarehouse & _mortar_data
 A reference to the mortar data object that holds all the mortar mesh information.
 
const BoundaryID _secondary_id
 Boundary ID for the secondary surface.
 
const BoundaryID _primary_id
 Boundary ID for the primary surface.
 
const SubdomainID _secondary_subdomain_id
 Subdomain ID for the secondary surface.
 
const SubdomainID _primary_subdomain_id
 Subdomain ID for the primary surface.
 
std::set< BoundaryID > _secondary_set
 the secondaryid set
 
std::set< BoundaryID > _boundary_ids
 the union of the secondary and primary boundary ids
 
std::set< SubdomainID > _higher_dim_subdomain_ids
 the higher dimensional subdomain ids corresponding to the interior parents
 
const bool _interpolate_normals
 Whether to interpolate the nodal normals.
 
const MooseArray< Point > & _phys_points_secondary
 The locations of the quadrature points on the interior secondary elements.
 
const MooseArray< Point > & _phys_points_primary
 The locations of the quadrature points on the interior primary elements.
 
const libMesh::QBase *const & _qrule_msm
 The quadrature rule on the mortar segment element.
 
const libMesh::QBase *const & _qrule_face
 The arbitrary quadrature rule on the lower dimensional secondary face.
 
Elem const *const & _lower_secondary_elem
 The secondary face lower dimensional element (not the mortar element!).
 
Elem const *const & _lower_primary_elem
 The primary face lower dimensional element (not the mortar element!).
 
const std::vector< Real > & _JxW_msm
 The element Jacobian times weights.
 
const Elem *const & _msm_elem
 The current mortar segment element.
 
std::vector< Point > _normals
 the normals
 

Private Member Functions

void setNormals ()
 Set the normals vector.
 

Private Attributes

const AutomaticMortarGeneration * _amg
 

Friends

class ComputeMortarFunctor
 
class FEProblemBase
 
template<typename >
class MortarNodalAuxKernelTempl
 
class MortarUserObjectThread
 
void reinitMortarUserObjects (BoundaryID, BoundaryID, bool)
 Calls the reinitialization of mortar user objects.
 

Detailed Description

An interface for accessing mortar mesh data.

Note
mci is shorthand for mortar consumer interface, so _mci_problem indicates the mortar consumer interface's problem

Definition at line 36 of file MortarConsumerInterface.h.

Constructor & Destructor Documentation

◆ MortarConsumerInterface()

MortarConsumerInterface::MortarConsumerInterface ( const MooseObject *  moose_object)

Definition at line 173 of file MortarConsumerInterface.C.

174 : _mci_fe_problem(*moose_object->getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
175 _mci_subproblem(*moose_object->getCheckedPointerParam<SubProblem *>("_subproblem")),
176 _mci_tid(moose_object->getParam<THREAD_ID>("_tid")),
178 // all geometric assembly information should be correct for nl system number 0
182 _mci_mesh.getBoundaryID(moose_object->getParam<BoundaryName>("secondary_boundary"))),
183 _primary_id(_mci_mesh.getBoundaryID(moose_object->getParam<BoundaryName>("primary_boundary"))),
185 _mci_mesh.getSubdomainID(moose_object->getParam<SubdomainName>("secondary_subdomain"))),
187 _mci_mesh.getSubdomainID(moose_object->getParam<SubdomainName>("primary_subdomain"))),
189 _interpolate_normals(moose_object->getParam<bool>("interpolate_normals")),
198{
199 const bool displaced = moose_object->isParamValid("use_displaced_mesh")
200 ? moose_object->getParam<bool>("use_displaced_mesh")
201 : false;
202 const auto minimum_projection_angle = moose_object->getParam<Real>("minimum_projection_angle");
203 const auto mortar_3d_subpatch_plane =
204 moose_object->getParam<MooseEnum>("mortar_3d_subpatch_plane")
205 .getEnum<Mortar3DSubpatchPlane>();
206
207 // Only geometric 3D mode interprets this value as an angle between subpatch normals. Averaged
208 // normal and 2D interfaces continue to use the other projection-angle checks.
209 if (_mci_mesh.dimension() == 3 &&
210 mortar_3d_subpatch_plane == Mortar3DSubpatchPlane::GEOMETRIC_NORMAL &&
211 (minimum_projection_angle < 0.0 || minimum_projection_angle > 90.0))
212 moose_object->paramError("minimum_projection_angle",
213 "Must be between 0 and 90 degrees when "
214 "mortar_3d_subpatch_plane = GEOMETRIC_NORMAL.");
215
216 // Create the mortar interface if it hasn't already been created
218 std::make_pair(_primary_id, _secondary_id),
220 displaced,
221 moose_object->getParam<bool>("periodic"),
222 moose_object->getParam<bool>("debug_mesh"),
223 moose_object->getParam<bool>("correct_edge_dropping"),
224 minimum_projection_angle,
225 mortar_3d_subpatch_plane,
226 moose_object->getParam<MooseEnum>("triangulation"),
227 moose_object->getParam<bool>("triangulate_triangles"),
228 moose_object->getParam<MooseEnum>("mortar_3d_qp_mapping")
229 .getEnum<Mortar3DQuadraturePointMapping>());
230
232 std::make_pair(_primary_id, _secondary_id),
234 displaced);
235
238
239 std::set_union(secondary_set.begin(),
240 secondary_set.end(),
241 primary_set.begin(),
242 primary_set.end(),
245}
unsigned int THREAD_ID
Definition MooseTypes.h:237
const Elem *const & neighborLowerDElem() const
Return the neighboring lower dimensional element.
Definition Assembly.h:478
const libMesh::QBase *const & qRuleMortar() const
Returns a reference to the quadrature rule for the mortar segments.
Definition Assembly.h:708
const std::vector< Real > & jxWMortar() const
Returns a reference to JxW for mortar segment elements.
Definition Assembly.h:703
const MooseArray< Point > & qPointsFace() const
Returns the reference to the current quadrature being used.
Definition Assembly.h:335
const MooseArray< Point > & qPointsFaceNeighbor() const
Returns the reference to the current quadrature points being used on the neighbor face.
Definition Assembly.h:535
const Elem *const & msmElem() const
Definition Assembly.h:1964
const libMesh::QBase *const & qRuleFace() const
Returns the reference to the current quadrature being used on a current face.
Definition Assembly.h:312
const Elem *const & lowerDElem() const
Return the lower dimensional element.
Definition Assembly.h:472
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const MortarInterfaceWarehouse & mortarData() const
Returns the mortar data object.
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
Return the undisplaced or displaced mortar generation object associated with the provided boundaries ...
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle, const Mortar3DSubpatchPlane mortar_3d_subpatch_plane, const MooseEnum &triangulation, const bool triangulate_triangles, const Mortar3DQuadraturePointMapping mortar_3d_qp_mapping=Mortar3DQuadraturePointMapping::NORMAL_PROJECTION)
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.
Definition MooseBase.h:450
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:406
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
T getEnum() const
get the current value cast to the enum type T
Definition MooseEnum.h:172
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition MooseMesh.C:2983
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition MooseMesh.C:1712
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition MooseMesh.C:1673
const AutomaticMortarGeneration * _amg
std::set< BoundaryID > _boundary_ids
the union of the secondary and primary boundary ids
Elem const *const & _lower_secondary_elem
The secondary face lower dimensional element (not the mortar element!).
const bool _interpolate_normals
Whether to interpolate the nodal normals.
const libMesh::QBase *const & _qrule_msm
The quadrature rule on the mortar segment element.
const libMesh::QBase *const & _qrule_face
The arbitrary quadrature rule on the lower dimensional secondary face.
std::set< BoundaryID > _secondary_set
the secondaryid set
const BoundaryID _primary_id
Boundary ID for the primary surface.
const MortarInterfaceWarehouse & _mortar_data
A reference to the mortar data object that holds all the mortar mesh information.
Elem const *const & _lower_primary_elem
The primary face lower dimensional element (not the mortar element!).
const MooseArray< Point > & _phys_points_secondary
The locations of the quadrature points on the interior secondary elements.
std::set< SubdomainID > _higher_dim_subdomain_ids
the higher dimensional subdomain ids corresponding to the interior parents
const Elem *const & _msm_elem
The current mortar segment element.
const SubdomainID _secondary_subdomain_id
Subdomain ID for the secondary surface.
MooseMesh & _mci_mesh
Mesh to query for boundary and subdomain ID information.
const MooseArray< Point > & _phys_points_primary
The locations of the quadrature points on the interior primary elements.
const BoundaryID _secondary_id
Boundary ID for the secondary surface.
const std::vector< Real > & _JxW_msm
The element Jacobian times weights.
const SubdomainID _primary_subdomain_id
Subdomain ID for the primary surface.
const std::set< SubdomainID > & getHigherDimSubdomainIDs(SubdomainID lower_d_subdomain_id) const
Returns the higher dimensional subdomain ids of the interior parents of the given lower-d subdomain i...
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
virtual MooseMesh & mesh()=0
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ amg()

const AutomaticMortarGeneration & MortarConsumerInterface::amg ( ) const
inlineprotected

Retrieve the automatic mortar generation object associated with this constraint.

Definition at line 209 of file MortarConsumerInterface.h.

210{
211 mooseAssert(_amg, "this should have been set in the constructor");
212 return *_amg;
213}

Referenced by setNormals().

◆ checkPetrovGalerkinQuadraticFaces()

void MortarConsumerInterface::checkPetrovGalerkinQuadraticFaces ( const MooseObject &  moose_object,
const MooseVariableFieldBase &  lm_var 
) const
protected

Report an error if Petrov-Galerkin weights the gap of a SECOND order dual Lagrange multiplier with the standard basis on QUAD8 or TRI6 secondary faces.

libMesh builds the dual basis on these faces against a transformed basis, and the nodal integrals of the standard basis are not positive there, so the combination does not converge.

Parameters
moose_objectThe object reporting the error
lm_varThe Lagrange multiplier

Definition at line 257 of file MortarConsumerInterface.C.

259{
260 if (!lm_var.useDual() || lm_var.feType().family != LAGRANGE || lm_var.feType().order != SECOND)
261 return;
262
263 for (const auto * const lower_elem :
264 _mci_mesh.getMesh().active_local_subdomain_elements_ptr_range(_secondary_subdomain_id))
265 if (lower_elem->type() == QUAD8 || lower_elem->type() == TRI6)
266 moose_object.paramError(
267 "use_petrov_galerkin",
268 "The Petrov-Galerkin approach is not supported for a SECOND order dual Lagrange "
269 "multiplier on QUAD8 or TRI6 secondary faces. Use a FIRST order multiplier or disable "
270 "`use_petrov_galerkin`.");
271}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
const libMesh::FEType & feType() const
Get the type of finite element object.
bool useDual() const
Get dual mortar option.
OrderWrapper order

Referenced by MortarConstraintBase::MortarConstraintBase().

◆ getBoundaryIDs()

const std::set< BoundaryID > & MortarConsumerInterface::getBoundaryIDs ( ) const
inlineprotected

Definition at line 71 of file MortarConsumerInterface.h.

71{ return _boundary_ids; }

◆ getHigherDimSubdomainIDs()

const std::set< SubdomainID > & MortarConsumerInterface::getHigherDimSubdomainIDs ( ) const
inlineprotected

Definition at line 67 of file MortarConsumerInterface.h.

68 {
70 }

◆ interpolateNormals()

bool MortarConsumerInterface::interpolateNormals ( ) const
inlineprotected

Whether to interpolate the nodal normals (e.g.

classic idea of evaluating field at quadrature points). If this is set to false, then non-interpolated nodal normals will be used, and then the _normals member should be indexed with _i instead of _qp

Definition at line 83 of file MortarConsumerInterface.h.

83{ return _interpolate_normals; }

Referenced by setNormals().

◆ onInterface()

bool MortarConsumerInterface::onInterface ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id 
) const
inline
Returns
Whether this object lies on the given primary-secondary boundary pair

Definition at line 263 of file MortarConsumerInterface.h.

265{
266 return (primary_boundary_id == _primary_id) && (secondary_boundary_id == _secondary_id);
267}

◆ primarySubdomain()

SubdomainID MortarConsumerInterface::primarySubdomain ( ) const
inline
Returns
The primary lower dimensional subdomain id

Definition at line 54 of file MortarConsumerInterface.h.

54{ return _primary_subdomain_id; }

◆ secondarySubdomain()

SubdomainID MortarConsumerInterface::secondarySubdomain ( ) const
inline
Returns
The secondary lower dimensional subdomain id

Definition at line 59 of file MortarConsumerInterface.h.

◆ setNormals()

void MortarConsumerInterface::setNormals ( )
private

Set the normals vector.

Definition at line 248 of file MortarConsumerInterface.C.

249{
250 if (interpolateNormals())
252 else
254}
std::vector< Point > getNormals(const Elem &secondary_elem, const std::vector< Point > &xi1_pts) const
Compute the normals at given reference points on a secondary element.
std::vector< Point > getNodalNormals(const Elem &secondary_elem) const
const AutomaticMortarGeneration & amg() const
Retrieve the automatic mortar generation object associated with this constraint.
std::vector< Point > _normals
the normals
bool interpolateNormals() const
Whether to interpolate the nodal normals (e.g.
const std::vector< Point > & get_points() const

◆ triangulationParams()

InputParameters MortarConsumerInterface::triangulationParams ( )
static
Returns
An InputParameters object containing just the parameters that control 3D mortar polygon triangulation (triangulation, triangulate_triangles). Provided so that downstream actions / objects which need to expose the same controls (e.g. ContactAction) can pull these definitions in via params += rather than duplicating them.

Definition at line 131 of file MortarConsumerInterface.C.

132{
134
135 MooseEnum triangulation(
136#if defined(LIBMESH_HAVE_TRIANGLE) || defined(LIBMESH_HAVE_POLY2TRI)
137 "vertex centroid ear_clipping delaunay",
138#else
139 "vertex centroid ear_clipping",
140#endif
141 "centroid");
142 triangulation.addDocumentation(
143 "vertex",
144 "Triangulate clipped 3D mortar polygons by forming a fan from an existing polygon vertex.");
145 triangulation.addDocumentation(
146 "centroid",
147 "Triangulate clipped 3D mortar polygons by forming a fan from a polygon centroid.");
148 triangulation.addDocumentation(
149 "ear_clipping", "Triangulate clipped 3D mortar polygons with an ear-clipping algorithm.");
150#if defined(LIBMESH_HAVE_TRIANGLE) || defined(LIBMESH_HAVE_POLY2TRI)
151 triangulation.addDocumentation(
152 "delaunay",
153 "Triangulate clipped 3D mortar polygons using libMesh's constrained-Delaunay PSLG "
154 "triangulation backend while preserving polygon boundary edges.");
155#endif
156 params.addParam<MooseEnum>(
157 "triangulation",
158 triangulation,
159 "Strategy used to triangulate clipped 3D mortar polygons into mortar segments. The default "
160 "is 'centroid' to preserve the legacy 3D mortar segmentation behavior.");
161 params.addParam<bool>(
162 "triangulate_triangles",
163 false,
164 "Whether a clipped 3D mortar polygon that is already a triangle should still be subdivided "
165 "during triangulation. When enabled, already-triangular polygons are subdivided with the "
166 "centroid-based path because the vertex-fan, ear-clipping, and Delaunay backends cannot "
167 "refine a triangle any further on their own.");
168
169 return params;
170}
InputParameters emptyInputParameters()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.

Referenced by validParams().

◆ trimDerivative()

void MortarConsumerInterface::trimDerivative ( dof_id_type  remove_derivative_index,
ADReal &  dual_number 
)
staticprotected

Get rid of AD derivative entries by dof index.

Definition at line 274 of file MortarConsumerInterface.C.

276{
277 auto md_it = dual_number.derivatives().nude_data().begin();
278 auto mi_it = dual_number.derivatives().nude_indices().begin();
279
280 auto d_it = dual_number.derivatives().nude_data().begin();
281
282 for (auto i_it = dual_number.derivatives().nude_indices().begin();
283 i_it != dual_number.derivatives().nude_indices().end();
284 ++i_it, ++d_it)
285 if (*i_it != remove_derivative_index)
286 {
287 *mi_it = *i_it;
288 *md_it = *d_it;
289 ++mi_it;
290 ++md_it;
291 }
292
293 std::size_t n_indices = md_it - dual_number.derivatives().nude_data().begin();
294 dual_number.derivatives().nude_indices().resize(n_indices);
295 dual_number.derivatives().nude_data().resize(n_indices);
296}

Referenced by trimInteriorNodeDerivatives().

◆ trimInteriorNodeDerivatives()

template<typename Variables , typename DualNumbers >
void MortarConsumerInterface::trimInteriorNodeDerivatives ( const std::map< unsigned int, unsigned int > &  primary_ip_lowerd_map,
const Variables &  moose_var,
DualNumbers &  ad_vars,
const bool  is_secondary 
)
staticprotected

Get rid of interior node variable's derivatives.

Definition at line 217 of file MortarConsumerInterface.h.

222{
223 //
224 // Remove interior node variable's derivatives from AD objects.
225 //
226
227 mooseAssert(moose_vars.size(), "Should have passed at least one variable");
228 const auto num_indices = is_secondary ? moose_vars[0]->dofIndices().size()
229 : moose_vars[0]->dofIndicesNeighbor().size();
230#ifdef DEBUG
231 for (const auto i : make_range(std::size_t(1), moose_vars.size()))
232 if (auto * moose_var = moose_vars[i])
233 mooseAssert(is_secondary ? moose_var->dofIndices().size()
234 : moose_var->dofIndicesNeighbor().size() == num_indices,
235 "These must be the same for all passed in variables");
236#endif
237
238 for (const auto dof_index : make_range(num_indices))
239 if (!domain_ip_lowerd_map.count(dof_index))
240 {
241 for (const auto * const moose_var : moose_vars)
242 {
243 // It's valid for a user to pass a container that represents a LIBMESH_DIM vector of
244 // component variables for which one or two of the variables may be null depending on the
245 // mesh dimension in the simulation
246 if (!moose_var)
247 continue;
248
249 mooseAssert(moose_var->isNodal(),
250 "Trimming of interior node's derivatives is only supported for Lagrange "
251 "elements in mortar objects");
252
253 const auto remove_derivative_index = is_secondary
254 ? moose_var->dofIndices()[dof_index]
255 : moose_var->dofIndicesNeighbor()[dof_index];
256 for (auto & dual_number : dual_numbers)
257 trimDerivative(remove_derivative_index, dual_number);
258 }
259 }
260}
unsigned int count
Definition MortarUtils.C:53
static void trimDerivative(dof_id_type remove_derivative_index, ADReal &dual_number)
Get rid of AD derivative entries by dof index.
IntRange< T > make_range(T beg, T end)

◆ validParams()

InputParameters MortarConsumerInterface::validParams ( )
static

Definition at line 26 of file MortarConsumerInterface.C.

27{
28 // Create InputParameters object that will be appended to the parameters for the inheriting object
30 // On a displaced mesh this will geometrically and algebraically ghost the entire interface
32 "AugmentSparsityOnInterface",
34 [](const InputParameters & obj_params, InputParameters & rm_params)
35 {
36 rm_params.set<bool>("use_displaced_mesh") = obj_params.get<bool>("use_displaced_mesh");
37 rm_params.set<BoundaryName>("secondary_boundary") =
38 obj_params.get<BoundaryName>("secondary_boundary");
39 rm_params.set<BoundaryName>("primary_boundary") =
40 obj_params.get<BoundaryName>("primary_boundary");
41 rm_params.set<SubdomainName>("secondary_subdomain") =
42 obj_params.get<SubdomainName>("secondary_subdomain");
43 rm_params.set<SubdomainName>("primary_subdomain") =
44 obj_params.get<SubdomainName>("primary_subdomain");
45 rm_params.set<bool>("ghost_point_neighbors") =
46 obj_params.get<bool>("ghost_point_neighbors");
47 rm_params.set<bool>("ghost_higher_d_neighbors") =
48 obj_params.get<bool>("ghost_higher_d_neighbors");
49 });
50
51 params.addRequiredParam<BoundaryName>("primary_boundary",
52 "The name of the primary boundary sideset.");
53 params.addRequiredParam<BoundaryName>("secondary_boundary",
54 "The name of the secondary boundary sideset.");
55 params.addRequiredParam<SubdomainName>("primary_subdomain", "The name of the primary subdomain.");
56 params.addRequiredParam<SubdomainName>("secondary_subdomain",
57 "The name of the secondary subdomain.");
58 params.addParam<bool>(
59 "periodic",
60 false,
61 "Whether this constraint is going to be used to enforce a periodic condition. This has the "
62 "effect of changing the normals vector for projection from outward to inward facing");
63
64 params.addParam<bool>(
65 "debug_mesh",
66 false,
67 "Whether this constraint is going to enable mortar segment mesh debug information. An exodus"
68 "file will be generated if the user sets this flag to true");
69
70 params.addParam<bool>(
71 "correct_edge_dropping",
72 false,
73 "Whether to enable correct edge dropping treatment for mortar constraints. When disabled "
74 "any Lagrange Multiplier degree of freedom on a secondary element without full primary "
75 "contributions will be set (strongly) to 0.");
76
77 params.addParam<bool>(
78 "interpolate_normals",
79 true,
80 "Whether to interpolate the nodal normals (e.g. classic idea of evaluating field at "
81 "quadrature points). If this is set to false, then non-interpolated nodal normals will be "
82 "used, and then the _normals member should be indexed with _i instead of _qp");
83
84 params.addParam<bool>("ghost_point_neighbors",
85 false,
86 "Whether we should ghost point neighbors of secondary face elements, their "
87 "interior parents, and their mortar interface couples.");
88 params.addParam<Real>(
89 "minimum_projection_angle",
90 40.0,
91 "Parameter to control which angle (in degrees) is admissible for the creation of mortar "
92 "segments. If set to a value close to zero, very oblique projections are allowed, which "
93 "can result in mortar segments solving physics not meaningfully, and overprojection of "
94 "primary nodes onto the mortar segment mesh in extreme cases. In 3D with "
95 "mortar_3d_subpatch_plane = GEOMETRIC_NORMAL, this parameter also controls which primary "
96 "and secondary subpatch normal pairings are admissible before polygon clipping.");
97 params.addParam<MooseEnum>(
98 "mortar_3d_subpatch_plane",
99 MooseEnum(getMortar3DSubpatchPlaneOptions(), "GEOMETRIC_NORMAL"),
100 "Method used to construct the local 3D mortar subpatch planes used for projection and "
101 "clipping. GEOMETRIC_NORMAL uses the geometric normal of each linear or bilinear secondary "
102 "subpatch. AVERAGED_NODAL_NORMAL uses the averaged nodal normal on each secondary subpatch.");
104
105 MooseEnum mortar_3d_qp_mapping(getMortar3DQuadraturePointMappingOptions(), "normal_projection");
106 mortar_3d_qp_mapping.addDocumentation(
107 "normal_projection",
108 "Project each mortar-segment quadrature point onto the linearized primary and secondary "
109 "sub-elements along the mortar-segment normal.");
110 mortar_3d_qp_mapping.addDocumentation(
111 "reference_interpolation",
112 "Interpolate stored primary and secondary parent-face reference coordinates over each "
113 "triangular mortar segment.");
114 params.addParam<MooseEnum>(
115 "mortar_3d_qp_mapping",
116 mortar_3d_qp_mapping,
117 "Method used to map quadrature points on 3D mortar segments to primary and secondary "
118 "parent-face reference coordinates. This parameter has no effect for 2D mortar.");
119
120 params.addParam<bool>(
121 "ghost_higher_d_neighbors",
122 false,
123 "Whether we should ghost higher-dimensional neighbors. This is necessary when we are doing "
124 "second order mortar with finite volume primal variables, because in order for the method to "
125 "be second order we must use cell gradients, which couples in the neighbor cells.");
126
127 return params;
128}
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
void addRelationshipManager(const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
Tells MOOSE about a RelationshipManager that this object needs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
static InputParameters triangulationParams()

Referenced by MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), MortarConstraintBase::validParams(), and MortarUserObject::validParams().

Friends And Related Symbol Documentation

◆ ComputeMortarFunctor

friend class ComputeMortarFunctor
friend

Definition at line 194 of file MortarConsumerInterface.h.

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 195 of file MortarConsumerInterface.h.

◆ MortarNodalAuxKernelTempl

template<typename >
friend class MortarNodalAuxKernelTempl
friend

Definition at line 198 of file MortarConsumerInterface.h.

◆ MortarUserObjectThread

friend class MortarUserObjectThread
friend

Definition at line 199 of file MortarConsumerInterface.h.

◆ reinitMortarUserObjects

void reinitMortarUserObjects ( BoundaryID  ,
BoundaryID  ,
bool   
)
friend

Calls the reinitialization of mortar user objects.

See also
FEProblemBase::reinitMortarUserObjects

Member Data Documentation

◆ _amg

const AutomaticMortarGeneration* MortarConsumerInterface::_amg
private

Definition at line 192 of file MortarConsumerInterface.h.

Referenced by amg().

◆ _boundary_ids

std::set<BoundaryID> MortarConsumerInterface::_boundary_ids
protected

the union of the secondary and primary boundary ids

Definition at line 140 of file MortarConsumerInterface.h.

Referenced by getBoundaryIDs().

◆ _higher_dim_subdomain_ids

std::set<SubdomainID> MortarConsumerInterface::_higher_dim_subdomain_ids
protected

the higher dimensional subdomain ids corresponding to the interior parents

Definition at line 143 of file MortarConsumerInterface.h.

Referenced by getHigherDimSubdomainIDs().

◆ _interpolate_normals

const bool MortarConsumerInterface::_interpolate_normals
protected

Whether to interpolate the nodal normals.

Definition at line 146 of file MortarConsumerInterface.h.

Referenced by interpolateNormals().

◆ _JxW_msm

const std::vector<Real>& MortarConsumerInterface::_JxW_msm
protected

◆ _lower_primary_elem

Elem const* const& MortarConsumerInterface::_lower_primary_elem
protected

The primary face lower dimensional element (not the mortar element!).

The mortar element lives on the secondary side of the mortar interface and may correspond to _lower_secondary_elem under the very specific circumstance that the nodes on the primary side of the mortar interface exactly project onto the secondary side of the mortar interface. In general projection of primary nodes will split the face elements on the secondary side of the interface. It is these split elements that are the mortar segment mesh elements

Definition at line 174 of file MortarConsumerInterface.h.

◆ _lower_secondary_elem

Elem const* const& MortarConsumerInterface::_lower_secondary_elem
protected

The secondary face lower dimensional element (not the mortar element!).

The mortar element lives on the secondary side of the mortar interface and may correspond to _lower_secondary_elem under the very specific circumstance that the nodes on the primary side of the mortar interface exactly project onto the secondary side of the mortar interface. In general projection of primary nodes will split the face elements on the secondary side of the interface. It is these split elements that are the mortar segment mesh elements

Definition at line 166 of file MortarConsumerInterface.h.

Referenced by setNormals().

◆ _mci_assembly

Assembly& MortarConsumerInterface::_mci_assembly
protected

Definition at line 118 of file MortarConsumerInterface.h.

◆ _mci_fe_problem

FEProblemBase& MortarConsumerInterface::_mci_fe_problem
protected

Definition at line 111 of file MortarConsumerInterface.h.

◆ _mci_mesh

MooseMesh& MortarConsumerInterface::_mci_mesh
protected

Mesh to query for boundary and subdomain ID information.

Definition at line 116 of file MortarConsumerInterface.h.

Referenced by checkPetrovGalerkinQuadraticFaces().

◆ _mci_subproblem

SubProblem& MortarConsumerInterface::_mci_subproblem
protected

Definition at line 112 of file MortarConsumerInterface.h.

◆ _mci_tid

const THREAD_ID MortarConsumerInterface::_mci_tid
protected

Definition at line 113 of file MortarConsumerInterface.h.

◆ _mortar_data

const MortarInterfaceWarehouse& MortarConsumerInterface::_mortar_data
protected

A reference to the mortar data object that holds all the mortar mesh information.

Definition at line 122 of file MortarConsumerInterface.h.

◆ _msm_elem

const Elem* const& MortarConsumerInterface::_msm_elem
protected

The current mortar segment element.

Definition at line 180 of file MortarConsumerInterface.h.

◆ _normals

std::vector<Point> MortarConsumerInterface::_normals
protected

◆ _phys_points_primary

const MooseArray<Point>& MortarConsumerInterface::_phys_points_primary
protected

◆ _phys_points_secondary

const MooseArray<Point>& MortarConsumerInterface::_phys_points_secondary
protected

◆ _primary_id

const BoundaryID MortarConsumerInterface::_primary_id
protected

Boundary ID for the primary surface.

Definition at line 128 of file MortarConsumerInterface.h.

Referenced by onInterface().

◆ _primary_subdomain_id

const SubdomainID MortarConsumerInterface::_primary_subdomain_id
protected

Subdomain ID for the primary surface.

Definition at line 134 of file MortarConsumerInterface.h.

Referenced by primarySubdomain().

◆ _qrule_face

const libMesh::QBase* const& MortarConsumerInterface::_qrule_face
protected

The arbitrary quadrature rule on the lower dimensional secondary face.

Definition at line 158 of file MortarConsumerInterface.h.

Referenced by setNormals().

◆ _qrule_msm

const libMesh::QBase* const& MortarConsumerInterface::_qrule_msm
protected

◆ _secondary_id

const BoundaryID MortarConsumerInterface::_secondary_id
protected

Boundary ID for the secondary surface.

Definition at line 125 of file MortarConsumerInterface.h.

Referenced by MortarConsumerInterface(), and onInterface().

◆ _secondary_set

std::set<BoundaryID> MortarConsumerInterface::_secondary_set
protected

the secondaryid set

Definition at line 137 of file MortarConsumerInterface.h.

◆ _secondary_subdomain_id

const SubdomainID MortarConsumerInterface::_secondary_subdomain_id
protected

Subdomain ID for the secondary surface.

Definition at line 131 of file MortarConsumerInterface.h.

Referenced by checkPetrovGalerkinQuadraticFaces(), and secondarySubdomain().


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