$extrastylesheet
cell_tet10.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_TET10_H
00021 #define LIBMESH_CELL_TET10_H
00022 
00023 // Local includes
00024 #include "libmesh/cell_tet.h"
00025 
00026 // C++ includes
00027 #include <cstddef>
00028 
00029 namespace libMesh
00030 {
00031 
00032 
00033 
00034 
00060 class Tet10 : public Tet
00061 {
00062 public:
00063 
00067   explicit
00068   Tet10  (Elem* p=NULL);
00069 
00073   ElemType     type ()   const { return TET10; }
00074 
00078   unsigned int n_nodes() const { return 10; }
00079 
00083   unsigned int n_sub_elem() const { return 8; }
00084 
00088   virtual bool is_vertex(const unsigned int i) const;
00089 
00093   virtual bool is_edge(const unsigned int i) const;
00094 
00098   virtual bool is_face(const unsigned int i) const;
00099 
00100   /*
00101    * @returns true iff the specified (local) node number is on the
00102    * specified side
00103    */
00104   virtual bool is_node_on_side(const unsigned int n,
00105                                const unsigned int s) const;
00106 
00107   /*
00108    * @returns true iff the specified (local) node number is on the
00109    * specified edge
00110    */
00111   virtual bool is_node_on_edge(const unsigned int n,
00112                                const unsigned int e) const;
00113 
00114   /*
00115    * @returns true iff the specified child is on the
00116    * specified side
00117    */
00118   virtual bool is_child_on_side(const unsigned int c,
00119                                 const unsigned int s) const;
00120 
00121   /*
00122    * @returns true iff the element map is definitely affine within
00123    * numerical tolerances
00124    */
00125   virtual bool has_affine_map () const;
00126 
00130   Order default_order() const { return SECOND; }
00131 
00136   UniquePtr<Elem> build_side (const unsigned int i,
00137                               bool proxy) const;
00138 
00143   UniquePtr<Elem> build_edge (const unsigned int i) const;
00144 
00145   virtual void connectivity(const unsigned int sc,
00146                             const IOPackage iop,
00147                             std::vector<dof_id_type>& conn) const;
00148 
00152   unsigned int n_second_order_adjacent_vertices (const unsigned int) const
00153   { return 2; }
00154 
00160   unsigned short int second_order_adjacent_vertex (const unsigned int n,
00161                                                    const unsigned int v) const;
00162 
00172   virtual std::pair<unsigned short int, unsigned short int>
00173   second_order_child_vertex (const unsigned int n) const;
00174 
00179   static const unsigned int side_nodes_map[4][6];
00180 
00185   static const unsigned int edge_nodes_map[6][3];
00186 
00187 protected:
00188 
00192   Node* _nodelinks_data[10];
00193 
00194 
00195 
00196 #ifdef LIBMESH_ENABLE_AMR
00197 
00201   float embedding_matrix (const unsigned int i,
00202                           const unsigned int j,
00203                           const unsigned int k) const;
00204 
00209   static const float _embedding_matrix[8][10][10];
00210 
00211 
00212 #endif
00213 
00214 
00215 private:
00216 
00221   static const unsigned short int _second_order_adjacent_vertices[6][2];
00222 
00226   static const unsigned short int _second_order_vertex_child_number[10];
00227 
00231   static const unsigned short int _second_order_vertex_child_index[10];
00232 };
00233 
00234 
00235 
00236 // ------------------------------------------------------------
00237 // Tet10 class member functions
00238 inline
00239 Tet10::Tet10(Elem* p) :
00240   Tet(Tet10::n_nodes(), p, _nodelinks_data)
00241 {
00242 }
00243 
00244 } // namespace libMesh
00245 
00246 
00247 #endif // LIBMESH_CELL_TET10_H