suanPan
GSSSS.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 ******************************************************************************/
33#ifndef GSSSS_H
34#define GSSSS_H
35
36#include "Integrator.h"
37
38class GSSSS : public ImplicitIntegrator {
39protected:
40 const double L1, L2, L4;
41
42 double L3 = 0., L5 = 0.;
43 double W1 = 0., W3G3 = 0., W2G5 = 0., W1G6 = 0.;
44
45 double DT = 0.;
46
47 double C0{0.}, C1{0.}, C2{0.}, C3{0.}, C4{0.}, XD{0.}, XV{0.}, XA{0.};
48
49 // ReSharper disable once CppMemberFunctionMayBeStatic
50 template<typename T> void generate_constants(double, double, double) { throw invalid_argument("need a proper scheme"); }
51
52public:
53 explicit GSSSS(unsigned);
54
55 void assemble_resistance() override;
56 void assemble_matrix() override;
57
58 vec get_force_residual() override;
59 vec get_displacement_residual() override;
60 sp_mat get_reference_load() override;
61
62 [[nodiscard]] int process_load() override;
63 [[nodiscard]] int process_constraint() override;
64 [[nodiscard]] int process_load_resistance() override;
65 [[nodiscard]] int process_constraint_resistance() override;
66
67 int update_trial_status() override;
68
69 void update_parameter(double) override;
70
71 vec from_incre_velocity(const vec&, const uvec&) override;
72 vec from_incre_acceleration(const vec&, const uvec&) override;
73
74 void print() override;
75};
76
77class GSSSSU0 final : public GSSSS {
78public:
79 GSSSSU0(unsigned, vec&&);
80};
81
82class GSSSSV0 final : public GSSSS {
83public:
84 GSSSSV0(unsigned, vec&&);
85};
86
87class GSSSSOptimal final : public GSSSS {
88public:
89 GSSSSOptimal(unsigned, double);
90};
91
92#endif
93
A GSSSS class defines a solver using GSSSS algorithm.
Definition: GSSSS.h:38
GSSSS(unsigned)
Definition: GSSSS.cpp:22
const double L4
Definition: GSSSS.h:40
double C2
Definition: GSSSS.h:47
double XA
Definition: GSSSS.h:47
sp_mat get_reference_load() override
Definition: GSSSS.cpp:72
void assemble_resistance() override
Definition: GSSSS.cpp:28
double C0
Definition: GSSSS.h:47
void assemble_matrix() override
Definition: GSSSS.cpp:45
vec get_displacement_residual() override
Definition: GSSSS.cpp:70
int update_trial_status() override
Definition: GSSSS.cpp:138
double W1G6
Definition: GSSSS.h:43
void update_parameter(double) override
Definition: GSSSS.cpp:148
double W1
Definition: GSSSS.h:43
double L5
Definition: GSSSS.h:42
double W3G3
Definition: GSSSS.h:43
void generate_constants(double, double, double)
Definition: GSSSS.h:50
int process_constraint() override
Definition: GSSSS.cpp:90
int process_load() override
Definition: GSSSS.cpp:74
int process_load_resistance() override
Definition: GSSSS.cpp:106
int process_constraint_resistance() override
Definition: GSSSS.cpp:122
double XD
Definition: GSSSS.h:47
double XV
Definition: GSSSS.h:47
void print() override
Definition: GSSSS.cpp:178
double W2G5
Definition: GSSSS.h:43
double L3
Definition: GSSSS.h:42
double DT
Definition: GSSSS.h:45
double C1
Definition: GSSSS.h:47
double C3
Definition: GSSSS.h:47
vec get_force_residual() override
Definition: GSSSS.cpp:68
const double L2
Definition: GSSSS.h:40
vec from_incre_velocity(const vec &, const uvec &) override
Definition: GSSSS.cpp:166
vec from_incre_acceleration(const vec &, const uvec &) override
Definition: GSSSS.cpp:172
const double L1
Definition: GSSSS.h:40
double C4
Definition: GSSSS.h:47
Definition: GSSSS.h:87
GSSSSOptimal(unsigned, double)
Definition: GSSSS.cpp:232
Definition: GSSSS.h:77
GSSSSU0(unsigned, vec &&)
Definition: GSSSS.cpp:193
Definition: GSSSS.h:82
GSSSSV0(unsigned, vec &&)
Definition: GSSSS.cpp:215
Definition: Integrator.h:149