suanPan
SectionShell.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  ******************************************************************************/
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);
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(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 
OutputType
Definition: OutputType.h:21
ParameterType
Definition: ParameterType.h:21
The DomainBase class is a template.
Definition: DomainBase.h:96
A Material abstract base class.
Definition: Material.h:102
A SectionShell class.
Definition: SectionShell.h:69
bool is_initialized() const
Definition: SectionShell.cpp:30
void set_symmetric(bool) const
Definition: SectionShell.cpp:28
virtual const vec & get_current_plate_stress() const
Definition: SectionShell.cpp:64
~SectionShell() override=default
int update_incre_status(double, double)
Definition: SectionShell.cpp:76
virtual int reset_status()=0
virtual const vec & get_current_plate_strain() const
Definition: SectionShell.cpp:58
bool is_symmetric() const
Definition: SectionShell.cpp:32
SectionShell & operator=(const SectionShell &)=delete
virtual const vec & get_trial_membrane_strain() const
Definition: SectionShell.cpp:38
const vec & get_eccentricity() const
Definition: SectionShell.cpp:36
void set_initialized(bool) const
Definition: SectionShell.cpp:26
SectionShell & operator=(SectionShell &&)=delete
virtual const mat & get_trial_membrane_stiffness() const
Definition: SectionShell.cpp:50
virtual int clear_status()=0
virtual const vec & get_current_plate_strain_rate() const
Definition: SectionShell.cpp:60
virtual const vec & get_trial_plate_strain() const
Definition: SectionShell.cpp:42
virtual const mat & get_current_plate_stiffness() const
Definition: SectionShell.cpp:68
SectionShell(const SectionShell &)=default
int update_trial_status(double, double)
Definition: SectionShell.cpp:86
virtual const vec & get_trial_membrane_strain_rate() const
Definition: SectionShell.cpp:40
virtual double get_parameter(ParameterType)
Definition: SectionShell.cpp:74
virtual int initialize(const shared_ptr< DomainBase > &)=0
virtual const vec & get_current_membrane_stress() const
Definition: SectionShell.cpp:62
SectionShell(unsigned=0, unsigned=0, vec &&={0., 0.})
Definition: SectionShell.cpp:22
void set_eccentricity(const vec &) const
Definition: SectionShell.cpp:34
virtual int commit_status()=0
virtual const vec & get_trial_plate_stress() const
Definition: SectionShell.cpp:48
virtual const mat & get_current_membrane_stiffness() const
Definition: SectionShell.cpp:66
virtual const mat & get_initial_membrane_stiffness() const
Definition: SectionShell.cpp:70
virtual const mat & get_trial_plate_stiffness() const
Definition: SectionShell.cpp:52
SectionShell(SectionShell &&)=delete
virtual const vec & get_trial_membrane_stress() const
Definition: SectionShell.cpp:46
virtual const vec & get_trial_plate_strain_rate() const
Definition: SectionShell.cpp:44
virtual const vec & get_current_membrane_strain_rate() const
Definition: SectionShell.cpp:56
virtual const vec & get_current_membrane_strain() const
Definition: SectionShell.cpp:54
virtual const mat & get_initial_plate_stiffness() const
Definition: SectionShell.cpp:72
virtual vector< vec > record(OutputType)
Definition: SectionShell.cpp:108
virtual unique_ptr< SectionShell > get_copy()=0
A base Tag class.
Definition: Tag.h:38
Definition: MatrixModifier.hpp:36
std::vector< T > vector
Definition: container.h:53
unique_ptr< Material > make_copy(const shared_ptr< Material > &)
Definition: Material.cpp:357
Definition: SectionShell.h:41
const unsigned material_tag
Definition: SectionShell.h:42
vec trial_plate_strain
Definition: SectionShell.h:48
vec trial_plate_stress
Definition: SectionShell.h:58
mat initial_plate_stiffness
Definition: SectionShell.h:64
vec current_plate_strain
Definition: SectionShell.h:49
vec current_membrane_stress
Definition: SectionShell.h:57
mat trial_plate_stiffness
Definition: SectionShell.h:66
const vec eccentricity
Definition: SectionShell.h:44
mat current_plate_stiffness
Definition: SectionShell.h:65
vec trial_membrane_strain
Definition: SectionShell.h:46
vec trial_membrane_strain_rate
Definition: SectionShell.h:51
mat current_membrane_stiffness
Definition: SectionShell.h:63
vec current_membrane_strain_rate
Definition: SectionShell.h:52
vec current_membrane_strain
Definition: SectionShell.h:47
vec current_plate_stress
Definition: SectionShell.h:59
mat initial_membrane_stiffness
Definition: SectionShell.h:61
vec trial_plate_strain_rate
Definition: SectionShell.h:53
vec current_plate_strain_rate
Definition: SectionShell.h:54
mat trial_membrane_stiffness
Definition: SectionShell.h:62
vec trial_membrane_stress
Definition: SectionShell.h:56