libMesh
non_manifold_coupling.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef LIBMESH_NON_MANIFOLD_COUPLING_H
19 #define LIBMESH_NON_MANIFOLD_COUPLING_H
20 
21 // libMesh Includes
22 #include "libmesh/ghosting_functor.h" // base class
23 #include "libmesh/sides_to_elem_map.h" // MeshTools::SidesToElemMap
24 
25 // C++ includes
26 #include <memory>
27 
28 namespace libMesh
29 {
30 
31 // Forward declarations
32 class MeshBase;
33 
64 {
65 public:
70 
80  virtual ~NonManifoldGhostingFunctor() = default;
81 
85  virtual std::unique_ptr<GhostingFunctor> clone () const override;
86 
92  virtual void mesh_reinit () override;
93 
99  virtual void redistribute () override;
100 
105  virtual void delete_remote_elements() override;
106 
112  virtual void operator() (const MeshBase::const_element_iterator & range_begin,
113  const MeshBase::const_element_iterator & range_end,
115  map_type & coupled_elements) override;
116 private:
117 
122 };
123 
124 } // namespace libMesh
125 
126 #endif // LIBMESH_NON_MANIFOLD_COUPLING_H
This abstract base class defines the interface by which library code and user code can report associa...
The definition of the const_element_iterator struct.
Definition: mesh_base.h:2216
virtual void operator()(const MeshBase::const_element_iterator &range_begin, const MeshBase::const_element_iterator &range_end, processor_id_type p, map_type &coupled_elements) override
For the specified range of active elements, query the SidesToElemMap and add all side neighbors to th...
NonManifoldGhostingFunctor & operator=(const NonManifoldGhostingFunctor &)=default
virtual ~NonManifoldGhostingFunctor()=default
MeshBase & mesh
virtual std::unique_ptr< GhostingFunctor > clone() const override
clone() just calls the copy ctor.
std::map< const Elem *, const CouplingMatrix *, CompareDofObjectsByPIDAndThenID > map_type
What elements do we care about and what variables do we care about on each element?
The libMesh namespace provides an interface to certain functionality in the library.
A GhostingFunctor subclass that uses a SidesToElemMap object to determine when Elem DOFs should be gh...
NonManifoldGhostingFunctor(const MeshBase &mesh)
Constructor.
uint8_t processor_id_type
Definition: id_types.h:104
This is the MeshBase class.
Definition: mesh_base.h:75
virtual void delete_remote_elements() override
When remote elements are deleted, we should remove them from the information in the SidesToElemMap...
MeshTools::SidesToElemMap _stem
Quickly-searchable map from (elem, side) pair to list of connected Elems.
This class implements a generalization of the MeshTools::build_nodes_to_elem_map() function...
virtual void redistribute() override
When the Mesh is redistributed, we may need to update the information in the SidesToElemMap by removi...
virtual void mesh_reinit() override
If the Mesh changes, we&#39;ll need to clear the SidesToElemMap and recreate it, since all the neighbor i...