suanPan
Loading...
Searching...
No Matches
C3D8.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2025 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 C3D8_H
30#define C3D8_H
31
33
34class C3D8 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 static const field<vec> h_mode;
47
48 const double penalty;
49
50 const char int_scheme;
51
52 const bool hourglass_control;
53
54 mat hourglass;
55
56 std::vector<IntegrationPoint> int_pt;
57
58public:
59 C3D8(
60 unsigned, // tag
61 uvec&&, // node tag
62 unsigned, // material tag
63 double, // penalty factor
64 char, // reduced integration
65 bool // nonlinear geometry switch
66 );
67
68 int initialize(const shared_ptr<DomainBase>&) override;
69
70 int update_status() override;
71
72 int commit_status() override;
73 int clear_status() override;
74 int reset_status() override;
75
76 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
77
78 std::vector<vec> record(OutputType) override;
79
80 void print() override;
81
82#ifdef SUANPAN_VTK
83 void Setup() override;
84 mat GetData(OutputType) override;
85 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
86 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
87#endif
88};
89
90#endif
91
OutputType
Definition OutputType.h:23
The C3D8 class defines C3D8 C3D8R elements.
Definition C3D8.h:34
mat compute_shape_function(const mat &, unsigned) const override
Definition C3D8.cpp:208
int commit_status() override
Definition C3D8.cpp:190
int reset_status() override
Definition C3D8.cpp:202
void print() override
Definition C3D8.cpp:216
int update_status() override
Definition C3D8.cpp:113
int initialize(const shared_ptr< DomainBase > &) override
Definition C3D8.cpp:48
int clear_status() override
Definition C3D8.cpp:196
std::vector< vec > record(OutputType) override
Definition C3D8.cpp:210
Definition MaterialElement.h:73