$extrastylesheet
cell_prism6.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_PRISM6_H
00021 #define LIBMESH_CELL_PRISM6_H
00022 
00023 // Local includes
00024 #include "libmesh/cell_prism.h"
00025 
00026 // C++ includes
00027 #include <cstddef>
00028 
00029 namespace libMesh
00030 {
00031 
00032 
00033 
00034 
00052 class Prism6 : public Prism
00053 {
00054 public:
00055 
00059   explicit
00060   Prism6  (Elem* p=NULL);
00061 
00065   ElemType     type () const   { return PRISM6; }
00066 
00070   unsigned int n_sub_elem() const { return 1; }
00071 
00075   virtual bool is_vertex(const unsigned int i) const;
00076 
00080   virtual bool is_edge(const unsigned int i) const;
00081 
00085   virtual bool is_face(const unsigned int i) const;
00086 
00087   /*
00088    * @returns true iff the specified (local) node number is on the
00089    * specified side
00090    */
00091   virtual bool is_node_on_side(const unsigned int n,
00092                                const unsigned int s) const;
00093 
00094   /*
00095    * @returns true iff the specified (local) node number is on the
00096    * specified edge
00097    */
00098   virtual bool is_node_on_edge(const unsigned int n,
00099                                const unsigned int e) const;
00100 
00101   /*
00102    * @returns true iff the element map is definitely affine within
00103    * numerical tolerances
00104    */
00105   virtual bool has_affine_map () const;
00106 
00110   Order default_order() const { return FIRST; }
00111 
00116   UniquePtr<Elem> build_side (const unsigned int i,
00117                               bool proxy) const;
00118 
00123   UniquePtr<Elem> build_edge (const unsigned int i) const;
00124 
00125   virtual void connectivity(const unsigned int sc,
00126                             const IOPackage iop,
00127                             std::vector<dof_id_type>& conn) const;
00128 
00133   static const unsigned int side_nodes_map[5][4];
00134 
00138   static const unsigned int side_elems_map[5][4];
00139 
00144   static const unsigned int edge_nodes_map[9][2];
00145 
00149   virtual Real volume () const;
00150 
00151 protected:
00152 
00156   Node* _nodelinks_data[6];
00157 
00158 
00159 
00160 #ifdef LIBMESH_ENABLE_AMR
00161 
00165   float embedding_matrix (const unsigned int i,
00166                           const unsigned int j,
00167                           const unsigned int k) const
00168   { return _embedding_matrix[i][j][k]; }
00169 
00174   static const float _embedding_matrix[8][6][6];
00175 
00176 #endif
00177 
00178 };
00179 
00180 
00181 
00182 // ------------------------------------------------------------
00183 // Prism6 class member functions
00184 inline
00185 Prism6::Prism6(Elem* p) :
00186   Prism(Prism6::n_nodes(), p, _nodelinks_data)
00187 {
00188 }
00189 
00190 
00191 } // namespace libMesh
00192 
00193 #endif // LIBMESH_CELL_PRISM6_H