suanPan
Substepping.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 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  ******************************************************************************/
28 #ifndef SUBSTEPPING_H
29 #define SUBSTEPPING_H
30 
31 #include <Material/Material.h>
32 
33 class Substepping final : public Material {
34  const unsigned max_iteration;
35 
36  const unsigned mat_tag;
37 
38  unique_ptr<Material> trial_mat_obj, current_mat_obj;
39 
40 public:
41  Substepping(unsigned, // tag
42  unsigned, // mat tag
43  unsigned // max iteration
44  );
45  Substepping(const Substepping&);
46  Substepping(Substepping&&) = delete;
47  Substepping& operator=(const Substepping&) = delete;
49  ~Substepping() override = default;
50 
51  int initialize(const shared_ptr<DomainBase>&) override;
52 
53  unique_ptr<Material> get_copy() override;
54 
55  [[nodiscard]] double get_parameter(ParameterType) const override;
56 
57  [[nodiscard]] const mat& get_initial_damping() const override;
58  [[nodiscard]] const vec& get_initial_history() const override;
59  [[nodiscard]] const mat& get_initial_stiffness() const override;
60 
61  const mat& get_current_damping() override;
62  const mat& get_current_secant() override;
63  const mat& get_current_stiffness() override;
64 
65  const mat& get_trial_damping() override;
66  const mat& get_trial_secant() override;
67  const mat& get_trial_stiffness() override;
68 
69  const vec& get_current_strain() override;
70  const vec& get_current_strain_rate() override;
71  const vec& get_current_stress() override;
72 
73  const vec& get_trial_strain() override;
74  const vec& get_trial_strain_rate() override;
75  const vec& get_trial_stress() override;
76 
77  void set_initial_history(const vec&) override;
78 
79  int update_trial_status(const vec&) override;
80 
81  int clear_status() override;
82  int commit_status() override;
83  int reset_status() override;
84 
85  std::vector<vec> record(OutputType) override;
86 
87  void print() override;
88 };
89 
90 #endif
91 
OutputType
Definition: OutputType.h:21
ParameterType
Definition: ParameterType.h:21
A Material abstract base class.
Definition: Material.h:102
A Substepping material class.
Definition: Substepping.h:33
const vec & get_trial_strain_rate() override
Definition: Substepping.cpp:81
const mat & get_initial_stiffness() const override
Definition: Substepping.cpp:59
const mat & get_initial_damping() const override
Definition: Substepping.cpp:55
const vec & get_initial_history() const override
Definition: Substepping.cpp:57
Substepping(unsigned, unsigned, unsigned)
Definition: Substepping.cpp:21
const mat & get_trial_damping() override
Definition: Substepping.cpp:67
int update_trial_status(const vec &) override
Definition: Substepping.cpp:94
Substepping & operator=(const Substepping &)=delete
int commit_status() override
Definition: Substepping.cpp:134
const vec & get_trial_stress() override
Definition: Substepping.cpp:83
int clear_status() override
Definition: Substepping.cpp:126
double get_parameter(ParameterType) const override
Definition: Substepping.cpp:53
const vec & get_trial_strain() override
Definition: Substepping.cpp:79
const vec & get_current_strain_rate() override
Definition: Substepping.cpp:75
const mat & get_trial_secant() override
Definition: Substepping.cpp:69
~Substepping() override=default
const mat & get_current_damping() override
Definition: Substepping.cpp:61
unique_ptr< Material > get_copy() override
Definition: Substepping.cpp:51
const mat & get_trial_stiffness() override
Definition: Substepping.cpp:71
int reset_status() override
Definition: Substepping.cpp:140
int initialize(const shared_ptr< DomainBase > &) override
Definition: Substepping.cpp:33
Substepping(Substepping &&)=delete
const mat & get_current_secant() override
Definition: Substepping.cpp:63
void set_initial_history(const vec &) override
Definition: Substepping.cpp:85
const vec & get_current_strain() override
Definition: Substepping.cpp:73
const mat & get_current_stiffness() override
Definition: Substepping.cpp:65
const vec & get_current_stress() override
Definition: Substepping.cpp:77
void print() override
Definition: Substepping.cpp:92
std::vector< vec > record(OutputType) override
Definition: Substepping.cpp:90
Substepping & operator=(Substepping &&)=delete