diff --git a/HEN_HOUSE/estar/estarMainCalc.cpp b/HEN_HOUSE/estar/estarMainCalc.cpp index d99755676..772c7564e 100644 --- a/HEN_HOUSE/estar/estarMainCalc.cpp +++ b/HEN_HOUSE/estar/estarMainCalc.cpp @@ -119,8 +119,7 @@ int estarCalculation(int isCompound, int NEP, float mediaDensity, string *elemen fc = getDataFromFormulae(knmat, rho, elementArray, massFraction, numOfAtoms, NEP, mediaNum); cout << "\n"; - if (*ipotval != -1) { - assert(*ipotval>=0 && "Ivalue must be non-negative"); + if (*ipotval >= 0) { fc.pot = *ipotval; cout << "For medium " << mediaNum << " I-value (eV) given in egsinp file is " << fc.pot << "\n"; } diff --git a/HEN_HOUSE/makefiles/standard_makefile b/HEN_HOUSE/makefiles/standard_makefile index 6a98aab44..810f80f64 100644 --- a/HEN_HOUSE/makefiles/standard_makefile +++ b/HEN_HOUSE/makefiles/standard_makefile @@ -86,8 +86,8 @@ failed_message = "______Operation failed______" $(EXECUTABLE): $(FORTRAN_FILE).$(FEXT) $(EGS_EXTRA_OBJECTS) $(EXE_DIR) compare @echo $(empty) @echo $(empty) - @echo "Fortran compiling $(FORTRAN_FILE).$(FEXT) using flags '$(EGS_EXTRA_FLAGS) $(FCFLAGS) $(OPTLEVEL_F)' and extra objects/libs '$(EGS_EXTRA_OBJECTS) $(ESTAR_DIR)estarPreProcess.cpp -lstdc++ $(EGS_EXTRA_LIBS)'" - @$(F77) $(EGS_EXTRA_FLAGS) $(FCFLAGS) $(OPTLEVEL_F) $(COMPILE_TIME) $(GIT_HASH) $(FOUT)$@ $(FORTRAN_FILE).$(FEXT) $(EGS_EXTRA_OBJECTS) $(ESTAR_DIR)estarPreProcess.cpp -std=c++11 $(F77_CPP_LINKER) $(EGS_EXTRA_LIBS) + @echo "Fortran compiling $(FORTRAN_FILE).$(FEXT) using flags '$(EGS_EXTRA_FLAGS) $(FCFLAGS) $(OPTLEVEL_F)' and extra objects/libs '$(EGS_EXTRA_OBJECTS) $(ESTAR_DIR)estarPreProcess.cpp $(F77_CPP_LINKER) $(EGS_EXTRA_LIBS)'" + @$(F77) $(EGS_EXTRA_FLAGS) $(FCFLAGS) $(OPTLEVEL_F) $(COMPILE_TIME) $(GIT_HASH) $(FOUT)$@ $(FORTRAN_FILE).$(FEXT) $(EGS_EXTRA_OBJECTS) $(ESTAR_DIR)estarPreProcess.cpp $(F77_CPP_LINKER) $(EGS_EXTRA_LIBS) # The line of code above was originally: # @$(F77) $(EGS_EXTRA_FLAGS) $(FCFLAGS) $(OPTLEVEL_F) $(FOUT)$@ $(FORTRAN_FILE).$(FEXT) $(EGS_EXTRA_OBJECTS) $(EGS_EXTRA_LIBS) 2>&1 # The '2>&1' gives a compilation error when running in windows and thus this has been removed. diff --git a/HEN_HOUSE/specs/all_common.spec b/HEN_HOUSE/specs/all_common.spec index 032f729b2..bbadcfedb 100644 --- a/HEN_HOUSE/specs/all_common.spec +++ b/HEN_HOUSE/specs/all_common.spec @@ -70,7 +70,7 @@ ESTAR_ROUTINE = $(ESTAR_MODULES)routine$(DSEP) ESTAR_S_HELPERS = $(ESTAR_MODULES)solverHelpers$(DSEP) # ESTAR linking keyword -F77_CPP_LINKER = -lstdc++ +F77_CPP_LINKER = -lstdc++ -std=c++11 # Utilities coming with EGSnrc # diff --git a/HEN_HOUSE/src/get_media_inputs.mortran b/HEN_HOUSE/src/get_media_inputs.mortran index 5c92f32be..18f28f57e 100644 --- a/HEN_HOUSE/src/get_media_inputs.mortran +++ b/HEN_HOUSE/src/get_media_inputs.mortran @@ -674,7 +674,7 @@ $INTEGER ival,ival_media,ival_medfile,i,j,k,ival_ae,ival_ue,ival_ap,ival_up, $REAL ecut_min, pcut_min; $LOGICAL medfile_specified,densityfile_specified,elements_specified, - outfile_specified($MXMED), densityoutputfile_specified; + outfile_specified($MXMED), densityoutputfile_specified($MXMED); $LOGICAL iunrst_specified,stern_specified,iaprim_specified, gasp_specified,rho_specified,start_delim_found,end_delim_found, spec_by_pz,spec_by_rhoz,df_if_elem_mismatch($MXMED), @@ -722,7 +722,7 @@ $TYPE asym_df($MXEL); data blank/' '/; save medfile_specified,material_file,df_if_elem_mismatch,df_if_rho_mismatch, - spoutput_file,outfile_specified; + spoutput_file,outfile_specified,densityoutputfile_specified; REPLACE {$WRITE_MEDERR(#)} WITH { ; @@ -904,6 +904,7 @@ DO i=1,NMED[ bulkdensity_specified=.false.; localdensity_specified=.false.; ipot_specified=.false.; + densityoutputfile_specified(i)=.false.; densityfile_specified=.false.; stern_specified=.false.; iunrst_specified=.false.; @@ -1088,7 +1089,7 @@ DO i=1,NMED[ CALL GET_INPUT; IF(error_flags(ival_densityoutputfile)=0)[ density_outputfile=char_value(ival_densityoutputfile,1); - densityoutputfile_specified=.true.; + densityoutputfile_specified(i)=.true.; $WRITE_MEDERR(' Density correction file will be output.'); ] @@ -1676,7 +1677,7 @@ DO i=1,NMED[ inpdensity_file(i)=density_file; "Only output the density correction file for the first job if parallel" - IF(densityoutputfile_specified & + IF(densityoutputfile_specified(i) & (n_parallel=0 | i_parallel=first_parallel)) [ outdensity_file(i)=density_outputfile; ] @@ -1737,7 +1738,7 @@ DO i=1,nmed[ write(ounit,'(a,i5)')' iunrst: ',iunrst(i); write(ounit,'(a,i5)')' iaprim: ',iaprim(i); write(ounit,'(a,1p,e14.5,a)')' gasp: ',inpgasp(i),' atm.'; - IF(epstfl(i)~=1)[ + IF(epstfl(i)~=1 & densityoutputfile_specified(i))[ write(ounit,*)' output density correction file: ', $cstring(outdensity_file(i)); ]