suanPan
BatheExplicit.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 BATHEEXPLICIT_H
30#define BATHEEXPLICIT_H
31
32#include "Integrator.h"
33
34class BatheExplicit final : public ExplicitIntegrator {
35 enum class FLAG {
36 FIRST,
37 SECOND
38 };
39
40 FLAG step_flag = FLAG::FIRST;
41
42 const double P, Q1, Q2, Q0;
43 double DT{0.}, A0{0.}, A1{0.}, A2{0.}, A3{0.}, A4{0.}, A5{0.}, A6{0.}, A7{0.};
44
45public:
46 BatheExplicit(unsigned, double);
47
48 [[nodiscard]] bool has_corrector() const override;
49
50 void assemble_resistance() override;
51 void assemble_matrix() override;
52
53 void update_incre_time(double) override;
54
55 int update_trial_status() override;
56 int correct_trial_status() override;
57
58 void commit_status() override;
59 void clear_status() override;
60
61 void update_parameter(double) override;
62
63 void print() override;
64};
65
66#endif
67
A BatheExplicit class defines a solver using BatheExplicit algorithm.
Definition: BatheExplicit.h:34
void update_incre_time(double) override
Definition: BatheExplicit.cpp:50
void assemble_resistance() override
Definition: BatheExplicit.cpp:31
bool has_corrector() const override
Definition: BatheExplicit.cpp:29
BatheExplicit(unsigned, double)
Definition: BatheExplicit.cpp:22
void print() override
Definition: BatheExplicit.cpp:122
void assemble_matrix() override
Definition: BatheExplicit.cpp:48
int correct_trial_status() override
Definition: BatheExplicit.cpp:71
void update_parameter(double) override
Definition: BatheExplicit.cpp:107
void commit_status() override
Definition: BatheExplicit.cpp:80
void clear_status() override
Definition: BatheExplicit.cpp:100
int update_trial_status() override
Definition: BatheExplicit.cpp:56
Definition: Integrator.h:158