cad-to-dagmc 0.6.2__tar.gz → 0.9.3__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.

Files changed (80) hide show
  1. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/.github/workflows/black.yml +3 -3
  2. cad_to_dagmc-0.9.3/.github/workflows/ci_with_benchmarks.yml +66 -0
  3. cad_to_dagmc-0.9.3/.github/workflows/ci_with_conda_install.yml +91 -0
  4. cad_to_dagmc-0.9.3/.github/workflows/ci_with_pip_install.yml +65 -0
  5. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/.gitignore +1 -0
  6. cad_to_dagmc-0.9.3/CITATION.cff +10 -0
  7. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/PKG-INFO +64 -65
  8. cad_to_dagmc-0.9.3/README.md +153 -0
  9. cad_to_dagmc-0.9.3/examples/surface_and_unstructured_mesh/unstructured_mesh_with_conformal_surface_mesh.py +105 -0
  10. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/cadquery_assembly.py +3 -4
  11. cad_to_dagmc-0.9.3/examples/surface_mesh/cadquery_assembly_with_scaled_geometry.py +14 -0
  12. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/cadquery_compound.py +2 -2
  13. cad_to_dagmc-0.9.3/examples/surface_mesh/cadquery_object_and_stp_file.py +28 -0
  14. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/cadquery_text.py +8 -6
  15. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/curved_cadquery_object_to_dagmc_surface_mesh.py +4 -2
  16. cad_to_dagmc-0.9.3/examples/surface_mesh/different_resolution_meshes.py +44 -0
  17. cad_to_dagmc-0.9.3/examples/surface_mesh/from_gmsh_mesh_file.py +53 -0
  18. cad_to_dagmc-0.9.3/examples/surface_mesh/from_gmsh_mesh_file_with_tags.py +44 -0
  19. cad_to_dagmc-0.9.3/examples/surface_mesh/from_gmsh_object_with_tag.py +26 -0
  20. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/multiple_cadquery_objects.py +3 -3
  21. cad_to_dagmc-0.9.3/examples/surface_mesh/multiple_stp_files.py +30 -0
  22. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/surface_mesh/single_cadquery_object.py +2 -2
  23. cad_to_dagmc-0.9.3/examples/surface_mesh/single_stp_file.py +24 -0
  24. cad_to_dagmc-0.9.3/examples/surface_mesh/single_stp_file_multiple_volumes.py +16 -0
  25. cad_to_dagmc-0.9.3/examples/surface_mesh/tagged_mesh.msh +3445 -0
  26. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/unstrucutred_volume_mesh/curved_cadquery_object_to_dagmc_volume_mesh.py +3 -3
  27. cad_to_dagmc-0.9.3/examples/unstrucutred_volume_mesh/different_resolution_meshes.py +44 -0
  28. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/examples/unstrucutred_volume_mesh/simulate_unstrucutred_volume_mesh_with_openmc.py +2 -4
  29. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/pyproject.toml +11 -2
  30. cad_to_dagmc-0.9.3/src/_version.py +34 -0
  31. cad_to_dagmc-0.9.3/src/cad_to_dagmc/core.py +1036 -0
  32. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/src/cad_to_dagmc.egg-info/PKG-INFO +64 -65
  33. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/src/cad_to_dagmc.egg-info/SOURCES.txt +14 -6
  34. cad_to_dagmc-0.9.3/src/cad_to_dagmc.egg-info/requires.txt +10 -0
  35. cad_to_dagmc-0.9.3/tests/tagged_mesh.msh +3445 -0
  36. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_file_creation.py +44 -20
  37. cad_to_dagmc-0.9.3/tests/test_get_volumes.py +89 -0
  38. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_h5m_in_transport.py +77 -26
  39. cad_to_dagmc-0.9.3/tests/test_kwarg_args.py +229 -0
  40. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_loading_from_file_vs_shape_object.py +0 -2
  41. cad_to_dagmc-0.9.3/tests/test_mesh_to_dagmc.py +106 -0
  42. cad_to_dagmc-0.9.3/tests/test_python_api.py +434 -0
  43. cad_to_dagmc-0.6.2/.github/workflows/anaconda-publish.yml +0 -30
  44. cad_to_dagmc-0.6.2/.github/workflows/ci_with_benchmarks.yml +0 -50
  45. cad_to_dagmc-0.6.2/.github/workflows/ci_with_install.yml +0 -60
  46. cad_to_dagmc-0.6.2/.github/workflows/ci_with_pip_install.yml +0 -67
  47. cad_to_dagmc-0.6.2/README.md +0 -158
  48. cad_to_dagmc-0.6.2/examples/surface_mesh/cadquery_object_and_stp_file.py +0 -16
  49. cad_to_dagmc-0.6.2/examples/surface_mesh/create_stp_files_for_examples.py +0 -90
  50. cad_to_dagmc-0.6.2/examples/surface_mesh/multiple_stp_files.py +0 -12
  51. cad_to_dagmc-0.6.2/examples/surface_mesh/single_stp_file.py +0 -5
  52. cad_to_dagmc-0.6.2/examples/surface_mesh/single_stp_file_multiple_volumes.py +0 -6
  53. cad_to_dagmc-0.6.2/src/_version.py +0 -16
  54. cad_to_dagmc-0.6.2/src/cad_to_dagmc/core.py +0 -503
  55. cad_to_dagmc-0.6.2/src/cad_to_dagmc.egg-info/requires.txt +0 -7
  56. cad_to_dagmc-0.6.2/tests/create_brep_file_for_testing.py +0 -56
  57. cad_to_dagmc-0.6.2/tests/extrude_rectangle.step +0 -0
  58. cad_to_dagmc-0.6.2/tests/single_cube.step +0 -0
  59. cad_to_dagmc-0.6.2/tests/test_python_api.py +0 -113
  60. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/.github/workflows/python-publish.yml +0 -0
  61. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/LICENSE +0 -0
  62. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/setup.cfg +0 -0
  63. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/src/cad_to_dagmc/__init__.py +0 -0
  64. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/src/cad_to_dagmc.egg-info/dependency_links.txt +0 -0
  65. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/src/cad_to_dagmc.egg-info/top_level.txt +0 -0
  66. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/ENDFB-7.1-NNDC_H1.h5 +0 -0
  67. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/ball_reactor.brep +0 -0
  68. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/curved_extrude.stp +0 -0
  69. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/extrude_rectangle.stp +0 -0
  70. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/multi_volume_cylinders.stp +0 -0
  71. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/one_cube.brep +0 -0
  72. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/single_cube.stp +0 -0
  73. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/single_volume_thin.stp +0 -0
  74. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/single_volume_thin.vtk +0 -0
  75. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_brep_file.brep +0 -0
  76. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_two_joined_cubes.brep +0 -0
  77. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_two_sep_cubes.brep +0 -0
  78. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/test_version.py +0 -0
  79. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/two_connected_cubes.stp +0 -0
  80. {cad_to_dagmc-0.6.2 → cad_to_dagmc-0.9.3}/tests/two_disconnected_cubes.stp +0 -0
@@ -13,11 +13,11 @@ jobs:
13
13
  black:
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v3
16
+ - uses: actions/checkout@v4
17
17
  with:
18
18
  ref: ${{ github.head_ref }}
19
19
  - name: Setup Python
20
- uses: actions/setup-python@v2
20
+ uses: actions/setup-python@v5
21
21
  with:
22
22
  python-version: 3.x
23
23
  - name: Install black
@@ -27,6 +27,6 @@ jobs:
27
27
  - name: Run black
28
28
  run: |
29
29
  black --line-length 100 .
30
- - uses: stefanzweifel/git-auto-commit-action@v4
30
+ - uses: stefanzweifel/git-auto-commit-action@v5
31
31
  with:
32
32
  commit_message: "[skip ci] Apply formatting changes"
@@ -0,0 +1,66 @@
1
+
2
+ name: CI with model benchmark zoo
3
+
4
+ on:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ paths-ignore:
9
+ - 'docs/**'
10
+ - '.gitignore'
11
+ - '*.md'
12
+ - 'CITATION.cff'
13
+ - 'LICENSE.txt'
14
+ - 'readthedocs.yml'
15
+ push:
16
+ branches:
17
+ - main
18
+
19
+ jobs:
20
+ testing:
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Install system packages
28
+ run: |
29
+ sudo apt-get update -y
30
+ sudo apt-get upgrade -y
31
+ sudo apt-get install -y libgl1 libglx-mesa0 libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0
32
+
33
+ - name: Set up Miniforge
34
+ run: |
35
+ wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh"
36
+ bash Miniforge3.sh -b -p "${HOME}/miniforge"
37
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
38
+ conda init bash
39
+ conda config --set always_yes yes --set changeps1 no
40
+ conda update -q conda
41
+
42
+ - name: Create and activate Conda environment
43
+ run: |
44
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
45
+ conda create -n ci-env python=3.11
46
+ conda activate ci-env
47
+ conda install -c conda-forge "openmc=0.15.0=dagmc*nompi*" trimesh networkx cadquery gmsh python-gmsh vtk
48
+ python -m pip install .[tests]
49
+ python -m pip install git+https://github.com/svalinn/pydagmc
50
+ python -m pip install git+https://github.com/jmwright/cadquery-direct-mesh-plugin
51
+
52
+ - name: Run tests
53
+ shell: bash -l {0}
54
+ env:
55
+ OPENMC_CROSS_SECTIONS: /home/runner/work/cad_to_dagmc/cad_to_dagmc/cross_sections.xml
56
+ run: |
57
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
58
+ conda activate ci-env
59
+ python -m ensurepip --upgrade
60
+ python -m pip install . --no-deps
61
+ python -m pip install openmc_data_downloader
62
+ openmc_data_downloader -l ENDFB-7.1-NNDC -i Fe56 Be9 Al27
63
+ git clone --single-branch -b main --depth 1 https://github.com/fusion-energy/model_benchmark_zoo.git
64
+ cd model_benchmark_zoo
65
+ python -m pip install .[tests]
66
+ pytest tests/test_cad_to_dagmc -v
@@ -0,0 +1,91 @@
1
+
2
+ # This CI does includes particle transport tests as openmc is installed
3
+
4
+ name: CI with Conda install
5
+
6
+ on:
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ paths-ignore:
11
+ - 'docs/**'
12
+ - '.gitignore'
13
+ - '*.md'
14
+ - 'CITATION.cff'
15
+ - 'LICENSE.txt'
16
+ - 'readthedocs.yml'
17
+ push:
18
+ branches:
19
+ - main
20
+
21
+ jobs:
22
+ testing:
23
+ runs-on: ubuntu-latest
24
+
25
+ steps:
26
+ - name: Checkout repository
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Install system packages
30
+ run: |
31
+ sudo apt-get update -y
32
+ sudo apt-get upgrade -y
33
+ sudo apt-get install -y libgl1 libglx-mesa0 libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0
34
+ - name: Set up Miniforge
35
+ run: |
36
+ wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh"
37
+ bash Miniforge3.sh -b -p "${HOME}/miniforge"
38
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
39
+ conda init bash
40
+ conda config --set always_yes yes --set changeps1 no
41
+ conda update -q conda
42
+
43
+ - name: Create and activate Conda environment
44
+ run: |
45
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
46
+ conda create -n ci-env python=3.11
47
+ conda activate ci-env
48
+ conda install -c conda-forge "openmc=0.15.0=dagmc*nompi*" trimesh networkx cadquery gmsh python-gmsh vtk
49
+ python -m pip install .[tests]
50
+ python -m pip install git+https://github.com/svalinn/pydagmc
51
+ python -m pip install git+https://github.com/jmwright/cadquery-direct-mesh-plugin
52
+
53
+ - name: Test import
54
+ shell: bash -l {0}
55
+ run: |
56
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
57
+ conda activate ci-env
58
+ python -c "import cad_to_dagmc"
59
+
60
+ - name: Run tests
61
+ shell: bash -l {0}
62
+ run: |
63
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
64
+ conda activate ci-env
65
+ pytest -v tests
66
+
67
+ - name: Run examples
68
+ shell: bash -l {0}
69
+ run: |
70
+ source "${HOME}/miniforge/etc/profile.d/conda.sh"
71
+ conda activate ci-env
72
+ python examples/surface_mesh/cadquery_assembly.py
73
+ python examples/surface_mesh/cadquery_assembly_with_scaled_geometry.py
74
+ python examples/surface_mesh/cadquery_compound.py
75
+ python examples/surface_mesh/cadquery_object_and_stp_file.py
76
+ python examples/surface_mesh/cadquery_text.py
77
+ python examples/surface_mesh/curved_cadquery_object_to_dagmc_surface_mesh.py
78
+ python examples/surface_mesh/from_gmsh_mesh_file.py
79
+ python examples/surface_mesh/from_gmsh_mesh_file_with_tags.py
80
+ python examples/surface_mesh/from_gmsh_object_with_tag.py
81
+ python examples/surface_mesh/multiple_cadquery_objects.py
82
+ python examples/surface_mesh/multiple_stp_files.py
83
+ python examples/surface_mesh/single_cadquery_object.py
84
+ python examples/surface_mesh/single_stp_file_multiple_volumes.py
85
+ python examples/surface_mesh/single_stp_file.py
86
+ python examples/unstrucutred_volume_mesh/curved_cadquery_object_to_dagmc_volume_mesh.py
87
+ python examples/unstrucutred_volume_mesh/simulate_unstrucutred_volume_mesh_with_openmc.py
88
+ python examples/unstrucutred_volume_mesh/different_resolution_meshes.py
89
+ python examples/surface_mesh/different_resolution_meshes.py
90
+ python examples/surface_mesh/cadquery_assembly_with_scaled_geometry.py
91
+ python examples/surface_and_unstructured_mesh/unstructured_mesh_with_conformal_surface_mesh.py
@@ -0,0 +1,65 @@
1
+
2
+ # This CI does not currently include particle transport tests as openmc is not installed
3
+
4
+ name: CI with pip install
5
+
6
+ on:
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ paths-ignore:
11
+ - 'docs/**'
12
+ - '.gitignore'
13
+ - '*.md'
14
+ - 'CITATION.cff'
15
+ - 'LICENSE.txt'
16
+ - 'readthedocs.yml'
17
+ push:
18
+ branches:
19
+ - main
20
+
21
+ jobs:
22
+ testing:
23
+ runs-on: ubuntu-latest
24
+ container:
25
+ image: openmc/openmc:develop-dagmc
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v4
29
+
30
+ - name: install non pypi dependencies
31
+ shell: bash
32
+ run: |
33
+ apt-get --allow-releaseinfo-change update
34
+ apt-get update -y
35
+ apt-get upgrade -y
36
+ apt-get install -y libblas-dev liblapack-dev libgl1 libglx-mesa0 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 make cmake libeigen3-dev
37
+ apt install python3
38
+ apt install python3-pip
39
+ python -m pip install --extra-index-url https://shimwell.github.io/wheels moab
40
+ python -c "import pymoab"
41
+ python -m pip install .[tests]
42
+ python -m pip install git+https://github.com/svalinn/pydagmc
43
+ python -m pip install git+https://github.com/jmwright/cadquery-direct-mesh-plugin
44
+ python -c "import cad_to_dagmc"
45
+ pytest -v tests
46
+ python examples/surface_mesh/cadquery_assembly.py
47
+ python examples/surface_mesh/cadquery_assembly_with_scaled_geometry.py
48
+ python examples/surface_mesh/cadquery_compound.py
49
+ python examples/surface_mesh/cadquery_object_and_stp_file.py
50
+ python examples/surface_mesh/cadquery_text.py
51
+ python examples/surface_mesh/curved_cadquery_object_to_dagmc_surface_mesh.py
52
+ python examples/surface_mesh/from_gmsh_mesh_file.py
53
+ python examples/surface_mesh/from_gmsh_mesh_file_with_tags.py
54
+ python examples/surface_mesh/from_gmsh_object_with_tag.py
55
+ python examples/surface_mesh/multiple_cadquery_objects.py
56
+ python examples/surface_mesh/multiple_stp_files.py
57
+ python examples/surface_mesh/single_cadquery_object.py
58
+ python examples/surface_mesh/single_stp_file_multiple_volumes.py
59
+ python examples/surface_mesh/single_stp_file.py
60
+ python examples/unstrucutred_volume_mesh/curved_cadquery_object_to_dagmc_volume_mesh.py
61
+ python examples/unstrucutred_volume_mesh/simulate_unstrucutred_volume_mesh_with_openmc.py
62
+ python examples/unstrucutred_volume_mesh/different_resolution_meshes.py
63
+ python examples/surface_mesh/different_resolution_meshes.py
64
+ python examples/surface_mesh/cadquery_assembly_with_scaled_geometry.py
65
+ python examples/surface_and_unstructured_mesh/unstructured_mesh_with_conformal_surface_mesh.py
@@ -137,3 +137,4 @@ dmypy.json
137
137
  *.stp
138
138
  src/_version.py
139
139
  *.msh
140
+ *.step
@@ -0,0 +1,10 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Shimwell"
5
+ given-names: "Jonathan"
6
+ orcid: "https://orcid.org/0000-0001-6909-0946"
7
+ title: "CAD to DAGMC. Convert CAD geometry (STP files) or Cadquery assemblies to DAGMC h5m files"
8
+ version: 0.7.0
9
+ date-released: 2024-4-14
10
+ url: "https://github.com/fusion-energy/cad_to_dagmc"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: cad_to_dagmc
3
- Version: 0.6.2
3
+ Version: 0.9.3
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,15 +14,21 @@ Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: trimesh
16
16
  Requires-Dist: networkx
17
- Requires-Dist: cadquery>=2.4.0
17
+ Requires-Dist: cadquery>=2.5.2
18
+ Requires-Dist: numpy
19
+ Requires-Dist: gmsh
18
20
  Provides-Extra: tests
19
21
  Requires-Dist: pytest; extra == "tests"
20
22
  Requires-Dist: vtk; extra == "tests"
23
+ Requires-Dist: assembly-mesh-plugin; extra == "tests"
24
+ Dynamic: license-file
21
25
 
22
26
 
23
27
  [![N|Python](https://www.python.org/static/community_logos/python-powered-w-100x40.png)](https://www.python.org)
24
28
 
25
- [![CI with install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_install.yml/badge.svg?branch=main)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_install.yml) Testing package and running examples
29
+ [![CI with Conda install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml) Testing package and running examples with dependencies installed via Conda
30
+
31
+ [![CI with pip install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml) Testing package and running examples with dependencies installed vua PIP
26
32
 
27
33
  [![CI with model benchmark zoo](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml/badge.svg?branch=main)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml) Testing with [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo)
28
34
 
@@ -31,32 +37,44 @@ Requires-Dist: vtk; extra == "tests"
31
37
  [![PyPI](https://img.shields.io/pypi/v/cad_to_dagmc?color=brightgreen&label=pypi&logo=grebrightgreenen&logoColor=green)](https://pypi.org/project/cad_to_dagmc/)
32
38
 
33
39
 
34
- A minimal package that converts CAD geometry to [DAGMC](https://github.com/svalinn/DAGMC/) h5m files
40
+ A minimal package that converts CAD geometry to [DAGMC](https://github.com/svalinn/DAGMC/) (h5m) files, [unstructured mesh](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.UnstructuredMesh.html) files (vtk) and Gmsh (msh) files ready for use in neutronics simulations.
35
41
 
36
- cad-to-dagmc can create:
42
+ cad-to-dagmc can create DAGMC compatible:
37
43
  - surface meshes / faceted geometry / triangular meshes
38
44
  - unstructured mesh / tetrahedral meshes / volume meshes
39
45
 
40
- cad-to-dagmc can convert:
46
+ cad-to-dagmc can convert the following in to DAGMC compatible meshes:
41
47
  - STEP files
42
- - CadQuery objects (in memory)
43
-
44
- 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
- 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/).
48
+ - CadQuery objects (optionally use names as material tags)
49
+ - Gmsh meshes (optionally use physical groups as material tags)
50
+
51
+ Cad-to-dagmc offers a wide range of features including.
52
+ - Compatibly with [assembly-mesh-plugin](https://github.com/CadQuery/assembly-mesh-plugin) (see examples)
53
+ - Access to the Gmsh mesh to allow user to define full set of mesh parameters
54
+ - Option to use Gmsh physical groups as material tags
55
+ - Geometry scaling with ```scale_factor``` argument
56
+ - Model wide mesh size parameters with ```min_mesh_size``` and ```max_mesh_size``` arguments
57
+ - Volume specific mesh sizing parameters with the ```set_size``` argument
58
+ - Unstructured mesh that share the same coordinates as the surface mesh.
59
+ - Volume mesh allows selecting individual volumes in the geometry.
60
+ - Parallel meshing to quickly mesh the geometry using multiple CPU cores
61
+ - Imprint and merging of CAD geometry, or disable with the ```imprint``` argument
62
+ - Add geometry from multiple sources ([STEP](http://www.steptools.com/stds/step/) files, [CadQuery](https://cadquery.readthedocs.io) objects and [Gmsh](https://gmsh.info/) meshes)
63
+ - Ability to tag the DAGMC implicit complement material using the ```implicit_complement_material_tag``` argument
64
+ - Selected different Gmesh mesh algorithms (defaults to 1) using the ```mesh_algorithm``` argument
65
+ - Pass CadQuery objects in memory for fast transfer of geometry using the ```method``` argument
66
+ - Easy to install with [pip](https://pypi.org/project/cad-to-dagmc/) and [Conda/Mamba](https://anaconda.org/conda-forge/cad_to_dagmc)
67
+ - Well tested both with [CI unit tests](https://github.com/fusion-energy/cad_to_dagmc/tree/main/tests), integration tests and the CSG [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo).
68
+ - Compatible with [Paramak](https://github.com/fusion-energy/paramak) geometry for fusion simulations.
47
69
 
48
- This package is tested with [pytest tests](https://github.com/fusion-energy/cad_to_dagmc/tree/main/tests) and also the DAGMC geometry made with this package is compared to simulation carried out with native constructive solid geometry, see [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo) for more details.
49
-
50
- 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
70
 
52
71
  # Installation options
53
72
 
54
- - Install using Mamba and pip
55
- - Install using Conda and pip
73
+ - Install using Mamba
74
+ - Install using Conda
56
75
  - Install using pip and source compilations
57
76
 
58
-
59
- ## Install using Mamba and pip
77
+ ## Install using Mamba
60
78
 
61
79
  In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
62
80
  - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
@@ -65,7 +83,7 @@ In principle, installing any Conda/Mamba distribution will work. A few Conda/Mam
65
83
 
66
84
  This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
67
85
 
68
- Create a new conda environment, I've chosen Python 3.10 here but newer versions are
86
+ Create a new environment, I've chosen Python 3.10 here but newer versions are
69
87
  also supported.
70
88
  ```bash
71
89
  mamba create --name new_env python=3.10 -y
@@ -76,27 +94,20 @@ Activate the environment
76
94
  mamba activate new_env
77
95
  ```
78
96
 
79
- Install the dependencies
80
- ```bash
81
- mamba install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
82
- ```
83
-
84
- Then you can install the cad_to_dagmc package with ```pip```
97
+ Then you can install the cad_to_dagmc package
85
98
  ```bash
86
- pip install cad_to_dagmc
99
+ mamba install -y -c conda-forge cad_to_dagmc
87
100
  ```
88
101
 
89
-
90
- ## Install using Conda and pip
102
+ ## Install using Conda
91
103
 
92
104
  In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
93
105
  - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
94
106
  - [Anaconda](https://www.anaconda.com/download)
95
107
  - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
96
108
 
97
- This example uses Conda to install some dependencies that are not available via PyPi.
98
-
99
- Create a new conda environment
109
+ Create a new environment, I've chosen Python 3.10 here but newer versions are
110
+ also supported.
100
111
  ```bash
101
112
  conda create --name new_env python=3.10 -y
102
113
  ```
@@ -106,23 +117,26 @@ Activate the environment
106
117
  conda activate new_env
107
118
  ```
108
119
 
109
- Install the dependencies
120
+ Then you can install the cad_to_dagmc package
110
121
  ```bash
111
- conda install -y -c conda-forge "moab>=5.3.0" gmsh python-gmsh
112
- ```
113
-
114
- Then you can install the cad_to_dagmc package with ```pip```
115
- ```bash
116
- pip install cad_to_dagmc
122
+ conda install -y -c conda-forge cad_to_dagmc
117
123
  ```
118
124
 
119
125
  ## Install using pip and source compilations
120
126
 
121
- It should possible to avoid the use of conda and installing using pip and compiling from source.
127
+ It is also possible to avoid the use of conda/mamba and installing using pip.
122
128
 
123
- First compile MOAB (and install Pymoab) from source
129
+ First ensure hdf5 is installed as this is needed by MOAB pip install command
124
130
 
125
- Then install gmsh from source (installing from pip appears to cause conflicts with the open cascade used in ocp and cadquery)
131
+ ```
132
+ sudo apt-get install libhdf5-dev
133
+ ```
134
+
135
+ Then install MOAB, currently available from the repo.
136
+
137
+ ```
138
+ pip install git+https://bitbucket.org/fathomteam/moab/
139
+ ```
126
140
 
127
141
  Then you can install the cad_to_dagmc package with ```pip```
128
142
 
@@ -130,13 +144,13 @@ Then you can install the cad_to_dagmc package with ```pip```
130
144
  pip install cad_to_dagmc
131
145
  ```
132
146
 
133
- ## Install with transport code (e.g OpenMC)
147
+ ## Install with OpenMC or other particle transport codes
134
148
 
135
149
  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/).
136
150
 
137
151
  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
138
152
  ```bash
139
- mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
153
+ mamba install -c conda-forge -y "openmc=0.15.0=dagmc*nompi*"
140
154
  ```
141
155
 
142
156
  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,36 +158,21 @@ It might not be possible to install OpenMC and cad-to-dagmc in the same conda/ma
144
158
  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.
145
159
 
146
160
 
147
-
148
161
  # Known incompatibilities
149
162
 
150
163
  The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
151
164
 
152
165
  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```
153
166
 
154
- 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.
167
+ Installing one of the package dependancies (Gmsh) with pip appears to result in errors when passing cad objects in memory between cadquery / ocp and gmsh. The default method of passing cad objects is via file so this should not impact most users. The conda install gmsh appears to work fine with in memory passing of cad objects as the version of OCP matches between Gmsh and CadQuery.
155
168
 
156
- # Usage - with OpenMC
157
169
 
158
- 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/).
170
+ # Usage
159
171
 
160
- You can run ```mamba install -c conda-forge openmc``` however this may choose to install OpenMC without DAGMC included.
172
+ For examples showing creation of DAGMC h5m files, vtk files and usage within OpenMC transport code see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
161
173
 
162
- You can be more specific with conda/mamba commands to make sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
163
- ```bash
164
- mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
165
- ```
166
-
167
- You could also [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which might be prefered as it can be tricky for the conda enviroment to get resolved.
168
-
169
-
170
-
171
- # Usage - creation of DAGMC h5m files
172
-
173
- For examples see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
174
-
175
- # Usage - simulation with transport code
174
+ For more examples see the CAD tasks in the [neutronics-workshop](https://github.com/fusion-energy/neutronics-workshop) and [model benchmark zoo](https://github.com/fusion-energy/model_benchmark_zoo)
176
175
 
177
- For examples see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
176
+ # Related software
178
177
 
179
- For more examples see the CAD tasks in the [neutronics-workshop](https://github.com/fusion-energy/neutronics-workshop) and [model benchmark zoo](https://github.com/fusion-energy/model_benchmark_zoo)
178
+ 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/).
@@ -0,0 +1,153 @@
1
+
2
+ [![N|Python](https://www.python.org/static/community_logos/python-powered-w-100x40.png)](https://www.python.org)
3
+
4
+ [![CI with Conda install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml) Testing package and running examples with dependencies installed via Conda
5
+
6
+ [![CI with pip install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml) Testing package and running examples with dependencies installed vua PIP
7
+
8
+ [![CI with model benchmark zoo](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml/badge.svg?branch=main)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml) Testing with [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo)
9
+
10
+ [![Upload Python Package](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/python-publish.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/python-publish.yml)
11
+
12
+ [![PyPI](https://img.shields.io/pypi/v/cad_to_dagmc?color=brightgreen&label=pypi&logo=grebrightgreenen&logoColor=green)](https://pypi.org/project/cad_to_dagmc/)
13
+
14
+
15
+ A minimal package that converts CAD geometry to [DAGMC](https://github.com/svalinn/DAGMC/) (h5m) files, [unstructured mesh](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.UnstructuredMesh.html) files (vtk) and Gmsh (msh) files ready for use in neutronics simulations.
16
+
17
+ cad-to-dagmc can create DAGMC compatible:
18
+ - surface meshes / faceted geometry / triangular meshes
19
+ - unstructured mesh / tetrahedral meshes / volume meshes
20
+
21
+ cad-to-dagmc can convert the following in to DAGMC compatible meshes:
22
+ - STEP files
23
+ - CadQuery objects (optionally use names as material tags)
24
+ - Gmsh meshes (optionally use physical groups as material tags)
25
+
26
+ Cad-to-dagmc offers a wide range of features including.
27
+ - Compatibly with [assembly-mesh-plugin](https://github.com/CadQuery/assembly-mesh-plugin) (see examples)
28
+ - Access to the Gmsh mesh to allow user to define full set of mesh parameters
29
+ - Option to use Gmsh physical groups as material tags
30
+ - Geometry scaling with ```scale_factor``` argument
31
+ - Model wide mesh size parameters with ```min_mesh_size``` and ```max_mesh_size``` arguments
32
+ - Volume specific mesh sizing parameters with the ```set_size``` argument
33
+ - Unstructured mesh that share the same coordinates as the surface mesh.
34
+ - Volume mesh allows selecting individual volumes in the geometry.
35
+ - Parallel meshing to quickly mesh the geometry using multiple CPU cores
36
+ - Imprint and merging of CAD geometry, or disable with the ```imprint``` argument
37
+ - Add geometry from multiple sources ([STEP](http://www.steptools.com/stds/step/) files, [CadQuery](https://cadquery.readthedocs.io) objects and [Gmsh](https://gmsh.info/) meshes)
38
+ - Ability to tag the DAGMC implicit complement material using the ```implicit_complement_material_tag``` argument
39
+ - Selected different Gmesh mesh algorithms (defaults to 1) using the ```mesh_algorithm``` argument
40
+ - Pass CadQuery objects in memory for fast transfer of geometry using the ```method``` argument
41
+ - Easy to install with [pip](https://pypi.org/project/cad-to-dagmc/) and [Conda/Mamba](https://anaconda.org/conda-forge/cad_to_dagmc)
42
+ - Well tested both with [CI unit tests](https://github.com/fusion-energy/cad_to_dagmc/tree/main/tests), integration tests and the CSG [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo).
43
+ - Compatible with [Paramak](https://github.com/fusion-energy/paramak) geometry for fusion simulations.
44
+
45
+
46
+ # Installation options
47
+
48
+ - Install using Mamba
49
+ - Install using Conda
50
+ - Install using pip and source compilations
51
+
52
+ ## Install using Mamba
53
+
54
+ In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
55
+ - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
56
+ - [Anaconda](https://www.anaconda.com/download)
57
+ - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
58
+
59
+ This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
60
+
61
+ Create a new environment, I've chosen Python 3.10 here but newer versions are
62
+ also supported.
63
+ ```bash
64
+ mamba create --name new_env python=3.10 -y
65
+ ```
66
+
67
+ Activate the environment
68
+ ```bash
69
+ mamba activate new_env
70
+ ```
71
+
72
+ Then you can install the cad_to_dagmc package
73
+ ```bash
74
+ mamba install -y -c conda-forge cad_to_dagmc
75
+ ```
76
+
77
+ ## Install using Conda
78
+
79
+ In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
80
+ - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
81
+ - [Anaconda](https://www.anaconda.com/download)
82
+ - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
83
+
84
+ Create a new environment, I've chosen Python 3.10 here but newer versions are
85
+ also supported.
86
+ ```bash
87
+ conda create --name new_env python=3.10 -y
88
+ ```
89
+
90
+ Activate the environment
91
+ ```bash
92
+ conda activate new_env
93
+ ```
94
+
95
+ Then you can install the cad_to_dagmc package
96
+ ```bash
97
+ conda install -y -c conda-forge cad_to_dagmc
98
+ ```
99
+
100
+ ## Install using pip and source compilations
101
+
102
+ It is also possible to avoid the use of conda/mamba and installing using pip.
103
+
104
+ First ensure hdf5 is installed as this is needed by MOAB pip install command
105
+
106
+ ```
107
+ sudo apt-get install libhdf5-dev
108
+ ```
109
+
110
+ Then install MOAB, currently available from the repo.
111
+
112
+ ```
113
+ pip install git+https://bitbucket.org/fathomteam/moab/
114
+ ```
115
+
116
+ Then you can install the cad_to_dagmc package with ```pip```
117
+
118
+ ```bash
119
+ pip install cad_to_dagmc
120
+ ```
121
+
122
+ ## Install with OpenMC or other particle transport codes
123
+
124
+ 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/).
125
+
126
+ 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
127
+ ```bash
128
+ mamba install -c conda-forge -y "openmc=0.15.0=dagmc*nompi*"
129
+ ```
130
+
131
+ 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.
132
+
133
+ 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.
134
+
135
+
136
+ # Known incompatibilities
137
+
138
+ The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
139
+
140
+ 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```
141
+
142
+ Installing one of the package dependancies (Gmsh) with pip appears to result in errors when passing cad objects in memory between cadquery / ocp and gmsh. The default method of passing cad objects is via file so this should not impact most users. The conda install gmsh appears to work fine with in memory passing of cad objects as the version of OCP matches between Gmsh and CadQuery.
143
+
144
+
145
+ # Usage
146
+
147
+ For examples showing creation of DAGMC h5m files, vtk files and usage within OpenMC transport code see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
148
+
149
+ For more examples see the CAD tasks in the [neutronics-workshop](https://github.com/fusion-energy/neutronics-workshop) and [model benchmark zoo](https://github.com/fusion-energy/model_benchmark_zoo)
150
+
151
+ # Related software
152
+
153
+ 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/).