$extrastylesheet
periodic_boundaries.h
Go to the documentation of this file.
00001 
00002 // The libMesh Finite Element Library.
00003 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
00004 
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 #ifndef LIBMESH_PERIODIC_BOUNDARIES_H
00020 #define LIBMESH_PERIODIC_BOUNDARIES_H
00021 
00022 // ------------------------------------------------------------
00023 // Periodic boundary conditions information
00024 
00025 // Local Includes -----------------------------------
00026 #include "libmesh/libmesh_config.h"
00027 
00028 #ifdef LIBMESH_ENABLE_PERIODIC
00029 
00030 // Local Includes -----------------------------------
00031 #include "libmesh/vector_value.h" // RealVectorValue
00032 
00033 // C++ Includes   -----------------------------------
00034 #include <map>
00035 
00036 namespace libMesh {
00037 
00038 // Forward Declarations
00039 class Elem;
00040 class PeriodicBoundaryBase;
00041 class PointLocatorBase;
00042 
00048 class PeriodicBoundaries : public std::map<boundary_id_type, PeriodicBoundaryBase*>
00049 {
00050 public:
00051   PeriodicBoundaryBase* boundary(boundary_id_type id);
00052 
00053   const PeriodicBoundaryBase* boundary(boundary_id_type id) const;
00054 
00055   PeriodicBoundaries() {}
00056 
00057   ~PeriodicBoundaries();
00058 
00059   // The periodic neighbor of \p e in direction \p side, if it
00060   // exists.  NULL otherwise
00061   const Elem* neighbor(boundary_id_type boundary_id,
00062                        const PointLocatorBase& point_locator,
00063                        const Elem* e,
00064                        unsigned int side) const;
00065 };
00066 
00067 } // namespace libMesh
00068 
00069 #endif // LIBMESH_ENABLE_PERIODIC
00070 
00071 #endif // LIBMESH_PERIODIC_BOUNDARIES_H