30 #ifndef MAPLOADPATTERNS_H 31 #define MAPLOADPATTERNS_H 33 #include "preprocessor/prep_handlers/LoadHandlerMember.h" 34 #include "domain/load/pattern/LoadPattern.h" 35 #include "domain/load/pattern/TimeSeries.h" 48 typedef std::map<std::string,TimeSeries *> map_timeseries;
49 map_timeseries tseries;
50 typedef map_timeseries::iterator time_series_iterator;
51 typedef map_timeseries::const_iterator time_series_const_iterator;
53 std::string time_series_name;
55 typedef std::map<std::string,LoadPattern *> map_loadpatterns;
56 map_loadpatterns loadpatterns;
63 TimeSeries *create_time_series(
const std::string &);
65 LoadPattern *create_load_pattern(
const std::string &);
67 typedef map_loadpatterns::iterator iterator;
68 typedef map_loadpatterns::const_iterator const_iterator;
82 const_iterator begin(
void)
const 83 {
return loadpatterns.begin(); }
84 const_iterator end(
void)
const 85 {
return loadpatterns.end(); }
87 {
return loadpatterns.begin(); }
89 {
return loadpatterns.end(); }
90 size_t size(
void)
const 91 {
return loadpatterns.size(); }
92 bool empty(
void)
const 93 {
return loadpatterns.empty(); }
95 const std::string getCurrentLoadPatternId(
void)
const;
97 const LoadPattern *getCurrentLoadPatternPtr(
void)
const;
98 inline const std::string &getCurrentLoadPattern(
void)
const 100 inline void setCurrentLoadPattern(
const std::string &nmb)
118 inline const std::string &getCurrentTimeSeries(
void)
const 119 {
return time_series_name; }
120 inline void setCurrentTimeSeries(
const std::string &nmb)
121 { time_series_name= nmb; }
125 boost::python::list
getKeys(
void)
const;
127 inline const int &getCurrentElementLoadTag(
void)
const 129 inline void setCurrentElementLoadTag(
const int &n)
131 inline const int &getCurrentNodeLoadTag(
void)
const 133 inline void setCurrentNodeLoadTag(
const int &n)
147 boost::python::dict
getPyDict(
void)
const;
148 void setPyDict(
const boost::python::dict &);
153 TimeSeries *XC::MapLoadPatterns::create_time_series(
const std::string &cod_ts)
160 tseries[cod_ts]= nts;
164 time_series_name= cod_ts;
170 LoadPattern *XC::MapLoadPatterns::create_load_pattern(
const std::string &cod_lp)
176 std::map<std::string,TimeSeries *>::const_iterator its= tseries.find(time_series_name);
177 if(its!= tseries.end())
185 loadpatterns[cod_lp]= lp;
187 if(loadpatterns.empty())
192 std::cerr <<
"MapLoadPatterns; ERROR " 193 <<
", time series: " << time_series_name
194 <<
" not found." << std::endl;
LoadPattern * newLoadPattern(const std::string &, const std::string &)
Define a LoadPattern object with the type and the name being passed as parameters.
Definition: MapLoadPatterns.cc:276
LoadPattern * findLoadPattern(const std::string &)
Returns a pointer to the load pattern which name being passed as parameter.
Definition: MapLoadPatterns.cc:116
void clear(void)
Clears all the load patterns.
Definition: MapLoadPatterns.cc:332
Communication parameters between processes.
Definition: Communicator.h:66
void copyLoads(const Node *, const Node *)
Copy the loads from the first node to the second one.
Definition: MapLoadPatterns.cc:399
TimeSeries * findTS(const int &)
Returns a pointer to the TS cuyo dbTag being passed as parameter.
Definition: MapLoadPatterns.cc:70
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: MapLoadPatterns.cc:525
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: MapLoadPatterns.cc:493
MapLoadPatterns(LoadHandler *owr)
Default constructor.
Definition: MapLoadPatterns.cc:65
??.
Definition: LoadHandlerMember.h:43
A load pattern is the spatial distribution as well as its variation in time of a specific set of forc...
Definition: LoadPattern.h:97
virtual void setTimeSeries(TimeSeries *theSeries)
Set the time series for the pattern.
Definition: LoadPattern.cpp:165
const std::string & getTimeSeriesName(const TimeSeries *) const
Returns the name of the time series pointed by the parameter.
Definition: MapLoadPatterns.cc:261
Base class for the finite elements.
Definition: Element.h:112
int & getTagLP(void)
Returns the tag para el siguiente load pattern.
Definition: LoadHandlerMember.cc:77
std::list< LoadPattern * > getLoadPatternsActingOn(const Node *)
Return the load patterns that act on the given node.
Definition: MapLoadPatterns.cc:359
const std::string & getLoadPatternName(const LoadPattern *) const
Returns the name of the load pattern pointed by the parameter.
Definition: MapLoadPatterns.cc:164
void removeAllFromDomain(void)
Remove the loadpatterns del domain.
Definition: MapLoadPatterns.cc:208
void removeLoadsOn(const Node *)
Removes the given node from all the load patterns.
Definition: MapLoadPatterns.cc:386
std::deque< std::string > getNamesList(void) const
Return the names of the load patterns.
Definition: MapLoadPatterns.cc:614
void clear_time_series(void)
Clears all the load patterns.
Definition: MapLoadPatterns.cc:323
boost::python::list getLoadPatternsActingOnPy(const Node *)
Return the load patterns that act on the given node.
Definition: MapLoadPatterns.cc:372
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: MapLoadPatterns.cc:596
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Load pattern container.
Definition: MapLoadPatterns.h:46
void addToDomain(const std::string &)
Adds the load pattern to the domain.
Definition: MapLoadPatterns.cc:178
Time variation of loads.
Definition: TimeSeries.h:85
DbTagData & getDbTagData(void) const
Return a vector to store the dbTags of the class members.
Definition: MapLoadPatterns.cc:462
void set_owner(EntityWithOwner *owr)
Assigns the owner of the object.
Definition: EntityWithOwner.cc:111
int recvData(const Communicator &comm)
Send members through the communicator argument.
Definition: MapLoadPatterns.cc:480
TimeSeries * newTimeSeries(const std::string &, const std::string &)
Define a TimeSeries object with the type and name passed as parameters.
Definition: MapLoadPatterns.cc:225
Load definition manager.
Definition: LoadHandler.h:45
Mesh node.
Definition: Node.h:111
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: MapLoadPatterns.cc:584
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: MapLoadPatterns.cc:469
void removeFromDomain(const std::string &)
Remove the load pattern del domain.
Definition: MapLoadPatterns.cc:196
bool removeLoadPattern(const std::string &)
Remove the load pattern with the given name.
Definition: MapLoadPatterns.cc:299
boost::python::list getKeys(void) const
Return load case names.
Definition: MapLoadPatterns.cc:623
~MapLoadPatterns(void)
Destructor.
Definition: MapLoadPatterns.cc:346