Commit 38a0db21 authored by Juan Caneses Marin (nfc)'s avatar Juan Caneses Marin (nfc)
Browse files

Succesfully transfered module function Interp1 to MoveParticlePack to prevent it being global

parent be3cb123
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ REAL(r8) :: pcnt1, pcnt2, pcnt3, pcnt4
CHARACTER*300 :: command, mpwd
INTEGER(i4) :: n_mpwd, STATUS
CHARACTER*300 :: inputFileDir, inputFile, fileName, xpSelector, rootDir, dir0, dir1
! functions
REAL(r8) :: Interp1


! Create input namelist from the user-defined structures:
! ==============================================================================
+10 −1
Original line number Diff line number Diff line
@@ -22,7 +22,8 @@ REAL(r8) :: L1, L2, L3, L4
REAL(r8) :: mu0, mu1, mu2, mu3
REAL(r8) :: M1, M2, M3, M4
REAL(r8) :: u2
REAL(r8) :: B, Phi                            ! Variables to hold potential field
REAL(r8) :: B, Phi
REAL(r8) :: Interp1

! Time step:
dt = in0%dt
@@ -210,6 +211,7 @@ REAL(r8) :: upar, Bf, Omega, Omega_RF
REAL(r8) :: m_t, q_t
TYPE(inTYP)  :: in0
TYPE(splTYP) :: spline0
REAL(r8) :: Interp1

! Test particle mass:
m_t = in0%m_t
@@ -253,6 +255,7 @@ REAL(r8) :: dkep_par, dkep, kep1
REAL(r8) :: kep_per1, kep_par1
REAL(r8) :: upar1, u1
REAL(r8) :: m_t, q_t
REAL(r8) :: Interp1

! Test particle mass:
m_t = in0%m_t
@@ -427,7 +430,13 @@ SUBROUTINE loadParticles(zp0,kep0,xip0,in0)
return
END SUBROUTINE loadParticles

! =======================================================================================================
FUNCTION Interp1(xq, spline0)
! =======================================================================================================
  USE local
  USE spline_fits 
  USE dataTYP

  IMPLICIT NONE
  TYPE(splTYP) :: spline0
  REAL(r8) :: xq, Interp1, curv2