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