libMesh
Loading...
Searching...
No Matches
face_c0polygon.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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_C0POLYGON_H
21#define LIBMESH_FACE_C0POLYGON_H
22
23// Local includes
24#include "libmesh/libmesh_common.h"
25#include "libmesh/face_polygon.h"
26
27namespace libMesh
28{
29
51class C0Polygon : public Polygon
52{
53public:
54
66 explicit
67 C0Polygon (const unsigned int num_sides, Elem * p=nullptr);
68
69 C0Polygon (C0Polygon &&) = delete;
70 C0Polygon (const C0Polygon &) = delete;
71 C0Polygon & operator= (const C0Polygon &) = delete;
73 virtual ~C0Polygon() = default;
74
78 virtual ElemType type () const override final { return C0POLYGON; }
79
84 virtual unsigned int n_sub_elem() const override { return this->n_sides(); }
85
91 virtual unsigned int opposite_node(const unsigned int n,
92 const unsigned int s) const override final;
93
97 virtual bool is_vertex(const unsigned int i) const override;
98
102 virtual bool is_edge(const unsigned int i) const override;
103
107 virtual bool is_face(const unsigned int i) const override;
108
112 virtual unsigned int n_nodes_per_side() const override { return 2;}
113
118 virtual bool is_node_on_side(const unsigned int n,
119 const unsigned int s) const override;
120
121 virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
122
123 virtual std::vector<unsigned int> nodes_on_edge(const unsigned int e) const override;
124
129 virtual bool is_node_on_edge(const unsigned int n,
130 const unsigned int e) const override
131 { return this->is_node_on_side(n,e); }
132
137 virtual bool has_affine_map () const override;
138
142 virtual Order default_order() const override;
143
147 using Elem::key;
148
149 virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i) override;
150
154 virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
155 const unsigned int i) override;
156
157 // Avoid hiding deprecated version with different signature
159
160 virtual void connectivity(const unsigned int sf,
161 const IOPackage iop,
162 std::vector<dof_id_type> & conn) const override;
163
167 virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override
168 { return 2; }
169
173 virtual std::pair<unsigned short int, unsigned short int>
174 second_order_child_vertex (const unsigned int n) const override;
175
179 virtual Real volume () const override;
180
184 virtual Point true_centroid () const override;
185
186 virtual void permute(unsigned int perm_num) override final;
187
188 virtual void flip(BoundaryInfo *) override final;
189
190 ElemType side_type (const unsigned int s) const override final;
191
192 virtual Point side_vertex_average_normal(const unsigned int s) const override final;
193
197 virtual void retriangulate() override final;
198
199protected:
200
201#ifdef LIBMESH_ENABLE_AMR
202
206 virtual Real embedding_matrix (const unsigned int /*i*/,
207 const unsigned int /*j*/,
208 const unsigned int /*k*/) const override
209 { libmesh_not_implemented(); return 0; }
210
211#endif // LIBMESH_ENABLE_AMR
212
213};
214
215
216} // namespace libMesh
217
218#endif // LIBMESH_FACE_POLYGON_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
The C0Polygon is an element in 2D with an arbitrary (but fixed) number of first-order (EDGE2) sides.
virtual bool is_edge(const unsigned int i) const override
C0Polygon(C0Polygon &&)=delete
virtual Point true_centroid() const override
An optimized method for calculating the centroid of a C0Polygon.
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
ElemType side_type(const unsigned int s) const override final
virtual bool is_face(const unsigned int i) const override
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual ~C0Polygon()=default
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual bool has_affine_map() const override
virtual Real volume() const override
An optimized method for calculating the area of a C0Polygon.
virtual void retriangulate() override final
Create a triangulation from the current node locations.
virtual Order default_order() const override
virtual unsigned int n_sub_elem() const override
C0Polygon(const C0Polygon &)=delete
virtual bool is_vertex(const unsigned int i) const override
virtual unsigned int opposite_node(const unsigned int n, const unsigned int s) const override final
virtual ElemType type() const override final
virtual Point side_vertex_average_normal(const unsigned int s) const override final
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Element refinement is not implemented for polygons.
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
C0Polygon & operator=(const C0Polygon &)=delete
virtual unsigned int n_nodes_per_side() const override
C0Polygon elements have only vertex nodes, two per side/edge.
virtual Real embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
This is the base class from which all geometric element types are derived.
Definition elem.h:96
virtual dof_id_type key(const unsigned int s) const =0
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
The Polygon is an element in 2D with an arbitrary (but fixed) number of sides.
virtual unsigned int n_sides() const override final
The libMesh namespace provides an interface to certain functionality in the library.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
ElemType
Defines an enum for geometric element types.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real