suanPan
GQ12.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2024 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 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 vector<vec> record(OutputType) override;
78
79 void print() override;
80
81#ifdef SUANPAN_VTK
82 void Setup() override;
83 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
84 mat GetData(OutputType) override;
85 void SetDeformation(vtkSmartPointer<vtkPoints>&, 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:154
int initialize(const shared_ptr< DomainBase > &) override
Definition: GQ12.cpp:35
int update_status() override
Definition: GQ12.cpp:134
mat compute_shape_function(const mat &, unsigned) const override
Definition: GQ12.cpp:166
int reset_status() override
Definition: GQ12.cpp:160
GQ12(unsigned, uvec &&, unsigned, double=1.)
Definition: GQ12.cpp:31
int commit_status() override
Definition: GQ12.cpp:148
vector< vec > record(OutputType) override
Definition: GQ12.cpp:168
void print() override
Definition: GQ12.cpp:174
Definition: MaterialElement.h:64