suanPan
UniversalOS.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 UNIVERSALOS_H
29 #define UNIVERSALOS_H
30 
32 
33 class UniversalOS : public StressWrapper {
34 public:
36  unsigned, // tag
37  unsigned, // 3D material tag
38  unsigned, // max iteration
39  uvec&&, uvec&&
40  );
41 
42  void print() override;
43 };
44 
45 class OS146 final : public UniversalOS {
46 public:
47  OS146(
48  unsigned, // tag
49  unsigned, // 3D material tag
50  unsigned // max iteration
51  );
52 
53  unique_ptr<Material> get_copy() override;
54 };
55 
56 class OS146S final : public Material {
57  const unsigned base_tag;
58 
59  const double shear_modulus;
60 
62 
63 public:
64  OS146S(
65  unsigned, // tag
66  unsigned, // 3D material tag
67  double // shear modulus
68  );
69 
70  int initialize(const shared_ptr<DomainBase>&) override;
71 
72  [[nodiscard]] double get_parameter(ParameterType) const override;
73 
74  unique_ptr<Material> get_copy() 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
Definition: UniversalOS.h:45
unique_ptr< Material > get_copy() override
Definition: UniversalOS.cpp:34
OS146(unsigned, unsigned, unsigned)
Definition: UniversalOS.cpp:31
Definition: UniversalOS.h:56
int clear_status() override
Definition: UniversalOS.cpp:71
double get_parameter(ParameterType) const override
Definition: UniversalOS.cpp:56
int reset_status() override
Definition: UniversalOS.cpp:85
void print() override
Definition: UniversalOS.cpp:94
std::vector< vec > record(OutputType) override
Definition: UniversalOS.cpp:92
unique_ptr< Material > get_copy() override
Definition: UniversalOS.cpp:58
OS146S(unsigned, unsigned, double)
Definition: UniversalOS.cpp:36
int commit_status() override
Definition: UniversalOS.cpp:78
int initialize(const shared_ptr< DomainBase > &) override
Definition: UniversalOS.cpp:41
int update_trial_status(const vec &) override
Definition: UniversalOS.cpp:60
A StressWrapper class.
Definition: StressWrapper.h:37
A UniversalOS class.
Definition: UniversalOS.h:33
void print() override
Definition: UniversalOS.cpp:24
UniversalOS(unsigned, unsigned, unsigned, uvec &&, uvec &&)
Definition: UniversalOS.cpp:21