face_quad9.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_QUAD9_H 00021 #define LIBMESH_FACE_QUAD9_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/face_quad.h" 00027 00028 // C++ includes 00029 #include <cstddef> 00030 00031 namespace libMesh 00032 { 00033 00034 00035 00036 // Forward declarations 00037 00038 00039 00056 // ------------------------------------------------------------ 00057 // Quad9 class definition 00058 class Quad9 : public Quad 00059 { 00060 public: 00061 00065 explicit 00066 Quad9 (Elem* p=NULL) : 00067 Quad(Quad9::n_nodes(), p, _nodelinks_data) {} 00068 00072 ElemType type () const { return QUAD9; } 00073 00077 unsigned int n_nodes() const { return 9; } 00078 00082 unsigned int n_sub_elem() const { return 4; } 00083 00087 virtual bool is_vertex(const unsigned int i) const; 00088 00092 virtual bool is_edge(const unsigned int i) const; 00093 00097 virtual bool is_face(const unsigned int i) const; 00098 00099 /* 00100 * @returns true iff the specified (local) node number is on the 00101 * specified side 00102 */ 00103 virtual bool is_node_on_side(const unsigned int n, 00104 const unsigned int s) const; 00105 00106 /* 00107 * @returns true iff the specified (local) node number is on the 00108 * specified edge (== is_node_on_side in 2D) 00109 */ 00110 virtual bool is_node_on_edge(const unsigned int n, 00111 const unsigned int e) const 00112 { return this->is_node_on_side(n,e); } 00113 00114 /* 00115 * @returns true iff the element map is definitely affine within 00116 * numerical tolerances 00117 */ 00118 virtual bool has_affine_map () const; 00119 00123 Order default_order() const { return SECOND; } 00124 00134 dof_id_type key (const unsigned int s) const; 00135 00136 AutoPtr<Elem> build_side (const unsigned int i, 00137 bool proxy) const; 00138 00139 virtual void connectivity(const unsigned int sf, 00140 const IOPackage iop, 00141 std::vector<dof_id_type>& conn) const; 00142 00146 unsigned int n_second_order_adjacent_vertices (const unsigned int n) const; 00147 00153 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00154 const unsigned int v) const; 00155 00165 virtual std::pair<unsigned short int, unsigned short int> 00166 second_order_child_vertex (const unsigned int n) const; 00167 00172 static const unsigned int side_nodes_map[4][3]; 00173 00174 00175 protected: 00176 00180 Node* _nodelinks_data[9]; 00181 00182 00183 00184 #ifdef LIBMESH_ENABLE_AMR 00185 00189 float embedding_matrix (const unsigned int i, 00190 const unsigned int j, 00191 const unsigned int k) const 00192 { return _embedding_matrix[i][j][k]; } 00193 00198 static const float _embedding_matrix[4][9][9]; 00199 00200 #endif 00201 00202 00203 }; 00204 00205 } // namespace libMesh 00206 00207 00208 #endif // LIBMESH_FACE_QUAD9_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: