suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
BatheTwoStep.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 ******************************************************************************/
29#ifndef BATHETWOSTEP_H
30#define BATHETWOSTEP_H
31
32#include "../Integrator.h"
33
34class BatheTwoStep final : public ImplicitIntegrator {
35 enum class FLAG {
36 TRAP,
37 EULER
38 };
39
40 FLAG step_flag = FLAG::TRAP;
41
42 const double GM;
43
44 const double Q1, Q2, Q0, Q02 = Q0 / Q2, Q12 = Q1 / Q2;
45
46 double P0{0.}, P1{0.}, P2{0.}, P3{0.}, P4{0.}, P5{0.}, P6{0.}, P7{0.}, P8{0.}, P9{0.};
47
48protected:
49 void update_parameter(double) override;
50
51public:
52 BatheTwoStep(unsigned, double, double);
53
54 [[nodiscard]] bool time_independent_matrix() const override;
55
56 void assemble_resistance() override;
57 void assemble_effective_matrix() override;
58
59 void update_incre_time(double) override;
60
61 int update_trial_status(bool) override;
62
63 void commit_status() override;
64 void clear_status() override;
65
66 vec from_incre_velocity(const vec&, const uvec&) override;
67 vec from_incre_acceleration(const vec&, const uvec&) override;
68 vec from_total_velocity(const vec&, const uvec&) override;
69 vec from_total_acceleration(const vec&, const uvec&) override;
70
71 void print() override;
72};
73
74#endif
75
A BatheTwoStep class defines a solver using BatheTwoStep algorithm.
Definition BatheTwoStep.h:34
void update_incre_time(double) override
Definition BatheTwoStep.cpp:61
int update_trial_status(bool) override
Definition BatheTwoStep.cpp:67
void commit_status() override
Definition BatheTwoStep.cpp:82
void clear_status() override
Definition BatheTwoStep.cpp:102
vec from_incre_acceleration(const vec &, const uvec &) override
Definition BatheTwoStep.cpp:115
vec from_total_acceleration(const vec &, const uvec &) override
Definition BatheTwoStep.cpp:129
void update_parameter(double) override
Definition BatheTwoStep.cpp:139
vec from_total_velocity(const vec &, const uvec &) override
Definition BatheTwoStep.cpp:121
void assemble_resistance() override
Definition BatheTwoStep.cpp:32
void assemble_effective_matrix() override
Definition BatheTwoStep.cpp:49
vec from_incre_velocity(const vec &, const uvec &) override
Definition BatheTwoStep.cpp:109
bool time_independent_matrix() const override
Definition BatheTwoStep.cpp:30
void print() override
Definition BatheTwoStep.cpp:156
Definition Integrator.h:151