suanPan
F21.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  ******************************************************************************/
34 #ifndef F21_H
35 #define F21_H
36 
37 #include <Element/SectionElement.h>
38 #include <Element/Utility/B2DC.h>
39 
40 class F21 final : public SectionElement2D {
41  struct IntegrationPoint final {
42  double coor, weight;
43  unique_ptr<Section> b_section;
44  mat B;
45  IntegrationPoint(double, double, unique_ptr<Section>&&);
46  };
47 
48  static constexpr unsigned b_node = 2, b_dof = 3, b_size = b_dof * b_node;
49 
50  const unsigned int_pt_num;
51 
52  const double length = 0.;
53 
54  vector<IntegrationPoint> int_pt;
55 
56  unique_ptr<Orientation> b_trans;
57 
58  mat initial_local_flexibility;
59  mat current_local_flexibility, trial_local_flexibility;
60  vec current_local_deformation, trial_local_deformation;
61  vec current_local_resistance, trial_local_resistance;
62 
63 public:
64  F21(unsigned, // tag
65  uvec&&, // node tag
66  unsigned, // section tags
67  unsigned = 6, // integration points
68  bool = false // nonlinear geometry switch
69  );
70 
71  int initialize(const shared_ptr<DomainBase>&) override;
72 
73  int update_status() override;
74 
75  int clear_status() override;
76  int commit_status() override;
77  int reset_status() override;
78 
79  vector<vec> record(OutputType) override;
80 
81  void print() override;
82 
83 #ifdef SUANPAN_VTK
84  void Setup() override;
85  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
86  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
87 #endif
88 };
89 
90 #endif
91 
OutputType
Definition: OutputType.h:21
The F21 class.
Definition: F21.h:40
int initialize(const shared_ptr< DomainBase > &) override
Definition: F21.cpp:35
int clear_status() override
Definition: F21.cpp:104
void print() override
Definition: F21.cpp:146
int reset_status() override
Definition: F21.cpp:126
F21(unsigned, uvec &&, unsigned, unsigned=6, bool=false)
Definition: F21.cpp:30
int update_status() override
Definition: F21.cpp:69
vector< vec > record(OutputType) override
Definition: F21.cpp:137
int commit_status() override
Definition: F21.cpp:115
Definition: SectionElement.h:62