Closed AJMHubert closed 8 years ago
In CalculateFigureofMeritandDetermineThickness(IThicknessIndex,IErr)
IThicknessIndex is I think an output not input, I have more clarity now
Fixed: need CalculateFigureofMeritandDetermineThickness(IThicknessIndex,IErr) for felixsim. Adapdted to fix
IThicknessIndex is used (local variable) in RefineWriteOut.f90/WriteIterationOutput:
IF(IExitFLAG.EQ.1.OR.(Iter.GE.(IPreviousPrintedIteration+IPrint))) THEN IThickness = (RInitialThickness + (IThicknessIndex-1)*RDeltaThickness)/10!RB in nm
When traced back through the subroutines I end up in felixfunction.f90/CreateImagesAndWriteOutput:
`SUBROUTINE CreateImagesAndWriteOutput(Iiter,IExitFLAG,IErr)
!NB core 0 only USE MyNumbers
USE CConst; USE IConst; USE RConst USE IPara; USE RPara; USE SPara; USE CPara USE BlochPara
USE IChannels
USE MPI USE MyMPI
IMPLICIT NONE
INTEGER(IKIND) :: IErr,IThicknessIndex,Iiter,IExitFLAG
IF (ISimFLAG.EQ.0) THEN !Refine Mode (not needed for sim mode) CALL CalculateFigureofMeritandDetermineThickness(IThicknessIndex,IErr) IF( IErr.NE.0 ) THEN PRINT*,"CreateImagesAndWriteOutput(", my_rank, ") error ", IErr, & "Calling function CalculateFigureofMeritandDetermineThickness" RETURN ENDIF END IF
!!$ OUTPUT -------------------------------------
CALL WriteIterationOutput(Iiter,IThicknessIndex,IExitFLAG,IErr) IF( IErr.NE.0 ) THEN PRINT*,"CreateImagesAndWriteOutput(",my_rank,")error in WriteIterationOutput" RETURN ENDIF
END SUBROUTINE CreateImagesAndWriteOutput`
It is never initialised but is still called? felixrefine doesn't need to loop through thicknesses to output the images, so I am guessing this is a remnant of the felixsim ---> felixrefine update? if so I think I can fix this.