Skip to content

Commit

Permalink
Merge pull request #17 from ebknudsen/develop
Browse files Browse the repository at this point in the history
homogenize and improve nuclear data logic
  • Loading branch information
ebknudsen authored Nov 16, 2023
2 parents 48de559 + 51800b0 commit 02f1c06
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 30 deletions.
41 changes: 25 additions & 16 deletions Arch/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@
#!/bin/bash
set -ex

echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/endfb80_hdf5/cross_sections.xml" >> $HOME/.bashrc
source $HOME/.bashrc
if [ ! -e $0.done ]; then
if [ "x${OPENMC_CROSS_SECTIONS}"=="x" ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi

sudo pacman -Sy --noconfirm wget
#default libraries
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

#defaul libraries
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"
mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

cd /opt
sudo mkdir -p nuclear_data
cd nuclear_data
toget=$endfb_VIII

#see other default options above
sudo wget $endfb_VIII
if [ ! -e `basename $toget` ]; then
#see other default options above
wget $toget

for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
fi
touch ${0}.done
else
name=`basename $0`
echo nuclear data appears to already be installed \(lock file ${name}.done exists\) - skipping.
fi

for entry in "$PWD"/*
do
sudo tar -xvf $entry
done
20 changes: 12 additions & 8 deletions Debian10/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@
set -ex

if [ ! -e $0.done ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
source $HOME/.bashrc
if [ "x${OPENMC_CROSS_SECTIONS}"=="x" ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi


#default libraries
endfb_VII="https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz"
endfb_VIII="https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz"
jeff="https://anl.box.com/shared/static/ddetxzp0gv1buk1ev67b8ynik7f268hw.xz"
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

if [ ! -e `basename $endfb_VII` ]; then
toget=$endfb_VIII

if [ ! -e `basename $toget` ]; then
#see other default options above
wget $endfb_VII
wget $toget

for entry in "$PWD"/*
for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
Expand Down
15 changes: 9 additions & 6 deletions Debian11/nuclear_data-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ if [ ! -e $0.done ]; then
echo "export OPENMC_CROSS_SECTIONS=$HOME/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml" >> $HOME/.bashrc
fi


#default libraries
endfb_VII="https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz"
endfb_VIII="https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz"
jeff="https://anl.box.com/shared/static/ddetxzp0gv1buk1ev67b8ynik7f268hw.xz"
endfb_VII="https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz"
endfb_VIII="https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz"
jeff="https://anl.box.com/shared/static/4jwkvrr9pxlruuihcrgti75zde6g7bum.xz"

mkdir -p $HOME/openmc/nuclear_data
cd $HOME/openmc/nuclear_data

if [ ! -e `basename $endfb_VII` ]; then
toget=$endfb_VIII

if [ ! -e `basename $toget` ]; then
#see other default options above
wget $endfb_VII
wget $toget

for entry in "$PWD"/*
for entry in "$PWD"/*.xz
do
tar -xvf $entry
done
Expand Down

0 comments on commit 02f1c06

Please sign in to comment.