suanPan
Allman.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  ******************************************************************************/
29 #ifndef ALLMAN_H
30 #define ALLMAN_H
31 
33 
34 class Allman final : public MaterialElement2D {
35  struct IntegrationPoint final {
36  vec coor;
37  double weight;
38  unique_ptr<Material> m_material;
39  mat strain_mat;
40  IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
41  };
42 
43  static constexpr unsigned m_node = 3, m_dof = 3, m_size = m_dof * m_node;
44 
45  const double thickness; // thickness
46 
47  double area = 0.; // area
48 
49  vector<IntegrationPoint> int_pt;
50 
51  static mat form_coor(const mat&);
52  static field<mat> form_transform(const mat&);
53 
54 public:
55  Allman(unsigned, // tag
56  uvec&&, // node tag
57  unsigned, // material tag
58  double = 1. // thickness
59  );
60 
61  int initialize(const shared_ptr<DomainBase>&) override;
62 
63  int update_status() override;
64 
65  int commit_status() override;
66  int clear_status() override;
67  int reset_status() override;
68 
69  vector<vec> record(OutputType) override;
70 
71  void print() override;
72 
73 #ifdef SUANPAN_VTK
74  void Setup() override;
75  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
76  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
77 #endif
78 };
79 
80 #endif
81 
OutputType
Definition: OutputType.h:21
The Allman class.
Definition: Allman.h:34
int update_status() override
Definition: Allman.cpp:132
int initialize(const shared_ptr< DomainBase > &) override
Definition: Allman.cpp:79
Allman(unsigned, uvec &&, unsigned, double=1.)
Definition: Allman.cpp:75
int clear_status() override
Definition: Allman.cpp:153
vector< vec > record(OutputType) override
Definition: Allman.cpp:165
int reset_status() override
Definition: Allman.cpp:159
void print() override
Definition: Allman.cpp:171
int commit_status() override
Definition: Allman.cpp:147
Definition: MaterialElement.h:62
Definition: shape.h:50