libMesh
periodic_boundaries.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 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_PERIODIC_BOUNDARIES_H
19 #define LIBMESH_PERIODIC_BOUNDARIES_H
20 
21 // Local Includes
22 #include "libmesh/libmesh_config.h"
23 
24 #ifdef LIBMESH_ENABLE_PERIODIC
25 
26 // Local Includes
27 #include "libmesh/vector_value.h" // RealVectorValue
28 
29 // C++ Includes
30 #include <map>
31 
32 namespace libMesh
33 {
34 
35 // Forward Declarations
36 class Elem;
37 class PeriodicBoundaryBase;
38 class PointLocatorBase;
39 
51 class PeriodicBoundaries : public std::map<boundary_id_type, PeriodicBoundaryBase *>
52 {
53 public:
55 
57 
59 
61 
62  // The periodic neighbor of \p e in direction \p side, if it
63  // exists, nullptr otherwise.
64  const Elem * neighbor(boundary_id_type boundary_id,
65  const PointLocatorBase & point_locator,
66  const Elem * e,
67  unsigned int side) const;
68 };
69 
70 } // namespace libMesh
71 
72 #endif // LIBMESH_ENABLE_PERIODIC
73 
74 #endif // LIBMESH_PERIODIC_BOUNDARIES_H
libMesh::PeriodicBoundaries
We're using a class instead of a typedef to allow forward declarations and future flexibility.
Definition: periodic_boundaries.h:51
libMesh::PeriodicBoundaryBase
The base class for defining periodic boundaries.
Definition: periodic_boundary_base.h:48
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::PeriodicBoundaries::PeriodicBoundaries
PeriodicBoundaries()
Definition: periodic_boundaries.h:58
libMesh::boundary_id_type
int8_t boundary_id_type
Definition: id_types.h:51
libMesh::PeriodicBoundaries::boundary
PeriodicBoundaryBase * boundary(boundary_id_type id)
Definition: periodic_boundaries.C:40
libMesh::PeriodicBoundaries::~PeriodicBoundaries
~PeriodicBoundaries()
Definition: periodic_boundaries.C:32
libMesh::PeriodicBoundaries::neighbor
const Elem * neighbor(boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side) const
Definition: periodic_boundaries.C:61
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::PointLocatorBase
This is the base class for point locators.
Definition: point_locator_base.h:62