$extrastylesheet
edge_inf_edge2.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_EDGE_INF_EDGE2_H
00021 #define LIBMESH_EDGE_INF_EDGE2_H
00022 
00023 #include "libmesh/libmesh_common.h"
00024 
00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00026 
00027 // Local includes
00028 #include "libmesh/edge.h"
00029 
00030 // C++ includes
00031 #include <cstddef>
00032 
00033 namespace libMesh
00034 {
00035 
00036 
00053 class InfEdge2 : public Edge
00054 {
00055 public:
00056 
00060   explicit
00061   InfEdge2 (Elem* p=NULL) :
00062     Edge(InfEdge2::n_nodes(), p, _nodelinks_data) {}
00063 
00067   unsigned int n_sub_elem() const { return 1; }
00068 
00072   virtual bool is_vertex(const unsigned int i) const;
00073 
00077   virtual bool is_edge(const unsigned int i) const;
00078 
00082   virtual bool is_face(const unsigned int i) const;
00083 
00084   /*
00085    * @returns true iff the specified (local) node number is on the
00086    * specified side
00087    */
00088   virtual bool is_node_on_side(const unsigned int n,
00089                                const unsigned int s) const;
00090 
00091   /*
00092    * @returns true iff the specified (local) node number is on the
00093    * specified edge (i.e. "returns true" in 1D)
00094    */
00095   virtual bool is_node_on_edge(const unsigned int n,
00096                                const unsigned int e) const;
00097 
00101   ElemType type()  const { return INFEDGE2; }
00102 
00106   Order default_order() const { return FIRST; }
00107 
00108   virtual void connectivity(const unsigned int se,
00109                             const IOPackage iop,
00110                             std::vector<dof_id_type>& conn) const;
00111 
00112 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00113 
00117   bool infinite () const { return true; }
00118 
00122   Point origin () const;
00123 
00124 #endif
00125 
00126 
00127 protected:
00128 
00132   Node* _nodelinks_data[2];
00133 
00134 
00135 
00136 #ifdef LIBMESH_ENABLE_AMR
00137 
00141   float embedding_matrix (const unsigned int,
00142                           const unsigned int,
00143                           const unsigned int) const
00144   { libmesh_not_implemented(); return 0.; }
00145 
00146 #endif
00147 };
00148 
00149 
00150 
00151 
00152 // ------------------------------------------------------------
00153 // InfEdge2 class member functions
00154 inline
00155 Point InfEdge2::origin () const
00156 {
00157   return ( this->point(0)*2 - this->point(1) );
00158 }
00159 
00160 
00161 } // namespace libMesh
00162 
00163 #endif
00164 
00165 #endif // LIBMESH_EDGE_INF_EDGE2_H