suanPan
OALTS.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 ******************************************************************************/
31#ifndef OALTS_H
32#define OALTS_H
33
34#include "Integrator.h"
35
36class OALTS final : public ImplicitIntegrator {
37 const double A1, A2, B0, B1, B2, B10, B20;
38
39 double DT{0.}, P1{0.}, P2{0.}, P3{0.};
40
41 bool if_starting = true;
42
43public:
44 OALTS(unsigned, double);
45
46 void assemble_resistance() override;
47 void assemble_matrix() override;
48
49 int update_trial_status() override;
50
51 void update_parameter(double) override;
52
53 void commit_status() override;
54 void clear_status() override;
55
56 vec from_incre_velocity(const vec&, const uvec&) override;
57 vec from_incre_acceleration(const vec&, const uvec&) override;
58 vec from_total_velocity(const vec&, const uvec&) override;
59 vec from_total_acceleration(const vec&, const uvec&) override;
60
61 void print() override;
62};
63
64#endif
65
Definition: Integrator.h:149
A OALTS class defines a solver using OALTS algorithm.
Definition: OALTS.h:36
vec from_total_velocity(const vec &, const uvec &) override
Definition: OALTS.cpp:133
void assemble_matrix() override
Definition: OALTS.cpp:49
void commit_status() override
Definition: OALTS.cpp:103
int update_trial_status() override
Definition: OALTS.cpp:77
void update_parameter(double) override
Definition: OALTS.cpp:93
vec from_incre_velocity(const vec &, const uvec &) override
Definition: OALTS.cpp:121
void assemble_resistance() override
Definition: OALTS.cpp:32
void print() override
Definition: OALTS.cpp:149
void clear_status() override
Definition: OALTS.cpp:115
vec from_incre_acceleration(const vec &, const uvec &) override
Definition: OALTS.cpp:127
vec from_total_acceleration(const vec &, const uvec &) override
Definition: OALTS.cpp:141
OALTS(unsigned, double)
Definition: OALTS.cpp:22