cad-to-dagmc 0.6.0__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cad-to-dagmc might be problematic. Click here for more details.
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/ci_with_benchmarks.yml +6 -3
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/ci_with_install.yml +4 -14
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/ci_with_pip_install.yml +15 -5
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/PKG-INFO +57 -21
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/README.md +54 -20
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/pyproject.toml +2 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/_version.py +2 -2
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc.egg-info/PKG-INFO +57 -21
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc.egg-info/SOURCES.txt +0 -3
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc.egg-info/requires.txt +2 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_h5m_in_transport.py +104 -32
- cad_to_dagmc-0.6.0/tests/test_h5m_in_simulation.py +0 -137
- cad_to_dagmc-0.6.0/tests/test_model_creation_for_transport.py +0 -47
- cad_to_dagmc-0.6.0/tests/test_package.py +0 -434
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/anaconda-publish.yml +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/black.yml +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.github/workflows/python-publish.yml +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/.gitignore +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/LICENSE +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/cadquery_assembly.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/cadquery_compound.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/cadquery_object_and_stp_file.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/cadquery_text.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/create_stp_files_for_examples.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/curved_cadquery_object_to_dagmc_surface_mesh.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/multiple_cadquery_objects.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/multiple_stp_files.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/single_cadquery_object.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/single_stp_file.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/surface_mesh/single_stp_file_multiple_volumes.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/unstrucutred_volume_mesh/curved_cadquery_object_to_dagmc_volume_mesh.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/examples/unstrucutred_volume_mesh/simulate_unstrucutred_volume_mesh_with_openmc.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/setup.cfg +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc/__init__.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc/core.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc.egg-info/dependency_links.txt +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/src/cad_to_dagmc.egg-info/top_level.txt +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/ENDFB-7.1-NNDC_H1.h5 +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/ball_reactor.brep +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/create_brep_file_for_testing.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/curved_extrude.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/extrude_rectangle.step +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/extrude_rectangle.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/multi_volume_cylinders.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/one_cube.brep +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/single_cube.step +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/single_cube.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/single_volume_thin.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/single_volume_thin.vtk +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_brep_file.brep +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_file_creation.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_loading_from_file_vs_shape_object.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_python_api.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_two_joined_cubes.brep +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_two_sep_cubes.brep +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/test_version.py +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/two_connected_cubes.stp +0 -0
- {cad_to_dagmc-0.6.0 → cad_to_dagmc-0.6.1}/tests/two_disconnected_cubes.stp +0 -0
|
@@ -37,11 +37,14 @@ jobs:
|
|
|
37
37
|
sudo apt-get upgrade -y
|
|
38
38
|
sudo apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0
|
|
39
39
|
mamba activate
|
|
40
|
-
mamba install -y -c conda-forge
|
|
40
|
+
mamba install -y -c conda-forge "openmc=0.14.0=dagmc*nompi*" moab>=5.3.0 gmsh python-gmsh
|
|
41
41
|
python -m pip install --upgrade pip
|
|
42
|
-
python -m pip install
|
|
42
|
+
python -m pip install .
|
|
43
|
+
python -m pip install openmc_data_downloader
|
|
43
44
|
openmc_data_downloader -l ENDFB-7.1-NNDC -i Fe56 Be9
|
|
44
|
-
git clone https://github.com/fusion-energy/model_benchmark_zoo.git
|
|
45
|
+
git clone --single-branch -b main --depth 1 https://github.com/fusion-energy/model_benchmark_zoo.git
|
|
45
46
|
cd model_benchmark_zoo
|
|
46
47
|
python -m pip install .[tests]
|
|
48
|
+
conda env export > environment.yml
|
|
49
|
+
cat environment.yml
|
|
47
50
|
pytest tests/test_cad_to_dagmc -v
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
# This CI does includes particle transport tests as openmc is installed
|
|
3
|
+
|
|
2
4
|
name: CI with install
|
|
3
5
|
|
|
4
6
|
on:
|
|
@@ -37,15 +39,12 @@ jobs:
|
|
|
37
39
|
mamba activate
|
|
38
40
|
mamba create -y --name cad_to_dagmc python=3.10
|
|
39
41
|
mamba activate cad_to_dagmc
|
|
40
|
-
mamba install -y -c conda-forge
|
|
42
|
+
mamba install -y -c conda-forge "openmc=0.14.0=dagmc*nompi*" gmsh python-gmsh
|
|
41
43
|
python -m pip install --upgrade pip
|
|
42
44
|
python -m pip install .
|
|
43
45
|
python -c "import cad_to_dagmc"
|
|
44
46
|
python -m pip install .[tests]
|
|
45
|
-
pytest -v tests
|
|
46
|
-
pytest -v tests/test_loading_from_file_vs_shape_object.py
|
|
47
|
-
pytest -v tests/test_python_api.py
|
|
48
|
-
pytest -v tests/test_version.py
|
|
47
|
+
pytest -v tests
|
|
49
48
|
python examples/surface_mesh/create_stp_files_for_examples.py
|
|
50
49
|
python examples/surface_mesh/cadquery_assembly.py
|
|
51
50
|
python examples/surface_mesh/cadquery_compound.py
|
|
@@ -58,13 +57,4 @@ jobs:
|
|
|
58
57
|
python examples/surface_mesh/single_cadquery_object.py
|
|
59
58
|
python examples/surface_mesh/single_stp_file.py
|
|
60
59
|
python examples/unstrucutred_volume_mesh/curved_cadquery_object_to_dagmc_volume_mesh.py
|
|
61
|
-
pytest -v tests/test_model_creation_for_transport.py
|
|
62
|
-
mamba activate base
|
|
63
|
-
mamba create -y --name openmc python=3.10
|
|
64
|
-
mamba activate openmc
|
|
65
|
-
mamba install -y -c conda-forge "openmc=0.14.0=dagmc*nompi*"
|
|
66
|
-
python -m pip install pytest
|
|
67
|
-
python -m pip install vtk
|
|
68
|
-
pytest -v tests/test_h5m_in_simulation.py
|
|
69
|
-
pytest -v tests/test_h5m_in_transport.py
|
|
70
60
|
python examples/unstrucutred_volume_mesh/simulate_unstrucutred_volume_mesh_with_openmc.py
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
# This CI does not currently include particle transport tests as openmc is not installed
|
|
3
|
+
|
|
2
4
|
name: CI with pip install
|
|
3
5
|
|
|
4
6
|
on:
|
|
@@ -32,16 +34,24 @@ jobs:
|
|
|
32
34
|
apt-get update -y
|
|
33
35
|
apt-get upgrade -y
|
|
34
36
|
apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0 libxcursor-dev libxft2 libxinerama-dev
|
|
37
|
+
apt-get install -y make cmake
|
|
35
38
|
apt install python3
|
|
36
39
|
apt install python3-pip
|
|
37
|
-
python -m pip install --upgrade pip
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
python -m pip install --upgrade pip
|
|
41
|
+
mkdir MOAB
|
|
42
|
+
cd MOAB
|
|
43
|
+
git clone --single-branch -b 5.5.1 --depth 1 https://bitbucket.org/fathomteam/moab/
|
|
44
|
+
mkdir build
|
|
45
|
+
cd build
|
|
46
|
+
apt-get install -y libeigen3-dev
|
|
47
|
+
cmake ../moab -DENABLE_PYMOAB=ON -DENABLE_HDF5=ON -DENABLE_BLASLAPACK=OFF -DENABLE_FORTRAN=OFF
|
|
48
|
+
make -j2
|
|
49
|
+
make install
|
|
50
|
+
cd ../..
|
|
41
51
|
python -m pip install .
|
|
42
52
|
python -c "import cad_to_dagmc"
|
|
43
53
|
python -m pip install .[tests]
|
|
44
|
-
pytest
|
|
54
|
+
pytest -v tests
|
|
45
55
|
cd examples
|
|
46
56
|
python create_stp_files_for_examples.py
|
|
47
57
|
python cadquery_assembly.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cad_to_dagmc
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Converts CAD files to a DAGMC h5m file
|
|
5
5
|
Author-email: Jonathan Shimwell <mail@jshimwell.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/fusion-energy/cad_to_dagmc
|
|
@@ -14,6 +14,8 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: trimesh
|
|
16
16
|
Requires-Dist: networkx
|
|
17
|
+
Requires-Dist: cadquery-ocp>=7.7.2
|
|
18
|
+
Requires-Dist: cadquery>=2.4.0
|
|
17
19
|
Provides-Extra: tests
|
|
18
20
|
Requires-Dist: pytest; extra == "tests"
|
|
19
21
|
Requires-Dist: vtk; extra == "tests"
|
|
@@ -40,8 +42,7 @@ cad-to-dagmc can convert:
|
|
|
40
42
|
- STEP files
|
|
41
43
|
- CadQuery objects (in memory)
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
cad-to-dagmc aims to produce DAGMC compatible h5m files from CAD geometry is intended to convert [STEP](http://www.steptools.com/stds/step/) files or [CadQuery](https://cadquery.readthedocs.io) objects to a [DAGMC](https://github.com/svalinn/DAGMC/) compatible h5m file.
|
|
45
46
|
|
|
46
47
|
The resulting DAGMC geometry can then be used for simulations in [OpenMC](https://github.com/openmc-dev/openmc/) or [other supported codes](https://svalinn.github.io/DAGMC/).
|
|
47
48
|
|
|
@@ -49,16 +50,20 @@ This package is tested with [pytest tests](https://github.com/fusion-energy/cad_
|
|
|
49
50
|
|
|
50
51
|
Also checkout these other software projects that also create DAGMC geometry [CAD-to-OpenMC](https://github.com/openmsr/CAD_to_OpenMC), [Stellarmesh](https://github.com/Thea-Energy/stellarmesh) and [Coreform Cubit](https://coreform.com/products/coreform-cubit/)
|
|
51
52
|
|
|
52
|
-
# Installation
|
|
53
|
+
# Installation options
|
|
54
|
+
|
|
55
|
+
- Install using Mamba and pip
|
|
56
|
+
- Install using Conda and pip
|
|
57
|
+
- Install using pip and source compilations
|
|
58
|
+
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
## Install using Mamba and pip
|
|
61
|
+
|
|
62
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
55
63
|
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
56
64
|
- [Anaconda](https://www.anaconda.com/download)
|
|
57
65
|
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
# Install using Mamba and pip
|
|
61
|
-
|
|
62
67
|
This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
|
|
63
68
|
|
|
64
69
|
Create a new conda environment, I've chosen Python 3.10 here but newer versions are
|
|
@@ -74,7 +79,7 @@ mamba activate new_env
|
|
|
74
79
|
|
|
75
80
|
Install the dependencies
|
|
76
81
|
```bash
|
|
77
|
-
mamba install -y -c conda-forge
|
|
82
|
+
mamba install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -82,19 +87,13 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
82
87
|
pip install cad_to_dagmc
|
|
83
88
|
```
|
|
84
89
|
|
|
85
|
-
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
86
|
-
|
|
87
|
-
To install OpenMC You can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
88
|
-
```bash
|
|
89
|
-
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
93
|
-
|
|
94
|
-
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
95
90
|
|
|
91
|
+
## Install using Conda and pip
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
94
|
+
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
95
|
+
- [Anaconda](https://www.anaconda.com/download)
|
|
96
|
+
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
98
97
|
|
|
99
98
|
This example uses Conda to install some dependencies that are not available via PyPi.
|
|
100
99
|
|
|
@@ -110,7 +109,7 @@ conda activate new_env
|
|
|
110
109
|
|
|
111
110
|
Install the dependencies
|
|
112
111
|
```bash
|
|
113
|
-
conda install -y -c conda-forge
|
|
112
|
+
conda install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
114
113
|
```
|
|
115
114
|
|
|
116
115
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -118,6 +117,43 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
118
117
|
pip install cad_to_dagmc
|
|
119
118
|
```
|
|
120
119
|
|
|
120
|
+
## Install using pip and source compilations
|
|
121
|
+
|
|
122
|
+
It should possible to avoid the use of conda and installing using pip and compiling from source.
|
|
123
|
+
|
|
124
|
+
First compile MOAB (and install Pymoab) from source
|
|
125
|
+
|
|
126
|
+
Then install gmsh from source (installing from pip appears to cause conflicts with the open cascade used in ocp and cadquery)
|
|
127
|
+
|
|
128
|
+
Then you can install the cad_to_dagmc package with ```pip```
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pip install cad_to_dagmc
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Install with transport code (e.g OpenMC)
|
|
135
|
+
|
|
136
|
+
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
137
|
+
|
|
138
|
+
To install OpenMC you can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
139
|
+
```bash
|
|
140
|
+
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
144
|
+
|
|
145
|
+
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# Known incompatibilities
|
|
150
|
+
|
|
151
|
+
The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
|
|
152
|
+
|
|
153
|
+
The package requires newer versions of pip. It is recommended to ensure that your version of pip is up to date. This can be done with ```python -m pip install --upgrade pip```
|
|
154
|
+
|
|
155
|
+
Installing one of the package dependancies (gmsh) with pip appears to result in occational errors when passing cad objects between cadquery / ocp and gmsh. The conda install gmsh appears to work fine.
|
|
156
|
+
|
|
121
157
|
# Usage - with OpenMC
|
|
122
158
|
|
|
123
159
|
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others supported by [DAGMC](https://svalinn.github.io/DAGMC/).
|
|
@@ -20,8 +20,7 @@ cad-to-dagmc can convert:
|
|
|
20
20
|
- STEP files
|
|
21
21
|
- CadQuery objects (in memory)
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
cad-to-dagmc aims to produce DAGMC compatible h5m files from CAD geometry is intended to convert [STEP](http://www.steptools.com/stds/step/) files or [CadQuery](https://cadquery.readthedocs.io) objects to a [DAGMC](https://github.com/svalinn/DAGMC/) compatible h5m file.
|
|
25
24
|
|
|
26
25
|
The resulting DAGMC geometry can then be used for simulations in [OpenMC](https://github.com/openmc-dev/openmc/) or [other supported codes](https://svalinn.github.io/DAGMC/).
|
|
27
26
|
|
|
@@ -29,16 +28,20 @@ This package is tested with [pytest tests](https://github.com/fusion-energy/cad_
|
|
|
29
28
|
|
|
30
29
|
Also checkout these other software projects that also create DAGMC geometry [CAD-to-OpenMC](https://github.com/openmsr/CAD_to_OpenMC), [Stellarmesh](https://github.com/Thea-Energy/stellarmesh) and [Coreform Cubit](https://coreform.com/products/coreform-cubit/)
|
|
31
30
|
|
|
32
|
-
# Installation
|
|
31
|
+
# Installation options
|
|
32
|
+
|
|
33
|
+
- Install using Mamba and pip
|
|
34
|
+
- Install using Conda and pip
|
|
35
|
+
- Install using pip and source compilations
|
|
36
|
+
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
## Install using Mamba and pip
|
|
39
|
+
|
|
40
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
35
41
|
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
36
42
|
- [Anaconda](https://www.anaconda.com/download)
|
|
37
43
|
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
# Install using Mamba and pip
|
|
41
|
-
|
|
42
45
|
This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
|
|
43
46
|
|
|
44
47
|
Create a new conda environment, I've chosen Python 3.10 here but newer versions are
|
|
@@ -54,7 +57,7 @@ mamba activate new_env
|
|
|
54
57
|
|
|
55
58
|
Install the dependencies
|
|
56
59
|
```bash
|
|
57
|
-
mamba install -y -c conda-forge
|
|
60
|
+
mamba install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
58
61
|
```
|
|
59
62
|
|
|
60
63
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -62,19 +65,13 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
62
65
|
pip install cad_to_dagmc
|
|
63
66
|
```
|
|
64
67
|
|
|
65
|
-
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
66
|
-
|
|
67
|
-
To install OpenMC You can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
68
|
-
```bash
|
|
69
|
-
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
73
|
-
|
|
74
|
-
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
75
68
|
|
|
69
|
+
## Install using Conda and pip
|
|
76
70
|
|
|
77
|
-
|
|
71
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
72
|
+
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
73
|
+
- [Anaconda](https://www.anaconda.com/download)
|
|
74
|
+
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
78
75
|
|
|
79
76
|
This example uses Conda to install some dependencies that are not available via PyPi.
|
|
80
77
|
|
|
@@ -90,7 +87,7 @@ conda activate new_env
|
|
|
90
87
|
|
|
91
88
|
Install the dependencies
|
|
92
89
|
```bash
|
|
93
|
-
conda install -y -c conda-forge
|
|
90
|
+
conda install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
94
91
|
```
|
|
95
92
|
|
|
96
93
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -98,6 +95,43 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
98
95
|
pip install cad_to_dagmc
|
|
99
96
|
```
|
|
100
97
|
|
|
98
|
+
## Install using pip and source compilations
|
|
99
|
+
|
|
100
|
+
It should possible to avoid the use of conda and installing using pip and compiling from source.
|
|
101
|
+
|
|
102
|
+
First compile MOAB (and install Pymoab) from source
|
|
103
|
+
|
|
104
|
+
Then install gmsh from source (installing from pip appears to cause conflicts with the open cascade used in ocp and cadquery)
|
|
105
|
+
|
|
106
|
+
Then you can install the cad_to_dagmc package with ```pip```
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install cad_to_dagmc
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Install with transport code (e.g OpenMC)
|
|
113
|
+
|
|
114
|
+
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
115
|
+
|
|
116
|
+
To install OpenMC you can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
117
|
+
```bash
|
|
118
|
+
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
122
|
+
|
|
123
|
+
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# Known incompatibilities
|
|
128
|
+
|
|
129
|
+
The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
|
|
130
|
+
|
|
131
|
+
The package requires newer versions of pip. It is recommended to ensure that your version of pip is up to date. This can be done with ```python -m pip install --upgrade pip```
|
|
132
|
+
|
|
133
|
+
Installing one of the package dependancies (gmsh) with pip appears to result in occational errors when passing cad objects between cadquery / ocp and gmsh. The conda install gmsh appears to work fine.
|
|
134
|
+
|
|
101
135
|
# Usage - with OpenMC
|
|
102
136
|
|
|
103
137
|
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others supported by [DAGMC](https://svalinn.github.io/DAGMC/).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cad_to_dagmc
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Converts CAD files to a DAGMC h5m file
|
|
5
5
|
Author-email: Jonathan Shimwell <mail@jshimwell.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/fusion-energy/cad_to_dagmc
|
|
@@ -14,6 +14,8 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: trimesh
|
|
16
16
|
Requires-Dist: networkx
|
|
17
|
+
Requires-Dist: cadquery-ocp>=7.7.2
|
|
18
|
+
Requires-Dist: cadquery>=2.4.0
|
|
17
19
|
Provides-Extra: tests
|
|
18
20
|
Requires-Dist: pytest; extra == "tests"
|
|
19
21
|
Requires-Dist: vtk; extra == "tests"
|
|
@@ -40,8 +42,7 @@ cad-to-dagmc can convert:
|
|
|
40
42
|
- STEP files
|
|
41
43
|
- CadQuery objects (in memory)
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
cad-to-dagmc aims to produce DAGMC compatible h5m files from CAD geometry is intended to convert [STEP](http://www.steptools.com/stds/step/) files or [CadQuery](https://cadquery.readthedocs.io) objects to a [DAGMC](https://github.com/svalinn/DAGMC/) compatible h5m file.
|
|
45
46
|
|
|
46
47
|
The resulting DAGMC geometry can then be used for simulations in [OpenMC](https://github.com/openmc-dev/openmc/) or [other supported codes](https://svalinn.github.io/DAGMC/).
|
|
47
48
|
|
|
@@ -49,16 +50,20 @@ This package is tested with [pytest tests](https://github.com/fusion-energy/cad_
|
|
|
49
50
|
|
|
50
51
|
Also checkout these other software projects that also create DAGMC geometry [CAD-to-OpenMC](https://github.com/openmsr/CAD_to_OpenMC), [Stellarmesh](https://github.com/Thea-Energy/stellarmesh) and [Coreform Cubit](https://coreform.com/products/coreform-cubit/)
|
|
51
52
|
|
|
52
|
-
# Installation
|
|
53
|
+
# Installation options
|
|
54
|
+
|
|
55
|
+
- Install using Mamba and pip
|
|
56
|
+
- Install using Conda and pip
|
|
57
|
+
- Install using pip and source compilations
|
|
58
|
+
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
## Install using Mamba and pip
|
|
61
|
+
|
|
62
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
55
63
|
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
56
64
|
- [Anaconda](https://www.anaconda.com/download)
|
|
57
65
|
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
# Install using Mamba and pip
|
|
61
|
-
|
|
62
67
|
This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
|
|
63
68
|
|
|
64
69
|
Create a new conda environment, I've chosen Python 3.10 here but newer versions are
|
|
@@ -74,7 +79,7 @@ mamba activate new_env
|
|
|
74
79
|
|
|
75
80
|
Install the dependencies
|
|
76
81
|
```bash
|
|
77
|
-
mamba install -y -c conda-forge
|
|
82
|
+
mamba install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -82,19 +87,13 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
82
87
|
pip install cad_to_dagmc
|
|
83
88
|
```
|
|
84
89
|
|
|
85
|
-
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
86
|
-
|
|
87
|
-
To install OpenMC You can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
88
|
-
```bash
|
|
89
|
-
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
93
|
-
|
|
94
|
-
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
95
90
|
|
|
91
|
+
## Install using Conda and pip
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
|
|
94
|
+
- [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
|
|
95
|
+
- [Anaconda](https://www.anaconda.com/download)
|
|
96
|
+
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
|
|
98
97
|
|
|
99
98
|
This example uses Conda to install some dependencies that are not available via PyPi.
|
|
100
99
|
|
|
@@ -110,7 +109,7 @@ conda activate new_env
|
|
|
110
109
|
|
|
111
110
|
Install the dependencies
|
|
112
111
|
```bash
|
|
113
|
-
conda install -y -c conda-forge
|
|
112
|
+
conda install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
|
|
114
113
|
```
|
|
115
114
|
|
|
116
115
|
Then you can install the cad_to_dagmc package with ```pip```
|
|
@@ -118,6 +117,43 @@ Then you can install the cad_to_dagmc package with ```pip```
|
|
|
118
117
|
pip install cad_to_dagmc
|
|
119
118
|
```
|
|
120
119
|
|
|
120
|
+
## Install using pip and source compilations
|
|
121
|
+
|
|
122
|
+
It should possible to avoid the use of conda and installing using pip and compiling from source.
|
|
123
|
+
|
|
124
|
+
First compile MOAB (and install Pymoab) from source
|
|
125
|
+
|
|
126
|
+
Then install gmsh from source (installing from pip appears to cause conflicts with the open cascade used in ocp and cadquery)
|
|
127
|
+
|
|
128
|
+
Then you can install the cad_to_dagmc package with ```pip```
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pip install cad_to_dagmc
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Install with transport code (e.g OpenMC)
|
|
135
|
+
|
|
136
|
+
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).
|
|
137
|
+
|
|
138
|
+
To install OpenMC you can run ```mamba install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
|
|
139
|
+
```bash
|
|
140
|
+
mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
It might not be possible to install OpenMC and cad-to-dagmc in the same conda/mamba python environment so you may have to create a new conda/mamba environment and install OpenMC there.
|
|
144
|
+
|
|
145
|
+
Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# Known incompatibilities
|
|
150
|
+
|
|
151
|
+
The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
|
|
152
|
+
|
|
153
|
+
The package requires newer versions of pip. It is recommended to ensure that your version of pip is up to date. This can be done with ```python -m pip install --upgrade pip```
|
|
154
|
+
|
|
155
|
+
Installing one of the package dependancies (gmsh) with pip appears to result in occational errors when passing cad objects between cadquery / ocp and gmsh. The conda install gmsh appears to work fine.
|
|
156
|
+
|
|
121
157
|
# Usage - with OpenMC
|
|
122
158
|
|
|
123
159
|
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others supported by [DAGMC](https://svalinn.github.io/DAGMC/).
|
|
@@ -43,11 +43,8 @@ tests/single_volume_thin.stp
|
|
|
43
43
|
tests/single_volume_thin.vtk
|
|
44
44
|
tests/test_brep_file.brep
|
|
45
45
|
tests/test_file_creation.py
|
|
46
|
-
tests/test_h5m_in_simulation.py
|
|
47
46
|
tests/test_h5m_in_transport.py
|
|
48
47
|
tests/test_loading_from_file_vs_shape_object.py
|
|
49
|
-
tests/test_model_creation_for_transport.py
|
|
50
|
-
tests/test_package.py
|
|
51
48
|
tests/test_python_api.py
|
|
52
49
|
tests/test_two_joined_cubes.brep
|
|
53
50
|
tests/test_two_sep_cubes.brep
|