pyg3

Design

The pyg3 package contains three components:

  1. A fork of OpenSees with several global variables removed and all OPS_* functions #ifdef’ed out.

  2. The OpenSeesCommandPackage Tcl package, for dynamically loading the OpenSees Tcl API into a Tcl interpreter. This package consists of modified copies of the Tcl*.cpp files from OpenSees.

  3. The pyg3 python bindings to core OpenSees classes.

Features

  • Users will no longer need to laboriously parse text output, and can instead directly interact with the OpenSees Vector class as a numpy array.

  • The pyg3 package aims to be completely threadsafe and free of module-level state. It is hard to begin listing how many benefits this brings, but some possibilities are:

    • highly efficient multithreaded state determination
    • safe embedding
  • Tight integration with core C++ classes opens the door to possibilities like directly implementing new elements entirely from Python.

Back to top