84 template <
typename Variables,
typename DualNumbers>
87 const Variables & moose_var,
88 DualNumbers & ad_vars,
89 const bool is_secondary);
191 mooseAssert(
_amg,
"this should have been set in the constructor");
195 template <
typename Variables,
typename DualNumbers>
198 const std::map<unsigned int, unsigned int> & domain_ip_lowerd_map,
199 const Variables & moose_vars,
200 DualNumbers & dual_numbers,
201 const bool is_secondary)
207 mooseAssert(moose_vars.size(),
"Should have passed at least one variable");
208 const auto num_indices = is_secondary ? moose_vars[0]->dofIndices().size()
209 : moose_vars[0]->dofIndicesNeighbor().size();
211 for (
const auto i :
make_range(std::size_t(1), moose_vars.size()))
212 if (
auto * moose_var = moose_vars[i])
213 mooseAssert(is_secondary ? moose_var->dofIndices().size()
214 : moose_var->dofIndicesNeighbor().size() == num_indices,
215 "These must be the same for all passed in variables");
218 for (
const auto dof_index :
make_range(num_indices))
219 if (!domain_ip_lowerd_map.count(dof_index))
221 for (
const auto *
const moose_var : moose_vars)
229 mooseAssert(moose_var->isNodal(),
230 "Trimming of interior node's derivatives is only supported for Lagrange " 231 "elements in mortar objects");
233 const auto remove_derivative_index = is_secondary
234 ? moose_var->dofIndices()[dof_index]
235 : moose_var->dofIndicesNeighbor()[dof_index];
236 for (
auto & dual_number : dual_numbers)
const std::set< SubdomainID > & getHigherDimSubdomainIDs() const
SubdomainID primarySubdomain() const
bool onInterface(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id) const
Keeps track of stuff related to assembling.
const BoundaryID _secondary_id
Boundary ID for the secondary surface.
MortarConsumerInterface(const MooseObject *moose_object)
const AutomaticMortarGeneration * _amg
const libMesh::QBase *const & _qrule_face
The arbitrary quadrature rule on the lower dimensional secondary face.
const MooseArray< Point > & _phys_points_primary
The locations of the quadrature points on the interior primary elements.
std::set< SubdomainID > _higher_dim_subdomain_ids
the higher dimensional subdomain ids corresponding to the interior parents
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.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
const MortarData & _mortar_data
A reference to the mortar data object that holds all the mortar mesh information. ...
MooseMesh & _mci_mesh
Mesh to query for boundary and subdomain ID information.
DualNumber< Real, DNDerivativeType, true > ADReal
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const libMesh::QBase *const & _qrule_msm
The quadrature rule on the mortar segment element.
An interface for accessing mortar mesh data.
SubdomainID secondarySubdomain() const
This class is a container/interface for the objects involved in automatic generation of mortar spaces...
Elem const *const & _lower_secondary_elem
The secondary face lower dimensional element (not the mortar element!).
const Elem *const & _msm_elem
The current mortar segment element.
const AutomaticMortarGeneration & amg() const
Retrieve the automatic mortar generation object associated with this constraint.
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.
Every object that can be built by the factory should be derived from this class.
std::set< BoundaryID > _boundary_ids
the union of the secondary and primary boundary ids
std::vector< Point > _normals
the normals
boundary_id_type BoundaryID
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
bool interpolateNormals() const
Whether to interpolate the nodal normals (e.g.
const MooseArray< Point > & _phys_points_secondary
The locations of the quadrature points on the interior secondary elements.
static void trimDerivative(dof_id_type remove_derivative_index, ADReal &dual_number)
Get rid of AD derivative entries by dof index.
Base class for creating new nodally-based mortar auxiliary kernels.
void setNormals()
Set the normals vector.
SubProblem & _mci_subproblem
FEProblemBase & _mci_fe_problem
const BoundaryID _primary_id
Boundary ID for the primary surface.
const SubdomainID _primary_subdomain_id
Subdomain ID for the primary surface.
Generic class for solving transient nonlinear problems.
static InputParameters validParams()
IntRange< T > make_range(T beg, T end)
std::set< BoundaryID > _secondary_set
the secondaryid set
const SubdomainID _secondary_subdomain_id
Subdomain ID for the secondary surface.
const bool _interpolate_normals
Whether to interpolate the nodal normals.
const std::set< BoundaryID > & getBoundaryIDs() const
friend void reinitMortarUserObjects(BoundaryID, BoundaryID, bool)
Calls the reinitialization of mortar user objects.