pyMOTO Reference

Core

pymoto.Signal

Manages the state data, sensitivities, and connects module in- and outputs

pymoto.Module

Main class: Module Transforms input signal to output signal and output signal sensitivity to input signal sensitivity

pymoto.Network

Binds multiple Modules together as one Module

Mathematical Modules

pymoto.EinSum

General linear algebra module which uses the Numpy function einsum

pymoto.MathExpression

General mathematical expression module

pymoto.AutoMod

Module that automatically differentiates the response function

pymoto.Inverse

Calculate the inverse of a matrix \(\mathbf{B} = \mathbf{A}^{-1}\)

pymoto.LinSolve

Solves linear system of equations \(\mathbf{A}\mathbf{x}=\mathbf{b}\)

pymoto.SystemOfEquations

Solve a partitioned linear system of equations

pymoto.StaticCondensation

Static condensation of a linear system of equations

pymoto.EigenSolve

Solves the (generalized) eigenvalue problem \(\mathbf{A}\mathbf{q}_i = \lambda_i \mathbf{B} \mathbf{q}_i\)

pymoto.TransientSolve

Solves the transient thermal problem \(\mathbf{K}\mathbf{T} + \mathbf{C}\dot{\mathbf{T}} = \mathbf{Q}\)

pymoto.Scaling

Scales (scalar) input for different response functions in optimization (objective / constraints).

pymoto.Concatenate

Concatenates data of multiple signals into one big vector

pymoto.SetValue

Sets the values of a numpy array at specified indices to a given value

pymoto.AddMatrix

Compute linear combination of sparse matrices

Constraint Aggregation

pymoto.Aggregation

Abstract base-class for aggregation modules

pymoto.PNorm

P-norm aggregration

pymoto.SoftMinMax

Soft maximum/minimum function aggregation

pymoto.KSFunction

Aggregation using Kreisselmeier and Steinhauser function from 1979

Helper objects

pymoto.AggActiveSet

Determine active set for aggregation by discarding lower or upper fraction of a set of values

pymoto.AggScaling

Scaling strategy for aggregation to improve approximation of the true minimum or maximum.

Finite Element Modules

pymoto.AssembleGeneral

Assembles a sparse matrix according to element scaling \(\mathbf{A} = \sum_e x_e \mathbf{A}_e\)

pymoto.AssembleStiffness

Stiffness matrix assembly by scaling elements in 2D or 3D \(\mathbf{K} = \sum_e x_e \mathbf{K}_e\)

pymoto.AssembleMass

Consistent mass matrix or equivalents assembly by scaling elements \(\mathbf{M} = \sum_e x_e \mathbf{M}_e\)

pymoto.AssemblePoisson

Assembly of matrix to solve Poisson equation (e.g. Thermal conductivity, Electric permittivity) \(\mathbf{P} = \sum_e x_e \mathbf{P}_e\).

pymoto.ElementOperation

Generic module for element-wise operations based on nodal information

pymoto.NodalOperation

Generic module for nodal operations based on elemental information

pymoto.Strain

Evaluate average mechanical strains in solid elements based on deformation

pymoto.Stress

Calculate the average stresses per element

pymoto.ElementAverage

Determine average value in element of input nodal values

pymoto.ThermoMechanical

Determine equivalent thermo-mechanical load from design vector and elemental temperature difference

Filter Modules

pymoto.Filter

Abstract base class for any linear filter with normalization

pymoto.DensityFilter

Standard density filter for a structured mesh in topology optimization

pymoto.OverhangFilter

Implementation of overhang filter by Langelaar (2016, 2017)

pymoto.FilterConv

Density filter based on convolution

Output Modules

pymoto.FigModule

Abstract base class for any module which produces a figure

pymoto.PlotDomain

Plots the densities of a domain (2D or 3D)

pymoto.PlotGraph

Plot an X-Y graph

pymoto.PlotIter

Plot iteration history of one or more variables

pymoto.WriteToVTI

Writes vectors to a Paraview VTI file

pymoto.SeriesToVTI

Writes transient response vectors to a Paraview VTI file

pymoto.ScalarToFile

Writes iteration data to a log file

pymoto.Print

Prints the input signals to console

Complex-value Modules

pymoto.MakeComplex

Makes a complex variable from two real inputs \(z(x,y) = x + iy\)

pymoto.SplitComplex

Convert a complex variable into its real and imaginary parts \(z \rightarrow (x,y)\)

pymoto.RealPart

Takes the real part of a complex value \(x = \text{Re}(z)\)

pymoto.ImagPart

Takes the imaginary part of a complex value \(y = \text{Im}(z)\)

pymoto.ComplexNorm

Takes the complex norm \(A = \sqrt(z z^*)\)

pymoto.Conjugate

Conjugation of a complex value \(y = z^*\)

Common Utilities and Routines

pymoto.VoxelDomain

Definition for a structured voxel domain Nodal numbering used in the domain is given below.

pymoto.DyadicMatrix

Efficient storage for dyadic or rank-N matrix

pymoto.finite_difference

Performs a finite difference check on the given Module or Network

Optimizers

pymoto.minimize_oc

Execute minimization using the OC-method

pymoto.minimize_mma

Execute minimization using the MMA-method Svanberg (1987), The method of moving asymptotes - a new method for structural optimization

pymoto.minimize_slp

Sequential linear programming optimization algorithm

pymoto.OC

pymoto.MMA

Class for the Method of Moving Asymptotes (MMA) optimization algorithm

pymoto.SLP

Linear Solvers

pymoto.solvers.LinearSolver

Base class of all linear solvers

pymoto.solvers.LDAWrapper

Linear dependency aware solver (LDAS)

pymoto.solvers.SolverDiagonal

Solver for diagonal matrices

pymoto.solvers.SolverDenseQR

Solver for dense (square) matrices using a QR decomposition

pymoto.solvers.SolverDenseLU

Solver for dense (square) matrices using an LU decomposition

pymoto.solvers.SolverDenseCholesky

Solver for Hermitian positive-definite matrices using a Cholesky factorization.

pymoto.solvers.SolverDenseLDL

Solver for Hermitian or symmetric matrices using an LDL factorization.

pymoto.solvers.SolverSparseLU

Solver for sparse (square) matrices using an LU decomposition.

pymoto.solvers.SolverSparsePardiso

Solver wrapper Intel MKL Pardiso solver, which is a very fast and flexible multi-threaded solver

pymoto.solvers.SolverSparseCholeskyScikit

Solver for positive-definite Hermitian matrices using a Cholesky factorization.

pymoto.solvers.SolverSparseCholeskyCVXOPT

Solver for positive-definite Hermitian matrices using a Cholesky factorization.

Preconditioners

pymoto.solvers.Preconditioner

Abstract base class for preconditioners to inexact solvers

pymoto.solvers.DampedJacobi

Damped Jacobi preconditioner \(M = \frac{1}{\omega} D\)

pymoto.solvers.SOR

Successive over-relaxation preconditioner The matrix \(A = L + D + U\) is split into a lower triangular, diagonal, and upper triangular part.

pymoto.solvers.ILU

Incomplete LU factorization

pymoto.solvers.GeometricMultigrid

Geometric multigrid preconditioner

Iterative solvers

pymoto.solvers.CG

Preconditioned conjugate gradient method Works for positive-definite self-adjoint matrices (\(A=A^H\))