suanPan
Loading...
Searching...
No Matches
GERKN.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2025 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 ******************************************************************************/
32#ifndef GERKN_H
33#define GERKN_H
34
35#include "../Integrator.h"
36
37class GERKN : public ExplicitIntegrator {
38 enum class FLAG {
39 FIRST,
40 SECOND
41 };
42
43 FLAG step_flag = FLAG::FIRST;
44
45 double DT{0.};
46
47protected:
48 void update_parameter(double) override;
49
50 [[nodiscard]] int process_load_impl(bool) override;
51 [[nodiscard]] int process_constraint_impl(bool) override;
52
53 [[nodiscard]] bool has_corrector() const override;
54
55 int correct_trial_status() override;
56
57 double C1{0.}, C2{0.};
58
59 double UA10{0.}, UA20{0.}, UA21{0.};
60 double UB0{0.}, UB1{0.}, UB2{0.};
61
62 double VA10{0.}, VA20{0.}, VA21{0.};
63 double VB0{0.}, VB1{0.}, VB2{0.};
64
65 double AB0{0.}, AB1{0.}, AB2{0.};
66
67public:
68 using ExplicitIntegrator::ExplicitIntegrator;
69
70 void update_incre_time(double) override;
71
72 int update_trial_status(bool) override;
73
74 void commit_status() override;
75 void clear_status() override;
76
77 vec from_incre_acceleration(const vec&, const uvec&) override;
78 vec from_total_acceleration(const vec&, const uvec&) override;
79};
80
81class WAT2 final : public GERKN {
82public:
83 WAT2(unsigned, double);
84
85 void print() override;
86};
87
88#endif
89
Definition Integrator.h:157
Generalized Explicit Runge-Kutta-Nystrom time integration.
Definition GERKN.h:37
double UA21
Definition GERKN.h:59
double AB2
Definition GERKN.h:65
double VA21
Definition GERKN.h:62
int correct_trial_status() override
Definition GERKN.cpp:55
bool has_corrector() const override
Definition GERKN.cpp:53
double UB0
Definition GERKN.h:60
double C1
Definition GERKN.h:57
vec from_total_acceleration(const vec &, const uvec &) override
Definition GERKN.cpp:118
double UA20
Definition GERKN.h:59
void clear_status() override
Definition GERKN.cpp:109
int process_constraint_impl(bool) override
Definition GERKN.cpp:39
double UB2
Definition GERKN.h:60
double AB1
Definition GERKN.h:65
int update_trial_status(bool) override
Definition GERKN.cpp:75
double VA10
Definition GERKN.h:62
double AB0
Definition GERKN.h:65
double VB0
Definition GERKN.h:63
int process_load_impl(bool) override
Definition GERKN.cpp:25
void commit_status() override
Definition GERKN.cpp:90
double C2
Definition GERKN.h:57
void update_parameter(double) override
Definition GERKN.cpp:23
double VA20
Definition GERKN.h:62
double UA10
Definition GERKN.h:59
double VB1
Definition GERKN.h:63
double VB2
Definition GERKN.h:63
void update_incre_time(double) override
Definition GERKN.cpp:69
vec from_incre_acceleration(const vec &, const uvec &) override
Definition GERKN.cpp:116
double UB1
Definition GERKN.h:60
Definition GERKN.h:81
void print() override
Definition GERKN.cpp:162