fast_ctd

This is a Python package for fast conversion of STEP files to DAGMC models.

https://github.com/fusion-power-plant-framework/fast_ctd

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

This is a Python package for fast conversion of STEP files to DAGMC models.

Basic Info
  • Host: GitHub
  • Owner: Fusion-Power-Plant-Framework
  • License: gpl-2.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 11.9 MB
Statistics
  • Stars: 6
  • Watchers: 3
  • Forks: 1
  • Open Issues: 3
  • Releases: 2
Created 11 months ago · Last pushed 9 months ago
Metadata Files
Readme License Citation Codeowners

README.md

fast_ctd - Fast CAD to DAGMC

This is a Python package for the fast conversion of STEP files to DAGMC models (.h5m files).

This package wraps certain C++ modules from the following projects that enable this conversion:

And exposes a Python interface to them using nanobind.

Quick start

This project requires the following packages pre-installed:

  • cmake
  • OpenCASCADE 7.8.0 or later
  • MOAB 5.0.0 or later

The recommended way to install these dependencies is to use conda and can be installed with the following (openmc bundles MOAB):

bash conda install -c conda-forge 'openmc>=0.15.0=dagmc_*' 'occt>=7.8.0=all_*' cmake

Use pip to remotely install the package:

bash pip install fast_ctd@git+https://github.com/Fusion-Power-Plant-Framework/fast_ctd@main

or clone the repository and install it locally:

bash git clone https://github.com/Fusion-Power-Plant-Framework/fast_ctd.git cd fast_ctd pip install .

Development installation

Development of this package is done in a conda environment.

To create the environment, run:

bash conda env create -f conda/environment.yml

This will create a conda environment called fast_ctd. It locally installs the package in editable mode (meson is used to compile the C++ code with nanobind to create the extension under the hood).

Activate the fast_ctd environment (or set it as the default interpreter in your IDE):

bash conda activate fast_ctd

then try running an example:

bash cd examples python stp_to_dagmc_workflow.py

Changing the C++ source

The editable install of the package (included in the conda environment.yml) means you can edit the C++ source code and run the Python code without needing to reinstall (rebuild) the package. nanobind automatically detects changes and recompiles the extension when you run the Python code.

However, changing some files (for example binding.cpp) will require a reinstall, which can be done with:

bash pip install -e .

nanobind will throw an error when you try to run the Python code without reinstalling after changing files that require it.

Meson compilation (directly)

Sometimes it's useful to test the meson compilation directly, run this once:

bash meson setup --wipe builddir meson compile -C builddir

and then

bash meson compile -C builddir

after that.

Owner

  • Name: Fusion-Power-Plant-Framework
  • Login: Fusion-Power-Plant-Framework
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
authors:
  - family-names: Cook
    given-names: J. E.
    affiliation: United Kingdom Atomic Energy Authority, Culham Science Centre, Abingdon, Oxfordshire OX14 3DB, United Kingdom

  - family-names: Funk
    given-names: O.
    affiliation: United Kingdom Atomic Energy Authority, Culham Science Centre, Abingdon, Oxfordshire OX14 3DB, United Kingdom

  - family-names: Saunders
    given-names: H.
    affiliation: United Kingdom Atomic Energy Authority, Culham Science Centre, Abingdon, Oxfordshire OX14 3DB, United Kingdom

message: "If you use fast_ctd, please cite it as below."
title: "fast_ctd"
license: GPL-2.0-or-later
repository-code: "https://github.com/Fusion-Power-Plant-Framework/fast_ctd"

GitHub Events

Total
  • Create event: 3
  • Issues event: 1
  • Release event: 1
  • Watch event: 5
  • Delete event: 2
  • Push event: 9
  • Public event: 1
  • Pull request review event: 3
  • Pull request review comment event: 1
  • Pull request event: 9
  • Fork event: 1
Last Year
  • Create event: 3
  • Issues event: 1
  • Release event: 1
  • Watch event: 5
  • Delete event: 2
  • Push event: 9
  • Public event: 1
  • Pull request review event: 3
  • Pull request review comment event: 1
  • Pull request event: 9
  • Fork event: 1