From bd733c56ca642190f227fe660dc42d77b5fb148e Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 09:44:09 -0800 Subject: [PATCH] Modified maketest to skip final DeltaTime if STELLAR module called. For some reason the number of steps taken in the mac and linux version can be different by 50%! --- src/evolve.c | 1 + .../test_AtmEscFlareDavenport.py | 1 - .../AtmEscFlareLacy/test_AtmEscFlareLacy.py | 1 - .../test_DiffLimWaterEscape.py | 105 +++++++++--------- tests/AtmescStellar/DiffLimWaterEscape/vpl.in | 2 +- tests/maketest.py | 39 ++++--- 6 files changed, 77 insertions(+), 72 deletions(-) diff --git a/src/evolve.c b/src/evolve.c index 72414785f..4872a75f1 100644 --- a/src/evolve.c +++ b/src/evolve.c @@ -687,6 +687,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, // Timesteps are synchronized with the output time, so this statement is // sufficient control->Io.dNextOutput += control->Io.dOutputTime; + printf("%d\n",nSteps); nSteps = 0; } diff --git a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py index 8d40567a5..7a19a3521 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py +++ b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py @@ -106,7 +106,6 @@ "log.final.system.TotEnergy": {"value": -7.1773447078e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.6690355074e+40, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.KinEnergy": {"value": 1.4205267538e+37, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 3.7660480936e+10, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 1.3660515451e+08, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.4634687441, "rtol": 1e-4}, diff --git a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py index 9bc7eb697..645ffe2e0 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py +++ b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py @@ -106,7 +106,6 @@ "log.final.system.TotEnergy": {"value": -7.1802001227e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.6690359127e+40, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.KinEnergy": {"value": 1.4184861863e+37, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 2.9847629316e+10, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 1.3660512134e+08, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.4634687447, "rtol": 1e-4}, diff --git a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py index 3d835f2c5..957db6871 100644 --- a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py +++ b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py @@ -135,57 +135,56 @@ "log.initial.e.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, "log.final.system.Age": {"value": 3.001128e+16, "unit": u.sec, "rtol": 1e-4}, "log.final.system.Time": {"value": 2.997972e+16, "unit": u.sec, "rtol": 1e-4}, - "log.final.system.TotAngMom": {"value": 1.140605e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.system.TotEnergy": {"value": -1.890023e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 1.140596e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -1.891237e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.631379e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.KinEnergy": {"value": 9.851807e+35, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 2.721322e+11, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 9.848447e+35, "unit": u.Joule, "rtol": 1e-4}, "log.final.star.Mass": {"value": 1.789574e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 7.861410e+07, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.465100, "rtol": 1e-4}, - "log.final.star.RotAngMom": {"value": 2.171174e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.star.RotVel": {"value": 7134.305972, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.star.RotAngMom": {"value": 2.170804e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.RotVel": {"value": 7133.089239, "unit": u.m / u.sec, "rtol": 1e-4}, "log.final.star.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.star.RotRate": {"value": 9.075097e-05, "unit": 1 / u.sec, "rtol": 1e-4}, - "log.final.star.RotPer": {"value": 6.923546e+04, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.RotRate": {"value": 9.073549e-05, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.RotPer": {"value": 6.924727e+04, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Density": {"value": 8.793460e+04, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.star.HZLimitDryRunaway": {"value": 3.236261e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimitDryRunaway": {"value": 3.236263e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, "log.final.star.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.star.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, - "log.final.star.LXUVTot": {"value": 5.680619e-07, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LostEnergy": {"value": 1.442281e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.star.LostAngMom": {"value": 1.116766e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.LXUVTot": {"value": 5.680627e-07, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.LostEnergy": {"value": 1.442160e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.LostAngMom": {"value": 1.116760e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, "log.final.star.Luminosity": {"value": 0.000568, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LXUVStellar": {"value": 2.184766e+20, "unit": u.W, "rtol": 1e-4}, - "log.final.star.Temperature": {"value": 2649.348933, "unit": u.K, "rtol": 1e-4}, + "log.final.star.LXUVStellar": {"value": 2.184769e+20, "unit": u.W, "rtol": 1e-4}, + "log.final.star.Temperature": {"value": 2649.349670, "unit": u.K, "rtol": 1e-4}, "log.final.star.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.star.RossbyNumber": {"value": 0.009905, "rtol": 1e-4}, - "log.final.star.DRotPerDtStellar": {"value": 1.447229e-12, "rtol": 1e-4}, + "log.final.star.RossbyNumber": {"value": 0.009906, "rtol": 1e-4}, + "log.final.star.DRotPerDtStellar": {"value": 1.447475e-12, "rtol": 1e-4}, "log.final.b.Mass": {"value": 8.223700e+24, "unit": u.kg, "rtol": 1e-4}, "log.final.b.Radius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, "log.final.b.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.b.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.Density": {"value": 5429.316562, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.b.HZLimitDryRunaway": {"value": 3.236287e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.Instellation": {"value": 5825.743992, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.HZLimitDryRunaway": {"value": 3.236289e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.Instellation": {"value": 5825.751791, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.MeanMotion": {"value": 4.813397e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.b.OrbPeriod": {"value": 1.305354e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.b.SemiMajorAxis": {"value": 1.727522e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.SurfWaterMass": {"value": 0.000000, "unit": u.TO, "rtol": 1e-4}, "log.final.b.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.b.OxygenMass": {"value": 1146.053603, "unit": u.bar, "rtol": 1e-4}, - "log.final.b.RGLimit": {"value": 3.704010e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.OxygenMass": {"value": 1146.046267, "unit": u.bar, "rtol": 1e-4}, + "log.final.b.RGLimit": {"value": 3.704012e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.XO": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.PlanetRadius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, @@ -198,16 +197,16 @@ "log.final.b.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.b.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.b.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.b.FXUV": {"value": 5.825744, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.FXUV": {"value": 5.825752, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.AtmXAbsEffH2O": {"value": 0.041374, "rtol": 1e-4}, "log.final.b.RocheRadius": {"value": 4.290313e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.b.BondiRadius": {"value": 9.942293e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.BondiRadius": {"value": 9.942290e+08, "unit": u.m, "rtol": 1e-4}, "log.final.b.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.RRCriticalFlux": {"value": 41.454587, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.b.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.FXUVCRITDRAG": {"value": 0.000000, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.b.HREFFLUX": {"value": 4.676160e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.HREFFLUX": {"value": 4.676164e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, "log.final.b.XO2": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.XH2O": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.HDiffFlux": {"value": 0.000000, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, @@ -219,22 +218,22 @@ "log.final.e.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.e.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.Density": {"value": 4858.600773, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.e.HZLimitDryRunaway": {"value": 3.236326e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.Instellation": {"value": 905.968971, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.e.HZLimitDryRunaway": {"value": 3.236329e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.Instellation": {"value": 905.970184, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.e.MeanMotion": {"value": 1.191967e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.e.OrbPeriod": {"value": 5.271275e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.e.SemiMajorAxis": {"value": 4.380718e+09, "unit": u.m, "rtol": 1e-4}, "log.final.e.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, - "log.final.e.SurfWaterMass": {"value": 3.053422, "unit": u.TO, "rtol": 1e-4}, + "log.final.e.SurfWaterMass": {"value": 3.052434, "unit": u.TO, "rtol": 1e-4}, "log.final.e.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.e.OxygenMass": {"value": 1031.243496, "unit": u.bar, "rtol": 1e-4}, - "log.final.e.RGLimit": {"value": 3.765018e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.XO": {"value": 0.554278, "rtol": 1e-4}, + "log.final.e.OxygenMass": {"value": 1031.463102, "unit": u.bar, "rtol": 1e-4}, + "log.final.e.RGLimit": {"value": 3.765020e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.XO": {"value": 0.554357, "rtol": 1e-4}, "log.final.e.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.PlanetRadius": {"value": 5.880608e+06, "unit": u.m, "rtol": 1e-4}, "log.final.e.OxygenMantleMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, @@ -246,22 +245,22 @@ "log.final.e.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.e.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.e.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.e.FXUV": {"value": 0.905969, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.FXUV": {"value": 0.905970, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.AtmXAbsEffH2O": {"value": 0.073282, "rtol": 1e-4}, "log.final.e.RocheRadius": {"value": 8.653872e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.e.BondiRadius": {"value": 3.142136e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.e.BondiRadius": {"value": 3.142135e+08, "unit": u.m, "rtol": 1e-4}, "log.final.e.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.e.RRCriticalFlux": {"value": 26.551159, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.e.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, - "log.final.e.FXUVCRITDRAG": {"value": 0.297807, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.e.HREFFLUX": {"value": 2.112523e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.XO2": {"value": 0.426457, "rtol": 1e-4}, - "log.final.e.XH2O": {"value": 0.573543, "rtol": 1e-4}, - "log.final.e.HDiffFlux": {"value": 6.894047e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.HRefODragMod": {"value": 0.003131, "rtol": 1e-4}, + "log.final.e.FXUVCRITDRAG": {"value": 0.297754, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.HREFFLUX": {"value": 2.112525e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.XO2": {"value": 0.426589, "rtol": 1e-4}, + "log.final.e.XH2O": {"value": 0.573411, "rtol": 1e-4}, + "log.final.e.HDiffFlux": {"value": 6.892821e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.HRefODragMod": {"value": 0.003130, "rtol": 1e-4}, "log.final.e.KTide": {"value": 0.898227, "rtol": 1e-4}, - "log.final.e.RGDuration": {"value": 3.80345e+08, "unit": u.yr, "rtol": 1e-4}, + "log.final.e.RGDuration": {"value": 3.80438e+08, "unit": u.yr, "rtol": 1e-4}, } ) class Test_DiffLimWaterEscape(Benchmark): diff --git a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in index 6a28b602b..10d93eaa2 100755 --- a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in +++ b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in @@ -14,4 +14,4 @@ bDoForward 1 bVarDt 1 dEta 0.1 dStopTime 0.95e9 -dOutputTime 0.95e9 +dOutputTime 0.95e7 diff --git a/tests/maketest.py b/tests/maketest.py index faf4a40d7..3060b9a57 100644 --- a/tests/maketest.py +++ b/tests/maketest.py @@ -138,6 +138,7 @@ def GetSNames(bodyfiles): if line[0] == "saModules": if "stellar".casefold() in line or "stellar,".casefold() in line: stellar = True + print("WARNING: Stellar module detected, rtol will be set to 1e-4 for all values.") if line[0] == "sName": body_names.append(line[1]) @@ -475,15 +476,18 @@ def WriteTest(data, dirname, stellar): if "log" in k and v[0] != "": if "final" in k and stellar == True: - t.write( - ' "' - + k - + '": {"value": ' - + str(v[1]) - + ', "unit": ' - + v[0] - + ', "rtol": 1e-4}, \n' - ) + if "DeltaTime" in k: + print("WARNING: Skipping final DeltaTime") + else: + t.write( + ' "' + + k + + '": {"value": ' + + str(v[1]) + + ', "unit": ' + + v[0] + + ', "rtol": 1e-4}, \n' + ) else: t.write( ' "' @@ -496,13 +500,16 @@ def WriteTest(data, dirname, stellar): ) if "log" in k and v[0] == "": if "final" in k and stellar == True: - t.write( - ' "' - + k - + '": {"value": ' - + str(v[1]) - + ', "rtol": 1e-4}, \n' - ) + if "DeltaTime" in k: + print("WARNING: Skipping final DeltaTime") + else: + t.write( + ' "' + + k + + '": {"value": ' + + str(v[1]) + + ', "rtol": 1e-4}, \n' + ) else: t.write(' "' + k + '": {"value": ' + str(v[1]) + "}, \n")