$extrastylesheet
cell_pyramid5.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_CELL_PYRAMID5_H
00021 #define LIBMESH_CELL_PYRAMID5_H
00022 
00023 // Local includes
00024 #include "libmesh/cell_pyramid.h"
00025 
00026 // C++ includes
00027 #include <cstddef>
00028 
00029 namespace libMesh
00030 {
00031 
00032 
00033 
00034 
00053 class Pyramid5 : public Pyramid
00054 {
00055 public:
00056 
00060   explicit
00061   Pyramid5  (Elem* p=NULL);
00062 
00066   ElemType     type () const   { return PYRAMID5; }
00067 
00071   unsigned int n_sub_elem() const { return 1; }
00072 
00076   virtual bool is_vertex(const unsigned int i) const;
00077 
00081   virtual bool is_edge(const unsigned int i) const;
00082 
00086   virtual bool is_face(const unsigned int i) const;
00087 
00088   /*
00089    * @returns true iff the specified (local) node number is on the
00090    * specified side
00091    */
00092   virtual bool is_node_on_side(const unsigned int n,
00093                                const unsigned int s) const;
00094 
00095   /*
00096    * @returns true iff the specified (local) node number is on the
00097    * specified edge
00098    */
00099   virtual bool is_node_on_edge(const unsigned int n,
00100                                const unsigned int e) const;
00101 
00102   /*
00103    * @returns true iff the element map is definitely affine within
00104    * numerical tolerances
00105    */
00106   virtual bool has_affine_map () const;
00107 
00111   Order default_order() const { return FIRST; }
00112 
00117   UniquePtr<Elem> build_side (const unsigned int i,
00118                               bool proxy) const;
00119 
00124   UniquePtr<Elem> build_edge (const unsigned int i) const;
00125 
00126   virtual void connectivity(const unsigned int sc,
00127                             const IOPackage iop,
00128                             std::vector<dof_id_type>& conn) const;
00129 
00134   static const unsigned int side_nodes_map[5][4];
00135 
00140   static const unsigned int edge_nodes_map[8][2];
00141 
00145   virtual Real volume () const;
00146 
00147 
00148 protected:
00149 
00153   Node* _nodelinks_data[5];
00154 
00155 
00156 
00157 #ifdef LIBMESH_ENABLE_AMR
00158 
00162   float embedding_matrix (const unsigned int,
00163                           const unsigned int,
00164                           const unsigned int) const
00165   { libmesh_not_implemented(); return 0.; }
00166 
00167 #endif
00168 };
00169 
00170 
00171 
00172 // ------------------------------------------------------------
00173 // Pyramid5 class member functions
00174 inline
00175 Pyramid5::Pyramid5(Elem* p) :
00176   Pyramid(Pyramid5::n_nodes(), p, _nodelinks_data)
00177 {
00178 }
00179 
00180 } // namespace libMesh
00181 
00182 
00183 #endif // LIBMESH_CELL_PYRAMID5_H