remove loadPatterns; a new argument for the remove command

A forum dedicated to feature requests and the future direction of OpenSees, i.e. what would you like, what do you need, what should we explore

Moderators: silvia, selimgunay, Moderators

Post Reply
oleviuqserh
Posts: 65
Joined: Mon Oct 04, 2010 6:24 pm
Location: Colombia

remove loadPatterns; a new argument for the remove command

Post by oleviuqserh »

Hi Frank. Sorry to be repetitive with this regard, but I think it would be very useful if the command-line "remove loadPatterns" is implemented in the OpenSees framework. Sometimes when using a lot of loadPattern objects in the model, removing their tags become a bit cumbersome to deal with. I do not understand the source code and I am not a c++ programmer either, but I think this method could work just fine inside the Domain object. Please let me know what you think. Thank you very much.

In domain.cpp,
-------------------------------
int
Domain::removeLoadPatterns(void)
{
if (theLoadPatterns != 0)
delete theLoadPatterns;
return 0;
}
-------------------------------

or (I am not sure....)

-------------------------------
int
Domain::removeLoadPatterns(void)
{
for (int i=0; i<numLoadPatterns; i++)
if (theLoadPatterns[i] != 0)
delete theLoadPatterns[i];

theLoadPatterns = 0;
numLoadPatterns = 0;
return 0;
}
-------------------------------




In commands.cpp,
-------------------------------
int
removeObject(ClientData clientData, Tcl_Interp *interp, int argc,
TCL_Char **argv)
{
...
else if (strcmp(argv[1],"loadPatterns") == 0) {
theDomain.removeLoadPatterns();
}

}
-------------------------------


Thank you!
Post Reply