cell_inf_hex.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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_HEX_H
21 #define LIBMESH_CELL_INF_HEX_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 
46 class InfHex : public InfCell
47 {
48 public:
49 
54  InfHex(const unsigned int nn, Elem * p, Node ** nodelinkdata) :
55  InfCell(nn, InfHex::n_sides(), p, _elemlinks_data, nodelinkdata)
56  {
57  // Make sure the interior parent isn't undefined
58  if (LIBMESH_DIM > 3)
59  this->set_interior_parent(nullptr);
60  }
61 
62  InfHex (InfHex &&) = delete;
63  InfHex (const InfHex &) = delete;
64  InfHex & operator= (const InfHex &) = delete;
65  InfHex & operator= (InfHex &&) = delete;
66  virtual ~InfHex() = default;
67 
72  virtual Point master_point (const unsigned int i) const override final
73  {
74  libmesh_assert_less(i, this->n_nodes());
75  return Point(_master_points[i][0],
76  _master_points[i][1],
77  _master_points[i][2]);
78  }
79 
85  virtual unsigned int n_sides() const override final { return 5; }
86 
91  virtual unsigned int n_vertices() const override final { return 8; }
92 
97  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
98  override final { return (i > 3 && i < 8); }
99 
104  virtual unsigned int n_edges() const override final { return 8; }
105 
109  virtual unsigned int n_faces() const override final { return 5; }
110 
114  virtual unsigned int n_children() const override final { return 4; }
115 
120  virtual bool is_child_on_side(const unsigned int c,
121  const unsigned int s) const override final;
122 
126  virtual bool is_edge_on_side(const unsigned int e,
127  const unsigned int s) const override final;
128 
132  using Elem::key;
133 
139  virtual dof_id_type key (const unsigned int s) const override;
140 
144  virtual unsigned int which_node_am_i(unsigned int side,
145  unsigned int side_node) const override;
146 
150  virtual std::unique_ptr<Elem> side_ptr (const unsigned int i) override final;
151 
155  virtual void side_ptr (std::unique_ptr<Elem> & side, const unsigned int i) override final;
156 
161  virtual Real quality (const ElemQuality q) const override;
162 
168  virtual std::pair<Real, Real> qual_bounds (const ElemQuality q) const override;
169 
175  virtual bool contains_point (const Point & p, Real tol=TOLERANCE) const override;
176 
177 protected:
178 
182  Elem * _elemlinks_data[6+(LIBMESH_DIM>3)];
183 
184 
185 
195  static const unsigned short int _second_order_adjacent_vertices[8][2];
196 
200  static const unsigned short int _second_order_vertex_child_number[18];
201 
205  static const unsigned short int _second_order_vertex_child_index[18];
206 
210  static const Real _master_points[18][3];
211 };
212 
213 
214 } // namespace libMesh
215 
216 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
217 
218 #endif // LIBMESH_CELL_INF_HEX_H
Elem * _elemlinks_data[6+(LIBMESH_DIM >3)]
Definition: cell_inf_hex.h:182
InfHex & operator=(const InfHex &)=delete
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual Point master_point(const unsigned int i) const override final
Definition: cell_inf_hex.h:72
virtual dof_id_type key() const
Definition: elem.C:401
The base class for all geometric element types.
Definition: elem.h:100
virtual std::pair< Real, Real > qual_bounds(const ElemQuality q) const override
Definition: cell_inf_hex.C:331
static const Real TOLERANCE
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const override final
Definition: cell_inf_hex.C:207
void set_interior_parent(Elem *p)
Definition: elem.C:856
static const unsigned short int _second_order_adjacent_vertices[8][2]
Definition: cell_inf_hex.h:195
The base class for all 3D infinite geometric element types.
Definition: cell_inf.h:42
virtual ~InfHex()=default
virtual bool is_mid_infinite_edge_node(const unsigned int i) const override final
Definition: cell_inf_hex.h:97
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
Definition: cell_inf_hex.C:100
static const Real _master_points[18][3]
Definition: cell_inf_hex.h:210
virtual unsigned int n_nodes() const =0
InfHex(const unsigned int nn, Elem *p, Node **nodelinkdata)
Definition: cell_inf_hex.h:54
The base class for all 3D infinite hexahedral element types.
Definition: cell_inf_hex.h:46
virtual unsigned int n_vertices() const override final
Definition: cell_inf_hex.h:91
virtual unsigned int n_children() const override final
Definition: cell_inf_hex.h:114
virtual unsigned int n_faces() const override final
Definition: cell_inf_hex.h:109
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_inf_hex.C:89
static const unsigned short int _second_order_vertex_child_index[18]
Definition: cell_inf_hex.h:205
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const override
Definition: cell_inf_hex.C:440
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override final
Definition: cell_inf_hex.C:196
virtual Real quality(const ElemQuality q) const override
Definition: cell_inf_hex.C:220
virtual unsigned int n_edges() const override final
Definition: cell_inf_hex.h:104
A geometric point in (x,y,z) space.
Definition: point.h:38
static const unsigned short int _second_order_vertex_child_number[18]
Definition: cell_inf_hex.h:200
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2202
uint8_t dof_id_type
Definition: id_types.h:64
virtual unsigned int n_sides() const override final
Definition: cell_inf_hex.h:85