xc
LoadCombinationGroup.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 //LoadCombinationGroup.h
29 
30 #ifndef LOADCOMBINATIONGROUP_H
31 #define LOADCOMBINATIONGROUP_H
32 
33 #include "preprocessor/prep_handlers/LoadHandlerMember.h"
34 #include <map>
35 #include "boost/python/list.hpp"
36 
37 namespace XC {
38 class LoadCombination;
39 class LoadHandler;
40 class Domain;
41 
42 typedef std::map<std::string,LoadCombination *> LoadCombinationMap;
43 
45 //
47 class LoadCombinationGroup: public LoadHandlerMember, public LoadCombinationMap
48  {
49  protected:
50  LoadCombination *find_combination(const std::string &);
51  friend class LoadHandler;
52 
53  DbTagData &getDbTagData(void) const;
54  int sendData(Communicator &comm);
55  int recvData(const Communicator &comm);
56 
57  public:
60 
61  boost::python::list getKeys(void) const;
62  bool remove(const std::string &);
63  void clear(void);
64 
65  XC::LoadCombination *newLoadCombination(const std::string &,const std::string &);
66 
67  void addToDomain(const std::string &);
68  void removeFromDomain(const std::string &);
69  void removeAllFromDomain(void);
70 
71  std::deque<std::string> getNamesList(void) const;
72  const std::string &getNombreLoadCombination(const LoadCombination *) const;
73 
74  const LoadCombination *buscaLoadCombination(const std::string &) const;
75  const_iterator buscaCombPrevia(const LoadCombination &) const;
76  const LoadCombination *getPtrCombPrevia(const LoadCombination &) const;
77  const_iterator buscaCombPrevia(const std::string &) const;
78  const std::string getNombreCombPrevia(const std::string &) const;
79  int getTagCombPrevia(const std::string &) const;
80 
81  int sendSelf(Communicator &);
82  int recvSelf(const Communicator &);
83  boost::python::dict getPyDict(void) const;
84  void setPyDict(const boost::python::dict &);
85  };
86 
87 } // end of XC namespace
88 
89 #endif
Load combination container.
Definition: LoadCombinationGroup.h:47
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: LoadCombinationGroup.cc:249
Communication parameters between processes.
Definition: Communicator.h:66
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: LoadCombinationGroup.cc:232
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: LoadCombinationGroup.cc:279
void addToDomain(const std::string &)
Adds the combination to the domain.
Definition: LoadCombinationGroup.cc:102
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: LoadCombinationGroup.cc:292
??.
Definition: LoadHandlerMember.h:43
const std::string & getNombreLoadCombination(const LoadCombination *) const
Returns the name of the load combination pointed by the parameter.
Definition: LoadCombinationGroup.cc:65
void removeFromDomain(const std::string &)
Removes the combination from the domain.
Definition: LoadCombinationGroup.cc:114
LoadCombination * find_combination(const std::string &)
Returns a pointer to the load combination identified by the name being passed as parameter.
Definition: LoadCombinationGroup.cc:44
const LoadCombination * buscaLoadCombination(const std::string &) const
Returns a pointer to the load combination identified by the name being passed as parameter.
Definition: LoadCombinationGroup.cc:55
~LoadCombinationGroup(void)
Destructor.
Definition: LoadCombinationGroup.cc:202
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: LoadCombinationGroup.cc:207
void removeAllFromDomain(void)
Remomves all the load combinations from the domain.
Definition: LoadCombinationGroup.cc:126
LoadCombinationGroup(LoadHandler *owr)
Default constructor.
Definition: LoadCombinationGroup.cc:38
void clear(void)
Deletes all the combinations.
Definition: LoadCombinationGroup.cc:190
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: LoadCombinationGroup.cc:214
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
std::map< std::string, LoadCombination * > LoadCombinationMap
LoadCombinations.
Definition: LoadCombinationGroup.h:40
int recvData(const Communicator &comm)
Send members through the communicator argument.
Definition: LoadCombinationGroup.cc:218
Load definition manager.
Definition: LoadHandler.h:45
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
const_iterator buscaCombPrevia(const LoadCombination &) const
Search for the nearest combination to the one being passed as parameter from those that have their fa...
Definition: LoadCombinationGroup.cc:320
boost::python::list getKeys(void) const
Returns container&#39;s keys.
Definition: LoadCombinationGroup.cc:181