Line data Source code
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 : 10 : #pragma once 11 : 12 : // Framework includes 13 : #include "AutomaticMortarGeneration.h" 14 : #include "RelationshipManager.h" 15 : 16 : // libMesh includes 17 : #include "libmesh/mesh_base.h" 18 : 19 : using libMesh::boundary_id_type; 20 : using libMesh::CouplingMatrix; 21 : using libMesh::Elem; 22 : using libMesh::GhostingFunctor; 23 : using libMesh::MeshBase; 24 : using libMesh::processor_id_type; 25 : 26 : /** 27 : * GhostBoundary is used to ghost elements on a boundary. It is 28 : * useful when non-local elements are required for geometric searches or when 29 : * residual objects such as \p GapHeatTransfer require access into nonlocal entries 30 : * in the solution vector corresponding to degrees of freedom from the boundary 31 : * elements 32 : */ 33 : class GhostBoundary : public RelationshipManager 34 : { 35 : public: 36 : GhostBoundary(const InputParameters &); 37 : 38 : GhostBoundary(const GhostBoundary & other); 39 : 40 : static InputParameters validParams(); 41 : 42 : virtual void operator()(const MeshBase::const_element_iterator & /*range_begin*/, 43 : const MeshBase::const_element_iterator & /*range_end*/, 44 : processor_id_type p, 45 : map_type & coupled_elements) override; 46 : 47 : virtual std::unique_ptr<GhostingFunctor> clone() const override; 48 : 49 17 : virtual void redistribute() override { this->mesh_reinit(); } 50 : 51 : std::string getInfo() const override; 52 : 53 : virtual bool operator>=(const RelationshipManager & other) const override; 54 : 55 : protected: 56 : virtual void internalInitWithMesh(const MeshBase &) override; 57 : 58 : /// The boundary for which we will ghost elements 59 : const std::vector<BoundaryName> & _boundary_name; 60 : 61 : /// null matrix for generating full variable coupling 62 : const CouplingMatrix * const _null_mat = nullptr; 63 : };