suanPan
SectionShell.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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 SECTIONSHELL_H
29 #define SECTIONSHELL_H
30 
31 #include <Domain/Tag.h>
32 #include <Section/ParameterType.h>
33 
34 enum class OutputType;
35 
36 class DomainBase;
37 class Material;
38 
39 using std::vector;
40 
42  const unsigned material_tag; // material tag
43 
44  const vec eccentricity;
45 
50 
55 
60 
67 };
68 
69 class SectionShell : protected SectionShellData, public Tag {
70  const bool symmetric = false;
71  const bool initialized = false;
72 
73 public:
74  explicit SectionShell(unsigned = 0, // section tag
75  unsigned = 0, // material tag
76  vec&& = {0., 0.} // eccentricity
77  );
78  SectionShell(const SectionShell&) = default; // default copy ctor
79  SectionShell(SectionShell&&) = delete; // move forbidden
80  SectionShell& operator=(const SectionShell&) = delete; // assign forbidden
81  SectionShell& operator=(SectionShell&&) = delete; // assign forbidden
82 
83  ~SectionShell() override = default;
84 
85  virtual int initialize(const shared_ptr<DomainBase>&) = 0;
86 
87  void set_initialized(bool) const;
88  void set_symmetric(bool) const;
89  [[nodiscard]] bool is_initialized() const;
90  [[nodiscard]] bool is_symmetric() const;
91 
92  void set_eccentricity(const vec&) const;
93  [[nodiscard]] const vec& get_eccentricity() const;
94 
95  [[nodiscard]] virtual const vec& get_trial_membrane_strain() const;
96  [[nodiscard]] virtual const vec& get_trial_membrane_strain_rate() const;
97  [[nodiscard]] virtual const vec& get_trial_plate_strain() const;
98  [[nodiscard]] virtual const vec& get_trial_plate_strain_rate() const;
99  [[nodiscard]] virtual const vec& get_trial_membrane_stress() const;
100  [[nodiscard]] virtual const vec& get_trial_plate_stress() const;
101  [[nodiscard]] virtual const mat& get_trial_membrane_stiffness() const;
102  [[nodiscard]] virtual const mat& get_trial_plate_stiffness() const;
103 
104  [[nodiscard]] virtual const vec& get_current_membrane_strain() const;
105  [[nodiscard]] virtual const vec& get_current_membrane_strain_rate() const;
106  [[nodiscard]] virtual const vec& get_current_plate_strain() const;
107  [[nodiscard]] virtual const vec& get_current_plate_strain_rate() const;
108  [[nodiscard]] virtual const vec& get_current_membrane_stress() const;
109  [[nodiscard]] virtual const vec& get_current_plate_stress() const;
110  [[nodiscard]] virtual const mat& get_current_membrane_stiffness() const;
111  [[nodiscard]] virtual const mat& get_current_plate_stiffness() const;
112 
113  [[nodiscard]] virtual const mat& get_initial_membrane_stiffness() const;
114  [[nodiscard]] virtual const mat& get_initial_plate_stiffness() const;
115 
116  virtual unique_ptr<SectionShell> get_copy() = 0;
117 
118  virtual double get_parameter(ParameterType = ParameterType::NONE);
119 
120  int update_incre_status(double, double);
121  int update_incre_status(double, double, double, double);
122  int update_trial_status(double, double);
123  int update_trial_status(double, double, double, double);
124 
125  virtual int update_incre_status(const vec&, const vec&);
126  virtual int update_incre_status(const vec&, const vec&, const vec&, const vec&);
127  virtual int update_trial_status(const vec&, const vec&);
128  virtual int update_trial_status(const vec&, const vec&, const vec&, const vec&);
129 
130  virtual int clear_status() = 0;
131  virtual int commit_status() = 0;
132  virtual int reset_status() = 0;
133 
134  virtual vector<vec> record(const OutputType&);
135 };
136 
137 namespace suanpan {
138  unique_ptr<SectionShell> make_copy(const shared_ptr<SectionShell>&);
139  unique_ptr<SectionShell> make_copy(const unique_ptr<SectionShell>&);
140 } // namespace suanpan
141 
142 #endif
143 
vec current_membrane_strain
Definition: SectionShell.h:47
vec trial_plate_stress
Definition: SectionShell.h:58
mat current_plate_stiffness
Definition: SectionShell.h:65
The DomainBase class is a template.
Definition: DomainBase.h:90
mat initial_membrane_stiffness
Definition: SectionShell.h:61
OutputType
Definition: OutputType.h:21
vec trial_plate_strain_rate
Definition: SectionShell.h:53
vec trial_plate_strain
Definition: SectionShell.h:48
vec current_plate_strain
Definition: SectionShell.h:49
mat current_membrane_stiffness
Definition: SectionShell.h:63
Definition: MatrixModifier.hpp:36
A Material abstract base class.
Definition: Material.h:102
mat initial_plate_stiffness
Definition: SectionShell.h:64
vec trial_membrane_strain_rate
Definition: SectionShell.h:51
mat trial_plate_stiffness
Definition: SectionShell.h:66
std::vector< T > vector
Definition: container.h:53
mat trial_membrane_stiffness
Definition: SectionShell.h:62
Definition: SectionShell.h:41
unique_ptr< SectionShell > make_copy(const unique_ptr< SectionShell > &)
Definition: SectionShell.cpp:115
A base Tag class.
Definition: Tag.h:38
const vec eccentricity
Definition: SectionShell.h:44
vec trial_membrane_strain
Definition: SectionShell.h:46
vec current_plate_stress
Definition: SectionShell.h:59
vec current_plate_strain_rate
Definition: SectionShell.h:54
vec current_membrane_strain_rate
Definition: SectionShell.h:52
A SectionShell class.
Definition: SectionShell.h:69
vec current_membrane_stress
Definition: SectionShell.h:57
const unsigned material_tag
Definition: SectionShell.h:42
vec trial_membrane_stress
Definition: SectionShell.h:56
ParameterType
Definition: ParameterType.h:21