suanPan
CIN3D8.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 CIN3D8_H
30#define CIN3D8_H
31
33
34class CIN3D8 final : public MaterialElement3D {
35 struct IntegrationPoint final {
36 vec coor;
37 double weight;
38 unique_ptr<Material> c_material;
39 mat pn_pxyz;
40 sp_mat strain_mat;
41 IntegrationPoint(vec&&, double, unique_ptr<Material>&&, mat&&);
42 };
43
44 static constexpr unsigned c_node = 8, c_dof = 3, c_size = c_dof * c_node;
45
46 vector<IntegrationPoint> int_pt;
47
48 static mat compute_mapping(const vec&);
49 static mat compute_n(const vec&);
50 static mat compute_dn(const vec&);
51
52public:
53 CIN3D8(
54 unsigned, // tag
55 uvec&&, // node tag
56 unsigned // material tag
57 );
58
59 int initialize(const shared_ptr<DomainBase>&) override;
60
61 int update_status() override;
62
63 int commit_status() override;
64 int clear_status() override;
65 int reset_status() override;
66
67 vector<vec> record(OutputType) override;
68
69 void print() override;
70
71#ifdef SUANPAN_VTK
72 void Setup() override;
73 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
74 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
75#endif
76};
77
78#endif
79
OutputType
Definition: OutputType.h:23
The CIN3D8 class defines CIN3D8 CIN3D8R elements.
Definition: CIN3D8.h:34
int reset_status() override
Definition: CIN3D8.cpp:224
vector< vec > record(OutputType) override
Definition: CIN3D8.cpp:230
int commit_status() override
Definition: CIN3D8.cpp:212
int update_status() override
Definition: CIN3D8.cpp:197
void print() override
Definition: CIN3D8.cpp:236
CIN3D8(unsigned, uvec &&, unsigned)
Definition: CIN3D8.cpp:148
int initialize(const shared_ptr< DomainBase > &) override
Definition: CIN3D8.cpp:151
int clear_status() override
Definition: CIN3D8.cpp:218
Definition: MaterialElement.h:77