suanPan
B31OS.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 ******************************************************************************/
33#ifndef B31OS_H
34#define B31OS_H
35
38
39class B31OS final : public SectionOSElement3D {
40 struct IntegrationPoint final {
41 double coor, weight;
42 unique_ptr<Section> b_section;
43 sp_mat strain_mat;
44 IntegrationPoint(double, double, double, unique_ptr<Section>&&);
45 };
46
47 static constexpr unsigned b_node = 2, b_dof = 7, b_size = b_dof * b_node;
48
49 const unsigned orientation_tag, int_pt_num;
50
51 const double length{0.};
52
53 vector<IntegrationPoint> int_pt;
54
55 unique_ptr<Orientation> b_trans;
56
57public:
58 B31OS(
59 unsigned, // tag
60 uvec&&, // node tags
61 unsigned, // section tag
62 unsigned, // orientation tag
63 unsigned = 6, // integration points
64 bool = false // nonlinear geometry switch
65 );
66
67 int initialize(const shared_ptr<DomainBase>&) override;
68
69 int update_status() override;
70
71 int commit_status() override;
72 int clear_status() override;
73 int reset_status() override;
74
75 vector<vec> record(OutputType) override;
76
77 void print() override;
78
79#ifdef SUANPAN_VTK
80 void Setup() override;
81 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
82 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
83#endif
84};
85
86#endif
87
OutputType
Definition: OutputType.h:23
The B31OS class.
Definition: B31OS.h:39
int commit_status() override
Definition: B31OS.cpp:168
vector< vec > record(OutputType) override
Definition: B31OS.cpp:192
B31OS(unsigned, uvec &&, unsigned, unsigned, unsigned=6, bool=false)
Definition: B31OS.cpp:84
void print() override
Definition: B31OS.cpp:198
int update_status() override
Definition: B31OS.cpp:132
int clear_status() override
Definition: B31OS.cpp:176
int initialize(const shared_ptr< DomainBase > &) override
Definition: B31OS.cpp:89
int reset_status() override
Definition: B31OS.cpp:184
Definition: SectionElement.h:116