suanPan
Loading...
Searching...
No Matches
CAX8.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 CAX8_H
30#define CAX8_H
31
33
34class CAX8 final : public MaterialElement2D {
35 struct IntegrationPoint final {
36 vec coor;
37 double weight;
38 unique_ptr<Material> m_material;
39 mat strain_mat;
40 IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
41 };
42
43 static constexpr unsigned m_node = 8, m_dof = 2, m_size = m_dof * m_node;
44
45 const bool reduced_scheme;
46
47 vector<IntegrationPoint> int_pt;
48
49 static vec isoparametric_mapping(const vec&);
50
51public:
52 CAX8(
53 unsigned, // tag
54 uvec&&, // node tag
55 unsigned, // material tag
56 bool = false, // reduced integration
57 bool = false
58 ); // nonlinear geometry switch
59
60 int initialize(const shared_ptr<DomainBase>&) override;
61
62 int update_status() override;
63
64 int commit_status() override;
65 int clear_status() override;
66 int reset_status() override;
67
68 vector<vec> record(OutputType) override;
69
70 void print() override;
71
72#ifdef SUANPAN_VTK
73 void Setup() override;
74 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
75 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
76#endif
77};
78
79#endif
80
OutputType
Definition OutputType.h:23
The CAX8 class.
Definition CAX8.h:34
int reset_status() override
Definition CAX8.cpp:132
void print() override
Definition CAX8.cpp:144
int update_status() override
Definition CAX8.cpp:98
int clear_status() override
Definition CAX8.cpp:126
int commit_status() override
Definition CAX8.cpp:120
vector< vec > record(OutputType) override
Definition CAX8.cpp:138
CAX8(unsigned, uvec &&, unsigned, bool=false, bool=false)
Definition CAX8.cpp:48
int initialize(const shared_ptr< DomainBase > &) override
Definition CAX8.cpp:52
Definition MaterialElement.h:64