From d3c15026bf80b837a07da252b1ce9166185627c0 Mon Sep 17 00:00:00 2001 From: Trovemaster Date: Tue, 20 Oct 2015 14:33:40 +0100 Subject: [PATCH 1/2] A trivial change Just to check how github works --- fields.f90 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fields.f90 b/fields.f90 index e19be5a..30c41b8 100644 --- a/fields.f90 +++ b/fields.f90 @@ -16211,6 +16211,13 @@ recursive function fdiff(isearch,x,func) result (f) ! h = astep(1,imode)+astep(2,imode) ! + ! debug !!! + ! + !if (abs(f2-f1)>1e6) then + ! write(out,"('DEBUG SY: f1-f2 is too large',2e20.12)") f1,f2 + ! stop 'DEBUG SY: f1-f2 is too large' + !endif + ! f = ( f2-f1 )/(h) ! !f_t = 0.5_ark*(f2-f1) From 39ce84f0c53bc6f61849f2b1e947e8ae660644c8 Mon Sep 17 00:00:00 2001 From: Trovemaster Date: Tue, 20 Oct 2015 14:45:32 +0100 Subject: [PATCH 2/2] Check of the finite differences Added a check to stop if the finite diff is too large --- fields.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fields.f90 b/fields.f90 index 30c41b8..32d9cb7 100644 --- a/fields.f90 +++ b/fields.f90 @@ -16213,10 +16213,10 @@ recursive function fdiff(isearch,x,func) result (f) ! ! debug !!! ! - !if (abs(f2-f1)>1e6) then - ! write(out,"('DEBUG SY: f1-f2 is too large',2e20.12)") f1,f2 - ! stop 'DEBUG SY: f1-f2 is too large' - !endif + if (abs(f2-f1)>1e6) then + write(out,"('DEBUG SY: f1-f2 is too large',2e20.12)") f1,f2 + stop 'DEBUG SY: f1-f2 is too large' + endif ! f = ( f2-f1 )/(h) !