beamplasma_serial.sh

来自「pic 模拟程序!面向对象」· Shell 代码 · 共 155 行

SH
155
字号
#!/bin/sh# Shell script for submitting beamplasma.inp simulation on Unix/Linux# Invoke this script as follows:# prompt> nohup beamplasma_serial.sh >beamplasma.out 2>beamplasma.err &echoecho "XOOPIC - Serial shell script is beginning execution --"echo# Specify the number of steps# NUM_STEP1 gets the beam fully into the simulation region# NUM_STEP2 gets the beam 0.2 m into the plasma (using moving window)# NUM_STEP3 gets the beam an additional 0.2 m into the plasma# note:  NUM_STEP2 = NUM_STEP3 - NUM_STEP1NUM_STEP1=468NUM_STEP2=16876NUM_STEP3=17344# Specify the base name for input/output filesFILE_NAME="beamplasma"# Specify which version of xoopic to execute:OOPIC_DIR="/work/research/bruhwile/projects/oopic/oopic.serial"INPUT_DIR=$OOPIC_DIR"/inp"STORE_DIR="/work/research/bruhwile/projects/data.oopic/e157_serial"# copy input file and executable to local directory# set echo, turn on accounting, time job, etc.echoecho "Copying over the specified input file and executable..."cd $STORE_DIRcp $OOPIC_DIR/xg/xoopic .cp $INPUT_DIR/$FILE_NAME.inp .#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Run enough to get beam fully inside simulation regiontime xoopic -nox -i $FILE_NAME.inp -s $NUM_STEP1 -dp $NUM_STEP1# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n0_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job and run beam from 0.0 m to 0.2 mtime xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP2 -dp $NUM_STEP2# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n1_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job and run beam from 0.2 m to 0.4 mttime xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n2_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job and run beam from 0.4 m to 0.6 mtime xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n3_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job and run beam from 0.6 m to 0.8 mtime xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n4_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job and run beam from 0.8 m to 1.0 mtime xoopic -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp file..."N_DUMPS="n5_"cp $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;##########################echoechoecho "All done."exit

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?