Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to write GMSH mesh file #50

Merged
merged 12 commits into from
Dec 17, 2023
31 changes: 28 additions & 3 deletions .github/workflows/ci_with_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: install non pypi dependencies for cad creation
- name: install dependencies and run CSG / DAMGC benchmarks
env:
OPENMC_CROSS_SECTIONS: /home/runner/work/cad_to_dagmc/cad_to_dagmc/cross_sections.xml
shell: bash
Expand All @@ -37,9 +37,34 @@ jobs:
sudo apt-get upgrade -y
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
mamba activate
mamba install -y -c cadquery -c conda-forge moab gmsh python-gmsh cadquery=master "openmc=0.13.3=dagmc*nompi*"
mamba install -y -c conda-forge "openmc=0.13.3=dagmc*nompi*"
mamba install -y -c cadquery -c conda-forge moab gmsh python-gmsh cadquery=master
python -m pip install --upgrade pip
sudo apt install g++ cmake libhdf5-dev libpng-dev
mkdir MOAB
cd MOAB
git clone --single-branch --branch 5.4.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
mkdir build
cd build
cmake ../moab -DENABLE_HDF5=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/home/runner/work/cad_to_dagmc/cad_to_dagmc/MOAB -DENABLE_FORTRAN=OFF
make
sudo make install
mkdir DAGMC
cd DAGMC
git clone --single-branch --branch v3.2.2 --depth 1 https://github.com/svalinn/DAGMC.git
mkdir build
cd build
cmake ../DAGMC -DBUILD_TALLY=ON -DMOAB_DIR=/home/runner/work/cad_to_dagmc/cad_to_dagmc/MOAB -DBUILD_STATIC_EXE=OFF -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/work/cad_to_dagmc/cad_to_dagmc/DAGMC/
sudo make install
git clone --depth 1 --recurse-submodules https://github.com/openmc-dev/openmc.git openmc-repo
cd openmc-repo
mkdir build
cd build
cmake ..
make
sudo make install
cd ..
python -m pip install .
cd ..
python -m pip install cad_to_dagmc openmc_data_downloader
openmc_data_downloader -l ENDFB-7.1-NNDC -i Fe56 Be9
git clone https://github.com/fusion-energy/model_benchmark_zoo.git
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/ci_with_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# - uses: conda-incubator/setup-miniconda@v2

- name: install non pypi dependencies
shell: bash
run: |
Expand All @@ -46,7 +44,32 @@ jobs:
python -m pip install --upgrade pip
python -m pip install .
python -c "import cad_to_dagmc"
mamba install -y -c conda-forge "openmc=0.13.3=dagmc*nompi*"
sudo apt install g++ cmake libhdf5-dev libpng-dev
mkdir MOAB
cd MOAB
git clone --single-branch --branch 5.4.1 --depth 1 https://bitbucket.org/fathomteam/moab.git
mkdir build
cd build
cmake ../moab -DENABLE_HDF5=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/home/runner/work/cad_to_dagmc/cad_to_dagmc/MOAB -DENABLE_FORTRAN=OFF
make
sudo make install
mkdir DAGMC
cd DAGMC
git clone --single-branch --branch v3.2.2 --depth 1 https://github.com/svalinn/DAGMC.git
mkdir build
cd build
cmake ../DAGMC -DBUILD_TALLY=ON -DMOAB_DIR=/home/runner/work/cad_to_dagmc/cad_to_dagmc/MOAB -DBUILD_STATIC_EXE=OFF -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/work/cad_to_dagmc/cad_to_dagmc/DAGMC/
sudo make install
git clone --depth 1 --recurse-submodules https://github.com/openmc-dev/openmc.git openmc-repo
cd openmc-repo
mkdir build
cd build
cmake ..
make
sudo make install
cd ..
python -m pip install .
cd ..
python -m pip install .[tests]
pytest tests -v
cd examples
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ You may also want to install OpenMC with DAGMC to make use of the h5m geometry f
```bash
mamba install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
```
You could also [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which might be prefered.


# Install using Conda and pip
Expand Down Expand Up @@ -98,4 +99,4 @@ For examples see the [examples folder](https://github.com/fusion-energy/cad_to_d

# Usage - simulation with transport code

For examples see the CAD tasks in the [neutronics-workshop](https://github.com/fusion-energy/neutronics-workshop)
For 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)
Loading