face_tri6.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_FACE_TRI6_H 00021 #define LIBMESH_FACE_TRI6_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/face_tri.h" 00027 00028 // C++ includes 00029 #include <cstddef> 00030 00031 namespace libMesh 00032 { 00033 00034 00035 00036 // Forward declarations 00037 00038 00039 00040 00057 // ------------------------------------------------------------ 00058 // Tri6 class definition 00059 class Tri6 : public Tri 00060 { 00061 public: 00062 00066 explicit 00067 Tri6 (Elem* p=NULL) : 00068 Tri(Tri6::n_nodes(), p, _nodelinks_data) {} 00069 00073 ElemType type () const { return TRI6; } 00074 00078 unsigned int n_nodes() const { return 6; } 00079 00083 unsigned int n_sub_elem() const { return 4; } 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 (== is_node_on_side in 2D) 00110 */ 00111 virtual bool is_node_on_edge(const unsigned int n, 00112 const unsigned int e) const 00113 { return this->is_node_on_side(n,e); } 00114 00115 /* 00116 * @returns true iff the element map is definitely affine within 00117 * numerical tolerances 00118 */ 00119 virtual bool has_affine_map () const; 00120 00124 Order default_order() const { return SECOND; } 00125 00135 dof_id_type key (const unsigned int s) const; 00136 00137 AutoPtr<Elem> build_side (const unsigned int i, 00138 bool proxy) const; 00139 00140 virtual void connectivity(const unsigned int sf, 00141 const IOPackage iop, 00142 std::vector<dof_id_type>& conn) const; 00143 00147 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00148 { return 2; } 00149 00155 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00156 const unsigned int v) const; 00157 00167 virtual std::pair<unsigned short int, unsigned short int> 00168 second_order_child_vertex (const unsigned int n) const; 00169 00174 static const unsigned int side_nodes_map[3][3]; 00175 00176 00177 protected: 00178 00182 Node* _nodelinks_data[6]; 00183 00184 00185 00186 #ifdef LIBMESH_ENABLE_AMR 00187 00191 float embedding_matrix (const unsigned int i, 00192 const unsigned int j, 00193 const unsigned int k) const 00194 { return _embedding_matrix[i][j][k]; } 00195 00200 static const float _embedding_matrix[4][6][6]; 00201 00202 #endif 00203 00204 00205 private: 00206 00211 static const unsigned short int _second_order_adjacent_vertices[3][2]; 00212 00216 static const unsigned short int _second_order_vertex_child_number[6]; 00217 00221 static const unsigned short int _second_order_vertex_child_index[6]; 00222 }; 00223 00224 00225 } // namespace libMesh 00226 00227 #endif // LIBMESH_FACE_TRI6_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: