libMesh
face.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 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_H
21 #define LIBMESH_FACE_H
22 
23 // Local includes
24 #include "libmesh/elem.h"
25 
26 namespace libMesh
27 {
28 
37 class Face : public Elem
38 {
39 public:
40 
45  Face (const unsigned int nn,
46  const unsigned int ns,
47  Elem * p,
48  Elem ** elemlinkdata,
49  Node ** nodelinkdata) :
50  Elem(nn, ns, p, elemlinkdata, nodelinkdata) {}
51 
52  Face (Face &&) = delete;
53  Face (const Face &) = delete;
54  Face & operator= (const Face &) = delete;
55  Face & operator= (Face &&) = delete;
56  virtual ~Face() = default;
57 
61  virtual unsigned short dim () const override final { return 2; }
62 
67  virtual unsigned int n_faces() const override final { return 0; }
68 
72  virtual std::unique_ptr<Elem> build_edge_ptr (const unsigned int i) override final
73  { return build_side_ptr(i); }
74 
78  virtual void build_edge_ptr (std::unique_ptr<Elem> & edge, const unsigned int i) override final
79  { build_side_ptr(edge, i); }
80 
85 
89  virtual bool is_edge_on_side(const unsigned int e,
90  const unsigned int s) const override final
91  { return (e == s); }
92 
96  virtual std::vector<unsigned int> sides_on_edge(const unsigned int e) const override final
97  { return {e}; }
98 
105  virtual Point quasicircumcenter () const override;
106 
107 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
108 
113  virtual bool infinite () const override final { return false; }
114 
115 #endif
116 
117 };
118 
119 } // namespace libMesh
120 
121 #endif // LIBMESH_FACE_H
virtual unsigned short dim() const override final
Definition: face.h:61
A Node is like a Point, but with more information.
Definition: node.h:52
The Face is an abstract element type that lives in two dimensions.
Definition: face.h:37
virtual std::vector< unsigned int > sides_on_edge(const unsigned int e) const override final
sides_on_edge is trivial in 2D.
Definition: face.h:96
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
virtual void build_edge_ptr(std::unique_ptr< Elem > &edge, const unsigned int i) override final
build_side and build_edge are identical for faces.
Definition: face.h:78
Face & operator=(const Face &)=delete
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
The libMesh namespace provides an interface to certain functionality in the library.
Face(const unsigned int nn, const unsigned int ns, Elem *p, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: face.h:45
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const override final
is_edge_on_side is trivial in 2D.
Definition: face.h:89
virtual unsigned int n_faces() const override final
Definition: face.h:67
virtual ~Face()=default
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i)=0
virtual bool infinite() const override final
Definition: face.h:113
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
virtual Point quasicircumcenter() const override
Definition: face.C:29
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override final
build_side and build_edge are identical for faces.
Definition: face.h:72