Skip to main content

preCICE Case Generate

preCICE case-generate is a Python-based utility designed to simplify the generation of preCICE application cases. Such cases consist of the central precice-config.xml file which defines all sorts of connections and relations between involved solvers, as well as adapter-config.json files for each solver.

These files involve a lot of complex elements and modifiers, which are often times not needed. This tool introduces a simpler, easier to read and write topology.yaml file, which covers a wide range of features of the precice-config.xml file, yet with only a fraction of the complexity. An overview over the topology.yaml file can be found in precicecasegenerate/schemas/README.md.

Key Features

  • Automated preCICE configuration generation
  • YAML-based input parsing
  • Flexible topology description support
  • Comprehensive error logging and handling
  • Simple command-line interface

Getting Started

Prerequisites

Required dependencies are:

  • Python ≥ 3.10
  • pip
  • git for cloning the repository :)
  • preCICE Config Graph (will be installed during the setup)
  • ruamel.yaml
  • preciceadapterschema

Optional dependencies are:

Manual Installation

  1. Clone the repository
git clone https://github.com/precice/case-generate.git
cd case-generate
  1. Create a virtual environment
# On Unix/macOS
python -m venv venv
source venv/bin/activate

# On Windows
python -m venv venv
.\venv\Scripts\activate
  1. Install the project
# Upgrade pip and install build tools
python -m pip install --upgrade pip
pip install build

# Install the project in editable mode
pip install -e .

Optional dependencies for testing can be installed via

pip install -e ".[dev]"

Using Setup Scripts

Unix/macOS

./setup_scripts/install_dependencies.sh

Windows

.\setup_scripts\install_dependencies.ps1

Verifying Installation

  • Test the CLI tool
precice-case-generate --help

Usage

Command-Line Interface

Generate a preCICE configuration file from a YAML topology called topology.yaml:

precice-case-generate path/to/topology.yaml

The only required argument is the path/to/topology.yaml.

The precice-case-generate tool supports the following optional parameters:

  • -o, --output-path: Destination path for the generated folder.

    • Default: ./_generated/
    • Description: Choose a specific output location for the _generated/ directory.
  • -v, --verbose: Enable verbose console logging.

    • Default: Disabled
    • Description: Provides detailed logging information during execution.

Examples

Valid topology.yaml <-> application case pairs can be found in the examples/ directory. They include the preCICE tutorials 1–4 as well as some more complex simulations.

Configuration

  1. Prepare a YAML topology file describing your multi-physics simulation setup.
  2. Use the command-line interface to generate the preCICE configuration.
  3. preCICE Case Generate will create the necessary configuration files in the _generated/ directory.

Creating Topologies with MetaConfigurator

You can create a topology for your preCICE simulation using the online MetaConfigurator. We provide a preloaded schema to help you get started:

  1. Open the MetaConfigurator with the preloaded schema: MetaConfigurator Link

  2. Use the interactive interface to define your topology:

    • The preloaded schema provides a structured way to describe your simulation components
  3. Once complete, export your topology as a YAML file

    • Save the generated YAML file
    • Use precice-case-generate to create your preCICE application case and configuration files
    • Validate the generated preCICE config with config-checker

Documentation

The template for our topology.yaml file can be found in the schemas folder.

Alongside it, you will find README.md, which explains the topology's parameters.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

Troubleshooting

  • Ensure all dependencies are correctly installed
  • Verify the format of your input YAML file
  • Check the generated logs (./.logs) for detailed process information

If all else fails, open a pull request describing the issue you are encountering.

Metadata

Release files for precice-case-generate 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for precice-case-generate 2.2.0
File Size Uploaded Provenance Actions
precice_case_generate-2.2.0.tar.gz 33.7 kB With provenance Details for precice_case_generate-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for precice-case-generate 2.2.0
File Interpreter ABI Platform Actions
precice_case_generate-2.2.0-py3-none-any.whl Python 3 none any Details for precice_case_generate-2.2.0-py3-none-any.whl

Total release size: 72.9 kB

Release files / precice_case_generate-2.2.0.tar.gz

Download URL precice_case_generate-2.2.0.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aa073856a812d0924e0ecf614e344ea15dd3b026dbc7b34d688c4b6ff796b915
BLAKE2b-256 checksum
How to use checksums
13897b0c189ced234de2d4b50539b02f9fb377832d6308bfacf4637e29f636e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / precice_case_generate-2.2.0-py3-none-any.whl

Download URL precice_case_generate-2.2.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f153b6ad75d37ca75bc4494430c7541bc744b11cb982d66cf541ef3fc0d0678
BLAKE2b-256 checksum
How to use checksums
e2ef6c514a635ecc0d38206f2e325267f4e7e2f6702cdd91436d4f520bf9fcdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for precice-case-generate 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for precice_case_generate-2.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page