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