
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "_as_gen/tests_ci/run_mhd_alfven_wave.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download__as_gen_tests_ci_run_mhd_alfven_wave.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr__as_gen_tests_ci_run_mhd_alfven_wave.py:


Testing 3D circularly polarised Alfven wave with SPMHD
========================================================

CI test for the 3D circularly polarised Alfven wave (Toth 2000, 3D setup
of Gardiner & Stone 2008), following the description given in the Phantom
code paper (Price et al. 2018, Section 5.6.2 / 5.7.1).

.. GENERATED FROM PYTHON SOURCE LINES 10-24

.. code-block:: Python
   :lineno-start: 11


    import os

    import matplotlib.pyplot as plt
    import numpy as np

    import shamrock

    # If we use the shamrock executable to run this script instead of the python interpreter,
    # we should not initialize the system as the shamrock executable needs to handle specific MPI logic
    if not shamrock.sys.is_initialized():
        shamrock.change_loglevel(1)
        shamrock.sys.init("0:0")








.. GENERATED FROM PYTHON SOURCE LINES 25-47

.. code-block:: Python
   :lineno-start: 25

    gamma = 5.0 / 3.0
    rho0 = 1.0
    P0 = 0.1

    wavelength = 1.0
    amplitude = 0.1

    # Alfven speed set by B1 = 1, rho = 1 -> v_A = 1, period = wavelength / v_A = 1
    v_A = 1.0
    n_periods = 5
    t_target = n_periods * wavelength / v_A

    resol = 32

    plot_extra_resols = []  # 64, 128, too much for the ci

    do_plot = False
    dump_folder = "_to_trash"
    if do_plot and shamrock.sys.world_rank() == 0:
        os.makedirs(dump_folder, exist_ok=True)









.. GENERATED FROM PYTHON SOURCE LINES 48-198

.. code-block:: Python
   :lineno-start: 48

    def best_transverse_counts(model, xcnt, target_ratio=0.5, search_frac=0.18):

        lo = max(2, int(xcnt * (target_ratio - search_frac)))
        hi = int(xcnt * (target_ratio + search_frac)) + 1
        lo_y = lo + lo % 2
        lo_z = max(3, lo + (-lo) % 3)
        best = None
        for ycnt in range(lo_y, hi, 2):
            for zcnt in range(lo_z, hi, 3):
                xs, ys, zs = model.get_box_dim_true_fcc_3d(1, xcnt, ycnt, zcnt)
                score = abs(ys / xs - target_ratio) + abs(zs / xs - target_ratio)
                if best is None or score < best[0]:
                    best = (score, ycnt, zcnt)
        return best[1], best[2]


    def wave_basis(xs, ys, zs):
        # Athena-style: r_hat proportional to (1/Lx, 1/Ly, 1/Lz) and lambda = 1/|(1/Lx, 1/Ly, 1/Lz)|,
        # so a periodic translation along any axis shifts x1 by exactly one
        # wavelength. A lattice-derived box is only approximately 2:1:1, and
        # keeping the paper's fixed angles would leave a phase seam at the y/z
        # boundaries. For an exact 3 x 1.5 x 1.5 box this reduces to
        # sin(a) = 2/3, sin(b) = 2/sqrt(5), lambda = 1.
        k = np.array([1.0 / xs, 1.0 / ys, 1.0 / zs])
        lam = 1.0 / np.linalg.norm(k)
        r_hat = k * lam

        sin_a = r_hat[2]
        cos_a = np.hypot(r_hat[0], r_hat[1])
        sin_b = r_hat[1] / cos_a
        cos_b = r_hat[0] / cos_a

        e2_hat = np.array([-sin_b, cos_b, 0.0])
        e3_hat = np.array([-sin_a * cos_b, -sin_a * sin_b, cos_a])
        return lam, r_hat, e2_hat, e3_hat


    def run_alfven_wave(resol):
        ctx = shamrock.Context()
        ctx.pdata_layout_new()

        codeu = shamrock.UnitSystem(unit_time=1.0, unit_length=1.0, unit_mass=1.2566370621219e-06)

        model = shamrock.get_Model_SPH(context=ctx, vector_type="f64_3", sph_kernel="M4")

        cfg = model.gen_default_config()
        cfg.set_units(codeu)
        cfg.set_artif_viscosity_None()
        cfg.set_IdealMHD(sigma_mhd=1, sigma_u=1)
        cfg.set_boundary_periodic()
        cfg.set_eos_adiabatic(gamma)
        model.set_solver_config(cfg)

        crit_split = int(1e7)
        crit_merge = 1
        model.init_scheduler(crit_split, crit_merge)

        ycnt, zcnt = best_transverse_counts(model, resol)

        # lambda scales linearly with dr: pick dr so that lambda == wavelength exactly
        lam_unit = wave_basis(*model.get_box_dim_true_fcc_3d(1, resol, ycnt, zcnt))[0]
        dr = wavelength / lam_unit
        (xs, ys, zs) = model.get_box_dim_true_fcc_3d(dr, resol, ycnt, zcnt)
        lam, r_hat, e2_hat, e3_hat = wave_basis(xs, ys, zs)
        rotmat = np.column_stack([r_hat, e2_hat, e3_hat])
        print(f"[resol={resol}] Box dims: xs={xs} ys={ys} zs={zs}")
        print(f"[resol={resol}] r_hat={r_hat} (paper: [1/3, 2/3, 2/3]) lambda={lam}")

        def vel_func(r):
            x1 = np.dot(r, r_hat)
            v_wave = np.array(
                [
                    0.0,
                    amplitude * np.sin(2.0 * np.pi * x1 / lam),
                    amplitude * np.cos(2.0 * np.pi * x1 / lam),
                ]
            )
            return tuple(rotmat @ v_wave)

        def mag_func(r):
            x1 = np.dot(r, r_hat)
            B_wave = np.array(
                [
                    1.0,
                    amplitude * np.sin(2.0 * np.pi * x1 / lam),
                    amplitude * np.cos(2.0 * np.pi * x1 / lam),
                ]
            )
            # field is stored as B/rho in SPMHD
            return tuple(rotmat @ B_wave / rho0)

        box_min = (0.0, 0.0, 0.0)
        box_max = (xs, ys, zs)

        model.resize_simulation_box(box_min, box_max)

        setup = model.get_setup()
        gen = setup.make_generator_lattice_fcc(dr, box_min, box_max)
        setup.apply_setup(gen)

        gam1 = gamma - 1.0
        uuzero = P0 / (gam1 * rho0)
        model.set_value_in_a_box("uint", "f64", uuzero, box_min, box_max)

        model.set_field_value_lambda_f64_3("vxyz", vel_func)
        model.set_field_value_lambda_f64_3("B/rho", mag_func)

        vol_b = xs * ys * zs
        totmass = rho0 * vol_b
        pmass = model.total_mass_to_part_mass(totmass)
        model.set_particle_mass(pmass)

        print(f"[resol={resol}] Total mass :", totmass)
        print(f"[resol={resol}] Current part mass :", pmass)

        model.set_cfl_cour(0.3)
        model.set_cfl_force(0.25)

        model.timestep()

        model.evolve_until(t_target)

        # %%
        # Compare the transverse field component B2 against the exact solution.
        #
        # t_target is an integer number of wave periods, the exact
        # (undamped) solution coincides with the initial condition:
        #   B2_exact(x1) = amplitude * sin(2*pi*x1/wavelength)

        data = ctx.collect_data()

        xyz = data["xyz"]
        B_on_rho = data["B/rho"]

        x1 = xyz @ r_hat
        # SPMHD stores B/rho: recover the physical field before projecting it on e2
        rho = pmass * (model.get_hfact() / data["hpart"]) ** 3
        B2 = (B_on_rho * rho[:, None]) @ e2_hat

        return x1, B2


    x1, B2 = run_alfven_wave(resol)

    B2_exact = amplitude * np.sin(2.0 * np.pi * x1 / wavelength)

    l2_err_B2 = np.sqrt(np.mean((B2 - B2_exact) ** 2))

    print(f"L2 error on B2 : {l2_err_B2}")





.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    [resol=32] Box dims: xs=2.949065100472731 ys=1.4366054781132147 zs=1.5801854062767053
    [resol=32] r_hat=[0.33909051 0.69608533 0.63283713] (paper: [1/3, 2/3, 2/3]) lambda=1.0
    SPH setup: generating particles ...  
    SPH setup: Nstep = 12096 ( 1.2e+04 ) Ntotal = 12096 ( 1.2e+04 rank min = 4.4e+06 max = 1.2e+04) rate = 1.209600e+04 N.s^-1  
    SPH setup: the generation step took : 0.008611486 s  
    SPH setup: final particle count = 12096 beginning injection ...  
    SPH setup: injected        12096 / 12096 => 100.0% | ranks with patchs = 1 / 1  <- global loop -> (msg count : 0)  
    SPH setup: the injection step took : 0.005715532000000001 s  
    SPH setup: the setup took : 0.018698562000000002 s  
    [resol=32] Total mass : 6.694681564488508
    [resol=32] Current part mass : 0.0005534624309266292
    ---------------- t = 0, dt = 0 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: smoothing length is not converged, rerunning the iterator ...    [Smoothinglength][rank=0]
         largest h = 0.09031406717174761 unconverged cnt = 12096   
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0, dt = 0.00027288947639721585 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.00027288947639721585, dt = 0.009278239649430232 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.009551129125827448, dt = 0.01528146050713228 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.02483258963295973, dt = 0.019282955190414144 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.044115544823373876, dt = 0.021949977978129098 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.06606552280150298, dt = 0.02372746075860039 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01110471585823701  
    ---------------- t = 0.08979298356010337, dt = 0.012457067709741993 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.10225005126984536, dt = 0.017399207981155653 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.11964925925100102, dt = 0.02069329082211636 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.14034255007311738, dt = 0.022888800739862047 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010274610793354726  
    ---------------- t = 0.16323135081297943, dt = 0.012176957594496085 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.1754083084074755, dt = 0.017211595348119738 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.19261990375559523, dt = 0.020567503047719204 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.21318740680331444, dt = 0.0228044187791328 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010143191023244746  
    ---------------- t = 0.23599182558244725, dt = 0.01214857279245679 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.24814039837490404, dt = 0.017192225836487243 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.26533262421139125, dt = 0.020554349059937513 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.2858869732713288, dt = 0.022795515208774937 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010095245723794371  
    ---------------- t = 0.3086824884801037, dt = 0.012145575330693919 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.32082806381079765, dt = 0.017190155565015224 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.3380182193758129, dt = 0.020552948137204517 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.35857116751301743, dt = 0.02279452064244343 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010100271168618394  
    ---------------- t = 0.38136568815546085, dt = 0.012145101569391985 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.3935107897248528, dt = 0.01718936369196458 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.41070015341681737, dt = 0.020551564984792436 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.4312517184016098, dt = 0.02279251356645679 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010196964357094555  
    ---------------- t = 0.4540442319680666, dt = 0.012143873902564231 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.4661881058706308, dt = 0.017187564442663356 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.48337567031329415, dt = 0.020549391470152424 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.5039250617834465, dt = 0.022789916628284307 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010242752694283722  
    ---------------- t = 0.5267149784117309, dt = 0.012142304783340262 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.5388572831950711, dt = 0.017185335818788564 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.5560426190138597, dt = 0.020546706316079286 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.5765893253299389, dt = 0.022786925055819442 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010239534108047151  
    ---------------- t = 0.5993762503857584, dt = 0.012140796349555595 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.6115170467353139, dt = 0.017183253197540334 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.6287002999328543, dt = 0.020544180856042135 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.6492444807888964, dt = 0.022784258254016344 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01019122893249363  
    ---------------- t = 0.6720287390429127, dt = 0.012139435467851232 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.684168174510764, dt = 0.017181461586580033 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.701349636097344, dt = 0.020542311662598928 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.7218919477599429, dt = 0.022782640259317907 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010257515344900296  
    ---------------- t = 0.7446745880192608, dt = 0.012139046059818682 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.7568136340790794, dt = 0.017181115686591714 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.7739947497656712, dt = 0.020542438304868946 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.7945371880705401, dt = 0.022783646180816696 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010359526656103334  
    ---------------- t = 0.8173208342513568, dt = 0.012139955296903834 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.8294607895482606, dt = 0.01718275916156706 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.8466435487098277, dt = 0.020544823495888872 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.8671883722057165, dt = 0.02278673311711123 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01041937531040456  
    ---------------- t = 0.8899751053228278, dt = 0.012141836260984556 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.9021169415838123, dt = 0.017185566499418294 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.9193025080832306, dt = 0.020548409337643816 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.9398509174208743, dt = 0.022790035667174847 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010509561097303359  
    ---------------- t = 0.9626409530880492, dt = 0.012142821842361283 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.9747837749304105, dt = 0.01718619307503258 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 0.991969968005443, dt = 0.02054792082997508 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.012517888835418, dt = 0.02278855063240848 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010482040358084144  
    ---------------- t = 1.0353064394678266, dt = 0.012141849883276335 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.047448289351103, dt = 0.017184711581472115 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.064633000932575, dt = 0.020546004551614153 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.0851790054841892, dt = 0.02278638708655861 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010432900718965164  
    ---------------- t = 1.1079653925707478, dt = 0.012140602863987786 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.1201059954347357, dt = 0.017183054615445278 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.1372890500501809, dt = 0.020544193447606593 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.1578332434977874, dt = 0.022784597706691674 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010367376225040003  
    ---------------- t = 1.180617841204479, dt = 0.012139805129656836 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.1927576463341358, dt = 0.017182165490016575 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.2099398118241524, dt = 0.020543471336045973 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.2304832831601984, dt = 0.022784302361676615 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010367534699371475  
    ---------------- t = 1.2532675855218751, dt = 0.01213996938564839 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.2654075549075234, dt = 0.017182632273443715 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.282590187180967, dt = 0.020544346831625534 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.3031345340125926, dt = 0.022785738897343543 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010332260379935888  
    ---------------- t = 1.3259202729099362, dt = 0.012141002189155896 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.3380612750990921, dt = 0.017184159069600486 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.3552454341686926, dt = 0.02054629138520502 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.3757917255538976, dt = 0.022788004097926303 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010357399126342457  
    ---------------- t = 1.3985797296518239, dt = 0.012141985956846131 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.41072171560867, dt = 0.01718554790248004 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.42790726351115, dt = 0.020547776154954827 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.448455039666105, dt = 0.02278906424850468 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010385881611186868  
    ---------------- t = 1.4712441039146096, dt = 0.01214162709882678 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.4833857310134364, dt = 0.017184404945444494 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.500570135958881, dt = 0.02054550391714589 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.5211156398760268, dt = 0.02278548375816867 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010434180899419582  
    ---------------- t = 1.5439011236341955, dt = 0.012139665162450127 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.5560407887966456, dt = 0.01718159961604677 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.5732223884126924, dt = 0.020542199361526042 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.5937645877742184, dt = 0.022781965435594603 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010307150651296764  
    ---------------- t = 1.6165465532098129, dt = 0.012137896442055816 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.6286844496518686, dt = 0.01717918979386756 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.6458636394457362, dt = 0.020539406054073298 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.6664030454998096, dt = 0.022779140546878653 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01031625035768625  
    ---------------- t = 1.6891821860466882, dt = 0.012136573761204061 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.7013187598078923, dt = 0.01717754917079953 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.7184963089786918, dt = 0.02053786528928687 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.7390341742679787, dt = 0.02277787005066303 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010430285040673476  
    ---------------- t = 1.7618120443186418, dt = 0.012136341354781073 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.7739483856734228, dt = 0.017177428720364207 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.7911258143937872, dt = 0.02053815028648102 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.8116639646802681, dt = 0.022778844760790853 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010551735996272037  
    ---------------- t = 1.834442809441059, dt = 0.012137131383070012 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.846579940824129, dt = 0.01717886544371424 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.8637588062678432, dt = 0.020540184833545624 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.8842989911013888, dt = 0.02278167071455595 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01062063729071743  
    ---------------- t = 1.9070806618159448, dt = 0.012138786161492996 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.9192194479774378, dt = 0.017181222348229927 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.9364006703256678, dt = 0.020543085808831348 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.9569437561344991, dt = 0.022784689391636862 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010664643309562367  
    ---------------- t = 1.979728445526136, dt = 0.012140206332478932 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 1.9918686518586148, dt = 0.01718300300629441 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.0090516548649093, dt = 0.020544741067584877 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.029596395932494, dt = 0.022785927370986406 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01074141642686474  
    ---------------- t = 2.0523823233034806, dt = 0.012140521033186344 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.064522844336667, dt = 0.01718331234262497 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.081706156679292, dt = 0.02054496440228715 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.102251121081579, dt = 0.022785889421026457 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01074213979176944  
    ---------------- t = 2.1250370105026053, dt = 0.012140434208877416 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.1371774447114826, dt = 0.017183111486337624 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.1543605561978203, dt = 0.020544763823388067 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.1749053200212085, dt = 0.022785671284892537 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01067199003182933  
    ---------------- t = 2.197690991306101, dt = 0.012140458363574826 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.2098314496696756, dt = 0.0171833352674863 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.227014784937162, dt = 0.020545116204467962 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.24755990114163, dt = 0.022786357772218678 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010633246115204144  
    ---------------- t = 2.2703462589138486, dt = 0.012140773310025242 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.282487032223874, dt = 0.017183711464364246 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.299670743688238, dt = 0.020545554919175472 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.3202162986074133, dt = 0.022786985780561368 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010643969004529732  
    ---------------- t = 2.3430032843879744, dt = 0.0121412641175124 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.355144548505487, dt = 0.01718462638458557 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.3723291748900723, dt = 0.020546844137396863 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.392876019027469, dt = 0.02278854280811747 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010627225170461543  
    ---------------- t = 2.4156645618355865, dt = 0.012141430947824822 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.4278059927834112, dt = 0.017184257294622585 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.4449902500780336, dt = 0.020545566977628615 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.4655358170556623, dt = 0.022785680269965802 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01061608563217777  
    ---------------- t = 2.4883214973256282, dt = 0.012139733553090145 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.5004612308787184, dt = 0.017181775877899135 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.5176430067566176, dt = 0.020542571643712877 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.5381855784003307, dt = 0.022782682828237262 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010616311108057821  
    ---------------- t = 2.560968261228568, dt = 0.012138226518319235 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.5731064877468874, dt = 0.017179658144721232 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.590286145891609, dt = 0.020540043973902567 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.6108261898655116, dt = 0.02277979658543629 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010551559902820746  
    ---------------- t = 2.633605986450948, dt = 0.012136721930447042 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.6457427083813947, dt = 0.01717761010773223 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.662920318489127, dt = 0.020537846299863497 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.6834581647889904, dt = 0.022777554309911314 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010474774268052992  
    ---------------- t = 2.7062357190989017, dt = 0.012135602324201352 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.718371321423103, dt = 0.01717619695926395 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.735547518382367, dt = 0.02053620085719553 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.756083719239563, dt = 0.022776126863893884 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010575542680858491  
    ---------------- t = 2.778859846103457, dt = 0.012135116090206535 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.7909949621936634, dt = 0.01717572678249497 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.8081706889761584, dt = 0.020536112242200793 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.828706801218359, dt = 0.022776504304731604 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010709071336104064  
    ---------------- t = 2.851483305523091, dt = 0.01213578699655678 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.8636190925196474, dt = 0.01717685191160913 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.8807959444312567, dt = 0.020537816330570613 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.9013337607618275, dt = 0.0227790521683539 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010815897153191636  
    ---------------- t = 2.9241128129301814, dt = 0.012137284027188963 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.9362500969573704, dt = 0.01717917728754395 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.953429274244914, dt = 0.02054069360416613 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 2.9739699678490803, dt = 0.022782165005090647 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010905977549613149  
    ---------------- t = 2.996752132854171, dt = 0.012138803788495663 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.0088909366426666, dt = 0.017181184260630745 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.0260721209032972, dt = 0.020542851727405744 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.046614972630703, dt = 0.022783928661843672 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010894140421946516  
    ---------------- t = 3.069398901292547, dt = 0.012139439224908358 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.0815383405174552, dt = 0.01718196013248529 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.0987203006499406, dt = 0.02054350269712267 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.119263803347063, dt = 0.02278454263058838 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010894612271109553  
    ---------------- t = 3.142048345977652, dt = 0.012139699269845686 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.1541880452474973, dt = 0.017182252085169315 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.1713702973326665, dt = 0.02054345360499463 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.191913750937661, dt = 0.0227837991455493 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010851434799443312  
    ---------------- t = 3.2146975500832102, dt = 0.012139144458574122 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.2268366945417846, dt = 0.017181213302734023 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.2440179078445186, dt = 0.02054237533589853 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.2645602831804172, dt = 0.022783055056684674 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010804523620575246  
    ---------------- t = 3.287343338237102, dt = 0.012138877865921365 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.2994822161030233, dt = 0.017181042949129602 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.3166632590521528, dt = 0.02054238811281646 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.337205647164969, dt = 0.02278348682838712 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010763898371740768  
    ---------------- t = 3.359989133993356, dt = 0.01213932350066549 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.372128457494022, dt = 0.01718184228971813 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.38931029978374, dt = 0.0205437738853608 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.4098540736691008, dt = 0.022785217078554198 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010778924312433895  
    ---------------- t = 3.432639290747655, dt = 0.01214037516704 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.444779665914695, dt = 0.01718335547514034 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.461963021389835, dt = 0.020545493179455147 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.4825085145692904, dt = 0.022786021650719614 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010778612546969542  
    ---------------- t = 3.50529453622001, dt = 0.012139708360007433 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.5174342445800173, dt = 0.0171816400966244 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.534615884676642, dt = 0.020542138923803143 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.5551580236004447, dt = 0.022781957364870847 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010815995129877956  
    ---------------- t = 3.5779399809653154, dt = 0.012137658732914327 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.59007763969823, dt = 0.017178844053182617 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.6072564837514127, dt = 0.0205389200572602 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.627795403808673, dt = 0.022778252218076295 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01068759737603632  
    ---------------- t = 3.6505736560267494, dt = 0.012135747938992211 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.6627094039657417, dt = 0.017176266927135933 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.6798856708928778, dt = 0.020536070820224 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.7004217417131016, dt = 0.02277562383228766 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010656390148623076  
    ---------------- t = 3.7231973655453894, dt = 0.012134469485510545 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.7353318350309, dt = 0.01717447479801987 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.7525063098289198, dt = 0.020534230293473933 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.773040540122394, dt = 0.02277372509231848 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010817005664556227  
    ---------------- t = 3.7958142652147124, dt = 0.012133802162122509 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.807948067376835, dt = 0.017173820825718927 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.825121888202554, dt = 0.020533671075944927 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.845655559278499, dt = 0.02277366171586928 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010971954730966073  
    ---------------- t = 3.868429220994368, dt = 0.012134076717892794 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.8805632977122606, dt = 0.01717445700898573 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.897737754721246, dt = 0.02053498959583514 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.9182727443170813, dt = 0.022775577014467335 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01107038366704029  
    ---------------- t = 3.941048321331549, dt = 0.012135474218885094 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.953183795550434, dt = 0.017176555187733956 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.970360350738168, dt = 0.02053771148756275 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 3.990898062225731, dt = 0.022778904872491873 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01113376068021861  
    ---------------- t = 4.013676967098223, dt = 0.012137141094787687 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.0258141081930106, dt = 0.017178885720894616 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.042992993913905, dt = 0.02054031053543786 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.063533304449343, dt = 0.02278141760571148 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011205615849429553  
    ---------------- t = 4.086314722055054, dt = 0.012138154617897374 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.098452876672951, dt = 0.017180113021213285 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.115632989694165, dt = 0.020541385860262027 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.136174375554426, dt = 0.022782229980149137 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01114378451315007  
    ---------------- t = 4.158956605534575, dt = 0.012138500646551042 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.171095106181126, dt = 0.017180517414856867 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.188275623595983, dt = 0.020541888405594226 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.208817512001577, dt = 0.0227827037510785 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01112276939849549  
    ---------------- t = 4.231600215752655, dt = 0.012138809729315674 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.243739025481971, dt = 0.017181102139898548 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.260920127621869, dt = 0.02054251043518322 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.281462638057052, dt = 0.022783229334345484 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01111006610596835  
    ---------------- t = 4.304245867391398, dt = 0.01213893890929165 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.3163848063006895, dt = 0.01718107778277307 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.3335658840834625, dt = 0.02054247778755508 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.354108361871018, dt = 0.022783443030451444 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011118516982419387  
    ---------------- t = 4.37689180490147, dt = 0.012139222425031343 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.389031027326501, dt = 0.017181723968169804 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.406212751294671, dt = 0.02054340458501601 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.426756155879687, dt = 0.022784900246852525 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011098778130617958  
    ---------------- t = 4.44954105612654, dt = 0.01214009849389664 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.461681154620437, dt = 0.017182981861247743 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.478864136481684, dt = 0.020545017581531197 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.4994091540632155, dt = 0.02278654467488556 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011053723657372283  
    ---------------- t = 4.522195698738101, dt = 0.012140384901996636 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.534336083640098, dt = 0.01718267159500131 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.551518755235099, dt = 0.02054343545585442 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.5720621906909535, dt = 0.022783200578992538 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.01100410711629281  
    ---------------- t = 4.5948453912699465, dt = 0.01213823211011815 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.6069836233800645, dt = 0.01717975265001283 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.6241633760300775, dt = 0.02054031270963158 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.6447036887397095, dt = 0.022780020207983146 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010924100291445854  
    ---------------- t = 4.667483708947692, dt = 0.01213649474324536 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.679620203690938, dt = 0.01717719648764403 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.696797400178582, dt = 0.020537181196582963 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.717334581375165, dt = 0.022776898841349945 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.010913544291358015  
    ---------------- t = 4.740111480216515, dt = 0.012135113864984276 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.752246594081499, dt = 0.01717557593784818 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.7694221700193475, dt = 0.020535510524454532 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.789957680543802, dt = 0.022775051974173798 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011037137171844645  
    ---------------- t = 4.812732732517976, dt = 0.01213435897586751 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.824867091493843, dt = 0.01717458076041436 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.842041672254258, dt = 0.02053472182363671 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.8625763940778945, dt = 0.022774827081882148 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011198513433843614  
    ---------------- t = 4.885351221159777, dt = 0.01213442235312067 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.897485643512898, dt = 0.017174879385049878 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.914660522897948, dt = 0.020535379133033833 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.935195902030982, dt = 0.02277601921858994 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    Warning: the corrector tolerance are broken the step will be re rerunned      [BasicGasSPH][rank=0]
        eps_v = 0.011327481325217678  
    ---------------- t = 4.957971921249571, dt = 0.012135431951602988 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.970107353201175, dt = 0.017176503953030928 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    ---------------- t = 4.987283857154205, dt = 0.01271614284579492 ---------------- 
    Warning: High interface/patch volume ratio.                                  [InterfaceGen][rank=0]
        This can lead to high mpi overhead, try to increase the patch split crit  
    L2 error on B2 : 0.077212856332666




.. GENERATED FROM PYTHON SOURCE LINES 199-284

.. code-block:: Python
   :lineno-start: 201



    # The box spans 3 wavelengths along x1, and the solution only depends on
    # x1 modulo the wavelength, so fold x1 into a single period to overlay them.
    def fold_x1(x1):
        return np.mod(x1 + 0.5 * wavelength, wavelength) - 0.5 * wavelength


    if do_plot:
        all_resols = sorted(set([resol] + list(plot_extra_resols)))
        results = {res: (x1, B2) if res == resol else run_alfven_wave(res) for res in all_resols}

        # Fig. 26: B2 vs x1 (folded into one wavelength) for each resolution
        fig, ax = plt.subplots(figsize=(8, 5))

        colors = plt.cm.viridis(np.linspace(0.0, 0.8, len(all_resols)))

        for color, res in zip(colors, all_resols):
            x1_r, B2_r = results[res]
            ax.plot(fold_x1(x1_r), B2_r, ".", color=color, markersize=1.5, label=f"resol={res}")

        x1_exact = np.linspace(-0.5 * wavelength, 0.5 * wavelength, 500)
        B2_exact_line = amplitude * np.sin(2.0 * np.pi * x1_exact / wavelength)
        ax.plot(x1_exact, B2_exact_line, "-", color="red", linewidth=1.5, label="exact solution")

        ax.set_xlabel("$x_1$")
        ax.set_ylabel("$B_2$")
        ax.set_title(f"3D circularly polarised Alfven wave, $t={t_target:.0f}$ periods")
        ax.legend()
        fig.tight_layout()
        fig.savefig(os.path.join(dump_folder, "mhd_alfven_wave_b2_vs_x1.png"), dpi=150)
        plt.close(fig)

        nxs = np.array(all_resols, dtype=float)
        l1_errs = np.array(
            [
                np.mean(np.abs(B2_r - amplitude * np.sin(2.0 * np.pi * x1_r / wavelength)))
                for x1_r, B2_r in (results[res] for res in all_resols)
            ]
        )
        for res, err in zip(all_resols, l1_errs):
            print(f"L1 error on B2 (resol={res}) : {err}")

        fig, ax = plt.subplots(figsize=(6, 5))
        ax.loglog(nxs, l1_errs, "o-", color="black", label="Shamrock")
        if len(nxs) > 1:
            # Local order between consecutive resolutions: a single fit over all points
            # would be biased by coarse runs that are not yet in the asymptotic regime.
            orders = -np.diff(np.log(l1_errs)) / np.diff(np.log(nxs))
            for lo, hi, order in zip(all_resols[:-1], all_resols[1:], orders):
                print(f"L1 convergence order between resol={lo} and {hi} : {order}")
            ax.loglog(
                nxs,
                l1_errs[-1] * (nxs / nxs[-1]) ** -2,
                "--",
                color="gray",
                label="second order",
            )
            ax.set_title(f"Convergence, order between the two finest = {orders[-1]:.2f}")
        ax.set_xlabel("number of particles in x")
        ax.set_ylabel("L1 error on $B_2$")
        ax.legend()
        fig.tight_layout()
        fig.savefig(os.path.join(dump_folder, "mhd_alfven_wave_convergence.png"), dpi=150)
        plt.close(fig)

    test_pass = True
    err_log = ""

    expect_l2_err_B2 = 0.077212856332666
    tol = 1e-5  # too generous for now


    def float_equal(val1, val2, prec):
        return abs(val1 - val2) < prec


    if not float_equal(l2_err_B2, expect_l2_err_B2, tol * expect_l2_err_B2):
        err_log += "error on the L2 norm of B2 is outside of tolerances:\n"
        err_log += f"  expected error = {expect_l2_err_B2} +- {tol * expect_l2_err_B2}\n"
        err_log += f"  obtained error = {l2_err_B2} (relative error = {(l2_err_B2 - expect_l2_err_B2) / expect_l2_err_B2})\n"
        test_pass = False

    if test_pass == False:
        exit("Test did not pass L2 margins : \n" + err_log)








.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 33.987 seconds)

**Estimated memory usage:**  162 MB


.. _sphx_glr_download__as_gen_tests_ci_run_mhd_alfven_wave.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: run_mhd_alfven_wave.ipynb <run_mhd_alfven_wave.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: run_mhd_alfven_wave.py <run_mhd_alfven_wave.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: run_mhd_alfven_wave.zip <run_mhd_alfven_wave.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
