suanPan
GCMQ.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  ******************************************************************************/
34 #ifndef GCMQ_H
35 #define GCMQ_H
36 
37 #include "SGCMQ.h"
38 
39 class IntegrationPlan;
40 
41 class GCMQ final : public SGCMQ {
42  static constexpr int enhanced_mode = 2;
43 
44  const mat mat_stiffness, iso_mapping;
45 
46  mat HT, NT, MT, N, M; // constant matrices
47 
48  mat initial_viwt, trial_viwt, current_viwt;
49  vec trial_vif, current_vif;
50  vec trial_zeta, current_zeta; // enhanced strain
51  vec trial_beta, current_beta; // strain
52  vec trial_alpha, current_alpha; // stress
53  vec trial_q, current_q;
54 
55  vec pre_disp;
56 
57  static mat form_transformation(const mat&);
58  static mat form_enhanced_strain(const vec&, int);
59 
60 public:
61  using SGCMQ::SGCMQ;
62 
63  int initialize(const shared_ptr<DomainBase>&) override;
64 
65  int update_status() override;
66 
67  int commit_status() override;
68  int clear_status() override;
69  int reset_status() override;
70 
71  [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
72 
73  vector<vec> record(OutputType) override;
74 
75  void print() override;
76 
77 #ifdef SUANPAN_VTK
78  mat GetData(OutputType) override;
79 #endif
80 };
81 
82 #endif
83 
OutputType
Definition: OutputType.h:23
A GCMQ class.
Definition: GCMQ.h:41
int commit_status() override
Definition: GCMQ.cpp:162
int update_status() override
Definition: GCMQ.cpp:132
int initialize(const shared_ptr< DomainBase > &) override
Definition: GCMQ.cpp:61
vector< vec > record(OutputType) override
Definition: GCMQ.cpp:204
mat compute_shape_function(const mat &, unsigned) const override
Definition: GCMQ.cpp:202
void print() override
Definition: GCMQ.cpp:228
int reset_status() override
Definition: GCMQ.cpp:189
int clear_status() override
Definition: GCMQ.cpp:175
An IntegrationPlan class.
Definition: IntegrationPlan.h:77
A SGCMQ class.
Definition: SGCMQ.h:39
SGCMQ(unsigned, uvec &&, unsigned, double=1., char='I')
Definition: SGCMQ.cpp:154