libMesh
Loading...
Searching...
No Matches
face_quad4.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_QUAD4_H
21#define LIBMESH_FACE_QUAD4_H
22
23// Local includes
24#include "libmesh/libmesh_common.h"
25#include "libmesh/face_quad.h"
26
27namespace libMesh
28{
29
53class Quad4 : public Quad
54{
55public:
56
60 explicit
61 Quad4 (Elem * p=nullptr) :
63
64 Quad4 (Quad4 &&) = delete;
65 Quad4 (const Quad4 &) = delete;
66 Quad4 & operator= (const Quad4 &) = delete;
67 Quad4 & operator= (Quad4 &&) = delete;
68 virtual ~Quad4() = default;
69
73 virtual ElemType type () const override { return QUAD4; }
74
78 virtual unsigned int n_sub_elem() const override { return 1; }
79
83 virtual bool is_vertex(const unsigned int i) const override;
84
88 virtual bool is_edge(const unsigned int i) const override;
89
93 virtual bool is_face(const unsigned int i) const override;
94
99 virtual bool is_node_on_side(const unsigned int n,
100 const unsigned int s) const override;
101
102 virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
103
104 virtual std::vector<unsigned int> nodes_on_edge(const unsigned int e) const override;
105
110 virtual bool is_node_on_edge(const unsigned int n,
111 const unsigned int e) const override
112 { return this->is_node_on_side(n,e); }
113
118 virtual bool has_affine_map () const override;
119
123 virtual bool has_invertible_map(Real tol) const override;
124
128 virtual Order default_order() const override;
129
130 virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i) override;
131
135 virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
136 const unsigned int i) override;
137
138 // Avoid hiding deprecated version with different signature
140
141 virtual void connectivity(const unsigned int sf,
142 const IOPackage iop,
143 std::vector<dof_id_type> & conn) const override;
144
148 static const int num_nodes = 4;
149 static const int nodes_per_side = 2;
150
155 static const unsigned int side_nodes_map[num_sides][nodes_per_side];
156
161 virtual Point true_centroid () const override;
162
168 virtual Real volume () const override;
169
173 virtual BoundingBox loose_bounding_box () const override;
174
175 virtual void permute(unsigned int perm_num) override final;
176
177 virtual void flip(BoundaryInfo *) override final;
178
179 ElemType side_type (const unsigned int s) const override final;
180
181 virtual Point side_vertex_average_normal(const unsigned int s) const override final;
182
183protected:
184
189
190
191
192#ifdef LIBMESH_ENABLE_AMR
193
197 virtual Real embedding_matrix (const unsigned int i,
198 const unsigned int j,
199 const unsigned int k) const override
200 { return _embedding_matrix[i][j][k]; }
201
207
209
210#endif // LIBMESH_ENABLE_AMR
211
212};
213
214
215} // namespace libMesh
216
217#endif // LIBMESH_FACE_QUAD4_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
This is the base class from which all geometric element types are derived.
Definition elem.h:96
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
A Node is like a Point, but with more information.
Definition node.h:55
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
The QUAD4 is an element in 2D composed of 4 nodes.
Definition face_quad4.h:54
virtual Point side_vertex_average_normal(const unsigned int s) const override final
Definition face_quad4.C:394
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition face_quad4.h:110
virtual BoundingBox loose_bounding_box() const override
Builds a bounding box out of the nodal positions.
Definition face_quad4.C:356
virtual Order default_order() const override
Definition face_quad4.C:205
virtual ~Quad4()=default
virtual bool is_edge(const unsigned int i) const override
Definition face_quad4.C:99
Quad4(Quad4 &&)=delete
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Definition face_quad4.C:212
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition face_quad4.C:119
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition face_quad4.h:206
virtual unsigned int n_sub_elem() const override
Definition face_quad4.h:78
virtual bool has_invertible_map(Real tol) const override
Definition face_quad4.C:139
virtual ElemType type() const override
Definition face_quad4.h:73
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
Definition face_quad4.C:374
Quad4 & operator=(const Quad4 &)=delete
static const int num_nodes
Geometric constants for Quad4.
Definition face_quad4.h:148
virtual bool is_vertex(const unsigned int i) const override
Definition face_quad4.C:93
ElemType side_type(const unsigned int s) const override final
Definition face_quad4.C:386
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
Definition face_quad4.h:155
virtual bool is_face(const unsigned int i) const override
Definition face_quad4.C:104
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
Definition face_quad4.C:126
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition face_quad4.C:227
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition face_quad4.h:188
static const int nodes_per_side
Definition face_quad4.h:149
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
Definition face_quad4.C:362
virtual bool has_affine_map() const override
Definition face_quad4.C:131
Quad4(const Quad4 &)=delete
virtual Real embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Matrix used to create the elements children.
Definition face_quad4.h:197
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition face_quad4.C:109
Quad4(Elem *p=nullptr)
Constructor.
Definition face_quad4.h:61
virtual Point true_centroid() const override
An optimized method for computing the centroid of a 4-node quad with straight sides.
Definition face_quad4.C:264
virtual Real volume() const override
An optimized method for computing the area of a 4-node quad with straight sides, but not necessarily ...
Definition face_quad4.C:312
The QUAD is an element in 2D composed of 4 sides.
Definition face_quad.h:49
static const int num_children
Definition face_quad.h:86
static const int num_sides
Geometric constants for Quad4.
Definition face_quad.h:85
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