# smdogroup/tacs architecture

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

- Interactive diagram: https://gitdiagram.com/smdogroup/tacs
- Repository: https://github.com/smdogroup/tacs

## Overview

TACS is a parallel finite-element analysis and gradient-based structural-design toolkit. A typical Python workflow defines or loads a mesh and element properties, initializes the FE assembler, creates analysis problems, solves them, and evaluates functions and sensitivities. The repository also provides CAPS and MPhys integration, structural constraints, multiple analysis types, and FH5 output/conversion. Edges are limited to relationships shown by README statements or SOURCE INDEX references; several runtime connections are therefore omitted rather than inferred from the directory layout.

Main entry points: [`src/TACSAssembler.cpp`](https://github.com/smdogroup/tacs/blob/master/src/TACSAssembler.cpp) (FE assembler), [`tacs/pytacs.py`](https://github.com/smdogroup/tacs/blob/master/tacs/pytacs.py) (Python setup), [`tacs/problems/base.py`](https://github.com/smdogroup/tacs/blob/master/tacs/problems/base.py) (Problem base), [`tacs/problems/static.py`](https://github.com/smdogroup/tacs/blob/master/tacs/problems/static.py) (Static analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Model and mesh setup"]
  node_pytacs["Python setup<br/>[pytacs.py]"]
  node_mesh["Mesh loading<br/>[pymeshloader.py]"]
end

subgraph group_physics["FE physics"]
  node_assembler["FE assembler<br/>[TACSAssembler.cpp]"]
  node_elements["FE elements<br/>[TACSElement.h]"]
  node_shells["Shell models"]
  node_materials["Materials"]
  node_panel_analysis["Panel analysis"]
end

subgraph group_analysis["Analysis and optimization"]
  node_linear_solver["Linear algebra<br/>[BCSRMatImpl.h]"]
  node_integrator["Time integration<br/>[TACSIntegrator.cpp]"]
  node_problem_base["Problem base<br/>[base.py]"]
  node_static_problem["Static analysis<br/>[static.py]"]
  node_transient_problem["Transient analysis<br/>[transient.py]"]
  node_buckling_problem["Buckling analysis<br/>[buckling.py]"]
  node_functions["Analysis functions<br/>[TACSFunction.h]"]
  node_constraints["Design constraints<br/>[base.py]"]
  node_continuation["Continuation solver<br/>[continuation.py]"]
end

subgraph group_integration["Workflow integrations"]
  node_caps_model["CAPS model<br/>[tacs_model.py]"]
  node_caps_aim["TACS AIM<br/>[tacs_aim.py]"]
  node_mphys["MPhys coupling<br/>[builder.py]"]
end

subgraph group_output["Results and I/O"]
  node_fh5["FH5 output<br/>[TACSToFH5.cpp]"]
  node_fh5_loader["FH5 loading<br/>[TACSFH5Loader.h]"]
  node_tec_converter["Tecplot converter<br/>[f5totec.cpp]"]
  node_vtk_converter["VTK converter<br/>[f5tovtk.cpp]"]
end

node_user(("Analyst"))

node_user -->|"sets up"| node_pytacs
node_user -->|"defines model"| node_caps_model
node_caps_model -->|"registers with"| node_caps_aim
node_caps_model -->|"uses"| node_pytacs
node_pytacs -->|"uses loader"| node_mesh
node_mesh -.->|"provides mesh"| node_assembler
node_assembler -->|"assembles"| node_elements
node_shells -->|"uses"| node_materials
node_pytacs -.->|"creates problems"| node_problem_base
node_static_problem -->|"extends"| node_problem_base
node_transient_problem -->|"extends"| node_problem_base
node_problem_base -.->|"uses"| node_assembler
node_integrator -->|"integrates"| node_assembler
node_integrator -->|"uses"| node_linear_solver
node_static_problem -.->|"evaluates"| node_functions
node_problem_base -.->|"supports"| node_constraints
node_static_problem -.->|"can solve with"| node_continuation
node_buckling_problem -.->|"analyzes"| node_assembler
node_mphys -->|"initializes"| node_pytacs
node_mphys -->|"builds mesh group"| node_mesh
node_mphys -.->|"couples analysis"| node_assembler
node_assembler -.->|"writes results"| node_fh5
node_tec_converter -->|"loads FH5"| node_fh5_loader
node_vtk_converter -->|"loads FH5"| node_fh5_loader

click node_caps_model "https://github.com/smdogroup/tacs/blob/master/tacs/caps2tacs/tacs_model.py"
click node_caps_aim "https://github.com/smdogroup/tacs/blob/master/tacs/caps2tacs/tacs_aim.py"
click node_pytacs "https://github.com/smdogroup/tacs/blob/master/tacs/pytacs.py"
click node_mesh "https://github.com/smdogroup/tacs/blob/master/tacs/pymeshloader.py"
click node_assembler "https://github.com/smdogroup/tacs/blob/master/src/TACSAssembler.cpp"
click node_elements "https://github.com/smdogroup/tacs/blob/master/src/elements/TACSElement.h"
click node_shells "https://github.com/smdogroup/tacs/blob/master/src/elements/shell/TACSShellElementModel.h"
click node_materials "https://github.com/smdogroup/tacs/blob/master/src/constitutive/TACSMaterialProperties.h"
click node_panel_analysis "https://github.com/smdogroup/tacs/blob/master/src/constitutive/TACSPanelAnalysis.cpp"
click node_linear_solver "https://github.com/smdogroup/tacs/blob/master/src/bpmat/BCSRMatImpl.h"
click node_integrator "https://github.com/smdogroup/tacs/blob/master/src/TACSIntegrator.cpp"
click node_problem_base "https://github.com/smdogroup/tacs/blob/master/tacs/problems/base.py"
click node_static_problem "https://github.com/smdogroup/tacs/blob/master/tacs/problems/static.py"
click node_transient_problem "https://github.com/smdogroup/tacs/blob/master/tacs/problems/transient.py"
click node_buckling_problem "https://github.com/smdogroup/tacs/blob/master/tacs/problems/buckling.py"
click node_functions "https://github.com/smdogroup/tacs/blob/master/src/functions/TACSFunction.h"
click node_constraints "https://github.com/smdogroup/tacs/blob/master/tacs/constraints/base.py"
click node_continuation "https://github.com/smdogroup/tacs/blob/master/tacs/solvers/continuation.py"
click node_mphys "https://github.com/smdogroup/tacs/blob/master/tacs/mphys/builder.py"
click node_fh5 "https://github.com/smdogroup/tacs/blob/master/src/io/TACSToFH5.cpp"
click node_fh5_loader "https://github.com/smdogroup/tacs/blob/master/src/io/TACSFH5Loader.h"
click node_tec_converter "https://github.com/smdogroup/tacs/blob/master/extern/f5totec/f5totec.cpp"
click node_vtk_converter "https://github.com/smdogroup/tacs/blob/master/extern/f5tovtk/f5tovtk.cpp"

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_pytacs,node_mesh toneBlue
class node_assembler,node_elements,node_shells,node_materials,node_panel_analysis toneAmber
class node_linear_solver,node_integrator,node_problem_base,node_static_problem,node_transient_problem,node_buckling_problem,node_functions,node_constraints,node_continuation toneMint
class node_caps_model,node_caps_aim,node_mphys toneRose
class node_fh5,node_fh5_loader,node_tec_converter,node_vtk_converter,node_user toneIndigo
```

## Components

### Model and mesh setup

- [Python setup](https://github.com/smdogroup/tacs/blob/master/tacs/pytacs.py): `tacs/pytacs.py`
- [Mesh loading](https://github.com/smdogroup/tacs/blob/master/tacs/pymeshloader.py): `tacs/pymeshloader.py`

### FE physics

- [FE assembler](https://github.com/smdogroup/tacs/blob/master/src/TACSAssembler.cpp): `src/TACSAssembler.cpp`
- [FE elements](https://github.com/smdogroup/tacs/blob/master/src/elements/TACSElement.h): `src/elements/TACSElement.h`
- [Shell models](https://github.com/smdogroup/tacs/blob/master/src/elements/shell/TACSShellElementModel.h): `src/elements/shell/TACSShellElementModel.h`
- [Materials](https://github.com/smdogroup/tacs/blob/master/src/constitutive/TACSMaterialProperties.h): `src/constitutive/TACSMaterialProperties.h`
- [Panel analysis](https://github.com/smdogroup/tacs/blob/master/src/constitutive/TACSPanelAnalysis.cpp): `src/constitutive/TACSPanelAnalysis.cpp`

### Analysis and optimization

- [Linear algebra](https://github.com/smdogroup/tacs/blob/master/src/bpmat/BCSRMatImpl.h): `src/bpmat/BCSRMatImpl.h`
- [Time integration](https://github.com/smdogroup/tacs/blob/master/src/TACSIntegrator.cpp): `src/TACSIntegrator.cpp`
- [Problem base](https://github.com/smdogroup/tacs/blob/master/tacs/problems/base.py): `tacs/problems/base.py`
- [Static analysis](https://github.com/smdogroup/tacs/blob/master/tacs/problems/static.py): `tacs/problems/static.py`
- [Transient analysis](https://github.com/smdogroup/tacs/blob/master/tacs/problems/transient.py): `tacs/problems/transient.py`
- [Buckling analysis](https://github.com/smdogroup/tacs/blob/master/tacs/problems/buckling.py): `tacs/problems/buckling.py`
- [Analysis functions](https://github.com/smdogroup/tacs/blob/master/src/functions/TACSFunction.h): `src/functions/TACSFunction.h`
- [Design constraints](https://github.com/smdogroup/tacs/blob/master/tacs/constraints/base.py): `tacs/constraints/base.py`
- [Continuation solver](https://github.com/smdogroup/tacs/blob/master/tacs/solvers/continuation.py): `tacs/solvers/continuation.py`

### Workflow integrations

- [CAPS model](https://github.com/smdogroup/tacs/blob/master/tacs/caps2tacs/tacs_model.py): `tacs/caps2tacs/tacs_model.py`
- [TACS AIM](https://github.com/smdogroup/tacs/blob/master/tacs/caps2tacs/tacs_aim.py): `tacs/caps2tacs/tacs_aim.py`
- [MPhys coupling](https://github.com/smdogroup/tacs/blob/master/tacs/mphys/builder.py): `tacs/mphys/builder.py`

### Results and I/O

- [FH5 output](https://github.com/smdogroup/tacs/blob/master/src/io/TACSToFH5.cpp): `src/io/TACSToFH5.cpp`
- [FH5 loading](https://github.com/smdogroup/tacs/blob/master/src/io/TACSFH5Loader.h): `src/io/TACSFH5Loader.h`
- [Tecplot converter](https://github.com/smdogroup/tacs/blob/master/extern/f5totec/f5totec.cpp): `extern/f5totec/f5totec.cpp`
- [VTK converter](https://github.com/smdogroup/tacs/blob/master/extern/f5tovtk/f5tovtk.cpp): `extern/f5tovtk/f5tovtk.cpp`

### Other components

- **Analyst**

## Connections

- Analyst → Python setup: sets up
- Analyst → CAPS model: defines model
- CAPS model → TACS AIM: registers with (evidence: `tacs/caps2tacs/tacs_model.py`)
- CAPS model → Python setup: uses (evidence: `tacs/caps2tacs/tacs_model.py`)
- Python setup → Mesh loading: uses loader (evidence: `tacs/pytacs.py`)
- Mesh loading → FE assembler: provides mesh
- FE assembler → FE elements: assembles
- Shell models → Materials: uses (evidence: `src/elements/shell/TACSShellElementModel.h`)
- Python setup → Problem base: creates problems
- Static analysis → Problem base: extends (evidence: `tacs/problems/static.py`)
- Transient analysis → Problem base: extends (evidence: `tacs/problems/transient.py`)
- Problem base → FE assembler: uses
- Time integration → FE assembler: integrates
- Time integration → Linear algebra: uses
- Static analysis → Analysis functions: evaluates
- Problem base → Design constraints: supports
- Static analysis → Continuation solver: can solve with
- Buckling analysis → FE assembler: analyzes
- MPhys coupling → Python setup: initializes (evidence: `tacs/mphys/builder.py`)
- MPhys coupling → Mesh loading: builds mesh group (evidence: `tacs/mphys/builder.py`)
- MPhys coupling → FE assembler: couples analysis
- FE assembler → FH5 output: writes results
- Tecplot converter → FH5 loading: loads FH5 (evidence: `extern/f5totec/f5totec.cpp`)
- VTK converter → FH5 loading: loads FH5 (evidence: `extern/f5tovtk/f5tovtk.cpp`)
