Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
cd /opt
git clone https://github.com/openmc-dev/openmc.git
cd openmc
git checkout develop
git checkout v0.14.0
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=.. ..
make
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.10.9
python-version: 3.12.1
- name: Build plasma source
run: |
pip install --upgrade pip
Expand All @@ -36,7 +36,7 @@ jobs:
needs: build
strategy:
matrix:
python-version: [3.9.16, 3.10.9]
python-version: [3.9.16, 3.10.9, 3.11.7, 3.12.1]

steps:
- uses: actions/checkout@v2
Expand All @@ -63,7 +63,7 @@ jobs:
needs: build
strategy:
matrix:
python-version: [3.9.16, 3.10.9]
python-version: [3.9.16, 3.10.9, 3.11.7, 3.12.1]

steps:
- uses: actions/checkout@v2
Expand All @@ -82,7 +82,7 @@ jobs:
sudo apt install g++ cmake libhdf5-dev
git clone https://github.com/openmc-dev/openmc.git
cd openmc
git checkout develop
git checkout v0.14.0
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=.. ..
make
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,21 @@ The package can be built and installed in editable mode by:
Compiling of the parametric plasma source from source is another method of
using the software.

First clone the openmc repository into your home directory
First clone the openmc repository into your home directory (we currently support OpenMC v0.14.0)

```bash
cd ~
git clone https://github.com/openmc-dev/openmc.git
git clone -b v0.14.0 --depth 1 https://github.com/openmc-dev/openmc.git
```

Then clone the parametric plasma source repository

```bash
git clone https://github.com/open-radiation-sources/parametric-plasma-source.git
```

Then create a build folder and compile from the folder. This assumes that
openmc repository was cloned into your home directory ```/opt/openmc```.
openmc repository was cloned into a directory at `/opt/openmc`.

```bash
cd parametric-plasma-source
Expand Down
7 changes: 4 additions & 3 deletions parametric_plasma_source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@ if(OpenMC_FOUND)

add_library(source_sampling SHARED ${source_sampling_SOURCES})

find_package(HDF5 REQUIRED)

find_library(OPENMC_LIB openmc HINTS ${OPENMC_LIB_DIR} OPTIONAL)

if (OPENMC_LIB)
set_target_properties(source_sampling PROPERTIES PREFIX "")
set_target_properties(source_sampling PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(source_sampling PUBLIC ${OPENMC_INC_DIR})
target_link_libraries(source_sampling ${OPENMC_LIB} gfortran)
target_include_directories(source_sampling PUBLIC ${HDF5_INCLUDE_DIRS})
target_link_libraries(source_sampling ${OPENMC_LIB} ${HDF5_LIBRARIES})
endif()

# Build source_generator if OpenMC is available
Expand All @@ -73,8 +76,6 @@ if(OpenMC_FOUND)

add_executable(source_generator ${source_generator_SOURCES})

find_package(HDF5 REQUIRED)

set_target_properties(source_generator PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(source_generator PUBLIC ${OPENMC_INC_DIR})
target_include_directories(source_generator PUBLIC ${HDF5_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion parametric_plasma_source/src/source_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ int main(int argc, char* argv[])
}

std::cout << "Sampling source:" << std::endl;
openmc::model::external_sources.push_back(std::make_unique<openmc::CustomSourceWrapper>(path_source_library, source_parameters));
openmc::model::external_sources.push_back(std::make_unique<openmc::CompiledSourceWrapper>(path_source_library, source_parameters));
openmc::calculate_work();
openmc::allocate_banks();
openmc::initialize_source();
Expand Down
2 changes: 1 addition & 1 deletion pybind11
Submodule pybind11 updated 254 files