Commit 024d9dbf authored by Lore, Jeremy's avatar Lore, Jeremy
Browse files

Add hint examples

parent c5f01fbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
  Message ("Using gfortran flags")
  set (CMAKE_Fortran_FLAGS_RELEASE "-cpp -O3")
#  set (CMAKE_Fortran_FLAGS_DEBUG "-g -frange-check -fbounds-check -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter -fcheck=all -fbacktrace")
  set (CMAKE_Fortran_FLAGS_DEBUG "-g -Og")  
  set (CMAKE_Fortran_FLAGS_DEBUG "-g -Og -frange-check -fbounds-check -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter -fcheck=all -fbacktrace")  
  #-ffpe-trap=zero,underflow,overflow,invalid)
else ()
  Message ("Did not recognize compiler -- no flags set!")
+8 −3
Original line number Diff line number Diff line
Program test_m3dc1_bfield
program test_m3dc1_bfield
Use kind_mod
Use m3dc1_routines_mod
Implicit None
@@ -14,8 +14,8 @@ m3dc1_filenames(3) = '/home/jjl/M3DC1_runs/orlov_2300/n=3/eb1_1f_probeg/C1.h5'
m3dc1_filenames(4) = '/home/jjl/M3DC1_runs/orlov_2300/n=4/eb1_1f_probeg/C1.h5'
m3dc1_factors(1:4) = 2.
m3dc1_phases_deg(1:4) = 0.
m3dc1_itime = 0  ! 0 vacuum, 1 response
m3dc1_field_type = 0 ! total (0) or perturbed only (1)
m3dc1_itime = 1  ! 0 vacuum, 1 response
m3dc1_field_type = 1 ! total (0) or perturbed only (1)
m3dc1_toroidal_on_err = .false.

Call Etime(tarray,tres0)
@@ -44,6 +44,11 @@ Write(*,*) ' First call took ',tres-tres0,' seconds'
Call Etime(tarray,tres0)


rg = 2.4d0
zg = 0.d0
pg = 30.d0*3.14159d0/180.d0


Write(*,*) 'Evaluating B at [R,Z,phi] = ',rg,zg,pg
Call bfield_m3dc1(rg,pg,zg,num_pts,bg2,ierr_b)     
write(*,*) 'Bout [Br,Bz,Bphi] = ',bg2
+9 −11
Original line number Diff line number Diff line
@@ -5,16 +5,14 @@ gfile_name = '/home/jjl/Florian/g147170.02300'
!rmp_type = 'g3d' ! options: 'g3d', 'g3d+rmpcoil', 'm3dc1_full_field', 'g3d+m3dc1'

rmp_type = 'm3dc1_full_field' ! options: 'g3d', 'g3d+rmpcoil', 'm3dc1_full_field', 'g3d+m3dc1'
m3dc1_nsets = 1
m3dc1_nsets = 4
m3dc1_filenames(1) = '/home/jjl/M3DC1_runs/orlov_2300/n=1/eb1_1f_probeg/C1.h5'
!m3dc1_filenames(2) = '/home/jjl/M3DC1_runs/orlov_2300/n=2/eb1_1f_probeg/C1.h5'
!m3dc1_filenames(3) = '/home/jjl/M3DC1_runs/orlov_2300/n=3/eb1_1f_probeg/C1.h5'
!m3dc1_filenames(4) = '/home/jjl/M3DC1_runs/orlov_2300/n=4/eb1_1f_probeg/C1.h5'
m3dc1_scale_factors = 1*2.
m3dc1_phase_shift_deg = 1*0.
m3dc1_time = 0  ! 0 vacuum, 1 response


m3dc1_filenames(2) = '/home/jjl/M3DC1_runs/orlov_2300/n=2/eb1_1f_probeg/C1.h5'
m3dc1_filenames(3) = '/home/jjl/M3DC1_runs/orlov_2300/n=3/eb1_1f_probeg/C1.h5'
m3dc1_filenames(4) = '/home/jjl/M3DC1_runs/orlov_2300/n=4/eb1_1f_probeg/C1.h5'
m3dc1_scale_factors = 4*2.
m3dc1_phase_shift_deg = 4*0.
m3dc1_time = 1  ! 0 vacuum, 1 response

/

@@ -23,13 +21,13 @@ m3dc1_time = 0 ! 0 vacuum, 1 response
Nsym = 3

rstart = 1.95d0
rend = 2.1d0
rend = 2.4d0
zstart = 0.d0
zend = 0.d0

num_pts = 10
phistart_deg = 0.d0
ntransits = 100
ntransits = 10
dphi_line_deg = 0.5d0

follow_both_ways = .true.
+2 −5
Original line number Diff line number Diff line
@@ -17,18 +17,15 @@ Use setup_bfield_module
Implicit none


Integer(int32) :: ntor_pts_coil, i, nstart_fl, nsteps
Integer(int32) :: iocheck, itest, ierr_b, ind_poin, ierr
Integer(int32) :: i, nstart_fl, nsteps
Integer(int32) :: iocheck, ind_poin, ierr
Real(real64), Allocatable :: r1d(:), z1d(:),phistart_arr(:), fl_r(:,:), fl_z(:,:), fl_p(:,:), &
     psiout(:), psiNout(:), fl_r2(:,:), fl_z2(:,:), fl_p2(:,:)
Integer(int32), Allocatable :: ilg(:), fl_ierr(:), ilg2(:), fl_ierr2(:)
Real(real64) :: dphi_line, Adphirat
character(10) :: junk
Real(Kind=4)  :: tarray(2),tres,tres0
Logical :: calc_psiN_min = .false., follow_both_ways = .false.

Real(real64),Dimension(1) :: br_test,bz_test,bphi_test

!---------------------------------------------------------------------------
! Namelist variables:
Real(real64) :: &
Loading