suanPan
LeeNewmark.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  ******************************************************************************/
33 #ifndef LEENEWMARK_H
34 #define LEENEWMARK_H
35 
36 #include "LeeNewmarkBase.h"
37 
38 class LeeNewmark final : public LeeNewmarkBase {
39  const vec mass_coef, stiffness_coef;
40 
41  const uword n_damping = mass_coef.n_elem;
42 
43  const double CM;
44 
45  shared_ptr<MetaMat<double>> current_mass = nullptr;
46  shared_ptr<MetaMat<double>> current_stiffness = nullptr;
47  shared_ptr<MetaMat<double>> current_geometry = nullptr;
48 
49  [[nodiscard]] uword get_total_size() const override;
50 
51  void update_stiffness() const override;
52  void update_residual() const override;
53 
54 public:
55  explicit LeeNewmark(unsigned, vec&&, vec&&, double, double);
56 
57  int initialize() override;
58 
59  int process_constraint() override;
60 
61  void assemble_resistance() override;
62 
63  void print() override;
64 };
65 
66 #endif
67 
LeeNewmark(unsigned, vec &&, vec &&, double, double)
Definition: LeeNewmark.cpp:55
int process_constraint() override
Definition: LeeNewmark.cpp:71
void assemble_resistance() override
Definition: LeeNewmark.cpp:163
A LeeNewmark class defines a solver using Newmark algorithm with Lee damping model.
Definition: LeeNewmark.h:38
int initialize() override
Definition: LeeNewmark.cpp:61
void print() override
Definition: LeeNewmark.cpp:184
A LeeNewmarkBase class defines a solver using Newmark algorithm with Lee damping model.
Definition: LeeNewmarkBase.h:36