From 0d10714a116bd0e2d0695f6a756db58cbabffe74 Mon Sep 17 00:00:00 2001 From: "U-ADRICE\\sb28" Date: Wed, 4 Jan 2023 14:29:35 -0600 Subject: [PATCH] Regularized the utilities in Resources/Utils so that their usage is more uniform. E.g. called via the command line with a configuration file specified, where needed. --- Resources/Utils/calculateDEM/config.cfg | 4 ++- Resources/Utils/calculateDEM/source/main.cpp | 34 ++++++++++--------- .../build_calculateIonizationTemperature.bat | 2 +- .../calculateIonizationTemperature/config.cfg | 2 +- .../source/main.cpp | 28 +++++++-------- .../build_calculateVALheating.bat | 2 +- .../Utils/calculateVALheating/source/main.cpp | 12 +++---- .../build_scripts/build_extractQuantities.bat | 0 Resources/Utils/extractQuantities/config.cfg | 1 + .../Utils/extractQuantities/source/main.cpp | 28 +++++++++------ .../Utils/extractSpatialAverages/config.cfg | 2 ++ .../extractSpatialAverages/source/main.cpp | 30 +++++++++------- .../build_generatePieceWiseFit.bat | 0 .../generatePieceWiseFit/fits/B(closed).txt | 6 ++++ .../generatePieceWiseFit/fits/B(open).txt | 8 ++++- .../generatePieceWiseFit/source/main.cpp | 31 +++++++++++++---- .../source/piecewisefit.cpp | 0 .../source/piecewisefit.h | 0 Resources/Utils/meshTool/config.cfg | 6 +++- .../Utils/meshTool/meshes/meshDef(1).txt | 7 +++- .../Utils/meshTool/meshes/meshDef(2).txt | 7 +++- Resources/Utils/meshTool/source/main.cpp | 10 +++++- .../build_scripts/build_writeIEfile.bat | 2 +- Resources/Utils/writeIEfile/config.cfg | 5 +++ Resources/Utils/writeIEfile/source/main.cpp | 27 +++++++++------ 25 files changed, 168 insertions(+), 86 deletions(-) mode change 100644 => 100755 Resources/Utils/extractQuantities/build_scripts/build_extractQuantities.bat mode change 100644 => 100755 Resources/Utils/extractQuantities/config.cfg mode change 100644 => 100755 Resources/Utils/extractQuantities/source/main.cpp mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/build_scripts/build_generatePieceWiseFit.bat mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/fits/B(closed).txt mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/fits/B(open).txt mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/source/main.cpp mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp mode change 100644 => 100755 Resources/Utils/generatePieceWiseFit/source/piecewisefit.h create mode 100755 Resources/Utils/writeIEfile/config.cfg diff --git a/Resources/Utils/calculateDEM/config.cfg b/Resources/Utils/calculateDEM/config.cfg index a755d3f..4d743d1 100755 --- a/Resources/Utils/calculateDEM/config.cfg +++ b/Resources/Utils/calculateDEM/config.cfg @@ -1,9 +1,11 @@ +Results 40 0.1 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 1 -0 0 +0 600 +// Results directory // Number of temperature bins // Width of temperature bin (dex) // Temperature bins diff --git a/Resources/Utils/calculateDEM/source/main.cpp b/Resources/Utils/calculateDEM/source/main.cpp index 0815365..42c1676 100755 --- a/Resources/Utils/calculateDEM/source/main.cpp +++ b/Resources/Utils/calculateDEM/source/main.cpp @@ -5,7 +5,7 @@ // * // * (c) Dr. Stephen J. Bradshaw // * -// * Date last modified: 10/20/2021 +// * Date last modified: 01/04/2023 // * // **** @@ -22,8 +22,8 @@ int main( int argc, char **argv ) { -FILE *pCONFIGFile, *pAMRFile, *pPHYFile, *pDEMFile; -char szAMRFilename[256], szPHYFilename[256], szDEMFilename[256]; +FILE *pCFGFile, *pAMRFile, *pPHYFile, *pDEMFile; +char szResultsDirectory[256], szAMRFilename[256], szPHYFilename[256], szDEMFilename[256]; double *pflog10T, *pfDEM; double fdexStep, fds, fne, fTe, flog10Te; double fBuffer; @@ -33,31 +33,33 @@ int i, j, k, m; int iBuffer; if( argc == 1 ) { - printf( "\nERROR! No configuration file specified.\n" ); - exit(EXIT_SUCCESS); + printf( "\nA configuration file must be specified. E.g. calculateDEM config.cfg\n"); + exit( EXIT_SUCCESS ); } // Open the configuration file printf( "\nUsing: %s\n", argv[1] ); -pCONFIGFile = fopen( argv[1], "r" ); +pCFGFile = fopen( argv[1], "r" ); + // Get the directory containing the numerical results + fscanf( pCFGFile, "%s", szResultsDirectory ); // Get the number of temperature bins - fscanf( pCONFIGFile, "%i", &iNumBins ); + fscanf( pCFGFile, "%i", &iNumBins ); // Get the bin width (dex) - ReadDouble( pCONFIGFile, &fdexStep ); + ReadDouble( pCFGFile, &fdexStep ); // Allocate memory for the temperature intervals which define each bin pflog10T = (double*)malloc( sizeof(double*) * ( iNumBins + 1 ) ); // Read the temperature intervals from the configuration file for( i=0; i<(iNumBins+1); i++ ) { - ReadDouble( pCONFIGFile, &(pflog10T[i]) ); + ReadDouble( pCFGFile, &(pflog10T[i]) ); } // Get the number of output files to write // (the specified range is split into this number and summed over to calculate each DEM(T)) - fscanf( pCONFIGFile, "%i", &iNumOutputFiles ); + fscanf( pCFGFile, "%i", &iNumOutputFiles ); // Get the input file range - fscanf( pCONFIGFile, "%i", &iFileRangeStart ); - fscanf( pCONFIGFile, "%i", &iFileRangeEnd ); + fscanf( pCFGFile, "%i", &iFileRangeStart ); + fscanf( pCFGFile, "%i", &iFileRangeEnd ); // Close the configuration file -fclose( pCONFIGFile ); +fclose( pCFGFile ); // Split the input file range to produce the specified number of output files iSubRangeStep = ( iFileRangeEnd - iFileRangeStart ) / iNumOutputFiles; @@ -100,8 +102,8 @@ for( i=0; i 1 ) { - // Open and read the configuration file - pCFGFile = fopen( argv[1], "r" ); - // Get the directory containing the numerical results - fscanf( pCFGFile, "%s", szResultsDirectory ); - // Get the (log) temperature range and increment (dex) over which to calculate the (effective) ionization temperature - for( i=0; i<3; i++ ) - ReadDouble( pCFGFile, &(flogTRange[i]) ); - // Get the range of output files over which to calculate the (effective) ionization temperature - fscanf( pCFGFile, "%i", &iFrom ); - fscanf( pCFGFile, "%i", &iTo ); - fclose( pCFGFile ); -} else { +if( argc == 1 ) { printf( "\nA configuration file must be specified. E.g. calculateIonizationTemperature config.cfg\n"); exit( EXIT_SUCCESS ); } +// Open and read the configuration file +pCFGFile = fopen( argv[1], "r" ); + // Get the directory containing the numerical results + fscanf( pCFGFile, "%s", szResultsDirectory ); + // Get the (log) temperature range and increment (dex) over which to calculate the (effective) ionization temperature + for( i=0; i<3; i++ ) + ReadDouble( pCFGFile, &(flogTRange[i]) ); + // Get the range of output files over which to calculate the (effective) ionization temperature + fscanf( pCFGFile, "%i", &iFrom ); + fscanf( pCFGFile, "%i", &iTo ); +fclose( pCFGFile ); + pRadiation = new CRadiation( (char *)"Radiation_Model/config/elements_neq.cfg" ); pIonFrac = new CIonFrac( NULL, (char *)"Radiation_Model/config/elements_neq.cfg", pRadiation ); diff --git a/Resources/Utils/calculateVALheating/build_scripts/build_calculateVALheating.bat b/Resources/Utils/calculateVALheating/build_scripts/build_calculateVALheating.bat index 3c275dc..2a79d18 100755 --- a/Resources/Utils/calculateVALheating/build_scripts/build_calculateVALheating.bat +++ b/Resources/Utils/calculateVALheating/build_scripts/build_calculateVALheating.bat @@ -1 +1 @@ -g++ -O3 -flto -Wall ../source/main.cpp ../../../../Radiation_Model/source/radiation.cpp ../../../../Radiation_Model/source/element.cpp ../../../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp ../../../source/fitpoly.cpp ../../../source/file.cpp -o ../../../../calculateVALheating.exe +g++ -O3 -flto -Wall ../source/main.cpp ../../../../Radiation_Model/source/radiation.cpp ../../../../Radiation_Model/source/element.cpp ../../../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp ../../../source/fitpoly.cpp ../../../source/file.cpp -o ../calculateVALheating.exe diff --git a/Resources/Utils/calculateVALheating/source/main.cpp b/Resources/Utils/calculateVALheating/source/main.cpp index f173a30..23920c9 100755 --- a/Resources/Utils/calculateVALheating/source/main.cpp +++ b/Resources/Utils/calculateVALheating/source/main.cpp @@ -1,10 +1,10 @@ // -// updateVAL.cpp +// main.cpp // // Updates the VAL heating profile in the case that the initial // density profile has been altered. // -// Created by Jeffrey Reep on 7/27/15. +// Created by Jeffrey Reep on 07/27/2015 // // @@ -21,10 +21,10 @@ using namespace std; -int main() +int main( void ) { - - /*ifstream fin("Radiation_Model/atomic_data/OpticallyThick/VAL_atmospheres/VAL.heat"); + /* + ifstream fin("Radiation_Model/atomic_data/OpticallyThick/VAL_atmospheres/VAL.heat"); int heat_num_lines,i; double **heat_rows; fin >> heat_num_lines; @@ -198,4 +198,4 @@ int main() outfile.close(); return 0; -} +} \ No newline at end of file diff --git a/Resources/Utils/extractQuantities/build_scripts/build_extractQuantities.bat b/Resources/Utils/extractQuantities/build_scripts/build_extractQuantities.bat old mode 100644 new mode 100755 diff --git a/Resources/Utils/extractQuantities/config.cfg b/Resources/Utils/extractQuantities/config.cfg old mode 100644 new mode 100755 index 6b6005a..9bdce60 --- a/Resources/Utils/extractQuantities/config.cfg +++ b/Resources/Utils/extractQuantities/config.cfg @@ -1,3 +1,4 @@ +Results profile ine 2 1 f diff --git a/Resources/Utils/extractQuantities/source/main.cpp b/Resources/Utils/extractQuantities/source/main.cpp old mode 100644 new mode 100755 index 52bd32f..32899ae --- a/Resources/Utils/extractQuantities/source/main.cpp +++ b/Resources/Utils/extractQuantities/source/main.cpp @@ -5,21 +5,20 @@ // * // * (c) Dr. Stephen J. Bradshaw // * -// * Date last modified: 01/21/2021 +// * Date last modified: 01/04/2023 // * // **** #include -#include +#include #include "../../../source/file.h" - -int main(void) +int main( int argc, char **argv ) { FILE *pCONFIGFile, *pINPUTFile, *pOUTPUTFile; char **ppcDataType; -char szRoot[256], szExtension[32], szINPUTFilename[256], szOUTPUTFilename[256]; +char szResultsDirectory[256], szRoot[256], szExtension[32], szINPUTFilename[256], szOUTPUTFilename[256]; char cBuffer; double fBuffer; int *piNumColumns, *piRow, *piColumn, iRange[2]; @@ -27,8 +26,15 @@ int iNumRows, iNumEntries, iEntry, iNumRecords; int i, j, m, n; int iBuffer; +if( argc == 1 ) { + printf( "\nA configuration file must be specified. E.g. extractQuantities config.cfg\n"); + exit( EXIT_SUCCESS ); +} + // Open the configuration file -pCONFIGFile = fopen( "config.cfg", "r" ); +pCONFIGFile = fopen( argv[1], "r" ); + // Get the directory containing the numerical results + fscanf( pCONFIGFile, "%s", szResultsDirectory ); // Get the filename structure of the files containing the data to be extracted fscanf(pCONFIGFile, "%s", szRoot ); fscanf(pCONFIGFile, "%s", szExtension ); @@ -48,7 +54,7 @@ pCONFIGFile = fopen( "config.cfg", "r" ); } } // Get the number of entries to extract from each record - fscanf(pCONFIGFile, "%i", &iNumEntries ); + fscanf( pCONFIGFile, "%i", &iNumEntries ); // Allocate memory to store the row and column number for each entry piRow = (int*)malloc( sizeof(int) * iNumEntries ); piColumn = (int*)malloc( sizeof(int) * iNumEntries ); @@ -63,7 +69,7 @@ pCONFIGFile = fopen( "config.cfg", "r" ); // Close the configuration file fclose( pCONFIGFile ); -printf( "\n%s.%s\n", szRoot, szExtension ); +printf( "\n%s/%s.%s\n", szResultsDirectory, szRoot, szExtension ); printf( "\niNumber of Rows = %i\n", iNumRows ); for( i=0; i -#include +#include #include "../../../../HYDRAD/source/config.h" #include "../../../source/file.h" - // #define READ_ELECTRON_MASS_DENSITY // Required for runs using the optically-thick chromosphere model - -int main(void) +int main( int argc, char **argv ) { FILE *pCONFIGFile, *pAMRFile, *pEXTFile, *pOUTPUTFile; -char szRoot[256], szExtension[32], szAMRFilename[256], szEXTFilename[256], szOUTPUTFilename[256]; +char szResultsDirectory[256], szRoot[256], szExtension[32], szAMRFilename[256], szEXTFilename[256], szOUTPUTFilename[256]; double *pfSum; double fLLp, fULp, fLL, fUL; double fTimeStamp, fL, fs, fds; @@ -32,9 +30,15 @@ int iNumColumns, iNumAverages, iNumFiles, iNumCells; int i, j, k, l, m, n; int iBuffer; -// Open the configuration file -pCONFIGFile = fopen( "config.cfg", "r" ); +if( argc == 1 ) { + printf( "\nA configuration file must be specified. E.g. extractSpatialAverages config.cfg\n"); + exit( EXIT_SUCCESS ); +} +// Open the configuration file +pCONFIGFile = fopen( argv[1], "r" ); + // Get the directory containing the numerical results + fscanf( pCONFIGFile, "%s", szResultsDirectory ); // Get the filename structure of the files containing the data to be spatially averaged fscanf(pCONFIGFile, "%s", szRoot ); fscanf(pCONFIGFile, "%s", szExtension ); @@ -55,9 +59,9 @@ pCONFIGFile = fopen( "config.cfg", "r" ); fLLp /= 100.0; fULp /= 100.0; // Get the number of spatial average files to write - fscanf(pCONFIGFile, "%i", &iNumFiles ); + fscanf( pCONFIGFile, "%i", &iNumFiles ); - printf( "\n%s.%s\n", szRoot, szExtension ); + printf( "\n%s/%s.%s\n", szResultsDirectory, szRoot, szExtension ); printf( "\nNumber of Columns = %i\n", iNumColumns ); printf( "\nNumber of Columns to Average = %i\n", iNumAverages ); printf( "\tColumns:"); @@ -78,7 +82,7 @@ pCONFIGFile = fopen( "config.cfg", "r" ); printf( " [%i,%i]", iRange[0], iRange[1] ); // Construct the output filename and open the file - sprintf( szOUTPUTFilename, "f(t)(%ito%i).txt", iRange[0], iRange[1] ); + sprintf( szOUTPUTFilename, "%s/f(t)(%ito%i).txt", szResultsDirectory, iRange[0], iRange[1] ); pOUTPUTFile = fopen( szOUTPUTFilename, "w" ); // Write the number of rows to the output file fprintf( pOUTPUTFile, "%i\n", (iRange[1]-iRange[0])+1 ); @@ -89,7 +93,7 @@ pCONFIGFile = fopen( "config.cfg", "r" ); pfSum[k] = 0.0; // Construct the .amr filename and open the file - sprintf( szAMRFilename, "profile%i.amr", j ); + sprintf( szAMRFilename, "%s/profile%i.amr", szResultsDirectory, j ); pAMRFile = fopen( szAMRFilename, "r" ); // Get the timestamp from the .amr file ReadDouble( pAMRFile, &fTimeStamp ); @@ -102,7 +106,7 @@ pCONFIGFile = fopen( "config.cfg", "r" ); fscanf( pAMRFile, "%i", &iNumCells ); // Construct the .ext filename and open the file - sprintf( szEXTFilename, "%s%i.%s", szRoot, j, szExtension ); + sprintf( szEXTFilename, "%s/%s%i.%s", szResultsDirectory, szRoot, j, szExtension ); pEXTFile = fopen( szEXTFilename, "r" ); for( k=0; k +#include #include "piecewisefit.h" - -int main( void ) +int main( int argc, char **argv ) { PPIECEWISEFIT pMagneticField; - pMagneticField = new CPieceWiseFit( (char*)"fits/B(closed).txt", (char*)"fits/initial.amr.B" ); - // pMagneticField = new CPieceWiseFit( (char*)"fits/B(open).txt", (char*)"fits/initial.amr.B" ); - // pMagneticField = new CPieceWiseFit( (char*)"fits/initial.amr.B" ); + if( argc == 1 ) { + printf( "\nEither:\n" ); + printf( "\t1. Input (data) and output (fit) files must be specified. E.g. generatePieceWiseFit fits/B(closed).txt fits/initial.amr.B\n" ); + printf( "\t2. An existing fit file must be specified. E.g. generatePieceWiseFit fits/initial.amr.B\n"); + exit( EXIT_SUCCESS ); + } else if( argc == 2 ) { + pMagneticField = new CPieceWiseFit( argv[1] ); + } else { + pMagneticField = new CPieceWiseFit( argv[1], argv[2] ); + } + + // Example useage + #ifdef VERBOSE pMagneticField->ShowPieceWiseFit(); #endif // VERBOSE @@ -25,4 +44,4 @@ int main( void ) delete pMagneticField; return 0; -} +} \ No newline at end of file diff --git a/Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp b/Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp old mode 100644 new mode 100755 diff --git a/Resources/Utils/generatePieceWiseFit/source/piecewisefit.h b/Resources/Utils/generatePieceWiseFit/source/piecewisefit.h old mode 100644 new mode 100755 diff --git a/Resources/Utils/meshTool/config.cfg b/Resources/Utils/meshTool/config.cfg index 77e0cf4..e4f04c6 100755 --- a/Resources/Utils/meshTool/config.cfg +++ b/Resources/Utils/meshTool/config.cfg @@ -1,3 +1,7 @@ meshes/meshDef(1).txt meshes/initial.amr -../../../Initial_Conditions/profiles/initial.amr 10 \ No newline at end of file +../../../Initial_Conditions/profiles/initial.amr 10 + +// Path/filename of the definition file for the new mesh +// Path/filename of the new mesh +// Path/filename and number of refinement levels of the existing mesh \ No newline at end of file diff --git a/Resources/Utils/meshTool/meshes/meshDef(1).txt b/Resources/Utils/meshTool/meshes/meshDef(1).txt index bda7b6c..d2cb823 100755 --- a/Resources/Utils/meshTool/meshes/meshDef(1).txt +++ b/Resources/Utils/meshTool/meshes/meshDef(1).txt @@ -60,4 +60,9 @@ 1.0 1.0 1.0 -1.0 \ No newline at end of file +1.0 + +// Seed grid cell size +// Number of refinement levels +// Number of cells +// Size of cell as a multiple of the seed grid cell size \ No newline at end of file diff --git a/Resources/Utils/meshTool/meshes/meshDef(2).txt b/Resources/Utils/meshTool/meshes/meshDef(2).txt index c5d68ea..6cd4245 100755 --- a/Resources/Utils/meshTool/meshes/meshDef(2).txt +++ b/Resources/Utils/meshTool/meshes/meshDef(2).txt @@ -145,4 +145,9 @@ 2048.0 2048.0 2048.0 -2048.0 \ No newline at end of file +2048.0 + +// Seed grid cell size +// Number of refinement levels +// Number of cells +// Size of cell as a multiple of the seed grid cell size \ No newline at end of file diff --git a/Resources/Utils/meshTool/source/main.cpp b/Resources/Utils/meshTool/source/main.cpp index 50cc484..7c02e0e 100755 --- a/Resources/Utils/meshTool/source/main.cpp +++ b/Resources/Utils/meshTool/source/main.cpp @@ -1,9 +1,17 @@ +// **** +// * +// * A utility to generate a new mesh onto which an existing mesh is interpolated +// * +// * (c) Dr. Stephen J. Bradshaw +// * +// * Date last modified: 01/04/2023 +// * +// **** #include #include "meshtool.h" - int main( int argc, char **argv ) { PMESHTOOL pMeshTool; diff --git a/Resources/Utils/writeIEfile/build_scripts/build_writeIEfile.bat b/Resources/Utils/writeIEfile/build_scripts/build_writeIEfile.bat index fbc0c16..40f7b81 100755 --- a/Resources/Utils/writeIEfile/build_scripts/build_writeIEfile.bat +++ b/Resources/Utils/writeIEfile/build_scripts/build_writeIEfile.bat @@ -1 +1 @@ -g++ -O3 -flto -Wall ../source/main.cpp ../../../../Radiation_Model/source/radiation.cpp ../../../../Radiation_Model/source/element.cpp ../../../source/fitpoly.cpp ../../../source/file.cpp -o ../../../../writeIEfile.exe \ No newline at end of file +g++ -O3 -flto -Wall ../source/main.cpp ../../../../Radiation_Model/source/radiation.cpp ../../../../Radiation_Model/source/element.cpp ../../../source/fitpoly.cpp ../../../source/file.cpp -o ../writeIEFile.exe \ No newline at end of file diff --git a/Resources/Utils/writeIEfile/config.cfg b/Resources/Utils/writeIEfile/config.cfg new file mode 100755 index 0000000..e552036 --- /dev/null +++ b/Resources/Utils/writeIEfile/config.cfg @@ -0,0 +1,5 @@ +Results +0 600 + +// Results directory +// Output file range \ No newline at end of file diff --git a/Resources/Utils/writeIEfile/source/main.cpp b/Resources/Utils/writeIEfile/source/main.cpp index d6545db..df11ba1 100755 --- a/Resources/Utils/writeIEfile/source/main.cpp +++ b/Resources/Utils/writeIEfile/source/main.cpp @@ -5,7 +5,7 @@ // * // * (c) Dr. Stephen J. Bradshaw // * -// * Date last modified: 05/04/2021 +// * Date last modified: 01/04/2023 // * // **** @@ -17,24 +17,31 @@ #include "../../../../Radiation_Model/source/radiation.h" #include "../../../source/file.h" -int main(void) +int main( int argc, char **argv ) { PRADIATION pRadiation; -FILE *pAMRFile, *pPHYFile, *pIEFile; +FILE *pCFGFile, *pAMRFile, *pPHYFile, *pIEFile; char szResultsDirectory[256], szAMRFilename[256], szPHYFilename[256], szIEFilename[256]; double fs, fn, fT; double fBuffer; int iFrom, iTo, iNumCells; int iBuffer, i, j; -pRadiation = new CRadiation( (char *)"Radiation_Model/config/elements_neq.cfg" ); +if( argc == 1 ) { + printf( "\nA configuration file must be specified. E.g. writeIEFile config.cfg\n"); + exit( EXIT_SUCCESS ); +} -printf( "\nResults directory: " ); -scanf( "%s", szResultsDirectory ); -printf( "\nProfile range (from): " ); -scanf( "%i", &iFrom ); -printf( " (to): " ); -scanf( "%i", &iTo ); +// Open and read the configuration file +pCFGFile = fopen( argv[1], "r" ); + // Get the directory containing the numerical results + fscanf( pCFGFile, "%s", szResultsDirectory ); + // Get the range of output files over which to calculate the .ie files + fscanf( pCFGFile, "%i", &iFrom ); + fscanf( pCFGFile, "%i", &iTo ); +fclose( pCFGFile ); + +pRadiation = new CRadiation( (char *)"Radiation_Model/config/elements_neq.cfg" ); for( i=iFrom; i<=iTo; i++ ) {