$extrastylesheet
cell_inf_hex16.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_INF_HEX16_H
00021 #define LIBMESH_CELL_INF_HEX16_H
00022 
00023 #include "libmesh/libmesh_config.h"
00024 
00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00026 
00027 // Local includes
00028 #include "libmesh/cell_inf_hex.h"
00029 
00030 // C++ includes
00031 #include <cstddef>
00032 
00033 namespace libMesh
00034 {
00035 
00036 
00037 
00038 
00072 class InfHex16 : public InfHex
00073 {
00074 public:
00075 
00079   explicit
00080   InfHex16  (Elem* p=NULL);
00081 
00085   unsigned int n_nodes() const { return 16; }
00086 
00090   ElemType     type ()   const { return INFHEX16; }
00091 
00095   unsigned int n_sub_elem() const { return 1; }
00096 
00100   virtual bool is_vertex(const unsigned int i) const;
00101 
00105   virtual bool is_edge(const unsigned int i) const;
00106 
00110   virtual bool is_face(const unsigned int i) const;
00111 
00112   /*
00113    * @returns true iff the specified (local) node number is on the
00114    * specified side
00115    */
00116   virtual bool is_node_on_side(const unsigned int n,
00117                                const unsigned int s) const;
00118 
00119   /*
00120    * @returns true iff the specified (local) node number is on the
00121    * specified edge
00122    */
00123   virtual bool is_node_on_edge(const unsigned int n,
00124                                const unsigned int e) const;
00125 
00129   Order default_order() const { return SECOND; }
00130 
00136   UniquePtr<Elem> build_side (const unsigned int i,
00137                               bool proxy) const;
00138 
00144   UniquePtr<Elem> build_edge (const unsigned int i) const;
00145 
00146   virtual void connectivity(const unsigned int sc,
00147                             const IOPackage iop,
00148                             std::vector<dof_id_type>& conn) const;
00149 
00150   unsigned int vtk_element_type (const unsigned int) const
00151   { return 12; }
00152 
00156   unsigned int n_second_order_adjacent_vertices (const unsigned int) const
00157   { return 2; }
00158 
00164   unsigned short int second_order_adjacent_vertex (const unsigned int n,
00165                                                    const unsigned int v) const;
00166 
00176   virtual std::pair<unsigned short int, unsigned short int>
00177   second_order_child_vertex (const unsigned int n) const;
00178 
00183   static const unsigned int side_nodes_map[5][8];
00184 
00189   static const unsigned int edge_nodes_map[8][3];
00190 
00191 
00192 
00193 protected:
00194 
00195 
00199   Node* _nodelinks_data[16];
00200 
00201 
00202 #ifdef LIBMESH_ENABLE_AMR
00203 
00207   float embedding_matrix (const unsigned int i,
00208                           const unsigned int j,
00209                           const unsigned int k) const
00210   { return _embedding_matrix[i][j][k]; }
00211 
00216   static const float _embedding_matrix[4][16][16];
00217 
00218 #endif
00219 
00220 };
00221 
00222 
00223 
00224 // ------------------------------------------------------------
00225 // InfHex16 class member functions
00226 inline
00227 InfHex16::InfHex16(Elem* p) :
00228   InfHex(InfHex16::n_nodes(), p, _nodelinks_data)
00229 {
00230 }
00231 
00232 
00233 } // namespace libMesh
00234 
00235 #endif  // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00236 
00237 
00238 #endif // LIBMESH_CELL_INF_HEX16_H