suanPan
DC3D8.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 DC3D8_H
30#define DC3D8_H
31
34
35class DC3D8 final : public MaterialElement3D {
36 struct IntegrationPoint final : PhaseField {
37 vec coor;
38 double weight;
39 double maximum_energy = 0.;
40 unique_ptr<Material> c_material;
41 mat n_mat, pn_mat;
42 sp_mat strain_mat;
43 IntegrationPoint(vec&&, double, unique_ptr<Material>&&, mat&&, mat&&);
44 };
45
46 static constexpr unsigned c_node = 8, c_dof = 4, c_size = c_dof * c_node;
47
48 static const uvec u_dof, d_dof;
49
50 const double release_rate;
51
52 vector<IntegrationPoint> int_pt;
53
54public:
55 DC3D8(
56 unsigned, // tag
57 uvec&&, // node tag
58 unsigned, // material tag
59 double, // characteristic length
60 double // release rate
61 );
62
63 int initialize(const shared_ptr<DomainBase>&) override;
64
65 int update_status() override;
66
67 int commit_status() override;
68 int clear_status() override;
69 int reset_status() override;
70
71 vector<vec> record(OutputType) override;
72
73 void print() override;
74
75#ifdef SUANPAN_VTK
76 void Setup() override;
77 mat GetData(OutputType) override;
78 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
79 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
80#endif
81};
82
83#endif
84
OutputType
Definition: OutputType.h:23
The DC3D8 class.
Definition: DC3D8.h:35
int initialize(const shared_ptr< DomainBase > &) override
Definition: DC3D8.cpp:46
int clear_status() override
Definition: DC3D8.cpp:115
DC3D8(unsigned, uvec &&, unsigned, double, double)
Definition: DC3D8.cpp:42
int update_status() override
Definition: DC3D8.cpp:77
vector< vec > record(OutputType) override
Definition: DC3D8.cpp:131
int commit_status() override
Definition: DC3D8.cpp:105
void print() override
Definition: DC3D8.cpp:139
int reset_status() override
Definition: DC3D8.cpp:125
Definition: MaterialElement.h:77
A PhaseField class.
Definition: PhaseField.h:46