OpenSees Command Line Arguments

While graphical user interfaces are good for general purpose use, the command line remains the most versatile way to run OpenSees and other computer programs. Passing command line arguments to an OpenSees Tcl or Python script is useful when creating standalone applications for building and analyzing specialized models. Both Tcl and Python have constructs similar … Continue reading OpenSees Command Line Arguments

How to Use with with OpenSeesPy

The with command offers a clean approach to manage Python resources, particularly file streams. Without going into detail, the with command is a shortcut for exception handling. The nice thing about reading and writing files using the with command is you don't have to worry about closing the file stream. Immediately after the with block … Continue reading How to Use with with OpenSeesPy

A Better Way to Find Memory Leaks in OpenSees

In a previous post, I explained how to find a memory leak in OpenSees. The basic idea was to put the analysis inside a loop, run the loop a million times, and monitor your operating system for increasing memory usage. A perfectly fine leak hunting approach--as long as you are willing to monitor your operating … Continue reading A Better Way to Find Memory Leaks in OpenSees

Something Like a Double Negative

Double negatives are frowned upon in English, but are acceptable in other languages such as Spanish. For example, "No hay nada" is perfectly fine but may sound odd to native English speakers. Along similar lines, I recently came across some OpenSees code that looked something like this: const int N = 20; double Fx[N]; // … Continue reading Something Like a Double Negative