diff --git a/docs/gallery/README.md b/docs/gallery/README.md new file mode 100644 index 000000000..3beb87ec1 --- /dev/null +++ b/docs/gallery/README.md @@ -0,0 +1,15 @@ +How to add new images to the slideshow +====================================== + +1. Copy the images you wish to add to the gallery to this folder. The images + must be in `.png` format. +2. Run the `make_gallery.sh` script. This will append the new image data to + `gallery.rst`. Alternatively, edit `gallery.rst` yourself if you don't want + the new picture to be at the end of the slideshow. +3. Edit the alt text for the new images you have added in `gallery.rst`; these + will be at the bottom of the file. Otherwise they will be captioned with + Lorem Ipsum. +4. Run the `make_html_entry.sh` script. This will rebuild the html part of the + gallery automatically. +5. Commit the `.png` file and the the modified `gallery.rst` and + `slideshow.html` files. diff --git a/docs/gallery/atr.png b/docs/gallery/atr.png new file mode 100644 index 000000000..771371272 Binary files /dev/null and b/docs/gallery/atr.png differ diff --git a/docs/gallery/bsm_work.png b/docs/gallery/bsm_work.png new file mode 100644 index 000000000..03664b066 Binary files /dev/null and b/docs/gallery/bsm_work.png differ diff --git a/docs/gallery/fludag_ni_proton_mag.png b/docs/gallery/fludag_ni_proton_mag.png new file mode 100644 index 000000000..9b64f4849 Binary files /dev/null and b/docs/gallery/fludag_ni_proton_mag.png differ diff --git a/docs/gallery/fng_neutron_tetmesh_mcnp5.png b/docs/gallery/fng_neutron_tetmesh_mcnp5.png new file mode 100644 index 000000000..458353c1b Binary files /dev/null and b/docs/gallery/fng_neutron_tetmesh_mcnp5.png differ diff --git a/docs/gallery/fng_sdr_fluka.png b/docs/gallery/fng_sdr_fluka.png new file mode 100644 index 000000000..87b0d439e Binary files /dev/null and b/docs/gallery/fng_sdr_fluka.png differ diff --git a/docs/gallery/gallery.rst b/docs/gallery/gallery.rst new file mode 100644 index 000000000..9902c180f --- /dev/null +++ b/docs/gallery/gallery.rst @@ -0,0 +1,38 @@ +Gallery of projects that use DAGMC +================================== + +.. image:: hab1.png + :alt: NASA habitat module irradiated by 1 GeV protons, FluDAG + +---- + +.. image:: pppl_fnsf.png + :alt: PPPL Fusion Nuclear Science Facility (FNSF) + +.. image:: atr.png + :alt: Advanced Test Reactor (ATR) cross section + +.. image:: sns_proton.png + :alt: Proton flux in Spallation Neutron Source (SNS), DAG-MCNP6 + +.. image:: bsm_work.png + :scale: 45 + :alt: Fusion system blanket shield module, DAG-MCNP5 + +.. image:: fng_sdr_fluka.png + :alt: Frascati Neutron Generator (FNG) SDR geometry, FluDAG + +.. image:: fludag_ni_proton_mag.png + :alt: Protons being deflected by magnetic field, interacting on nickel block, FluDAG + +.. image:: hab_module_proton_daggeant4.png + :alt: Proton irradiation of NASA habitat module, DagGeant4 + +.. image:: iter_elm_coils_heating.png + :alt: Nuclear heating behind the ITER blanket modules including the presence of ELM coils, DAG-MCNP5 + +.. image:: pppl_fnsf_tritium.png + :alt: Tritium reaction rate in PPPL ST-FSNF, DAG-MCNP5 + +.. image:: fng_neutron_tetmesh_mcnp5.png + :alt: Neutron flux in FNG SDR geometry, DAG-MCNP5 diff --git a/docs/gallery/hab1.png b/docs/gallery/hab1.png new file mode 100644 index 000000000..347252ee5 Binary files /dev/null and b/docs/gallery/hab1.png differ diff --git a/docs/gallery/hab_module_proton_daggeant4.png b/docs/gallery/hab_module_proton_daggeant4.png new file mode 100644 index 000000000..e02f36793 Binary files /dev/null and b/docs/gallery/hab_module_proton_daggeant4.png differ diff --git a/docs/gallery/index.rst b/docs/gallery/index.rst new file mode 100644 index 000000000..46ebdc000 --- /dev/null +++ b/docs/gallery/index.rst @@ -0,0 +1,82 @@ +Gallery +======= + +Below is an array of analysis results produced using DAGMC. + +---- + +.. figure:: hab1.png + :align: center + + NASA habitat module irradiated by 1 GeV protons, FluDAG + +---- + +.. figure:: pppl_fnsf.png + :align: center + + PPPL Fusion Nuclear Science Facility (FNSF) + +---- + +.. figure:: atr.png + :align: center + + Advanced Test Reactor (ATR) cross section + +---- + +.. figure:: sns_proton.png + :align: center + + Proton flux in Spallation Neutron Source (SNS), DAG-MCNP6 + +---- + +.. figure:: bsm_work.png + :align: center + :scale: 45 + + Fusion system blanket shield module, DAG-MCNP5 + +---- + +.. figure:: fng_sdr_fluka.png + :align: center + + Frascati Neutron Generator (FNG) SDR geometry, FluDAG + +---- + +.. figure:: fludag_ni_proton_mag.png + :align: center + + Protons being deflected by magnetic field, interacting on nickel block, FluDAG + +---- + +.. figure:: hab_module_proton_daggeant4.png + :align: center + + Proton irradiation of NASA habitat module, DagGeant4 + +---- + +.. figure:: iter_elm_coils_heating.png + :align: center + + Nuclear heating behind the ITER blanket modules including the presence of ELM coils, DAG-MCNP5 + +---- + +.. figure:: pppl_fnsf_tritium.png + :align: center + + Tritium reaction rate in PPPL ST-FSNF, DAG-MCNP5 + +---- + +.. figure:: fng_neutron_tetmesh_mcnp5.png + :align: center + + Neutron flux in FNG SDR geometry, DAG-MCNP5 \ No newline at end of file diff --git a/docs/gallery/iter_elm_coils_heating.png b/docs/gallery/iter_elm_coils_heating.png new file mode 100644 index 000000000..8367c4030 Binary files /dev/null and b/docs/gallery/iter_elm_coils_heating.png differ diff --git a/docs/gallery/make_gallery.sh b/docs/gallery/make_gallery.sh new file mode 100755 index 000000000..e59a8baea --- /dev/null +++ b/docs/gallery/make_gallery.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# scans the current directory and for each new file not already existing in the +# gallery.rst file, creates a new entry, the person adding the file will however +# need to add descriptive text + +file=gallery.rst + +# function to write a gallery entry +function gallery_entry() +{ + echo "" >> $2 + echo ".. image::" $1 >> $2 + echo " :alt: Dummy Text Lorem Ipsum" >> $2 +} + +# for each png file +for i in *.png ; do + if ! grep -q $i gallery.rst ; then + gallery_entry $i $file + fi +done diff --git a/docs/gallery/make_html_entry.sh b/docs/gallery/make_html_entry.sh new file mode 100755 index 000000000..79da75458 --- /dev/null +++ b/docs/gallery/make_html_entry.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +# on the basis of the entries in gallery.rst file +# produce the html snippet that allows to make the +# gallery on the front page + +# this function writes the html entry for a given image, as determined +# from the gallery.rst entry +function html_slide_entry() +{ + slide_number="$1" + number_of_slides="$2" + imagename="$3" + alttext="$4" + output_html="$5" + + echo '
' >> $5 + echo '
'$1' / '$2'
' >> $5 + echo ' ' >> $5 + echo '
'$4'
' >> $5 + echo '
' >> $5 + echo '' >> $5 +} + +# writes the forward and backward buttons +function html_write_buttons +{ + outfile=$1 + echo ' ' >> $outfile + echo ' ' >> $outfile +} + +# writes the dots for the images +function html_write_dots +{ + dot_type="$1" + num_dots="$2" + outfile="$3" + echo '
' >> $outfile + for (( i = 1 ; i <= $num_dots ; i++ )) ; do + echo ' ' >> $outfile + done + echo '
' >> $outfile + echo '' >> $outfile +} + + +# this is the input rst file which determines, what the html will show +gallery_file="gallery.rst" + +# the file we are writing out to +out_file="test.html" + +# determine the number of images +num_images=`grep -c ' image::' $gallery_file` + +# write the start of the html section +echo '' > $out_file +echo '' >> $out_file +echo '
' >> $out_file +echo '
' >> $out_file + +# loop over the number of slides +for (( i = 1 ; i <= $num_images ; i++ )) ; do + alttext=`grep ":alt:" $gallery_file | sed -n "$i"p | cut -d ' ' -f6-` + img_file=`grep "image::" $gallery_file | sed -n "$i"p | awk '{print $3}'` + echo $alttext $img_file + html_slide_entry $i $num_images $img_file "$alttext" $out_file +done + +# write the buttons +html_write_buttons $out_file + +echo '
' >> $out_file +echo '
' >> $out_file + +# write the dots +html_write_dots "dot" $num_images $out_file + +echo '' >> $out_file + +# now we insert the autogen content into the slideshow file +# determine the line on which we insert the auto get content +breakline=`grep -n "<\!-- WE WILL INSERT AUTO GEN CONENT HERE -->" ../slideshow_empty.html | sed -e s'/:/ /'g | awk '{print $1}'` +breaklineplus1=$(($breakline+1)) +filelength=`wc -l ../slideshow_empty.html | awk '{print $1}'` + +# first print out the file upto the break point +sed -n 1,"$breakline"p ../slideshow_empty.html > ../slideshow.html +# dump the contents of the autogen file into the slideshow +cat $out_file >> ../slideshow.html +# now print out the rest of the slideshow +sed -n "$breaklineplus1","$filelength"p ../slideshow_empty.html >> ../slideshow.html + +# all done :) diff --git a/docs/gallery/pppl_fnsf.png b/docs/gallery/pppl_fnsf.png new file mode 100644 index 000000000..85642e5fc Binary files /dev/null and b/docs/gallery/pppl_fnsf.png differ diff --git a/docs/gallery/pppl_fnsf_tritium.png b/docs/gallery/pppl_fnsf_tritium.png new file mode 100644 index 000000000..a181807db Binary files /dev/null and b/docs/gallery/pppl_fnsf_tritium.png differ diff --git a/docs/gallery/sns_proton.png b/docs/gallery/sns_proton.png new file mode 100644 index 000000000..8587f89bb Binary files /dev/null and b/docs/gallery/sns_proton.png differ