suanPan
Load.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  ******************************************************************************/
32 #ifndef LOAD_H
33 #define LOAD_H
34 
36 
37 class Load : public ConditionalModifier {
38 protected:
39  static double multiplier;
40 
41  const bool mpdc_flag = false;
42 
43  const double pattern;
44 
48 
49  friend void set_load_multiplier(double);
50 
51 public:
52  Load(
53  unsigned, // tag
54  unsigned, // step tag
55  unsigned, // amplitude tag
56  uvec&&, // node tag
57  uvec&&, // dof tag
58  double // nominal magnitude
59  );
60  Load(const Load&) = delete; // copy forbidden
61  Load(Load&&) = delete; // move forbidden
62  Load& operator=(const Load&) = delete; // assign forbidden
63  Load& operator=(Load&&) = delete; // assign forbidden
64 
65  ~Load() override = default;
66 
67  void enable_displacement_control() const;
68  [[nodiscard]] bool if_displacement_control() const;
69 
70  [[nodiscard]] const vec& get_trial_load() const;
71  [[nodiscard]] const vec& get_trial_settlement() const;
72  [[nodiscard]] const sp_vec& get_reference_load() const;
73 };
74 
75 void set_load_multiplier(double);
76 
77 class GroupLoad {
78  const uvec groups;
79 
80 protected:
81  [[nodiscard]] uvec update_object_tag(const shared_ptr<DomainBase>&) const;
82 
83 public:
84  explicit GroupLoad(uvec&&);
85 };
86 
87 #endif
88 
A ConditionalModifier class.
Definition: ConditionalModifier.h:41
Definition: Load.h:77
GroupLoad(uvec &&)
Definition: Load.cpp:40
uvec update_object_tag(const shared_ptr< DomainBase > &) const
Definition: Load.cpp:43
A Load class.
Definition: Load.h:37
const double pattern
Definition: Load.h:43
void enable_displacement_control() const
Definition: Load.cpp:28
~Load() override=default
Load(unsigned, unsigned, unsigned, uvec &&, uvec &&, double)
Definition: Load.cpp:24
sp_vec reference_load
Definition: Load.h:47
Load & operator=(Load &&)=delete
Load(const Load &)=delete
const sp_vec & get_reference_load() const
Definition: Load.cpp:36
vec trial_settlement
Definition: Load.h:46
bool if_displacement_control() const
Definition: Load.cpp:30
const vec & get_trial_load() const
Definition: Load.cpp:32
const bool mpdc_flag
Definition: Load.h:41
const vec & get_trial_settlement() const
Definition: Load.cpp:34
static double multiplier
Definition: Load.h:39
Load & operator=(const Load &)=delete
friend void set_load_multiplier(double)
Definition: Load.cpp:38
vec trial_load
Definition: Load.h:45
Load(Load &&)=delete
void set_load_multiplier(double)
Definition: Load.cpp:38