danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code

Home Page:https://phantomsph.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with test case for magnetic field when compiled with SETUP=disc in deriv test

HughyG opened this issue · comments

The following line should pass the deriv test cases

make SETUP=disc MHD=yes phantomtest && ./bin/phantomtest deriv

but produces errors with mhd calculations

--> testing div B cleaning terms
    (on          1 active particles)
 trial neigh mean  :     151.00, real neigh mean =   38.00 ratio try/act=    3.97
 trial neigh max   :        151, max real neigh =       38
 n neighbour calls :          0, mean per part   =   1.000
 n density calcs   :          1, mean per part   =   1.000
 force controlling timestep on            1  gas particles
 (wall: total =      0.12s force =      0.00s cons2prim =      0.00s dens =      0.00s link =      0.12s)
 (cpu : total =      0.99s force =      0.08s cons2prim =      0.08s dens =      0.08s link =      0.74s)
 (cpu/wall: total =      7.91 force = --- cons2prim = --- dens = --- link =      5.96)
 checking h (density)...................
 h (density) =  1.704E-02 should be  1.200E-02 ratio = 1.420E+00 err = 4.200E-01 (         1)
 h (density) =  1.485E-02 should be  1.200E-02 ratio = 1.238E+00 err = 2.377E-01 (         2)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         3)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         4)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         5)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         6)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         7)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         8)
 h (density) =  1.469E-02 should be  1.200E-02 ratio = 1.224E+00 err = 2.244E-01 (         9)
 FAILED [on     115264 of    1000000 values, max err = 4.200E-01, tol = 3.000E-04]
 checking divB..........................
 divB =  3.180E+02 should be  9.995E-01 ratio = 3.181E+02 err = 3.171E+02 (         1)
 divB =  5.703E+02 should be  9.956E-01 ratio = 5.728E+02 err = 5.718E+02 (         2)
 divB =  5.525E+02 should be  9.877E-01 ratio = 5.594E+02 err = 5.584E+02 (         3)
 divB =  5.360E+02 should be  9.759E-01 ratio = 5.492E+02 err = 5.482E+02 (         4)
 divB =  5.430E+02 should be  9.603E-01 ratio = 5.654E+02 err = 5.644E+02 (         5)
 divB =  5.528E+02 should be  9.409E-01 ratio = 5.876E+02 err = 5.866E+02 (         6)
 divB =  5.625E+02 should be  9.178E-01 ratio = 6.129E+02 err = 6.119E+02 (         7)
 divB =  5.719E+02 should be  8.910E-01 ratio = 6.418E+02 err = 6.408E+02 (         8)
 divB =  5.810E+02 should be  8.607E-01 ratio = 6.749E+02 err = 6.739E+02 (         9)
 divB =  6.614E+02 should be  3.141E-02 ratio = 2.106E+04 err = 2.106E+04 (        25)
 FAILED [on     221312 of    1000000 values, max err = 2.106E+04, tol = 1.000E-03]
 checking gradpsi_x.....................
 gradpsi_x =  8.315E+00 should be -1.480E+00 ratio =-5.618E+00 err = 6.618E+00 (         1)
 gradpsi_x = -9.692E-01 should be -9.724E-01 ratio = 9.967E-01 err = 3.304E-03 (         2)
 gradpsi_x = -1.769E+00 should be -9.304E-01 ratio = 1.902E+00 err = 9.018E-01 (         3)
 gradpsi_x = -1.104E+00 should be -9.158E-01 ratio = 1.206E+00 err = 2.056E-01 (         4)
 gradpsi_x = -9.878E-01 should be -8.977E-01 ratio = 1.100E+00 err = 1.004E-01 (         5)
 gradpsi_x = -9.658E-01 should be -8.762E-01 ratio = 1.102E+00 err = 1.022E-01 (         6)
 gradpsi_x = -9.403E-01 should be -8.516E-01 ratio = 1.104E+00 err = 1.042E-01 (         7)
 gradpsi_x = -9.115E-01 should be -8.238E-01 ratio = 1.106E+00 err = 1.065E-01 (         8)
 gradpsi_x = -8.795E-01 should be -7.931E-01 ratio = 1.109E+00 err = 1.090E-01 (         9)
 gradpsi_x =  3.250E-02 should be -3.243E-05 ratio =-1.002E+03 err = 1.003E+03 (    340012)
 gradpsi_x =  3.933E-01 should be  9.528E-05 ratio = 4.128E+03 err = 4.127E+03 (    350003)
 FAILED [on     173835 of    1000000 values, max err = 5.725E+03, tol = 8.500E-04]
 checking gradpsi_y.....................
 gradpsi_y =  5.924E+00 should be -4.211E+00 ratio =-1.407E+00 err = 2.407E+00 (         1)
 gradpsi_y =  3.677E+00 should be -2.783E+00 ratio =-1.321E+00 err = 2.321E+00 (         2)
 gradpsi_y =  2.618E+00 should be -2.686E+00 ratio =-9.747E-01 err = 1.975E+00 (         3)
 gradpsi_y =  2.167E+00 should be -2.676E+00 ratio =-8.100E-01 err = 1.810E+00 (         4)
 gradpsi_y =  1.800E+00 should be -2.663E+00 ratio =-6.757E-01 err = 1.676E+00 (         5)
 gradpsi_y =  1.443E+00 should be -2.649E+00 ratio =-5.448E-01 err = 1.545E+00 (         6)
 gradpsi_y =  1.097E+00 should be -2.633E+00 ratio =-4.168E-01 err = 1.417E+00 (         7)
 gradpsi_y =  7.634E-01 should be -2.615E+00 ratio =-2.920E-01 err = 1.292E+00 (         8)
 gradpsi_y =  4.429E-01 should be -2.595E+00 ratio =-1.707E-01 err = 1.171E+00 (         9)
 gradpsi_y = -1.046E+00 should be  3.273E-04 ratio =-3.198E+03 err = 3.199E+03 (    270001)
 gradpsi_y =  3.315E+00 should be -8.284E-05 ratio =-4.001E+04 err = 4.001E+04 (    280072)
 FAILED [on     172101 of    1000000 values, max err = 4.012E+04, tol = 9.300E-04]
 checking gradpsi_z.....................
 gradpsi_z =  8.274E+00 should be -1.835E-02 ratio =-4.510E+02 err = 4.520E+02 (         1)
 gradpsi_z =  6.062E+00 should be -1.262E-02 ratio =-4.802E+02 err = 4.812E+02 (         2)
 gradpsi_z =  4.969E+00 should be -1.268E-02 ratio =-3.919E+02 err = 3.929E+02 (         3)
 gradpsi_z =  4.511E+00 should be -1.313E-02 ratio =-3.435E+02 err = 3.445E+02 (         4)
 gradpsi_z =  4.139E+00 should be -1.358E-02 ratio =-3.048E+02 err = 3.058E+02 (         5)
 gradpsi_z =  3.775E+00 should be -1.402E-02 ratio =-2.693E+02 err = 2.703E+02 (         6)
 gradpsi_z =  3.420E+00 should be -1.445E-02 ratio =-2.367E+02 err = 2.377E+02 (         7)
 gradpsi_z =  3.074E+00 should be -1.486E-02 ratio =-2.068E+02 err = 2.078E+02 (         8)
 gradpsi_z =  2.739E+00 should be -1.527E-02 ratio =-1.794E+02 err = 1.804E+02 (         9)
 gradpsi_z =  6.774E+00 should be -2.769E-04 ratio =-2.447E+04 err = 2.447E+04 (       159)
 FAILED [on     160973 of    1000000 values, max err = 1.057E+05, tol = 2.000E-03]

...

SUMMARY OF ALL TESTS:
PASSED:  22 of  31  71.0%
FAILED:   9 of  31  29.0%