Skip to content

Commit 41ee0e7

Browse files
committed
Turn on axis recalculation in force_final_grad
1 parent 8aa8ab4 commit 41ee0e7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/xspech.f90

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ subroutine spec
319319
version, &
320320
MPI_COMM_SPEC, &
321321
force_final, Lhessianallocated, LocalConstraint, hessian, dBBdmp, dFFdRZ, dmupfdx, &
322-
dRodR, dRodZ, dZodR, dZodZ, dessian, LGdof
322+
dRodR, dRodZ, dZodR, dZodZ, dRadR, dRadZ, dZadR, dZadZ, dessian, LGdof
323323

324324
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
325325

@@ -333,7 +333,7 @@ subroutine spec
333333
CHARACTER :: pack
334334
INTEGER :: Lfindzero_old, mfreeits_old
335335
REAL :: gBnbld_old
336-
INTEGER :: lnPtrj, numTrajTotal
336+
INTEGER :: lnPtrj, numTrajTotal, Lfindzero_temp
337337

338338
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
339339

@@ -501,11 +501,18 @@ subroutine spec
501501
SALLOCATE( dRodZ, (1:Ntz,0:3,1:mn), zero )
502502
SALLOCATE( dZodR, (1:Ntz,0:3,1:mn), zero )
503503
SALLOCATE( dZodZ, (1:Ntz,0:3,1:mn), zero )
504+
SALLOCATE( dRadR, (1:mn,0:1,0:1,1:mn), zero ) ! calculated in rzaxis; 19 Sep 16;
505+
SALLOCATE( dRadZ, (1:mn,0:1,0:1,1:mn), zero )
506+
SALLOCATE( dZadR, (1:mn,0:1,0:1,1:mn), zero )
507+
SALLOCATE( dZadZ, (1:mn,0:1,0:1,1:mn), zero )
504508

505509
LComputeDerivatives = .true.
506510

507511
LComputeAxis = .true.
512+
Lfindzero_temp = Lfindzero
513+
Lfindzero = 2 ! Necessary to trigger axis recomputation in packxi
508514
WCALL( xspech, dforce, ( NGdof, position(0:NGdof), force_final(0:NGdof), LComputeDerivatives, LComputeAxis) )
515+
Lfindzero = Lfindzero_temp
509516

510517
else
511518
SALLOCATE( force_final, (0:NGdof), zero )

0 commit comments

Comments
 (0)