suanPan
EB31OS.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2024 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  ******************************************************************************/
32 #ifndef EB31OS_H
33 #define EB31OS_H
34 
35 #include <Element/SectionElement.h>
37 
38 class EB31OS final : public SectionOSElement3D {
39  static constexpr unsigned b_node = 2u, b_dof = 7u, b_size = b_dof * b_node;
40 
41  const unsigned orientation_tag;
42 
43  const double length = 0.;
44 
45  unique_ptr<Orientation> b_trans;
46 
47  const vec property; // [E, G, A, IZ, IY, J, IW]
48 
49  mat local_stiff;
50 
51 public:
52  EB31OS(
53  unsigned, // tag
54  uvec&&, // node tags
55  vec&&, // properties
56  unsigned, // orientation tag
57  bool = false // nonlinear geometry switch
58  );
59 
60  int initialize(const shared_ptr<DomainBase>&) override;
61 
62  int update_status() override;
63 
64  int commit_status() override;
65  int clear_status() override;
66  int reset_status() override;
67 
68  vector<vec> record(OutputType) override;
69 
70  void print() override;
71 
72 #ifdef SUANPAN_VTK
73  void Setup() override;
74  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
75  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
76 #endif
77 };
78 
79 #endif
80 
OutputType
Definition: OutputType.h:23
The EB31OS class.
Definition: EB31OS.h:38
int commit_status() override
Definition: EB31OS.cpp:115
void print() override
Definition: EB31OS.cpp:137
int update_status() override
Definition: EB31OS.cpp:102
int clear_status() override
Definition: EB31OS.cpp:120
int reset_status() override
Definition: EB31OS.cpp:125
vector< vec > record(OutputType) override
Definition: EB31OS.cpp:130
EB31OS(unsigned, uvec &&, vec &&, unsigned, bool=false)
Definition: EB31OS.cpp:22
int initialize(const shared_ptr< DomainBase > &) override
Definition: EB31OS.cpp:27
Definition: SectionElement.h:116