libMesh
cell_inf_hex.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 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)
60  }
61 
66  virtual Point master_point (const unsigned int i) const libmesh_override
67  {
68  libmesh_assert_less(i, this->n_nodes());
69  return Point(_master_points[i][0],
70  _master_points[i][1],
71  _master_points[i][2]);
72  }
73 
79  virtual unsigned int n_sides() const libmesh_override { return 5; }
80 
85  virtual unsigned int n_vertices() const libmesh_override { return 8; }
86 
91  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
92  libmesh_override { return (i > 3 && i < 8); }
93 
98  virtual unsigned int n_edges() const libmesh_override { return 8; }
99 
103  virtual unsigned int n_faces() const libmesh_override { return 5; }
104 
108  virtual unsigned int n_children() const libmesh_override { return 4; }
109 
114  virtual bool is_child_on_side(const unsigned int c,
115  const unsigned int s) const libmesh_override;
116 
120  virtual bool is_edge_on_side(const unsigned int e,
121  const unsigned int s) const libmesh_override;
122 
126  using Elem::key;
127 
133  virtual dof_id_type key (const unsigned int s) const libmesh_override;
134 
138  virtual unsigned int which_node_am_i(unsigned int side,
139  unsigned int side_node) const libmesh_override;
140 
145  virtual UniquePtr<Elem> side_ptr (const unsigned int i) libmesh_override;
146 
151  virtual Real quality (const ElemQuality q) const libmesh_override;
152 
158  virtual std::pair<Real, Real> qual_bounds (const ElemQuality q) const libmesh_override;
159 
165  virtual bool contains_point (const Point & p, Real tol=TOLERANCE) const libmesh_override;
166 
167 protected:
168 
172  Elem * _elemlinks_data[6+(LIBMESH_DIM>3)];
173 
174 
175 
185  static const unsigned short int _second_order_adjacent_vertices[8][2];
186 
190  static const unsigned short int _second_order_vertex_child_number[18];
191 
195  static const unsigned short int _second_order_vertex_child_index[18];
196 
200  static const Real _master_points[18][3];
201 };
202 
203 
204 } // namespace libMesh
205 
206 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
207 
208 #endif // LIBMESH_CELL_INF_HEX_H
Elem * _elemlinks_data[6+(LIBMESH_DIM >3)]
Data for links to parent/neighbor/interior_parent elements.
Definition: cell_inf_hex.h:172
A Node is like a Point, but with more information.
Definition: node.h:52
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const libmesh_override
Definition: cell_inf_hex.C:160
UniquePtr< Elem > side(const unsigned int i) const
Definition: elem.h:2105
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
const class libmesh_nullptr_t libmesh_nullptr
static const Real TOLERANCE
virtual Point master_point(const unsigned int i) const libmesh_override
Definition: cell_inf_hex.h:66
virtual unsigned int n_faces() const libmesh_override
Definition: cell_inf_hex.h:103
The libMesh namespace provides an interface to certain functionality in the library.
void set_interior_parent(Elem *p)
Sets the pointer to the element&#39;s interior_parent.
Definition: elem.C:1003
static const unsigned short int _second_order_adjacent_vertices[8][2]
For higher-order elements, namely InfHex16 and InfHex18, the matrices for adjacent vertices of second...
Definition: cell_inf_hex.h:185
The InfCell is an abstract element type that lives in three dimensions.
Definition: cell_inf.h:42
virtual unsigned int n_children() const libmesh_override
Definition: cell_inf_hex.h:108
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const libmesh_override
Definition: cell_inf_hex.C:396
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual unsigned int n_nodes() const =0
static const Real _master_points[18][3]
Master element node locations.
Definition: cell_inf_hex.h:200
virtual dof_id_type key() const
Definition: elem.C:503
virtual unsigned int n_sides() const libmesh_override
Definition: cell_inf_hex.h:79
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const libmesh_override
Definition: cell_inf_hex.C:88
InfHex(const unsigned int nn, Elem *p, Node **nodelinkdata)
Default infinite brick element, takes number of nodes and parent.
Definition: cell_inf_hex.h:54
The InfHex is an element in 3D with 5 sides.
Definition: cell_inf_hex.h:46
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const libmesh_override
Definition: cell_inf_hex.C:149
virtual unsigned int n_vertices() const libmesh_override
Definition: cell_inf_hex.h:85
static const unsigned short int _second_order_vertex_child_index[18]
Vector that names the child vertex index for each second order node.
Definition: cell_inf_hex.h:195
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool is_mid_infinite_edge_node(const unsigned int i) const libmesh_override
Definition: cell_inf_hex.h:91
virtual UniquePtr< Elem > side_ptr(const unsigned int i) libmesh_override
Definition: cell_inf_hex.C:99
virtual Real quality(const ElemQuality q) const libmesh_override
Definition: cell_inf_hex.C:173
virtual std::pair< Real, Real > qual_bounds(const ElemQuality q) const libmesh_override
Definition: cell_inf_hex.C:287
ElemQuality
Defines an enum for element quality metrics.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
virtual unsigned int n_edges() const libmesh_override
Definition: cell_inf_hex.h:98
static const unsigned short int _second_order_vertex_child_number[18]
Vector that names a child sharing each second order node.
Definition: cell_inf_hex.h:190
uint8_t dof_id_type
Definition: id_types.h:64