https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
MortarExecutorInterface Class Referenceabstract

Interface for objects that need to be notified when the mortar segment mesh for an interface they consume has been (re)built. More...

#include <MortarExecutorInterface.h>

Inheritance diagram for MortarExecutorInterface:
[legend]

Public Member Functions

 MortarExecutorInterface (FEProblemBase &fe_problem)
 
 MortarExecutorInterface (MortarExecutorInterface &&other)
 Re-registers the moved-to object in place of other with the warehouse.
 
virtual ~MortarExecutorInterface ()=default
 This object does not deregister from the warehouse on destruction: FEProblemBase destroys its MortarInterfaceWarehouse (_mortar_data) before the solver/auxiliary systems that transitively own long-lived MortarExecutorInterface consumers (e.g.
 
virtual void mortarSetup (const AutomaticMortarGeneration &amg)=0
 Called by the MortarInterfaceWarehouse whenever amg's mortar segment mesh coverage has changed, so that this object may refresh any state (e.g.
 

Protected Attributes

MortarInterfaceWarehouse & _mortar_warehouse
 The warehouse this object is registered with for mortar setup notifications.
 
Materials for Mortar

These containers hold the materials whose properties are required by a given set of consumers.

Note that these containers will also hold materials that may not provide properties explicitly needed by the consumers but do provided properties that are dependencies of the materials that do provide properties needed by the consumers

std::map< SubdomainID, std::deque< MaterialBase * > > _secondary_ip_sub_to_mats
 
std::map< SubdomainID, std::deque< MaterialBase * > > _primary_ip_sub_to_mats
 A map from primary interior parent subdomain IDs to the block materials that will need to reinit'd on the primary face.
 
std::deque< MaterialBase * > _secondary_boundary_mats
 A container that holds the boundary materials that will need to be reinit'd on the secondary face.
 

Detailed Description

Interface for objects that need to be notified when the mortar segment mesh for an interface they consume has been (re)built.

Notification is push-based: this interface registers itself with the owning FEProblemBase's MortarInterfaceWarehouse in its constructor, and mortarSetup() is called back whenever that warehouse rebuilds an AutomaticMortarGeneration and its segment coverage (interior-parent subdomains, boundary materials, etc.) has changed. This replaces re-deriving "has coverage changed" from outside the warehouse on every use.

Definition at line 31 of file MortarExecutorInterface.h.

Constructor & Destructor Documentation

◆ MortarExecutorInterface() [1/2]

MortarExecutorInterface::MortarExecutorInterface ( FEProblemBase &  fe_problem)
Parameters
fe_problemThe problem that owns the MortarInterfaceWarehouse this object should register with

Definition at line 14 of file MortarExecutorInterface.C.

15 : _mortar_warehouse(fe_problem.mortarData())
16{
18}
const MortarInterfaceWarehouse & mortarData() const
Returns the mortar data object.
MortarInterfaceWarehouse & _mortar_warehouse
The warehouse this object is registered with for mortar setup notifications.
void notifyWhenMortarSetup(MortarExecutorInterface *mei)
Adds mei to the container of objects that will have their mortarSetup method called whenever a mortar...

◆ MortarExecutorInterface() [2/2]

MortarExecutorInterface::MortarExecutorInterface ( MortarExecutorInterface &&  other)

Re-registers the moved-to object in place of other with the warehouse.

Required because consumers such as ComputeMortarFunctor are held by value in containers (e.g. std::unordered_map) that move-construct on insertion.

Definition at line 20 of file MortarExecutorInterface.C.

25{
26 // Swap which object the warehouse calls back into; the moved-from object is about to be
27 // destroyed and must not receive further mortarSetup() notifications.
30}
std::map< SubdomainID, std::deque< MaterialBase * > > _primary_ip_sub_to_mats
A map from primary interior parent subdomain IDs to the block materials that will need to reinit'd on...
std::deque< MaterialBase * > _secondary_boundary_mats
A container that holds the boundary materials that will need to be reinit'd on the secondary face.
std::map< SubdomainID, std::deque< MaterialBase * > > _secondary_ip_sub_to_mats
void dontNotifyWhenMortarSetup(MortarExecutorInterface *mei)
Removes mei from the container of objects that will have their mortarSetup method called whenever a m...

◆ ~MortarExecutorInterface()

virtual MortarExecutorInterface::~MortarExecutorInterface ( )
virtualdefault

This object does not deregister from the warehouse on destruction: FEProblemBase destroys its MortarInterfaceWarehouse (_mortar_data) before the solver/auxiliary systems that transitively own long-lived MortarExecutorInterface consumers (e.g.

ComputeMortarFunctor, MortarNodalAuxKernelTempl), so deregistering here would touch an already-destroyed warehouse. This mirrors MeshChangedInterface, which has the same destruction-order constraint with respect to FEProblemBase::_notify_when_mesh_changes. A consumer that is instead stack-constructed fresh per use and destroyed well before FEProblemBase (e.g. MortarUserObjectThread) must deregister itself in its own destructor, since for such a consumer the warehouse is always still alive and skipping it would leave a dangling entry.

Member Function Documentation

◆ mortarSetup()

virtual void MortarExecutorInterface::mortarSetup ( const AutomaticMortarGeneration &  amg)
pure virtual

Called by the MortarInterfaceWarehouse whenever amg's mortar segment mesh coverage has changed, so that this object may refresh any state (e.g.

material dependency lists) that depends on which subdomains/boundaries the mortar segment mesh currently touches.

Implemented in MortarNodalAuxKernelTempl< ComputeValueType >, ComputeMortarFunctor, and MortarUserObjectThread.

Member Data Documentation

◆ _mortar_warehouse

MortarInterfaceWarehouse& MortarExecutorInterface::_mortar_warehouse
protected

The warehouse this object is registered with for mortar setup notifications.

Definition at line 69 of file MortarExecutorInterface.h.

Referenced by MortarExecutorInterface(), MortarExecutorInterface(), and MortarUserObjectThread::~MortarUserObjectThread().

◆ _primary_ip_sub_to_mats

std::map<SubdomainID, std::deque<MaterialBase *> > MortarExecutorInterface::_primary_ip_sub_to_mats
protected

A map from primary interior parent subdomain IDs to the block materials that will need to reinit'd on the primary face.

Definition at line 85 of file MortarExecutorInterface.h.

Referenced by MortarUserObjectThread::mortarSetup(), MortarUserObjectThread::operator()(), ComputeMortarFunctor::operator()(), and ComputeMortarFunctor::setupMortarMaterials().

◆ _secondary_boundary_mats

std::deque<MaterialBase *> MortarExecutorInterface::_secondary_boundary_mats
protected

A container that holds the boundary materials that will need to be reinit'd on the secondary face.

Definition at line 89 of file MortarExecutorInterface.h.

Referenced by MortarUserObjectThread::mortarSetup(), MortarUserObjectThread::operator()(), ComputeMortarFunctor::operator()(), and ComputeMortarFunctor::setupMortarMaterials().

◆ _secondary_ip_sub_to_mats

std::map<SubdomainID, std::deque<MaterialBase *> > MortarExecutorInterface::_secondary_ip_sub_to_mats
protected

A map from secondary interior parent subdomain IDs to the block materials that will need to reinit'd on the secondary face

Definition at line 81 of file MortarExecutorInterface.h.

Referenced by MortarUserObjectThread::mortarSetup(), MortarUserObjectThread::operator()(), ComputeMortarFunctor::operator()(), and ComputeMortarFunctor::setupMortarMaterials().


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