$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_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 00055 class Quad9 : public Quad 00056 { 00057 public: 00058 00062 explicit 00063 Quad9 (Elem* p=NULL) : 00064 Quad(Quad9::n_nodes(), p, _nodelinks_data) {} 00065 00069 ElemType type () const { return QUAD9; } 00070 00074 unsigned int n_nodes() const { return 9; } 00075 00079 unsigned int n_sub_elem() const { return 4; } 00080 00084 virtual bool is_vertex(const unsigned int i) const; 00085 00089 virtual bool is_edge(const unsigned int i) const; 00090 00094 virtual bool is_face(const unsigned int i) const; 00095 00096 /* 00097 * @returns true iff the specified (local) node number is on the 00098 * specified side 00099 */ 00100 virtual bool is_node_on_side(const unsigned int n, 00101 const unsigned int s) const; 00102 00103 /* 00104 * @returns true iff the specified (local) node number is on the 00105 * specified edge (== is_node_on_side in 2D) 00106 */ 00107 virtual bool is_node_on_edge(const unsigned int n, 00108 const unsigned int e) const 00109 { return this->is_node_on_side(n,e); } 00110 00111 /* 00112 * @returns true iff the element map is definitely affine within 00113 * numerical tolerances 00114 */ 00115 virtual bool has_affine_map () const; 00116 00120 Order default_order() const { return SECOND; } 00121 00131 dof_id_type key (const unsigned int s) const; 00132 00133 UniquePtr<Elem> build_side (const unsigned int i, 00134 bool proxy) const; 00135 00136 virtual void connectivity(const unsigned int sf, 00137 const IOPackage iop, 00138 std::vector<dof_id_type>& conn) const; 00139 00143 unsigned int n_second_order_adjacent_vertices (const unsigned int n) const; 00144 00150 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00151 const unsigned int v) const; 00152 00162 virtual std::pair<unsigned short int, unsigned short int> 00163 second_order_child_vertex (const unsigned int n) const; 00164 00169 static const unsigned int side_nodes_map[4][3]; 00170 00171 00172 protected: 00173 00177 Node* _nodelinks_data[9]; 00178 00179 00180 00181 #ifdef LIBMESH_ENABLE_AMR 00182 00186 float embedding_matrix (const unsigned int i, 00187 const unsigned int j, 00188 const unsigned int k) const 00189 { return _embedding_matrix[i][j][k]; } 00190 00195 static const float _embedding_matrix[4][9][9]; 00196 00197 #endif 00198 00199 00200 }; 00201 00202 } // namespace libMesh 00203 00204 00205 #endif // LIBMESH_FACE_QUAD9_H