summaryrefslogtreecommitdiff
path: root/Donjon/data/history_mphy.save
diff options
context:
space:
mode:
authorstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
committerstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
commit7dfcc480ba1e19bd3232349fc733caef94034292 (patch)
tree03ee104eb8846d5cc1a981d267687a729185d3f3 /Donjon/data/history_mphy.save
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Donjon/data/history_mphy.save')
-rwxr-xr-xDonjon/data/history_mphy.save55
1 files changed, 55 insertions, 0 deletions
diff --git a/Donjon/data/history_mphy.save b/Donjon/data/history_mphy.save
new file mode 100755
index 0000000..a91f322
--- /dev/null
+++ b/Donjon/data/history_mphy.save
@@ -0,0 +1,55 @@
+#!/bin/sh
+if [ $# = 0 ]
+ then
+ echo "usage: history_mphy.save directory" 1>&2
+ exit 1
+fi
+echo access history_mphy.save
+MACH=`uname -s`
+Sysx="`echo $MACH | cut -b -6`"
+if [ $Sysx = "CYGWIN" ]; then
+ MACH=`uname -o`
+elif [ $Sysx = "AIX" ]; then
+ MACH=`uname -s`
+else
+ MACH=`uname -sm | sed 's/[ ]/_/'`
+fi
+if [ $Sysx = "Linux" -o $Sysx = "Darwin" ]; then
+mkdir Rundir
+cd Rundir
+grep --text ">|+++ Burnup=" ../history_mphy.result > input_file
+head input_file
+cat >conv.f90 <<'eof2'
+program conv
+ parameter(maxtim=3000)
+ real burnup(maxtim),keff(maxtim)
+ character(len=8) :: text
+ it=0
+ 10 it=it+1
+ if(it.gt.maxtim) then
+ print *,'maxtim overflow'
+ stop
+ endif
+ open(7,file='input_file')
+ open(8,file='matlab_history_mphy.m')
+ read(7,*,end=20) text,text,burnup(it),text,keff(it)
+ go to 10
+ 20 close(7)
+ print *,'it=',it
+ write(8,200,advance='no') (burnup(i),i=1,it-1)
+ write(8,'(2h ])')
+ write(8,300,advance='no') (keff(i),i=1,it-1)
+ write(8,'(2h ])')
+ close(8)
+ 200 format(9h burnup=[,1p,10e12.4,4h .../(7x,10e12.4,4h ...))
+ 300 format(7h keff=[,1p,10e12.4,4h .../(8x,10e12.4,4h ...))
+end program conv
+eof2
+gfortran conv.f90
+./a.out <input_file
+rm input_file conv.f90 a.out
+mv matlab_history_mphy.m $1/"$MACH"
+cd ..
+rm -r Rundir
+fi
+echo "history_mphy.save completed"