periodic_boundaries.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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
Maps between boundary ids and PeriodicBoundaryBase objects.
unsigned short int side
Definition: xdr_io.C:50
The base class for all geometric element types.
Definition: elem.h:100
PeriodicBoundaryBase * boundary(boundary_id_type id)
int8_t boundary_id_type
Definition: id_types.h:51
const Elem * neighbor(boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side) const
Base class for all PeriodicBoundary implementations.