$extrastylesheet
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_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 00056 class Tri6 : public Tri 00057 { 00058 public: 00059 00063 explicit 00064 Tri6 (Elem* p=NULL) : 00065 Tri(Tri6::n_nodes(), p, _nodelinks_data) {} 00066 00070 ElemType type () const { return TRI6; } 00071 00075 unsigned int n_nodes() const { return 6; } 00076 00080 unsigned int n_sub_elem() const { return 4; } 00081 00085 virtual bool is_vertex(const unsigned int i) const; 00086 00090 virtual bool is_edge(const unsigned int i) const; 00091 00095 virtual bool is_face(const unsigned int i) const; 00096 00097 /* 00098 * @returns true iff the specified (local) node number is on the 00099 * specified side 00100 */ 00101 virtual bool is_node_on_side(const unsigned int n, 00102 const unsigned int s) const; 00103 00104 /* 00105 * @returns true iff the specified (local) node number is on the 00106 * specified edge (== is_node_on_side in 2D) 00107 */ 00108 virtual bool is_node_on_edge(const unsigned int n, 00109 const unsigned int e) const 00110 { return this->is_node_on_side(n,e); } 00111 00112 /* 00113 * @returns true iff the element map is definitely affine within 00114 * numerical tolerances 00115 */ 00116 virtual bool has_affine_map () const; 00117 00121 Order default_order() const { return SECOND; } 00122 00132 dof_id_type key (const unsigned int s) const; 00133 00134 UniquePtr<Elem> build_side (const unsigned int i, 00135 bool proxy) const; 00136 00137 virtual void connectivity(const unsigned int sf, 00138 const IOPackage iop, 00139 std::vector<dof_id_type>& conn) const; 00140 00144 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00145 { return 2; } 00146 00152 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00153 const unsigned int v) const; 00154 00164 virtual std::pair<unsigned short int, unsigned short int> 00165 second_order_child_vertex (const unsigned int n) const; 00166 00171 static const unsigned int side_nodes_map[3][3]; 00172 00173 00174 protected: 00175 00179 Node* _nodelinks_data[6]; 00180 00181 00182 00183 #ifdef LIBMESH_ENABLE_AMR 00184 00188 float embedding_matrix (const unsigned int i, 00189 const unsigned int j, 00190 const unsigned int k) const 00191 { return _embedding_matrix[i][j][k]; } 00192 00197 static const float _embedding_matrix[4][6][6]; 00198 00199 #endif 00200 00201 00202 private: 00203 00208 static const unsigned short int _second_order_adjacent_vertices[3][2]; 00209 00213 static const unsigned short int _second_order_vertex_child_number[6]; 00214 00218 static const unsigned short int _second_order_vertex_child_index[6]; 00219 }; 00220 00221 00222 } // namespace libMesh 00223 00224 #endif // LIBMESH_FACE_TRI6_H