suanPan
B21.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 B21_H
30 #define B21_H
31 
32 #include <Element/SectionElement.h>
33 
34 class Orientation;
35 
36 class B21 : public SectionElement2D {
37  struct IntegrationPoint final {
38  double coor, weight;
39  unique_ptr<Section> b_section;
40  mat strain_mat;
41  IntegrationPoint(double, double, unique_ptr<Section>&&);
42  };
43 
44  static constexpr unsigned b_node = 2, b_dof = 3, b_size = b_node * b_dof;
45 
46  const unsigned int_pt_num;
47 
48 protected:
49  const double length = 0.;
50 
51  vector<IntegrationPoint> int_pt;
52 
53  unique_ptr<Orientation> b_trans;
54 
55 public:
56  B21(unsigned, // tag
57  uvec&&, // node tags
58  unsigned, // section tag
59  unsigned = 6, // integration points
60  bool = false // nonlinear geometry switch
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 B21 class.
Definition: B21.h:36
B21(unsigned, uvec &&, unsigned, unsigned=6, bool=false)
Definition: B21.cpp:30
int update_status() override
Definition: B21.cpp:62
vector< vec > record(OutputType) override
Definition: B21.cpp:109
int commit_status() override
Definition: B21.cpp:85
const double length
Definition: B21.h:49
int initialize(const shared_ptr< DomainBase > &) override
Definition: B21.cpp:35
unique_ptr< Orientation > b_trans
Definition: B21.h:53
int reset_status() override
Definition: B21.cpp:101
int clear_status() override
Definition: B21.cpp:93
vector< IntegrationPoint > int_pt
Definition: B21.h:51
void print() override
Definition: B21.cpp:115
A Orientation class.
Definition: Orientation.h:40
Definition: SectionElement.h:62