suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
CSMQ.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2026 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 ******************************************************************************/
30#ifndef CSMQ_H
31#define CSMQ_H
32
34
35class CSMQ : public MaterialElement2D {
36 struct IntegrationPoint final {
37 vec coor;
38 double weight;
39 unique_ptr<Material> m_material;
40 mat b1, b2, b3;
41 IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
42 };
43
44 static constexpr unsigned m_dof = 3;
45
46 const unsigned m_node;
47
48 const unsigned m_size = m_dof * m_node;
49
50 const double thickness;
51
52 std::vector<IntegrationPoint> int_pt;
53
54 virtual const uvec& get_translation_dof() = 0;
55 virtual const uvec& get_rotation_dof() = 0;
56
57public:
58 CSMQ(
59 unsigned, // tag
60 uvec&&, // node tag
61 unsigned, // material tag
62 unsigned, // number of nodes
63 double = 1., // thickness
64 double = -1. // length
65 );
66
67 int initialize(const shared_ptr<DomainBase>&) override;
68
69 int update_status() override;
70
71 int commit_status() override;
72 int clear_status() override;
73 int reset_status() override;
74
75 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
76
77 [[nodiscard]] std::vector<vec> record(OutputType) const override;
78
79 void print() override;
80};
81
82class CSMQ5 final : public CSMQ {
83 static const uvec t_dof;
84 static const uvec r_dof;
85
86 const uvec& get_translation_dof() override;
87 const uvec& get_rotation_dof() override;
88
89public:
90 CSMQ5(
91 unsigned, // tag
92 uvec&&, // node tag
93 unsigned, // material tag
94 double = 1., // thickness
95 double = -1. // length
96 );
97};
98
99class CSMQ6 final : public CSMQ {
100 static const uvec t_dof;
101 static const uvec r_dof;
102
103 const uvec& get_translation_dof() override;
104 const uvec& get_rotation_dof() override;
105
106public:
107 CSMQ6(
108 unsigned, // tag
109 uvec&&, // node tag
110 unsigned, // material tag
111 double = 1., // thickness
112 double = -1. // length
113 );
114};
115
116class CSMQ7 final : public CSMQ {
117 static const uvec t_dof;
118 static const uvec r_dof;
119
120 const uvec& get_translation_dof() override;
121 const uvec& get_rotation_dof() override;
122
123public:
124 CSMQ7(
125 unsigned, // tag
126 uvec&&, // node tag
127 unsigned, // material tag
128 double = 1., // thickness
129 double = -1. // length
130 );
131};
132
133#endif
134
OutputType
Definition OutputType.h:23
Definition CSMQ.h:82
Definition CSMQ.h:99
Definition CSMQ.h:116
The CSMQ class.
Definition CSMQ.h:35
int initialize(const shared_ptr< DomainBase > &) override
Definition CSMQ.cpp:37
std::vector< vec > record(OutputType) const override
Definition CSMQ.cpp:197
int commit_status() override
Definition CSMQ.cpp:177
mat compute_shape_function(const mat &, unsigned) const override
Definition CSMQ.cpp:195
int reset_status() override
Definition CSMQ.cpp:189
void print() override
Definition CSMQ.cpp:203
int clear_status() override
Definition CSMQ.cpp:183
int update_status() override
Definition CSMQ.cpp:152
Definition MaterialElement.h:60