suanPan
NM2D2.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 NM2D2_H
30 #define NM2D2_H
31 
32 #include "NonlinearNM2D.h"
33 
34 class NM2D2 final : public NonlinearNM2D {
35  const mat para_set;
36  const vec yield_force;
37  const double c, h, k;
38 
39  [[nodiscard]] double evaluate(double, double, const mat&) const;
40  [[nodiscard]] static vec differentiate(const mat&, uword, uword);
41 
42  [[nodiscard]] double compute_h(double) const override;
43  [[nodiscard]] double compute_dh(double) const override;
44 
45  [[nodiscard]] double compute_f(const vec&) const override;
46  [[nodiscard]] vec compute_df(const vec&) const override;
47  [[nodiscard]] mat compute_ddf(const vec&) const override;
48 
49 public:
50  NM2D2(unsigned, // tag
51  double, // EA
52  double, // EIS
53  double, // NP
54  double, // MP
55  double, // c
56  double, // h
57  double, // k
58  double, // linear density
59  mat&& = {});
60 
61  int initialize(const shared_ptr<DomainBase>&) override;
62 
63  unique_ptr<Section> get_copy() override;
64 
65  void print() override;
66 };
67 
68 #endif
69 
A NonlinearNM2D class.
Definition: NonlinearNM2D.h:34
NM2D2(unsigned, double, double, double, double, double, double, double, double, mat &&={})
Definition: NM2D2.cpp:83
int initialize(const shared_ptr< DomainBase > &) override
Definition: NM2D2.cpp:91
unique_ptr< Section > get_copy() override
Definition: NM2D2.cpp:99
A NM2D2 class.
Definition: NM2D2.h:34
void print() override
Definition: NM2D2.cpp:101