#!/bin/bash # tet-file needs both .node and .ele files generated by Tetgen. No file extension is needed # mag-file: magnetization vectors. # mag-file format: # 1. . Line format: # 2: (,,) # site-file: observation positions. # site-file format: # 1. . Line format: # 2. ////// # 3. (,,)/(,,)/ # obs-file needs only the output file's name with no file extension # available calculating types: potential, gradient and tensor logfile=log.txt execu=./build/bin/magtet job=${1} if [[ ${job} == "prism" ]]; then echo "Executing the job \""${job}"\" by "${execu} echo "Logging file:" ${logfile} echo "======================" cat <<- EOF > ${logfile} tet-file = data/prism/prism.1 mag-file = (0,0,200) site-file = -30/30/-30/30/10/81/81 #site-file = (-30,-30,10)/(30,30,10)/51 obs-file = data/prism/prism cal-type = potential gradient tensor EOF ${execu} ${logfile} elif [[ ${job} == "pipeline" ]]; then echo "Executing the job \""${job}"\" by "${execu} echo "Logging file:" ${logfile} echo "======================" cat <<- EOF > ${logfile} tet-file = data/pipeline/pipeline mag-file = data/pipeline/magz.txt site-file = data/pipeline/site.txt obs-file = data/pipeline/pipeline cal-type = potential gradient tensor EOF ${execu} ${logfile} fi