suanPan
T3D2S.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  ******************************************************************************/
29 #ifndef T3D2S_H
30 #define T3D2S_H
31 
32 #include <Element/SectionElement.h>
33 
34 class Orientation;
35 
36 class T3D2S final : public SectionElement1D {
37  static constexpr unsigned t_node = 2, t_dof = 3, t_size = t_dof * t_node;
38 
39  const double length = 0.; // length of the element
40 
41  unique_ptr<Section> t_section; // section model
42  unique_ptr<Orientation> t_trans; // transformation
43 
44  const bool log_strain;
45 
46 public:
47  T3D2S(
48  unsigned, // tag
49  uvec&&, // node tag
50  unsigned, // material tag
51  bool = false, // nonlinear geometry switch
52  bool = true // log strain switch
53  );
54 
55  int initialize(const shared_ptr<DomainBase>&) override;
56 
57  int update_status() override;
58 
59  int commit_status() override;
60  int clear_status() override;
61  int reset_status() override;
62 
63  vector<vec> record(OutputType) override;
64 
65  void print() override;
66 
67 #ifdef SUANPAN_VTK
68  void Setup() override;
69  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
70  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
71 #endif
72 };
73 
74 #endif
75 
OutputType
Definition: OutputType.h:23
A Orientation class.
Definition: Orientation.h:48
Definition: SectionElement.h:51
The T3D2S class handles both linear and nonlinear problems by using a corotational transformation.
Definition: T3D2S.h:36
int initialize(const shared_ptr< DomainBase > &) override
Definition: T3D2S.cpp:28
void print() override
Definition: T3D2S.cpp:86
int update_status() override
Definition: T3D2S.cpp:42
int clear_status() override
Definition: T3D2S.cpp:72
vector< vec > record(OutputType) override
Definition: T3D2S.cpp:84
T3D2S(unsigned, uvec &&, unsigned, bool=false, bool=true)
Definition: T3D2S.cpp:23
int reset_status() override
Definition: T3D2S.cpp:78
int commit_status() override
Definition: T3D2S.cpp:66