libMesh
augment_sparsity_on_interface.h
Go to the documentation of this file.
1 #ifndef AUGMENT_SPARSITY_ON_INTERFACE_H
2 #define AUGMENT_SPARSITY_ON_INTERFACE_H
3 
4 #include "libmesh/ghosting_functor.h"
5 #include "libmesh/mesh_base.h"
6 
7 using libMesh::Elem;
12 
13 // Convenient typedef for a map for (element, side id) --> element neighbor
14 typedef std::map<std::pair<const Elem *, unsigned char>, const Elem *> ElementSideMap;
15 
16 // And the inverse map, but without sides in the key
17 typedef std::map<const Elem *, const Elem *> ElementMap;
18 
20 {
21 private:
22 
27 
34 
39 
44 
49 
50 public:
51 
56  boundary_id_type crack_boundary_lower,
57  boundary_id_type crack_boundary_upper);
58 
62  const ElementSideMap & get_lower_to_upper() const;
63 
67  virtual void operator() (const MeshBase::const_element_iterator & range_begin,
68  const MeshBase::const_element_iterator & range_end,
70  map_type & coupled_elements) override;
71 
76  virtual void mesh_reinit () override;
77 
82  virtual void redistribute () override
83  { this->mesh_reinit(); }
84 
85 
86 };
87 
88 #endif
This abstract base class defines the interface by which library code and user code can report associa...
std::map< const Elem *, const Elem * > ElementMap
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
MeshBase & mesh
bool _initialized
Make sure we&#39;ve been initialized before use.
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?
uint8_t processor_id_type
Definition: id_types.h:104
This is the MeshBase class.
Definition: mesh_base.h:74
boundary_id_type _crack_boundary_lower
Boundary IDs for the lower and upper faces of the "crack" in the mesh.
uint8_t processor_id_type
AugmentSparsityOnInterface(MeshBase &mesh, boundary_id_type crack_boundary_lower, boundary_id_type crack_boundary_upper)
Constructor.
int8_t boundary_id_type
Definition: id_types.h:51
ElementMap _upper_to_lower
The inverse (ignoring sides) of the above map.
virtual void redistribute() override
Update the cached _lower_to_upper map whenever our Mesh has been redistributed.
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
User-defined function to augment the sparsity pattern.
virtual void mesh_reinit() override
Rebuild the cached _lower_to_upper map whenever our Mesh has changed.
ElementSideMap _lower_to_upper
A map from (lower element ID, side ID) to matching upper element ID.
std::map< std::pair< const Elem *, unsigned char >, const Elem * > ElementSideMap
MeshBase & _mesh
The Mesh we&#39;re calculating on.
const ElementSideMap & get_lower_to_upper() const