suanPan
C3D8I.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 C3D8I_H
30#define C3D8I_H
31
33
34class C3D8I final : public MaterialElement3D {
35 struct IntegrationPoint final {
36 vec coor;
37 double weight;
38 unique_ptr<Material> c_material;
39 mat pn_pxyz, B1, B2;
40 IntegrationPoint(vec&&, double, unique_ptr<Material>&&, mat&&);
41 };
42
43 static constexpr unsigned c_node = 8, c_dof = 3, c_size = c_dof * c_node;
44
45 vector<IntegrationPoint> int_pt;
46
47public:
48 C3D8I(
49 unsigned, // tag
50 uvec&&, // node tag
51 unsigned // material tag
52 );
53
54 int initialize(const shared_ptr<DomainBase>&) override;
55
56 int update_status() override;
57
58 int commit_status() override;
59 int clear_status() override;
60 int reset_status() override;
61
62 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
63
64 vector<vec> record(OutputType) override;
65
66 void print() override;
67
68#ifdef SUANPAN_VTK
69 void Setup() override;
70 mat GetData(OutputType) override;
71 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
72 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
73#endif
74};
75
76#endif
77
OutputType
Definition: OutputType.h:23
The C3D8I class defines C3D8I C3D8IR elements.
Definition: C3D8I.h:34
int update_status() override
Definition: C3D8I.cpp:100
int clear_status() override
Definition: C3D8I.cpp:129
int initialize(const shared_ptr< DomainBase > &) override
Definition: C3D8I.cpp:36
vector< vec > record(OutputType) override
Definition: C3D8I.cpp:143
C3D8I(unsigned, uvec &&, unsigned)
Definition: C3D8I.cpp:33
int commit_status() override
Definition: C3D8I.cpp:123
void print() override
Definition: C3D8I.cpp:149
mat compute_shape_function(const mat &, unsigned) const override
Definition: C3D8I.cpp:141
int reset_status() override
Definition: C3D8I.cpp:135
Definition: MaterialElement.h:77