xc
LoadCombination.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //LoadCombination.h
29 
30 #ifndef LOADCOMBINATION_H
31 #define LOADCOMBINATION_H
32 
33 #include "LoadPatternCombination.h"
34 
35 namespace XC {
36 class MapLoadPatterns;
37 class LoadPattern;
38 class LoadHandler;
39 class LoadCombinationGroup;
40 
42 //
46  {
47  protected:
48  friend class Domain;
49  friend class FEM_ObjectBroker;
50 
53 
54  int recvDescomp(void);
55 
56 
57  friend class LoadCombinationGroup;
58  LoadCombination(LoadCombinationGroup *owr= nullptr,const std::string &nm= "",int tag= 0,LoadHandler *ll= nullptr);
59 
60  public:
61 
62  const LoadCombinationGroup *getGroup(void) const;
64 
65  LoadCombination &multiplica(const float &);
66  LoadCombination &divide(const float &);
67  LoadCombination &add(const std::string &);
68  LoadCombination &subtract(const std::string &);
69  LoadCombination &asigna(const std::string &);
70  inline LoadCombination &operator+=(const LoadCombination &c)
71  { return add(c); }
72  LoadCombination &operator-=(const LoadCombination &c)
73  { return subtract(c); }
74  LoadCombination &operator*=(const float &f)
75  { return multiplica(f); }
76  LoadCombination &operator/=(const float &f)
77  { return divide(f); }
80  LoadCombination operator*(const float &) const;
81  LoadCombination operator/(const float &) const;
82  bool operator==(const LoadCombination &) const;
83  bool operator!=(const LoadCombination &) const;
84  bool dominaA(const LoadCombination &other) const;
85 
86  const LoadCombination *getPtrCombPrevia(void) const;
87  const std::string getNombreCombPrevia(void) const;
88  int getTagCombPrevia(void) const;
89  const std::string getComponentsCombPrevia(void) const;
90  const std::string getComponentsRestoSobrePrevia(void) const;
91 
92  int sendSelf(Communicator &);
93  int recvSelf(const Communicator &);
94  };
95 
96 std::ostream &operator<<(std::ostream &os,const LoadCombination &);
97 
98 } // end of XC namespace
99 
100 #endif
LoadCombination & asigna(const std::string &)
Assigns the combination identified by the name being passed as parameter.
Definition: LoadCombination.cc:206
bool operator!=(const LoadCombination &) const
Not equal operator.
Definition: LoadCombination.cc:274
const std::string getComponentsCombPrevia(void) const
Returns, if possible, the decomposition of the "previous" combination.
Definition: LoadCombination.cc:89
Load combination container.
Definition: LoadCombinationGroup.h:47
const std::string getNombreCombPrevia(void) const
Returns, if possible, the name of the "previous" combination.
Definition: LoadCombination.cc:69
Communication parameters between processes.
Definition: Communicator.h:66
const std::string getComponentsRestoSobrePrevia(void) const
Returns, si puede, la diferencia entre esta y la previa.
Definition: LoadCombination.cc:99
LoadCombination operator+(const LoadCombination &) const
Addition operator.
Definition: LoadCombination.cc:242
bool operator==(const LoadCombination &) const
Equal operator.
Definition: LoadCombination.cc:292
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:151
LoadCombination(LoadCombinationGroup *owr=nullptr, const std::string &nm="", int tag=0, LoadHandler *ll=nullptr)
Constructor.
Definition: LoadCombination.cc:46
LoadCombination operator*(const float &) const
Product by a number operator.
Definition: LoadCombination.cc:258
LoadCombination & subtract(const LoadCombination &)
Subtracts the combination being passed as parameter.
Definition: LoadCombination.cc:181
const LoadCombination * getPtrCombPrevia(void) const
Returns, if possible, a pointer to the "previous" combination.
Definition: LoadCombination.cc:59
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: LoadCombination.cc:141
LoadCombination operator-(const LoadCombination &) const
Subtraction operator.
Definition: LoadCombination.cc:250
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int recvDescomp(void)
Returns the combination decomposition (it must be called only after setting un the object&#39;s owner and...
Definition: LoadCombination.cc:116
LoadCombination & multiplica(const float &)
Multiplies the combination by the number being passed as parameter.
Definition: LoadCombination.cc:222
Load definition manager.
Definition: LoadHandler.h:45
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: LoadCombination.cc:128
Base class for load pattern combinations (1.5*selfWeight+1.0*permanentLoad+1.6*trafficLoad ...
Definition: LoadPatternCombination.h:45
const LoadCombinationGroup * getGroup(void) const
Returns the group to which the combination belongs.
Definition: LoadCombination.cc:51
Base class for load pattern combinations (1.5*selfWeight+1.0*permanentLoad+1.6*trafficLoad ...
Definition: LoadCombination.h:45
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
LoadCombination & divide(const float &)
Divides the combination by the number being passed as parameter.
Definition: LoadCombination.cc:234
LoadCombination & add(const LoadCombination &)
Sums the combination being passed as parameter.
Definition: LoadCombination.cc:155
int getTagCombPrevia(void) const
Returns, if possible, the tag of the "previous" combination.
Definition: LoadCombination.cc:79
LoadCombination operator/(const float &) const
Division by a number operator.
Definition: LoadCombination.cc:266
bool dominaA(const LoadCombination &other) const
Returns true if the factors that weight all the load patterns of this load combination are greater th...
Definition: LoadCombination.cc:312