libMesh
cell_inf_prism.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 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 
46 class InfPrism : public InfCell
47 {
48 public:
49 
54  InfPrism(const unsigned int nn, Elem * p, Node ** nodelinkdata) :
55  InfCell(nn, InfPrism::n_sides(), p, _elemlinks_data, nodelinkdata)
56  {}
57 
58  InfPrism (InfPrism &&) = delete;
59  InfPrism (const InfPrism &) = delete;
60  InfPrism & operator= (const InfPrism &) = delete;
61  InfPrism & operator= (InfPrism &&) = delete;
62  virtual ~InfPrism() = default;
63 
68  virtual Point master_point (const unsigned int i) const override final
69  {
70  libmesh_assert_less(i, this->n_nodes());
71  return Point(_master_points[i][0],
72  _master_points[i][1],
73  _master_points[i][2]);
74  }
75 
81  virtual unsigned int n_sides() const override final { return 4; }
82 
87  virtual unsigned int n_vertices() const override final { return 6; }
88 
93  virtual unsigned int n_edges() const override final { return 6; }
94 
98  virtual unsigned int n_faces() const override final { return 4; }
99 
103  virtual unsigned int n_children() const override final { return 4; }
104 
109  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
110  override final { return (i > 2 && i < 6); }
111 
115  virtual bool is_child_on_side(const unsigned int c,
116  const unsigned int s) const override final;
117 
121  virtual bool is_edge_on_side(const unsigned int e,
122  const unsigned int s) const override final;
123 
127  using Elem::key;
128 
134  virtual dof_id_type key (const unsigned int s) const override;
135 
139  virtual unsigned int which_node_am_i(unsigned int side,
140  unsigned int side_node) const override;
141 
146  virtual std::unique_ptr<Elem> side_ptr (const unsigned int i) override final;
147 
152  virtual void side_ptr (std::unique_ptr<Elem> & side, const unsigned int i) override final;
153 
159  virtual bool contains_point (const Point & p, Real tol=TOLERANCE) const override;
160 
161 
162 protected:
163 
167  Elem * _elemlinks_data[5+(LIBMESH_DIM>3)];
168 
172  static const Real _master_points[12][3];
173 };
174 
175 } // namespace libMesh
176 
177 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
178 
179 #endif // LIBMESH_CELL_INF_PRISM_H
libMesh::InfPrism::n_vertices
virtual unsigned int n_vertices() const override final
Definition: cell_inf_prism.h:87
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::InfPrism::~InfPrism
virtual ~InfPrism()=default
libMesh::InfPrism::is_mid_infinite_edge_node
virtual bool is_mid_infinite_edge_node(const unsigned int i) const override final
Definition: cell_inf_prism.h:109
libMesh::InfPrism
The InfPrism is an element in 3D with 4 sides.
Definition: cell_inf_prism.h:46
libMesh::Elem::n_nodes
virtual unsigned int n_nodes() const =0
libMesh::InfPrism::InfPrism
InfPrism(const unsigned int nn, Elem *p, Node **nodelinkdata)
Default infinite prism element, takes number of nodes and parent.
Definition: cell_inf_prism.h:54
libMesh::InfPrism::n_sides
virtual unsigned int n_sides() const override final
Definition: cell_inf_prism.h:81
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::TOLERANCE
static const Real TOLERANCE
Definition: libmesh_common.h:128
libMesh::InfPrism::_elemlinks_data
Elem * _elemlinks_data[5+(LIBMESH_DIM >3)]
Data for links to parent/neighbor/interior_parent elements.
Definition: cell_inf_prism.h:167
libMesh::InfPrism::is_edge_on_side
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const override final
Definition: cell_inf_prism.C:194
libMesh::InfPrism::operator=
InfPrism & operator=(const InfPrism &)=delete
libMesh::InfPrism::_master_points
static const Real _master_points[12][3]
Master element node locations.
Definition: cell_inf_prism.h:172
libMesh::InfPrism::n_faces
virtual unsigned int n_faces() const override final
Definition: cell_inf_prism.h:98
libMesh::InfCell
The InfCell is an abstract element type that lives in three dimensions.
Definition: cell_inf.h:42
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
libMesh::Elem::key
virtual dof_id_type key() const
Definition: elem.C:410
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::InfPrism::which_node_am_i
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_inf_prism.C:87
libMesh::InfPrism::master_point
virtual Point master_point(const unsigned int i) const override final
Definition: cell_inf_prism.h:68
libMesh::InfPrism::n_edges
virtual unsigned int n_edges() const override final
Definition: cell_inf_prism.h:93
libMesh::InfPrism::side_ptr
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
Definition: cell_inf_prism.C:103
libMesh::InfPrism::n_children
virtual unsigned int n_children() const override final
Definition: cell_inf_prism.h:103
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::InfPrism::contains_point
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const override
Definition: cell_inf_prism.C:204
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::InfPrism::is_child_on_side
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override final
Definition: cell_inf_prism.C:183