suanPan
SimpleHysteresis.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  ******************************************************************************/
31 #ifndef SIMPLEHYSTERESIS_H
32 #define SIMPLEHYSTERESIS_H
33 
35 
37  const double middle_point;
38 };
39 
41  enum class Status {
42  NONE,
43  CBACKBONE,
44  TBACKBONE,
45  CINNER,
46  TINNER
47  };
48 
49  Status trial_flag = Status::NONE, current_flag = Status::NONE;
50 
55  [[nodiscard]] virtual podarray<double> compute_compression_initial_reverse() const = 0;
60  [[nodiscard]] virtual podarray<double> compute_tension_initial_reverse() const = 0;
61 
62  [[nodiscard]] virtual podarray<double> compute_compression_backbone(double) const = 0;
63  [[nodiscard]] virtual podarray<double> compute_tension_backbone(double) const = 0;
64  [[nodiscard]] virtual double compute_compression_residual(double, double) const = 0;
65  [[nodiscard]] virtual double compute_tension_residual(double, double) const = 0;
66  [[nodiscard]] podarray<double> compute_compression_inner(double) const;
67  [[nodiscard]] podarray<double> compute_tension_inner(double) const;
68 
69 public:
70  SimpleHysteresis(unsigned, // tag
71  double, // middle point
72  double = 0. // density
73  );
74 
75  int update_trial_status(const vec&) override;
76 
77  int clear_status() override;
78  int commit_status() override;
79  int reset_status() override;
80 };
81 
82 #endif
83 
A Material1D class.
Definition: Material1D.h:36
A SimpleHysteresis material class.
Definition: SimpleHysteresis.h:40
SimpleHysteresis(unsigned, double, double=0.)
Definition: SimpleHysteresis.cpp:72
int update_trial_status(const vec &) override
Definition: SimpleHysteresis.cpp:76
int reset_status() override
Definition: SimpleHysteresis.cpp:207
int commit_status() override
Definition: SimpleHysteresis.cpp:198
int clear_status() override
Definition: SimpleHysteresis.cpp:189
@ NONE
Definition: SimpleHysteresis.h:36
const double middle_point
Definition: SimpleHysteresis.h:37