Not Everything Should Be a Direct Translation

Like learning another language, not everything in OpenSees, and programming in general, is a direct translation from textbooks. Your mother tongue could be $latex {\bf x} = {\bf A}^{-1}{\bf b}$, but you should never invert the matrix then multiply. Instead, call an equation solver. For small matrices in OpenSees, use A.Solve(b, x) from the Matrix … Continue reading Not Everything Should Be a Direct Translation

Don’t Invert the Matrix

A common issue with linear algebra textbooks is the depiction of $latex {\bf x}={\bf A}^{-1}{\bf b}$ as the solution to the linear system of equations $latex {\bf A}{\bf x}={\bf b}$. Find the inverse of the matrix $latex {\bf A}$, then multiply that inverse with the right-hand side vector, $latex {\bf b}$. Theoretically correct? Yes. Practical? … Continue reading Don’t Invert the Matrix

Un-MATLAB Your OpenSees

Many people develop their OpenSees elements and materials in MATLAB, then port to C++. To support this transition, OpenSees implements easy matrix-vector algebra by overloading the +, -, *, and ^ operators for the Matrix and Vector classes. The overloaded operators are self-explanatory, except for ^, which is "transpose times" or inner product. C = … Continue reading Un-MATLAB Your OpenSees