# idaholab/raven architecture

> Architecture diagram of the GitHub repository idaholab/raven, 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/idaholab/raven
- Repository: https://github.com/idaholab/raven

## Overview

RAVEN is a framework for uncertainty, reliability, and risk analysis of complex system codes. A typical workflow defines inputs, samples model parameters, runs internal or external models, stores realizations, then applies learning, post-processing, and visualization; users can also optimize models or search for limit surfaces. The graph includes those documented capabilities and the central data, input, and utility layers. Relationships are limited to README statements and visible source-index references; dashed links indicate documented workflow structure whose exact runtime wiring was not shown.

Main entry points: [`ravenframework/Samplers`](https://github.com/idaholab/raven/tree/devel/ravenframework/Samplers) (Sampling methods), [`ravenframework/DataObjects/DataObject.py`](https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataObject.py) (Data objects), [`ravenframework/DataObjects/DataSet.py`](https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataSet.py) (Data sets), [`ravenframework/utils/InputData.py`](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/InputData.py) (Input specification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Analysis workflow"]
  node_sampling["Sampling methods"]
  node_limit_search["Limit-surface search"]
  node_distributions["Distributions<br/>[Distributions.py]"]
end

subgraph group_modeling["Models and learning"]
  node_external_models["External code interfaces"]
  node_surrogates["Surrogate learning"]
  node_keras["Keras models<br/>[KerasBase.py]"]
  node_optimization["Optimization"]
  node_genetic["Genetic algorithm"]
  node_amsc["AMSC complex<br/>[AMSC_Object.py]"]
end

subgraph group_analysis["Analysis and outputs"]
  node_postprocess["Post-processing"]
  node_averager["Realization averaging"]
  node_physics_validation["Physics validation"]
  node_tsa["Time-series analysis<br/>[ARMA.py]"]
  node_plotting["Plot interfaces<br/>[PlotInterface.py]"]
  node_coverage_plot["Coverage-map plot"]
end

subgraph group_data["Data and persistence"]
  node_data_objects["Data objects<br/>[DataObject.py]"]
  node_datasets["Data sets<br/>[DataSet.py]"]
  node_database[("Database<br/>[Database.py]")]
end

subgraph group_core["Framework core"]
  node_inputs["Input specification<br/>[InputData.py]"]
  node_input_types["Input types<br/>[InputTypes.py]"]
  node_base["Base entities<br/>[BaseEntity.py]"]
  node_utils["Shared utilities<br/>[utils.py]"]
  node_xml["XML utilities<br/>[xmlUtils.py]"]
  node_random["Random utilities<br/>[randomUtils.py]"]
  node_math["Math utilities<br/>[mathUtils.py]"]
  node_front["Front ranking<br/>[frontUtils.py]"]
  node_cached["Cached arrays<br/>[cached_ndarray.py]"]
  node_importer["Dynamic imports<br/>[importerUtils.py]"]
  node_plugins["Plugin manager<br/>[PluginManager.py]"]
end

node_user(("Analyst"))

node_user -.->|"defines analysis"| node_inputs
node_inputs -->|"uses types"| node_input_types
node_inputs -.->|"configures sampling"| node_sampling
node_sampling -.->|"evaluates models"| node_external_models
node_sampling -->|"uses distributions"| node_distributions
node_sampling -.->|"builds surrogates"| node_surrogates
node_limit_search -->|"uses complex"| node_amsc
node_limit_search -->|"uses distributions"| node_distributions
node_user -.->|"requests optimization"| node_optimization
node_optimization -.->|"offers genetic search"| node_genetic
node_surrogates -->|"includes model"| node_keras
node_sampling -.->|"produces realizations"| node_data_objects
node_data_objects -->|"specializes as"| node_datasets
node_datasets -->|"uses arrays"| node_cached
node_datasets -->|"uses math utilities"| node_math
node_datasets -->|"uses specifications"| node_inputs
node_datasets -->|"uses input types"| node_input_types
node_data_objects -.->|"persists data"| node_database
node_data_objects -.->|"feeds analysis"| node_postprocess
node_postprocess -.->|"includes averaging"| node_averager
node_postprocess -.->|"includes validation"| node_physics_validation
node_data_objects -->|"provides plot data"| node_coverage_plot
node_coverage_plot -->|"extends interface"| node_plotting
node_postprocess -.->|"supports time-series analysis"| node_tsa
node_inputs -->|"parses XML"| node_xml
node_xml -->|"uses utilities"| node_utils
node_utils -->|"uses math utilities"| node_math
node_optimization -->|"ranks candidates"| node_front
node_limit_search -->|"uses random utilities"| node_random
node_plugins -->|"loads catalogue"| node_xml
node_plugins -.->|"registers entities"| node_base
node_user -.->|"views results"| node_plotting

click node_inputs "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/InputData.py"
click node_input_types "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/InputTypes.py"
click node_base "https://github.com/idaholab/raven/blob/devel/ravenframework/BaseClasses/BaseEntity.py"
click node_sampling "https://github.com/idaholab/raven/tree/devel/ravenframework/Samplers"
click node_limit_search "https://github.com/idaholab/raven/blob/devel/ravenframework/Samplers/LimitSurfaceSearch.py"
click node_distributions "https://github.com/idaholab/raven/blob/devel/ravenframework/Distributions.py"
click node_external_models "https://github.com/idaholab/raven/tree/devel/ravenframework/CodeInterfaceClasses"
click node_surrogates "https://github.com/idaholab/raven/blob/devel/ravenframework/SupervisedLearning/SupervisedLearning.py"
click node_keras "https://github.com/idaholab/raven/blob/devel/ravenframework/SupervisedLearning/KerasBase.py"
click node_optimization "https://github.com/idaholab/raven/tree/devel/ravenframework/Optimizers"
click node_genetic "https://github.com/idaholab/raven/blob/devel/ravenframework/Optimizers/GeneticAlgorithm.py"
click node_postprocess "https://github.com/idaholab/raven/tree/devel/ravenframework/Models/PostProcessors"
click node_averager "https://github.com/idaholab/raven/blob/devel/ravenframework/Models/PostProcessors/RealizationAverager.py"
click node_physics_validation "https://github.com/idaholab/raven/blob/devel/ravenframework/Models/PostProcessors/Validations/PhysicsGuidedCoverageMapping.py"
click node_tsa "https://github.com/idaholab/raven/blob/devel/ravenframework/TSA/ARMA.py"
click node_plotting "https://github.com/idaholab/raven/blob/devel/ravenframework/OutStreams/PlotInterfaces/PlotInterface.py"
click node_coverage_plot "https://github.com/idaholab/raven/blob/devel/ravenframework/OutStreams/PlotInterfaces/SamplingCoverageMapPlot.py"
click node_data_objects "https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataObject.py"
click node_datasets "https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataSet.py"
click node_database "https://github.com/idaholab/raven/blob/devel/ravenframework/Databases/Database.py"
click node_amsc "https://github.com/idaholab/raven/blob/devel/src/AMSC/AMSC_Object.py"
click node_utils "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/utils.py"
click node_xml "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/xmlUtils.py"
click node_random "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/randomUtils.py"
click node_math "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/mathUtils.py"
click node_front "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/frontUtils.py"
click node_cached "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/cached_ndarray.py"
click node_importer "https://github.com/idaholab/raven/blob/devel/ravenframework/utils/importerUtils.py"
click node_plugins "https://github.com/idaholab/raven/blob/devel/ravenframework/PluginManager.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_sampling,node_limit_search,node_distributions toneBlue
class node_external_models,node_surrogates,node_keras,node_optimization,node_genetic,node_amsc toneAmber
class node_postprocess,node_averager,node_physics_validation,node_tsa,node_plotting,node_coverage_plot toneMint
class node_data_objects,node_datasets,node_database toneRose
class node_inputs,node_input_types,node_base,node_utils,node_xml,node_random,node_math,node_front,node_cached,node_importer,node_plugins,node_user toneIndigo
```

## Components

### Analysis workflow

- [Sampling methods](https://github.com/idaholab/raven/tree/devel/ravenframework/Samplers): `ravenframework/Samplers`
- [Limit-surface search](https://github.com/idaholab/raven/blob/devel/ravenframework/Samplers/LimitSurfaceSearch.py): `ravenframework/Samplers/LimitSurfaceSearch.py`
- [Distributions](https://github.com/idaholab/raven/blob/devel/ravenframework/Distributions.py): `ravenframework/Distributions.py`

### Models and learning

- [External code interfaces](https://github.com/idaholab/raven/tree/devel/ravenframework/CodeInterfaceClasses): `ravenframework/CodeInterfaceClasses`
- [Surrogate learning](https://github.com/idaholab/raven/blob/devel/ravenframework/SupervisedLearning/SupervisedLearning.py): `ravenframework/SupervisedLearning/SupervisedLearning.py`
- [Keras models](https://github.com/idaholab/raven/blob/devel/ravenframework/SupervisedLearning/KerasBase.py): `ravenframework/SupervisedLearning/KerasBase.py`
- [Optimization](https://github.com/idaholab/raven/tree/devel/ravenframework/Optimizers): `ravenframework/Optimizers`
- [Genetic algorithm](https://github.com/idaholab/raven/blob/devel/ravenframework/Optimizers/GeneticAlgorithm.py): `ravenframework/Optimizers/GeneticAlgorithm.py`
- [AMSC complex](https://github.com/idaholab/raven/blob/devel/src/AMSC/AMSC_Object.py): `src/AMSC/AMSC_Object.py`

### Analysis and outputs

- [Post-processing](https://github.com/idaholab/raven/tree/devel/ravenframework/Models/PostProcessors): `ravenframework/Models/PostProcessors`
- [Realization averaging](https://github.com/idaholab/raven/blob/devel/ravenframework/Models/PostProcessors/RealizationAverager.py): `ravenframework/Models/PostProcessors/RealizationAverager.py`
- [Physics validation](https://github.com/idaholab/raven/blob/devel/ravenframework/Models/PostProcessors/Validations/PhysicsGuidedCoverageMapping.py): `ravenframework/Models/PostProcessors/Validations/PhysicsGuidedCoverageMapping.py`
- [Time-series analysis](https://github.com/idaholab/raven/blob/devel/ravenframework/TSA/ARMA.py): `ravenframework/TSA/ARMA.py`
- [Plot interfaces](https://github.com/idaholab/raven/blob/devel/ravenframework/OutStreams/PlotInterfaces/PlotInterface.py): `ravenframework/OutStreams/PlotInterfaces/PlotInterface.py`
- [Coverage-map plot](https://github.com/idaholab/raven/blob/devel/ravenframework/OutStreams/PlotInterfaces/SamplingCoverageMapPlot.py): `ravenframework/OutStreams/PlotInterfaces/SamplingCoverageMapPlot.py`

### Data and persistence

- [Data objects](https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataObject.py): `ravenframework/DataObjects/DataObject.py`
- [Data sets](https://github.com/idaholab/raven/blob/devel/ravenframework/DataObjects/DataSet.py): `ravenframework/DataObjects/DataSet.py`
- [Database](https://github.com/idaholab/raven/blob/devel/ravenframework/Databases/Database.py): `ravenframework/Databases/Database.py`

### Framework core

- [Input specification](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/InputData.py): `ravenframework/utils/InputData.py`
- [Input types](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/InputTypes.py): `ravenframework/utils/InputTypes.py`
- [Base entities](https://github.com/idaholab/raven/blob/devel/ravenframework/BaseClasses/BaseEntity.py): `ravenframework/BaseClasses/BaseEntity.py`
- [Shared utilities](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/utils.py): `ravenframework/utils/utils.py`
- [XML utilities](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/xmlUtils.py): `ravenframework/utils/xmlUtils.py`
- [Random utilities](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/randomUtils.py): `ravenframework/utils/randomUtils.py`
- [Math utilities](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/mathUtils.py): `ravenframework/utils/mathUtils.py`
- [Front ranking](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/frontUtils.py): `ravenframework/utils/frontUtils.py`
- [Cached arrays](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/cached_ndarray.py): `ravenframework/utils/cached_ndarray.py`
- [Dynamic imports](https://github.com/idaholab/raven/blob/devel/ravenframework/utils/importerUtils.py): `ravenframework/utils/importerUtils.py`
- [Plugin manager](https://github.com/idaholab/raven/blob/devel/ravenframework/PluginManager.py): `ravenframework/PluginManager.py`

### Other components

- **Analyst**

## Connections

- Analyst → Input specification: defines analysis (evidence: `README.md`)
- Input specification → Input types: uses types (evidence: `ravenframework/utils/InputData.py`)
- Input specification → Sampling methods: configures sampling (evidence: `README.md`)
- Sampling methods → External code interfaces: evaluates models (evidence: `README.md`)
- Sampling methods → Distributions: uses distributions (evidence: `ravenframework/Samplers/LimitSurfaceSearch.py`)
- Sampling methods → Surrogate learning: builds surrogates (evidence: `README.md`)
- Limit-surface search → AMSC complex: uses complex (evidence: `ravenframework/Samplers/LimitSurfaceSearch.py`)
- Limit-surface search → Distributions: uses distributions (evidence: `ravenframework/Samplers/LimitSurfaceSearch.py`)
- Analyst → Optimization: requests optimization (evidence: `README.md`)
- Optimization → Genetic algorithm: offers genetic search (evidence: `README.md`)
- Surrogate learning → Keras models: includes model (evidence: `ravenframework/SupervisedLearning/KerasBase.py`)
- Sampling methods → Data objects: produces realizations (evidence: `README.md`)
- Data objects → Data sets: specializes as (evidence: `ravenframework/DataObjects/DataSet.py`)
- Data sets → Cached arrays: uses arrays (evidence: `ravenframework/DataObjects/DataSet.py`)
- Data sets → Math utilities: uses math utilities (evidence: `ravenframework/DataObjects/DataSet.py`)
- Data sets → Input specification: uses specifications (evidence: `ravenframework/DataObjects/DataSet.py`)
- Data sets → Input types: uses input types (evidence: `ravenframework/DataObjects/DataSet.py`)
- Data objects → Database: persists data (evidence: `README.md`)
- Data objects → Post-processing: feeds analysis (evidence: `README.md`)
- Post-processing → Realization averaging: includes averaging (evidence: `README.md`)
- Post-processing → Physics validation: includes validation (evidence: `README.md`)
- Data objects → Coverage-map plot: provides plot data (evidence: `ravenframework/OutStreams/PlotInterfaces/SamplingCoverageMapPlot.py`)
- Coverage-map plot → Plot interfaces: extends interface (evidence: `ravenframework/OutStreams/PlotInterfaces/SamplingCoverageMapPlot.py`)
- Post-processing → Time-series analysis: supports time-series analysis (evidence: `README.md`)
- Input specification → XML utilities: parses XML (evidence: `ravenframework/utils/InputData.py`)
- XML utilities → Shared utilities: uses utilities (evidence: `ravenframework/utils/xmlUtils.py`)
- Shared utilities → Math utilities: uses math utilities (evidence: `ravenframework/utils/utils.py`)
- Optimization → Front ranking: ranks candidates (evidence: `ravenframework/Optimizers/rankingHandlers/rankingHandlers.py`)
- Limit-surface search → Random utilities: uses random utilities (evidence: `ravenframework/Samplers/LimitSurfaceSearch.py`)
- Plugin manager → XML utilities: loads catalogue (evidence: `ravenframework/PluginManager.py`)
- Plugin manager → Base entities: registers entities
- Analyst → Plot interfaces: views results (evidence: `README.md`)
