suanPan
GQ12.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 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 
44 class 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 
59 public:
60  GQ12(unsigned, // tag
61  uvec&&, // node tag
62  unsigned, // material tag
63  double = 1. // thickness
64  );
65 
66  int initialize(const shared_ptr<DomainBase>&) override;
67 
68  int update_status() override;
69 
70  int commit_status() override;
71  int clear_status() override;
72  int reset_status() override;
73 
74  [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
75 
76  vector<vec> record(OutputType) override;
77 
78  void print() override;
79 
80 #ifdef SUANPAN_VTK
81  void Setup() override;
82  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
83  mat GetData(OutputType) override;
84  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
85 #endif
86 };
87 
88 #endif
89 
OutputType
Definition: OutputType.h:21
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:62