suanPan
BatheTwoStep.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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 
34 class BatheTwoStep final : public Integrator {
35  enum class FLAG {
36  TRAP,
37  EULER
38  };
39 
40  FLAG step_flag = FLAG::TRAP;
41 
42  double C0 = 0., C1 = 0., C2 = 0., C3 = 0., C4 = 0., C5 = 0., C6 = 0.;
43 
44 public:
46 
47  void assemble_resistance() override;
48  void assemble_matrix() override;
49 
50  int update_trial_status() override;
51 
52  void commit_status() override;
53  void clear_status() override;
54 
55  void update_parameter(double) override;
56  void update_compatibility() const override;
57 
58  vec from_incre_velocity(const vec&, const uvec&) override;
59  vec from_incre_acceleration(const vec&, const uvec&) override;
60 
61  void print() override;
62 };
63 
64 #endif
65 
A BatheTwoStep class defines a solver using BatheTwoStep algorithm.
Definition: BatheTwoStep.h:34
void commit_status() override
Definition: BatheTwoStep.cpp:74
void clear_status() override
Definition: BatheTwoStep.cpp:93
vec from_incre_acceleration(const vec &, const uvec &) override
Definition: BatheTwoStep.cpp:134
void update_parameter(double) override
Definition: BatheTwoStep.cpp:145
void assemble_matrix() override
Definition: BatheTwoStep.cpp:38
void update_compatibility() const override
update acceleration and velocity for zero displacement increment
Definition: BatheTwoStep.cpp:103
void assemble_resistance() override
Definition: BatheTwoStep.cpp:23
vec from_incre_velocity(const vec &, const uvec &) override
Definition: BatheTwoStep.cpp:123
void print() override
Definition: BatheTwoStep.cpp:157
int update_trial_status() override
Definition: BatheTwoStep.cpp:59
The Integrator class is basically a wrapper of the DomainBase class with regard to some status changi...
Definition: Integrator.h:46
Integrator(unsigned=0)
Definition: Integrator.cpp:22