$extrastylesheet
remote_elem.h
Go to the documentation of this file.
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_REMOTE_ELEM_H
00021 #define LIBMESH_REMOTE_ELEM_H
00022 
00023 // Local includes
00024 #include "libmesh/elem.h"
00025 #include "libmesh/libmesh_singleton.h"
00026 
00027 // C++ includes
00028 #include <cstddef>
00029 #include <limits>
00030 
00031 namespace libMesh
00032 {
00033 
00034 // Forward declarations
00035 
00036 
00037 
00047 class RemoteElem : public Elem,
00048                    public Singleton
00049 {
00050 public:
00051 
00055   static const dof_id_type remote_elem_id = static_cast<dof_id_type>(-2);
00056 
00060 private:
00061   RemoteElem () : Elem(0,0,NULL,_elemlinks_data,NULL)
00062   { this->set_id(remote_elem_id); }
00063 
00064 public:
00068   virtual ~RemoteElem();
00069 
00074   static const Elem & create ();
00075 
00076   virtual const Point & point (const unsigned int i) const
00077   { libmesh_not_implemented(); return Elem::point(i); }
00078 
00079   virtual Point & point (const unsigned int i)
00080   { libmesh_not_implemented(); return Elem::point(i); }
00081 
00082   virtual dof_id_type node (const unsigned int i) const
00083   { libmesh_not_implemented(); return Elem::node(i); }
00084 
00085   virtual Node* get_node (const unsigned int i) const
00086   { libmesh_not_implemented(); return Elem::get_node(i); }
00087 
00088   virtual Node* & set_node (const unsigned int i)
00089   { libmesh_not_implemented(); return Elem::set_node(i); }
00090 
00091   virtual dof_id_type key (const unsigned int) const
00092   { libmesh_not_implemented(); return 0; }
00093 
00094   virtual bool is_remote () const
00095   { return true; }
00096 
00097   virtual void connectivity(const unsigned int,
00098                             const IOPackage,
00099                             std::vector<dof_id_type>&) const
00100   { libmesh_not_implemented(); }
00101 
00102   virtual ElemType type () const
00103   { return REMOTEELEM; }
00104 
00105   virtual unsigned int dim () const
00106   { libmesh_not_implemented(); return 0; }
00107 
00108   virtual unsigned int n_nodes () const
00109   { libmesh_not_implemented(); return 0; }
00110 
00111   virtual unsigned int n_sides () const
00112   { libmesh_not_implemented(); return 0; }
00113 
00114   virtual unsigned int n_vertices () const
00115   { libmesh_not_implemented(); return 0; }
00116 
00117   virtual unsigned int n_edges () const
00118   { libmesh_not_implemented(); return 0; }
00119 
00120   virtual unsigned int n_faces () const
00121   { libmesh_not_implemented(); return 0; }
00122 
00123   virtual unsigned int n_children () const
00124   { libmesh_not_implemented(); return 0; }
00125 
00126   virtual bool is_vertex(const unsigned int) const
00127   { libmesh_not_implemented(); return false; }
00128 
00129   virtual bool is_edge(const unsigned int) const
00130   { libmesh_not_implemented(); return false; }
00131 
00132   virtual bool is_face(const unsigned int) const
00133   { libmesh_not_implemented(); return false; }
00134 
00135   virtual bool is_node_on_side(const unsigned int,
00136                                const unsigned int) const
00137   { libmesh_not_implemented(); return false; }
00138 
00139   virtual bool is_child_on_side(const unsigned int,
00140                                 const unsigned int) const
00141   { libmesh_not_implemented(); return false; }
00142 
00143   virtual bool is_edge_on_side(const unsigned int,
00144                                const unsigned int) const
00145   { libmesh_not_implemented(); return false; }
00146 
00147   virtual bool is_node_on_edge(const unsigned int,
00148                                const unsigned int) const
00149   { libmesh_not_implemented(); return false; }
00150 
00151   virtual unsigned int n_sub_elem () const
00152   { libmesh_not_implemented(); return 0; }
00153 
00154   virtual UniquePtr<Elem> side (const unsigned int) const
00155   { libmesh_not_implemented(); return UniquePtr<Elem>(); }
00156 
00157   virtual UniquePtr<Elem> build_side (const unsigned int,
00158                                       bool) const
00159   { libmesh_not_implemented(); return UniquePtr<Elem>(); }
00160 
00161   virtual UniquePtr<Elem> build_edge (const unsigned int) const
00162   { libmesh_not_implemented(); return UniquePtr<Elem>(); }
00163 
00164   virtual Order default_order () const
00165   { libmesh_not_implemented(); return FIRST; }
00166 
00167 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00168 
00169   virtual bool infinite () const
00170   { libmesh_not_implemented(); return false; }
00171 
00172 #endif
00173 
00174 #ifdef LIBMESH_ENABLE_AMR
00175 
00180   virtual float embedding_matrix (const unsigned int,
00181                                   const unsigned int,
00182                                   const unsigned int) const
00183   { libmesh_not_implemented(); return 0.; }
00184 
00185 #endif
00186 
00187 protected:
00188 
00192   Elem* _elemlinks_data[1];
00193 
00194 };
00195 
00196 // Singleton RemoteElem
00197 extern const RemoteElem* remote_elem;
00198 
00199 } // namespace libMesh
00200 
00201 #endif // LIBMESH_REMOTE_ELEM_H