# aatmdelissen/pymoto architecture

> Architecture diagram of the GitHub repository aatmdelissen/pymoto, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aatmdelissen/pymoto
- Repository: https://github.com/aatmdelissen/pymoto

## Overview

pyMOTO is a modular Python framework for topology optimization. A user builds a signal-and-module network representing a design problem; modules can filter design variables, assemble finite-element operators, solve physical systems, and compute responses and sensitivities. An optimizer updates design variables using those responses and gradients, iterating toward an optimized design. The graph also preserves documented structural, thermal, transient, aggregation, and visualization capabilities. Relationships between individual modules are limited to those stated in the README or visible in the supplied source index; unsampled internals are not assumed.

Main entry points: [`pymoto/core_objects.py`](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/core_objects.py) (Signals and networks), [`pymoto/solvers/auto_determine.py`](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/auto_determine.py) (Solver selection), [`pymoto/modules/assembly.py`](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/assembly.py) (FE assembly), [`pymoto/routines.py`](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/routines.py) (Optimization routines)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_framework["Model framework"]
  node_api["Signals and networks<br/>[core_objects.py]"]
  node_domain["Voxel domain<br/>[domain.py]"]
  node_sensitivities["Sensitivity modules<br/>[core_objects.py]"]
end

subgraph group_physics["Physics modules"]
  node_filter["Density filtering<br/>[filter.py]"]
  node_assembly["FE assembly<br/>[assembly.py]"]
  node_mechanics["Element operations<br/>[assembly.py]"]
  node_linear["Linear algebra<br/>[linalg.py]"]
  node_transient["Transient solve<br/>[transient.py]"]
  node_aggregation["Response aggregation<br/>[aggregation.py]"]
end

subgraph group_optimization["Optimization"]
  node_routines["Optimization routines<br/>[routines.py]"]
  node_optimizers["OC and SLP<br/>[optimizers.py]"]
  node_mma["MMA and GCMMA<br/>[mma.py]"]
end

subgraph group_support["Solvers and outputs"]
  node_solver_api["Solver selection<br/>[auto_determine.py]"]
  node_dense["Dense solvers<br/>[dense.py]"]
  node_sparse["Sparse solvers<br/>[sparse.py]"]
  node_iterative["Iterative solvers<br/>[iterative.py]"]
  node_io["Visualization and output<br/>[io.py]"]
end

node_user(("Researcher"))

node_user -->|"builds network"| node_api
node_api -->|"connects modules"| node_filter
node_api -->|"connects modules"| node_assembly
node_api -->|"connects modules"| node_linear
node_api -->|"backpropagates gradients"| node_sensitivities
node_filter -.->|"filters design field"| node_assembly
node_domain -->|"defines FE domain"| node_assembly
node_assembly -->|"provides FE operations"| node_mechanics
node_linear -->|"uses solver interface"| node_solver_api
node_solver_api -.->|"selects solver"| node_dense
node_solver_api -.->|"selects solver"| node_sparse
node_solver_api -.->|"selects solver"| node_iterative
node_api -->|"connects modules"| node_transient
node_api -->|"connects modules"| node_aggregation
node_routines -->|"optimizes network"| node_api
node_routines -->|"calls OC or SLP"| node_optimizers
node_routines -->|"calls MMA"| node_mma
node_optimizers -->|"evaluates network"| node_api
node_mma -->|"extends optimizer"| node_optimizers
node_api -->|"connects output modules"| node_io

click node_api "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/core_objects.py"
click node_domain "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/domain.py"
click node_filter "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/filter.py"
click node_assembly "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/assembly.py"
click node_mechanics "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/assembly.py"
click node_linear "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/linalg.py"
click node_transient "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/transient.py"
click node_aggregation "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/aggregation.py"
click node_sensitivities "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/core_objects.py"
click node_routines "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/routines.py"
click node_optimizers "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/optimizers.py"
click node_mma "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/mma.py"
click node_solver_api "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/auto_determine.py"
click node_dense "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/dense.py"
click node_sparse "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/sparse.py"
click node_iterative "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/iterative.py"
click node_io "https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/io.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_domain,node_sensitivities toneBlue
class node_filter,node_assembly,node_mechanics,node_linear,node_transient,node_aggregation toneAmber
class node_routines,node_optimizers,node_mma toneMint
class node_solver_api,node_dense,node_sparse,node_iterative,node_io toneRose
class node_user toneIndigo
```

## Components

### Model framework

- [Signals and networks](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/core_objects.py): `pymoto/core_objects.py`
- [Voxel domain](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/domain.py): `pymoto/common/domain.py`
- [Sensitivity modules](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/core_objects.py): `pymoto/core_objects.py`

### Physics modules

- [Density filtering](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/filter.py): `pymoto/modules/filter.py`
- [FE assembly](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/assembly.py): `pymoto/modules/assembly.py`
- [Element operations](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/assembly.py): `pymoto/modules/assembly.py`
- [Linear algebra](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/linalg.py): `pymoto/modules/linalg.py`
- [Transient solve](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/transient.py): `pymoto/modules/transient.py`
- [Response aggregation](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/aggregation.py): `pymoto/modules/aggregation.py`

### Optimization

- [Optimization routines](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/routines.py): `pymoto/routines.py`
- [OC and SLP](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/optimizers.py): `pymoto/common/optimizers.py`
- [MMA and GCMMA](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/common/mma.py): `pymoto/common/mma.py`

### Solvers and outputs

- [Solver selection](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/auto_determine.py): `pymoto/solvers/auto_determine.py`
- [Dense solvers](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/dense.py): `pymoto/solvers/dense.py`
- [Sparse solvers](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/sparse.py): `pymoto/solvers/sparse.py`
- [Iterative solvers](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/solvers/iterative.py): `pymoto/solvers/iterative.py`
- [Visualization and output](https://github.com/aatmdelissen/pymoto/blob/master/pymoto/modules/io.py): `pymoto/modules/io.py`

### Other components

- **Researcher**

## Connections

- Researcher → Signals and networks: builds network (evidence: `README.md`)
- Signals and networks → Density filtering: connects modules (evidence: `README.md`)
- Signals and networks → FE assembly: connects modules (evidence: `README.md`)
- Signals and networks → Linear algebra: connects modules (evidence: `README.md`)
- Signals and networks → Sensitivity modules: backpropagates gradients (evidence: `README.md`)
- Density filtering → FE assembly: filters design field
- Voxel domain → FE assembly: defines FE domain (evidence: `pymoto/modules/assembly.py`)
- FE assembly → Element operations: provides FE operations (evidence: `pymoto/modules/assembly.py`)
- Linear algebra → Solver selection: uses solver interface (evidence: `pymoto/modules/linalg.py`)
- Solver selection → Dense solvers: selects solver (evidence: `pymoto/solvers/auto_determine.py`)
- Solver selection → Sparse solvers: selects solver (evidence: `pymoto/solvers/auto_determine.py`)
- Solver selection → Iterative solvers: selects solver (evidence: `pymoto/solvers/iterative.py`)
- Signals and networks → Transient solve: connects modules (evidence: `README.md`)
- Signals and networks → Response aggregation: connects modules (evidence: `README.md`)
- Optimization routines → Signals and networks: optimizes network (evidence: `pymoto/routines.py`)
- Optimization routines → OC and SLP: calls OC or SLP (evidence: `pymoto/routines.py`)
- Optimization routines → MMA and GCMMA: calls MMA (evidence: `pymoto/routines.py`)
- OC and SLP → Signals and networks: evaluates network (evidence: `pymoto/common/optimizers.py`)
- MMA and GCMMA → OC and SLP: extends optimizer (evidence: `pymoto/common/mma.py`)
- Signals and networks → Visualization and output: connects output modules (evidence: `README.md`)
