suanPan
CSMT3.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 CSMT3_H
30#define CSMT3_H
31
33
34class CSMT3 final : public MaterialElement2D {
35 static constexpr unsigned m_node = 3, m_dof = 3, m_size = m_dof * m_node;
36
37 static const uvec t_dof;
38 static const uvec r_dof;
39
40 struct IntegrationPoint final {
41 rowvec coor;
42 double weight = 0.;
43 unique_ptr<Material> m_material;
44 mat b1, b2, b3;
45 IntegrationPoint(rowvec&&, double, unique_ptr<Material>&&);
46 };
47
48 const double thickness; // thickness
49 const double area = 0.; // area
50
51 vector<IntegrationPoint> int_pt;
52
53public:
54 CSMT3(unsigned, uvec&&, unsigned, double = 1., double = -1.);
55
56 int initialize(const shared_ptr<DomainBase>&) override;
57
58 int update_status() override;
59
60 int commit_status() override;
61 int clear_status() override;
62 int reset_status() override;
63
64 vector<vec> record(OutputType) override;
65
66 void print() override;
67
68#ifdef SUANPAN_VTK
69 void Setup() override;
70 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
71 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
72#endif
73};
74
75#endif
76
OutputType
Definition: OutputType.h:23
The CSMT3 class.
Definition: CSMT3.h:34
int commit_status() override
Definition: CSMT3.cpp:180
int update_status() override
Definition: CSMT3.cpp:158
int initialize(const shared_ptr< DomainBase > &) override
Definition: CSMT3.cpp:35
int reset_status() override
Definition: CSMT3.cpp:192
CSMT3(unsigned, uvec &&, unsigned, double=1., double=-1.)
Definition: CSMT3.cpp:31
vector< vec > record(OutputType) override
Definition: CSMT3.cpp:198
int clear_status() override
Definition: CSMT3.cpp:186
void print() override
Definition: CSMT3.cpp:204
Definition: MaterialElement.h:64
Definition: shape.h:50