suanPan
CSMT6.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  ******************************************************************************/
30 #ifndef CSMT6_H
31 #define CSMT6_H
32 
34 
35 class CSMT6 final : public MaterialElement2D {
36  struct IntegrationPoint final {
37  vec coor;
38  double weight;
39  unique_ptr<Material> m_material;
40  mat b1, b2, b3;
41  IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
42  };
43 
44  static constexpr unsigned m_node = 6, m_dof = 3, m_size = m_dof * m_node;
45 
46  inline static const uvec t_dof{0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16};
47  inline static const uvec r_dof{2, 5, 8, 11, 14, 17};
48 
49  const double thickness;
50 
51  const double area = 0.;
52 
53  vector<IntegrationPoint> int_pt;
54 
55 public:
56  CSMT6(unsigned, // tag
57  uvec&&, // node tag
58  unsigned, // material tag
59  double = 1., // thickness
60  double = -1. // length
61  );
62 
63  int initialize(const shared_ptr<DomainBase>&) override;
64 
65  int update_status() override;
66 
67  int commit_status() override;
68  int clear_status() override;
69  int reset_status() override;
70 
71  vector<vec> record(OutputType) override;
72 
73  void print() override;
74 
75 #ifdef SUANPAN_VTK
76  void Setup() override;
77  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
78  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
79 #endif
80 };
81 
82 #endif
83 
OutputType
Definition: OutputType.h:21
The CSMT6 class.
Definition: CSMT6.h:35
int update_status() override
Definition: CSMT6.cpp:151
int commit_status() override
Definition: CSMT6.cpp:173
CSMT6(unsigned, uvec &&, unsigned, double=1., double=-1.)
Definition: CSMT6.cpp:31
int reset_status() override
Definition: CSMT6.cpp:185
void print() override
Definition: CSMT6.cpp:197
vector< vec > record(OutputType) override
Definition: CSMT6.cpp:191
int initialize(const shared_ptr< DomainBase > &) override
Definition: CSMT6.cpp:35
int clear_status() override
Definition: CSMT6.cpp:179
Definition: MaterialElement.h:62
Definition: shape.h:50