suanPan
CP3.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 CP3_H
30#define CP3_H
31
33
34class CP3 final : public MaterialElement2D {
35 static constexpr unsigned m_node = 3, m_dof = 2, m_size = m_dof * m_node;
36
37 const double thickness; // thickness
38 const double area = 0.; // area
39
40 mat pn_pxy, strain_mat;
41
42 unique_ptr<Material> m_material; // store material model
43
44 static void stack_stiffness(mat&, const mat&, const mat&, double);
45
46public:
47 CP3(unsigned, uvec&&, unsigned, double = 1., bool = false);
48
49 int initialize(const shared_ptr<DomainBase>&) override;
50
51 int update_status() override;
52
53 int commit_status() override;
54 int clear_status() override;
55 int reset_status() override;
56
57 vector<vec> record(OutputType) override;
58
59 void print() override;
60
61#ifdef SUANPAN_VTK
62 void Setup() override;
63 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
64 mat GetData(OutputType) override;
65 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
66#endif
67};
68
69#endif
70
OutputType
Definition: OutputType.h:23
The CP3 class defines CPS3 CPE3 elements.
Definition: CP3.h:34
int update_status() override
Definition: CP3.cpp:194
void print() override
Definition: CP3.cpp:251
int initialize(const shared_ptr< DomainBase > &) override
Definition: CP3.cpp:150
int reset_status() override
Definition: CP3.cpp:247
int clear_status() override
Definition: CP3.cpp:245
int commit_status() override
Definition: CP3.cpp:243
vector< vec > record(OutputType) override
Definition: CP3.cpp:249
CP3(unsigned, uvec &&, unsigned, double=1., bool=false)
Definition: CP3.cpp:146
Definition: MaterialElement.h:64
Definition: shape.h:50