suanPan
C3D4.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 ******************************************************************************/
32#ifndef C3D4_H
33#define C3D4_H
34
36
37class C3D4 final : public MaterialElement3D {
38 static constexpr unsigned c_node = 4, c_dof = 3, c_size = c_dof * c_node;
39
40 const double volume = 0.;
41
42 unique_ptr<Material> c_material;
43
44 mat pn_pxyz, strain_mat;
45
46public:
47 C3D4(
48 unsigned, // tag
49 uvec&&, // node tag
50 unsigned, // material tag
51 bool = false // nonlinear geometry switch
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 vector<vec> record(OutputType) override;
63
64 void print() override;
65
66#ifdef SUANPAN_VTK
67 void Setup() override;
68 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
69 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
70#endif
71};
72
73#endif
74
OutputType
Definition: OutputType.h:23
The C3D4 class defines C3D4 elements with non-linear support.
Definition: C3D4.h:37
void print() override
Definition: C3D4.cpp:143
int initialize(const shared_ptr< DomainBase > &) override
Definition: C3D4.cpp:28
int update_status() override
Definition: C3D4.cpp:70
int reset_status() override
Definition: C3D4.cpp:139
int commit_status() override
Definition: C3D4.cpp:135
vector< vec > record(OutputType) override
Definition: C3D4.cpp:141
int clear_status() override
Definition: C3D4.cpp:137
C3D4(unsigned, uvec &&, unsigned, bool=false)
Definition: C3D4.cpp:25
Definition: MaterialElement.h:77