cell_inf_prism.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_CELL_INF_PRISM_H
21 #define LIBMESH_CELL_INF_PRISM_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26 
27 // Local includes
28 #include "libmesh/cell_inf.h"
29 
30 namespace libMesh
31 {
32 
33 
34 
35 
46 // ------------------------------------------------------------
47 // InfPrism class definition
48 class InfPrism : public InfCell
49 {
50 public:
51 
56  InfPrism(const unsigned int nn, Elem* p, Node** nodelinkdata);
57 
58 // /**
59 // * @returns 4 for the base \p s=0 and 2 for side faces.
60 // */
61 // unsigned int n_children_per_side(const unsigned int s) const;
62 
68  unsigned int n_sides() const { return 4; }
69 
74  unsigned int n_vertices() const { return 6; }
75 
80  unsigned int n_edges() const { return 6; }
81 
85  unsigned int n_faces() const { return 4; }
86 
90  unsigned int n_children() const { return 4; }
91 
92  /*
93  * @returns true iff the specified child is on the
94  * specified side
95  */
96  virtual bool is_child_on_side(const unsigned int c,
97  const unsigned int s) const;
98 
99  /*
100  * @returns true iff the specified edge is on the specified side
101  */
102  virtual bool is_edge_on_side(const unsigned int e,
103  const unsigned int s) const;
104 
110  dof_id_type key (const unsigned int s) const;
111 
116  AutoPtr<Elem> side (const unsigned int i) const;
117 
118 
119 protected:
120 
124  Elem* _elemlinks_data[5+(LIBMESH_DIM>3)];
125 };
126 
127 
128 
129 // ------------------------------------------------------------
130 // InfPrism class member functions
131 inline
132 InfPrism::InfPrism(const unsigned int nn, Elem* p, Node** nodelinkdata) :
133  InfCell(nn, InfPrism::n_sides(), p, _elemlinks_data, nodelinkdata)
134 {
135 }
136 
137 
138 // inline
139 // unsigned int InfPrism::n_children_per_side(const unsigned int s) const
140 // {
141 // libmesh_assert_less (s, this->n_sides());
142 
143 // switch (s)
144 // {
145 // case 0:
146 // // every infinite prism has 4 children in the base side
147 // return 4;
148 
149 // default:
150 // // on infinite faces (sides), only 2 children exist
151 // //
152 // // note that the face at infinity is already caught by the libmesh_assertion
153 // return 2;
154 // }
155 // }
156 
157 
158 } // namespace libMesh
159 
160 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
161 
162 #endif // LIBMESH_CELL_INF_PRISM_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo