suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
GQ12.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2026 Theodore Chang
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program 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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
39#ifndef GQ12_H
40#define GQ12_H
41
43
44class GQ12 final : public MaterialElement2D {
45 struct IntegrationPoint final {
46 vec coor;
47 double weight;
48 unique_ptr<Material> m_material;
49 mat strain_mat;
50 IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
51 };
52
53 static constexpr unsigned m_node = 4, m_dof = 3, m_size = m_dof * m_node;
54
55 const double thickness;
56
57 std::vector<IntegrationPoint> int_pt;
58
59public:
60 GQ12(
61 unsigned, // tag
62 uvec&&, // node tag
63 unsigned, // material tag
64 double = 1. // thickness
65 );
66
67 int initialize(const shared_ptr<DomainBase>&) override;
68
69 int update_status() override;
70
71 int commit_status() override;
72 int clear_status() override;
73 int reset_status() override;
74
75 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
76
77 [[nodiscard]] std::vector<vec> record(OutputType) const override;
78
79 void print() override;
80
81#ifdef SUANPAN_VTK
82 [[nodiscard]] vtkSmartPointer<vtkCell> GetCell() const override;
83
84 mat GetData(OutputType) override;
85 mat GetDeformation(double) override;
86#endif
87};
88
89#endif
90
OutputType
Definition OutputType.h:23
The GQ12 class implements the displacement based four node quadrilateral drilling element proposed by...
Definition GQ12.h:44
int clear_status() override
Definition GQ12.cpp:157
int initialize(const shared_ptr< DomainBase > &) override
Definition GQ12.cpp:36
int update_status() override
Definition GQ12.cpp:137
mat compute_shape_function(const mat &, unsigned) const override
Definition GQ12.cpp:169
std::vector< vec > record(OutputType) const override
Definition GQ12.cpp:171
int reset_status() override
Definition GQ12.cpp:163
int commit_status() override
Definition GQ12.cpp:151
void print() override
Definition GQ12.cpp:177
Definition MaterialElement.h:60