suanPan
SectionShell.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 SECTIONSHELL_H
29#define SECTIONSHELL_H
30
31#include <Domain/Tag.h>
32
33enum class OutputType;
34
35class DomainBase;
36class Material;
37
38using std::vector;
39
41 const unsigned material_tag; // material tag
42
43 const vec eccentricity;
44
49
54
59
66};
67
68class SectionShell : protected SectionShellData, public Tag {
69 const bool symmetric = false;
70 const bool initialized = false;
71
72public:
73 explicit SectionShell(
74 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 int update_incre_status(double, double);
119 int update_incre_status(double, double, double, double);
120 int update_trial_status(double, double);
121 int update_trial_status(double, double, double, double);
122
123 virtual int update_incre_status(const vec&, const vec&);
124 virtual int update_incre_status(const vec&, const vec&, const vec&, const vec&);
125 virtual int update_trial_status(const vec&, const vec&);
126 virtual int update_trial_status(const vec&, const vec&, const vec&, const vec&);
127
128 virtual int clear_status() = 0;
129 virtual int commit_status() = 0;
130 virtual int reset_status() = 0;
131
132 virtual vector<vec> record(OutputType);
133};
134
135namespace suanpan {
136 unique_ptr<SectionShell> make_copy(const shared_ptr<SectionShell>&);
137 unique_ptr<SectionShell> make_copy(const unique_ptr<SectionShell>&);
138} // namespace suanpan
139
140#endif
141
OutputType
Definition: OutputType.h:23
The DomainBase class is a template.
Definition: DomainBase.h:104
A Material abstract base class.
Definition: Material.h:111
A SectionShell class.
Definition: SectionShell.h:68
bool is_initialized() const
Definition: SectionShell.cpp:29
void set_symmetric(bool) const
Definition: SectionShell.cpp:27
virtual const vec & get_current_plate_stress() const
Definition: SectionShell.cpp:63
SectionShell & operator=(const SectionShell &)=delete
~SectionShell() override=default
int update_incre_status(double, double)
Definition: SectionShell.cpp:73
virtual int reset_status()=0
SectionShell & operator=(SectionShell &&)=delete
virtual const vec & get_current_plate_strain() const
Definition: SectionShell.cpp:57
bool is_symmetric() const
Definition: SectionShell.cpp:31
virtual const vec & get_trial_membrane_strain() const
Definition: SectionShell.cpp:37
const vec & get_eccentricity() const
Definition: SectionShell.cpp:35
void set_initialized(bool) const
Definition: SectionShell.cpp:25
virtual const mat & get_trial_membrane_stiffness() const
Definition: SectionShell.cpp:49
virtual int clear_status()=0
virtual const vec & get_current_plate_strain_rate() const
Definition: SectionShell.cpp:59
virtual const vec & get_trial_plate_strain() const
Definition: SectionShell.cpp:41
virtual const mat & get_current_plate_stiffness() const
Definition: SectionShell.cpp:67
SectionShell(const SectionShell &)=default
int update_trial_status(double, double)
Definition: SectionShell.cpp:83
virtual const vec & get_trial_membrane_strain_rate() const
Definition: SectionShell.cpp:39
virtual int initialize(const shared_ptr< DomainBase > &)=0
virtual const vec & get_current_membrane_stress() const
Definition: SectionShell.cpp:61
SectionShell(unsigned=0, unsigned=0, vec &&={0., 0.})
Definition: SectionShell.cpp:21
void set_eccentricity(const vec &) const
Definition: SectionShell.cpp:33
virtual int commit_status()=0
virtual const vec & get_trial_plate_stress() const
Definition: SectionShell.cpp:47
virtual const mat & get_current_membrane_stiffness() const
Definition: SectionShell.cpp:65
virtual const mat & get_initial_membrane_stiffness() const
Definition: SectionShell.cpp:69
virtual const mat & get_trial_plate_stiffness() const
Definition: SectionShell.cpp:51
SectionShell(SectionShell &&)=delete
virtual const vec & get_trial_membrane_stress() const
Definition: SectionShell.cpp:45
virtual const vec & get_trial_plate_strain_rate() const
Definition: SectionShell.cpp:43
virtual const vec & get_current_membrane_strain_rate() const
Definition: SectionShell.cpp:55
virtual const vec & get_current_membrane_strain() const
Definition: SectionShell.cpp:53
virtual unique_ptr< SectionShell > get_copy()=0
virtual const mat & get_initial_plate_stiffness() const
Definition: SectionShell.cpp:71
virtual vector< vec > record(OutputType)
Definition: SectionShell.cpp:105
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:370
Definition: SectionShell.h:40
const unsigned material_tag
Definition: SectionShell.h:41
vec trial_plate_strain
Definition: SectionShell.h:47
vec trial_plate_stress
Definition: SectionShell.h:57
mat initial_plate_stiffness
Definition: SectionShell.h:63
vec current_plate_strain
Definition: SectionShell.h:48
vec current_membrane_stress
Definition: SectionShell.h:56
mat trial_plate_stiffness
Definition: SectionShell.h:65
const vec eccentricity
Definition: SectionShell.h:43
mat current_plate_stiffness
Definition: SectionShell.h:64
vec trial_membrane_strain
Definition: SectionShell.h:45
vec trial_membrane_strain_rate
Definition: SectionShell.h:50
mat current_membrane_stiffness
Definition: SectionShell.h:62
vec current_membrane_strain_rate
Definition: SectionShell.h:51
vec current_membrane_strain
Definition: SectionShell.h:46
vec current_plate_stress
Definition: SectionShell.h:58
mat initial_membrane_stiffness
Definition: SectionShell.h:60
vec trial_plate_strain_rate
Definition: SectionShell.h:52
vec current_plate_strain_rate
Definition: SectionShell.h:53
mat trial_membrane_stiffness
Definition: SectionShell.h:61
vec trial_membrane_stress
Definition: SectionShell.h:55