cell_prism18.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_PRISM18_H
21 #define LIBMESH_CELL_PRISM18_H
22 
23 // Local includes
24 #include "libmesh/cell_prism.h"
25 
26 namespace libMesh
27 {
28 
69 class Prism18 final : public Prism
70 {
71 public:
72 
76  explicit
77  Prism18 (Elem * p=nullptr) :
79  {}
80 
81  Prism18 (Prism18 &&) = delete;
82  Prism18 (const Prism18 &) = delete;
83  Prism18 & operator= (const Prism18 &) = delete;
84  Prism18 & operator= (Prism18 &&) = delete;
85  virtual ~Prism18() = default;
86 
90  virtual ElemType type () const override { return PRISM18; }
91 
95  virtual unsigned int n_nodes() const override { return num_nodes; }
96 
100  virtual unsigned int n_sub_elem() const override { return 8; }
101 
105  virtual bool is_vertex(const unsigned int i) const override;
106 
110  virtual bool is_edge(const unsigned int i) const override;
111 
115  virtual bool is_face(const unsigned int i) const override;
116 
121  virtual bool is_node_on_side(const unsigned int n,
122  const unsigned int s) const override;
123 
124  virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
125 
130  virtual bool is_node_on_edge(const unsigned int n,
131  const unsigned int e) const override;
132 
137  virtual bool has_affine_map () const override;
138 
142  virtual Order default_order() const override;
143 
147  using Elem::key;
148 
158  virtual dof_id_type key (const unsigned int s) const override;
159 
163  virtual unsigned int which_node_am_i(unsigned int side,
164  unsigned int side_node) const override;
165 
170  virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i,
171  bool proxy) override;
172 
176  virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
177  const unsigned int i) override;
178 
183  virtual std::unique_ptr<Elem> build_edge_ptr (const unsigned int i) override;
184 
185  virtual void connectivity(const unsigned int sc,
186  const IOPackage iop,
187  std::vector<dof_id_type> & conn) const override;
188 
192  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override;
193 
200  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
201  const unsigned int v) const override;
202 
208  virtual std::pair<unsigned short int, unsigned short int>
209  second_order_child_vertex (const unsigned int n) const override;
210 
214  static const int num_nodes = 18;
215  static const int num_sides = 5;
216  static const int num_edges = 9;
217  static const int num_children = 8;
218  static const int nodes_per_side = 9;
219  static const int nodes_per_edge = 3;
220 
225  static const unsigned int side_nodes_map[num_sides][nodes_per_side];
226 
231  static const unsigned int edge_nodes_map[num_edges][nodes_per_edge];
232 
236  virtual Real volume () const override;
237 
238 protected:
239 
244 
245 
246 
247 #ifdef LIBMESH_ENABLE_AMR
248 
252  virtual float embedding_matrix (const unsigned int i,
253  const unsigned int j,
254  const unsigned int k) const override
255  { return _embedding_matrix[i][j][k]; }
256 
262 
264 
265 #endif // LIBMESH_ENABLE_AMR
266 
275  static const unsigned short int _remaining_second_order_adjacent_vertices[3][4];
276 };
277 
278 } // namespace libMesh
279 
280 #endif // LIBMESH_CELL_PRISM18_H
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: cell_prism18.C:92
static const unsigned short int _remaining_second_order_adjacent_vertices[3][4]
Definition: cell_prism18.h:275
Prism18 & operator=(const Prism18 &)=delete
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual dof_id_type key() const
Definition: elem.C:401
The base class for all geometric element types.
Definition: elem.h:100
Node * _nodelinks_data[num_nodes]
Definition: cell_prism18.h:243
virtual Order default_order() const override
Definition: cell_prism18.C:153
static const int num_nodes
Definition: cell_prism18.h:214
Prism18(Elem *p=nullptr)
Definition: cell_prism18.h:77
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: cell_prism18.C:318
virtual ~Prism18()=default
virtual ElemType type() const override
Definition: cell_prism18.h:90
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: cell_prism18.C:109
virtual unsigned int n_nodes() const override
Definition: cell_prism18.h:95
static const int num_edges
Definition: cell_prism18.h:216
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_prism18.C:191
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Definition: cell_prism18.C:309
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
Definition: cell_prism18.C:207
The base class for all prismatic element types.
Definition: cell_prism.h:36
virtual bool has_affine_map() const override
Definition: cell_prism18.C:120
static const float _embedding_matrix[num_children][num_nodes][num_nodes]
Definition: cell_prism18.h:261
static const int num_children
Definition: cell_prism18.h:217
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
Definition: cell_prism18.h:225
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: cell_prism18.C:514
static const int nodes_per_edge
Definition: cell_prism18.h:219
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
Definition: cell_prism18.h:231
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A 3D prismatic element with 18 nodes.
Definition: cell_prism18.h:69
virtual bool is_vertex(const unsigned int i) const override
Definition: cell_prism18.C:69
static const int num_sides
Definition: cell_prism18.h:215
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: cell_prism18.C:102
virtual float embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Definition: cell_prism18.h:252
virtual unsigned int n_sub_elem() const override
Definition: cell_prism18.h:100
virtual Real volume() const override
Definition: cell_prism18.C:577
static const int nodes_per_side
Definition: cell_prism18.h:218
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
Definition: cell_prism18.C:485
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition: cell_prism18.C:565
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 bool is_edge(const unsigned int i) const override
Definition: cell_prism18.C:76
virtual bool is_face(const unsigned int i) const override
Definition: cell_prism18.C:85