cell_prism.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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_PRISM_H 00021 #define LIBMESH_CELL_PRISM_H 00022 00023 // Local includes 00024 #include "libmesh/cell.h" 00025 00026 namespace libMesh 00027 { 00028 00029 00030 00031 00036 // ------------------------------------------------------------ 00037 // Prism class definition 00038 class Prism : public Cell 00039 { 00040 public: 00041 00046 Prism(const unsigned int nn, Elem* p, Node** nodelinkdata); 00047 00052 unsigned int n_nodes() const { return 6; } 00053 00057 unsigned int n_sides() const { return 5; } 00058 00062 unsigned int n_vertices() const { return 6; } 00063 00067 unsigned int n_edges() const { return 9; } 00068 00072 unsigned int n_faces() const { return 5; } 00073 00077 unsigned int n_children() const { return 8; } 00078 00079 /* 00080 * @returns true iff the specified child is on the 00081 * specified side 00082 */ 00083 virtual bool is_child_on_side(const unsigned int c, 00084 const unsigned int s) const; 00085 00086 /* 00087 * @returns true iff the specified edge is on the specified side 00088 */ 00089 virtual bool is_edge_on_side(const unsigned int e, 00090 const unsigned int s) const; 00091 00097 dof_id_type key (const unsigned int s) const; 00098 00103 AutoPtr<Elem> side (const unsigned int i) const; 00104 00105 00106 00107 protected: 00108 00112 Elem* _elemlinks_data[6+(LIBMESH_DIM>3)]; 00113 00114 00115 00122 static const unsigned short int _second_order_adjacent_vertices[9][2]; 00123 00127 static const unsigned short int _second_order_vertex_child_number[18]; 00128 00132 static const unsigned short int _second_order_vertex_child_index[18]; 00133 }; 00134 00135 00136 00137 // ------------------------------------------------------------ 00138 // Prism class member functions 00139 inline 00140 Prism::Prism(const unsigned int nn, Elem* p, Node** nodelinkdata) : 00141 Cell(nn, Prism::n_sides(), p, _elemlinks_data, nodelinkdata) 00142 { 00143 } 00144 00145 } // namespace libMesh 00146 00147 #endif // LIBMESH_CELL_PRISM_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: