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