$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_POINT_LOCATOR_BASE_H 00021 #define LIBMESH_POINT_LOCATOR_BASE_H 00022 00023 // Local Includes 00024 #include "libmesh/reference_counted_object.h" 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/auto_ptr.h" 00027 #include "libmesh/enum_point_locator_type.h" 00028 00029 // C++ includes 00030 #include <cstddef> 00031 #include <vector> 00032 00033 namespace libMesh 00034 { 00035 00036 00037 00038 // Forward Declarations 00039 class PointLocatorBase; 00040 class MeshBase; 00041 class Point; 00042 class TreeBase; 00043 class Elem; 00044 00045 00046 00054 class PointLocatorBase : public ReferenceCountedObject<PointLocatorBase> 00055 { 00056 protected: 00062 PointLocatorBase (const MeshBase& mesh, 00063 const PointLocatorBase* master); 00064 00065 public: 00069 virtual ~PointLocatorBase (); 00070 00077 static UniquePtr<PointLocatorBase> build (PointLocatorType t, 00078 const MeshBase& mesh, 00079 const PointLocatorBase* master = NULL); 00080 00084 virtual void clear() = 0; 00085 00090 virtual void init() = 0; 00091 00097 virtual const Elem* operator() (const Point& p, const std::set<subdomain_id_type> *allowed_subdomains = NULL) const = 0; 00098 00103 bool initialized () const; 00104 00111 virtual void enable_out_of_mesh_mode () = 0; 00112 00118 virtual void disable_out_of_mesh_mode () = 0; 00119 00124 virtual void set_close_to_point_tol(Real close_to_point_tol); 00125 00130 virtual void unset_close_to_point_tol(); 00131 00135 bool _verbose; 00136 00137 protected: 00143 const PointLocatorBase* _master; 00144 00148 const MeshBase& _mesh; 00149 00153 bool _initialized; 00154 00159 bool _use_close_to_point_tol; 00160 00164 Real _close_to_point_tol; 00165 }; 00166 00167 } // namespace libMesh 00168 00169 #endif // LIBMESH_POINT_LOCATOR_BASE_H