# alexandredabyseesaram/neurom architecture

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

- Interactive diagram: https://gitdiagram.com/alexandredabyseesaram/neurom
- Repository: https://github.com/alexandredabyseesaram/neurom

## Overview

NeuROM is a refactoring-stage HiDeNN/FENNI finite-element neural-network library for interpretable parametric reduced-order modeling. Its documented workflow represents a field on a mesh, interpolates it using finite-element shape functions, and uses variational physics to train the model; constrained nodal values support Dirichlet conditions, while trainable geometry enables mesh adaptation. The graph includes the sampled mesh, field, mapping, quadrature-context and variational-term layers. Several central modules are named in the tree but were not sampled, so their internal wiring is left unspecified.

Main entry points: [`src/neurom/interpolation/quadrature_context.py`](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/interpolation/quadrature_context.py) (Quadrature context), [`src/neurom/meshes/mesh.py`](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/meshes/mesh.py) (Mesh), [`src/neurom/physics/term.py`](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/term.py) (Variational terms), [`src/neurom/fields/trainable_field.py`](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fields/trainable_field.py) (Trainable field)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Fields and constraints"]
  node_fem_model["FEM model<br/>[fem_model.py]"]
  node_field["Field<br/>[field.py]"]
  node_trainable_field["Trainable field<br/>[trainable_field.py]"]
  node_constraints["Constraints<br/>[constraint.py]"]
  node_dirichlet["Dirichlet BC<br/>[dirichlet.py]"]
end

subgraph group_geometry["Mesh and geometry"]
  node_mesh["Mesh<br/>[mesh.py]"]
  node_topology["Topology<br/>[topology.py]"]
  node_mapping["Isoparametric mapping"]
  node_shape_functions["Shape functions<br/>[shape_function.py]"]
  node_reference_element["Reference element"]
end

subgraph group_evaluation["Interpolation and quadrature"]
  node_field_layout["Field layout<br/>[field_layout.py]"]
  node_quadrature_context["Quadrature context"]
  node_quadrature_rule["Quadrature rule<br/>[quadrature_rule.py]"]
  node_assembly["Quadrature assembly"]
end

subgraph group_physics["Variational physics"]
  node_physics_loss["Physics loss<br/>[physics_loss.py]"]
  node_term["Variational terms<br/>[term.py]"]
  node_elastic_energy["Elastic energy<br/>[elastic_energy.py]"]
  node_load_potential["Load potential<br/>[load_potential.py]"]
  node_differential["Field derivatives<br/>[differential.py]"]
  node_integrate["Integration<br/>[integrate.py]"]
end

node_user(("Model user"))

node_user -->|"configures"| node_fem_model
node_trainable_field -->|"applies"| node_constraints
node_dirichlet -->|"implements"| node_constraints
node_trainable_field -->|"indexes with"| node_topology
node_mesh -->|"uses"| node_topology
node_mesh -->|"positions from"| node_field
node_mapping -->|"evaluates"| node_shape_functions
node_quadrature_context -->|"uses"| node_quadrature_rule
node_quadrature_context -->|"reads"| node_mesh
node_quadrature_context -->|"maps positions"| node_mapping
node_quadrature_rule -->|"references"| node_reference_element
node_term -->|"reads"| node_field_layout
node_elastic_energy -->|"specializes"| node_term
node_load_potential -->|"specializes"| node_term

click node_fem_model "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fem_model.py"
click node_field "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fields/field.py"
click node_trainable_field "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fields/trainable_field.py"
click node_constraints "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/constraints/constraint.py"
click node_dirichlet "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/constraints/dirichlet.py"
click node_mesh "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/meshes/mesh.py"
click node_topology "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/meshes/topology.py"
click node_mapping "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/geometry/iso_parametric_mapping_1d.py"
click node_shape_functions "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/shape_functions/shape_function.py"
click node_reference_element "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/reference_elements/reference_element.py"
click node_field_layout "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/field_layout.py"
click node_quadrature_context "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/interpolation/quadrature_context.py"
click node_quadrature_rule "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/quadratures/quadrature_rule.py"
click node_assembly "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/interpolation/quadrature_assembly.py"
click node_physics_loss "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics_loss.py"
click node_term "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/term.py"
click node_elastic_energy "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/elastic_energy.py"
click node_load_potential "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/load_potential.py"
click node_differential "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/differential.py"
click node_integrate "https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/integrate.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_fem_model,node_field,node_trainable_field,node_constraints,node_dirichlet,node_user toneBlue
class node_mesh,node_topology,node_mapping,node_shape_functions,node_reference_element toneAmber
class node_field_layout,node_quadrature_context,node_quadrature_rule,node_assembly toneMint
class node_physics_loss,node_term,node_elastic_energy,node_load_potential,node_differential,node_integrate toneRose
```

## Components

### Fields and constraints

- [FEM model](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fem_model.py): `src/neurom/fem_model.py`
- [Field](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fields/field.py): `src/neurom/fields/field.py`
- [Trainable field](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/fields/trainable_field.py): `src/neurom/fields/trainable_field.py`
- [Constraints](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/constraints/constraint.py): `src/neurom/constraints/constraint.py`
- [Dirichlet BC](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/constraints/dirichlet.py): `src/neurom/constraints/dirichlet.py`

### Mesh and geometry

- [Mesh](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/meshes/mesh.py): `src/neurom/meshes/mesh.py`
- [Topology](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/meshes/topology.py): `src/neurom/meshes/topology.py`
- [Isoparametric mapping](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/geometry/iso_parametric_mapping_1d.py): `src/neurom/geometry/iso_parametric_mapping_1d.py`
- [Shape functions](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/shape_functions/shape_function.py): `src/neurom/shape_functions/shape_function.py`
- [Reference element](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/reference_elements/reference_element.py): `src/neurom/reference_elements/reference_element.py`

### Interpolation and quadrature

- [Field layout](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/field_layout.py): `src/neurom/field_layout.py`
- [Quadrature context](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/interpolation/quadrature_context.py): `src/neurom/interpolation/quadrature_context.py`
- [Quadrature rule](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/quadratures/quadrature_rule.py): `src/neurom/quadratures/quadrature_rule.py`
- [Quadrature assembly](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/interpolation/quadrature_assembly.py): `src/neurom/interpolation/quadrature_assembly.py`

### Variational physics

- [Physics loss](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics_loss.py): `src/neurom/physics_loss.py`
- [Variational terms](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/term.py): `src/neurom/physics/term.py`
- [Elastic energy](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/elastic_energy.py): `src/neurom/physics/elastic_energy.py`
- [Load potential](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/physics/load_potential.py): `src/neurom/physics/load_potential.py`
- [Field derivatives](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/differential.py): `src/neurom/differential.py`
- [Integration](https://github.com/alexandredabyseesaram/neurom/blob/master/src/neurom/integrate.py): `src/neurom/integrate.py`

### Other components

- **Model user**

## Connections

- Model user → FEM model: configures
- Trainable field → Constraints: applies
- Dirichlet BC → Constraints: implements
- Trainable field → Topology: indexes with
- Mesh → Topology: uses
- Mesh → Field: positions from
- Isoparametric mapping → Shape functions: evaluates
- Quadrature context → Quadrature rule: uses
- Quadrature context → Mesh: reads
- Quadrature context → Isoparametric mapping: maps positions
- Quadrature rule → Reference element: references
- Variational terms → Field layout: reads
- Elastic energy → Variational terms: specializes
- Load potential → Variational terms: specializes
