suanPan
Loading...
Searching...
No Matches
CP4.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2023 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 ******************************************************************************/
33#ifndef CP4_H
34#define CP4_H
35
37
38class CP4 final : public MaterialElement2D {
39 struct IntegrationPoint final {
40 vec coor;
41 double weight;
42 unique_ptr<Material> m_material;
43 mat pn_pxy, strain_mat;
44 IntegrationPoint(vec&&, double, unique_ptr<Material>&&, mat&&);
45 };
46
47 static constexpr unsigned m_node = 4, m_dof = 2, m_size = m_dof * m_node;
48
49 static const vec h_mode;
50
51 const double thickness;
52
53 const bool reduced_scheme;
54
55 vector<IntegrationPoint> int_pt;
56
57 mat hourglassing;
58
59 static void stack_stiffness(mat&, const mat&, const mat&, double);
60
61public:
62 CP4(unsigned, // tag
63 uvec&&, // node tag
64 unsigned, // material tag
65 double = 1., // thickness
66 bool = false, // reduced integration
67 bool = false // nonlinear geometry switch
68 );
69
70 int initialize(const shared_ptr<DomainBase>&) override;
71
72 int update_status() override;
73
74 int commit_status() override;
75 int clear_status() override;
76 int reset_status() override;
77
78 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
79
80 vector<vec> record(OutputType) override;
81
82 void print() override;
83
84#ifdef SUANPAN_VTK
85 void Setup() override;
86 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
87 mat GetData(OutputType) override;
88 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
89#endif
90};
91
92#endif
93
OutputType
Definition OutputType.h:21
The CP4 class handles CPS4, CPE4, CPS4R and CPE4R elements. It is a four node constant strain membran...
Definition CP4.h:38
int reset_status() override
Definition CP4.cpp:369
void print() override
Definition CP4.cpp:401
int initialize(const shared_ptr< DomainBase > &) override
Definition CP4.cpp:209
mat compute_shape_function(const mat &, unsigned) const override
Definition CP4.cpp:375
int update_status() override
Definition CP4.cpp:283
vector< vec > record(OutputType) override
Definition CP4.cpp:377
int commit_status() override
Definition CP4.cpp:357
int clear_status() override
Definition CP4.cpp:363
Definition MaterialElement.h:62