libMesh
face_tri3_subdivision.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_FACE_TRI3_SUBDIVISION_H
21 #define LIBMESH_FACE_TRI3_SUBDIVISION_H
22 
23 
24 // Local includes
25 #include "libmesh/face_tri3.h"
26 
27 namespace libMesh
28 {
29 
40 class Tri3Subdivision libmesh_final : public Tri3
41 {
42 public:
43 
48  Tri3(), _subdivision_updated(false), _is_ghost(false) {}
49 
53  Tri3Subdivision(Elem * p);
54 
58  virtual ElemType type () const libmesh_override { return TRI3SUBDIVISION; }
59 
64  virtual bool has_affine_map () const libmesh_override { return false; }
65 
70  virtual bool is_linear () const libmesh_override { return false; }
71 
75  virtual Order default_order() const libmesh_override { return FOURTH; }
76 
82  void prepare_subdivision_properties();
83 
88  bool is_subdivision_updated() const { return _subdivision_updated; }
89 
93  Node * get_ordered_node(unsigned int node_id) const;
94 
99  unsigned int get_ordered_valence(unsigned int node_id) const;
100 
105  unsigned int local_node_number(unsigned int node_id) const;
106 
110  bool is_ghost() const { return _is_ghost; }
111 
115  void set_ghost(bool ghosted) { _is_ghost = ghosted; }
116 
117 private:
118 
123  Node * _ordered_nodes[3];
124 
130 
135  bool _is_ghost;
136 };
137 
138 
139 } // namespace libMesh
140 
141 #endif // LIBMESH_FACE_TRI3_SUBDIVISION_H
The Tri3 is an element in 2D composed of 3 nodes.
Definition: face_tri3.h:54
bool _is_ghost
true if the element is a ghost element (e.g.
A Node is like a Point, but with more information.
Definition: node.h:52
ElemType
Defines an enum for geometric element types.
virtual bool has_affine_map() const libmesh_override
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
The libMesh namespace provides an interface to certain functionality in the library.
bool is_subdivision_updated() const
void set_ghost(bool ghosted)
Sets the boolean flag identifying ghost elements.
bool _subdivision_updated
true if the subdivision element is ready for use, i.e.
virtual ElemType type() const libmesh_override
virtual bool is_linear() const libmesh_override
virtual Order default_order() const libmesh_override
Tri3Subdivision()
Constructor without parent specification.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32