suanPan
ComplexHysteresis.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  ******************************************************************************/
29 #ifndef COMPLEXHYSTERESIS_H
30 #define COMPLEXHYSTERESIS_H
31 
33 
34 class ComplexHysteresis : public Material1D {
35  [[nodiscard]] virtual podarray<double> compute_compression_backbone(double) = 0;
36  [[nodiscard]] virtual podarray<double> compute_tension_backbone(double) = 0;
37  [[nodiscard]] virtual podarray<double> compute_compression_unload(double) = 0;
38  [[nodiscard]] virtual podarray<double> compute_tension_unload(double) = 0;
39  [[nodiscard]] virtual podarray<double> compute_compression_reload(double) = 0;
40  [[nodiscard]] virtual podarray<double> compute_tension_reload(double) = 0;
41  [[nodiscard]] virtual podarray<double> compute_compression_subunload(double) = 0;
42  [[nodiscard]] virtual podarray<double> compute_tension_subunload(double) = 0;
43 
44  virtual void update_compression_unload(double) = 0;
45  virtual void update_tension_unload(double) = 0;
46 
47 protected:
48  enum class Status {
49  NONE,
50  CBACKBONE,
51  TBACKBONE,
52  CUNLOAD,
53  TUNLOAD,
54  CSUBUNLOAD,
55  TSUBUNLOAD,
56  CRELOAD,
57  TRELOAD,
58  CTRANS,
59  TTRANS
60  };
61 
63 
64  const double elastic_modulus;
65 
66 public:
68  unsigned, // tag
69  double, // elastic modulus
70  double = 0. // density
71  );
72 
73  int initialize(const shared_ptr<DomainBase>&) override;
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 ComplexHysteresis material class.
Definition: ComplexHysteresis.h:34
ComplexHysteresis(unsigned, double, double=0.)
Definition: ComplexHysteresis.cpp:20
int update_trial_status(const vec &) override
Definition: ComplexHysteresis.cpp:32
int commit_status() override
Definition: ComplexHysteresis.cpp:211
Status current_load_status
Definition: ComplexHysteresis.h:62
const double elastic_modulus
Definition: ComplexHysteresis.h:64
Status
Definition: ComplexHysteresis.h:48
int clear_status() override
Definition: ComplexHysteresis.cpp:202
Status trial_load_status
Definition: ComplexHysteresis.h:62
int reset_status() override
Definition: ComplexHysteresis.cpp:220
int initialize(const shared_ptr< DomainBase > &) override
Definition: ComplexHysteresis.cpp:24
A Material1D class.
Definition: Material1D.h:36