diff --git a/source/posterior_sampling.simulation.tempered_differential_evolution.F90 b/source/posterior_sampling.simulation.tempered_differential_evolution.F90 index cadd0b544..8a0719314 100644 --- a/source/posterior_sampling.simulation.tempered_differential_evolution.F90 +++ b/source/posterior_sampling.simulation.tempered_differential_evolution.F90 @@ -54,9 +54,9 @@ function is heated up and cooled down to allow chains to more easily walk throug Implementation of a posterior sampling simulation class which implements a tempered differential evolution algorithm. !!} private - integer :: untemperedStepCount , temperingLevelCount , & + integer :: untemperedStepCount , temperingLevelCount , & & stepsPerLevel - integer :: temperingStep , temperingLevelMonotonic + integer :: temperingStep , temperingLevelMonotonic double precision :: temperatureMaximum class (posteriorSampleDffrntlEvltnPrpslSzTmpExpClass), pointer :: posteriorSampleDffrntlEvltnPrpslSzTmpExp_ => null() double precision , allocatable, dimension(:) :: temperatures @@ -64,8 +64,8 @@ function is heated up and cooled down to allow chains to more easily walk throug contains !![ - - + + !!] final :: temperedDifferentialEvolutionDestructor @@ -186,6 +186,8 @@ subroutine temperedDifferentialEvolutionInitialize(self,posteriorSampleDffrntlEv self%untemperedStepCount = untemperedStepCount self%stepsPerLevel = stepsPerLevel self%temperatureMaximum = temperatureMaximum + self%temperingLevelMonotonic = 0 + self%temperingStep = 0 allocate(self%temperatures(temperingLevelCount)) allocate(posteriorSampleStateSimple :: self%temperedStates(temperingLevelCount)) do i=1,temperingLevelCount @@ -328,10 +330,10 @@ integer function temperedDifferentialEvolutionLevel(self) class(posteriorSampleSimulationTemperedDffrntlEvltn), intent(inout) :: self temperedDifferentialEvolutionLevel=self%temperingLevelMonotonic - if (self%temperingLevelMonotonic > self%temperingLevelCount) & - & temperedDifferentialEvolutionLevel= 2 & - & *self%temperingLevelCount & - & -self%temperingLevelMonotonic + if (self%temperingLevelMonotonic > self%temperingLevelCount) & + & temperedDifferentialEvolutionLevel=+2 & + & *self%temperingLevelCount & + & -self%temperingLevelMonotonic return end function temperedDifferentialEvolutionLevel