suanPan
CSMT3.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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  ******************************************************************************/
29 #ifndef CSMT3_H
30 #define CSMT3_H
31 
33 
34 class CSMT3 final : public MaterialElement2D {
35  static constexpr unsigned m_node = 3, m_dof = 3, m_size = m_dof * m_node;
36 
37  inline static const uvec t_dof{0, 1, 3, 4, 6, 7};
38  inline static const uvec r_dof{2, 5, 8};
39 
40  struct IntegrationPoint final {
41  rowvec coor;
42  double weight = 0.;
43  unique_ptr<Material> m_material;
44  mat b1, b2, b3;
45  IntegrationPoint(rowvec&&, double, unique_ptr<Material>&&);
46  };
47 
48  const double thickness; // thickness
49  const double area = 0.; // area
50 
51  vector<IntegrationPoint> int_pt;
52 
53 public:
54  CSMT3(unsigned, uvec&&, unsigned, double = 1., double = -1.);
55 
56  int initialize(const shared_ptr<DomainBase>&) override;
57 
58  int update_status() override;
59 
60  int commit_status() override;
61  int clear_status() override;
62  int reset_status() override;
63 
64  vector<vec> record(OutputType) override;
65 
66  void print() override;
67 
68 #ifdef SUANPAN_VTK
69  void Setup() override;
70  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
71  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
72 #endif
73 };
74 
75 #endif
76 
OutputType
Definition: OutputType.h:21
The CSMT3 class.
Definition: CSMT3.h:34
int commit_status() override
Definition: CSMT3.cpp:177
int update_status() override
Definition: CSMT3.cpp:155
int initialize(const shared_ptr< DomainBase > &) override
Definition: CSMT3.cpp:32
int reset_status() override
Definition: CSMT3.cpp:189
CSMT3(unsigned, uvec &&, unsigned, double=1., double=-1.)
Definition: CSMT3.cpp:28
vector< vec > record(OutputType) override
Definition: CSMT3.cpp:195
int clear_status() override
Definition: CSMT3.cpp:183
void print() override
Definition: CSMT3.cpp:201
Definition: MaterialElement.h:62
Definition: shapeFunction.h:50