face_inf_quad.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_INF_QUAD_H 00021 #define LIBMESH_FACE_INF_QUAD_H 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/elem.h" 00029 00030 // C++ includes 00031 00032 namespace libMesh 00033 { 00034 00035 00036 // Forward declarations 00037 00038 00039 00060 // ------------------------------------------------------------ 00061 // InfQuad class definition 00062 class InfQuad : public Elem 00063 { 00064 public: 00065 00069 explicit 00070 InfQuad (const unsigned int nn, 00071 Elem* p, 00072 Node** nodelinkdata) : 00073 Elem(nn, InfQuad::n_sides(), p, _elemlinks_data, nodelinkdata) {} 00074 00078 unsigned int dim() const { return 2; } 00079 00080 // /** 00081 // * @returns 2 for the base, 1 otherwise 00082 // */ 00083 // unsigned int n_children_per_side(const unsigned int s) const; 00084 00090 unsigned int n_sides() const { return 3; } 00091 00095 unsigned int n_vertices() const { return 4; } 00096 00101 unsigned int n_edges() const { return 3; } 00102 00107 unsigned int n_faces() const { return 0; } 00108 00112 unsigned int n_children() const { return 2; } 00113 00114 /* 00115 * @returns true iff the specified child is on the 00116 * specified side 00117 */ 00118 virtual bool is_child_on_side(const unsigned int c, 00119 const unsigned int s) const; 00120 00126 dof_id_type key (const unsigned int s) const; 00127 00132 AutoPtr<Elem> side (const unsigned int i) const; 00133 00137 AutoPtr<Elem> build_edge (const unsigned int i) const 00138 { return build_side(i); } 00139 00140 /* 00141 * is_edge_on_side is trivial in 2D 00142 */ 00143 virtual bool is_edge_on_side(const unsigned int e, 00144 const unsigned int s) const 00145 { return (e == s); } 00146 00151 Real quality (const ElemQuality q) const; 00152 00158 std::pair<Real, Real> qual_bounds (const ElemQuality q) const; 00159 00164 bool infinite () const { return true; } 00165 00169 Point origin () const; 00170 00171 00172 protected: 00173 00177 Elem* _elemlinks_data[4+(LIBMESH_DIM>2)]; 00178 }; 00179 00180 00181 00182 // ------------------------------------------------------------ 00183 // InfQuad class member functions 00184 // inline 00185 // unsigned int InfQuad::n_children_per_side(const unsigned int s) const 00186 // { 00187 // libmesh_assert_less (s, this->n_sides()); 00188 00189 // switch (s) 00190 // { 00191 // case 0: 00192 // // every infinite face has 2 children in the base edge 00193 // return 2; 00194 00195 // default: 00196 // // on infinite edges only 1 child 00197 // return 1; 00198 // } 00199 // } 00200 00201 00202 00203 inline 00204 Point InfQuad::origin () const 00205 { 00206 return ( this->point(0)*2 - this->point(this->n_vertices()/2) ); 00207 } 00208 00209 00210 } // namespace libMesh 00211 00212 00213 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00214 00215 #endif // LIBMESH_FACE_INF_QUAD_H 00216 00217 00218 00219
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: