diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2b17084b..0f7c2142 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,8 @@ of the maintenance releases, please take a look at 2.2.0 (in development) ---------------------- +* Increase the precision of the Gmsh output from cashocs + 2.1.0 (February 6, 2024) ------------------------ diff --git a/cashocs/io/mesh.py b/cashocs/io/mesh.py index 3a556e6f..c25ba7f2 100644 --- a/cashocs/io/mesh.py +++ b/cashocs/io/mesh.py @@ -355,14 +355,14 @@ def create_point_representation( mod_line = "" if dim == 2: mod_line = ( - f"{points[idcs[subwrite_counter]][0]:.16f} " - f"{points[idcs[subwrite_counter]][1]:.16f} 0\n" + f"{points[idcs[subwrite_counter]][0]:.16e} " + f"{points[idcs[subwrite_counter]][1]:.16e} 0\n" ) elif dim == 3: mod_line = ( - f"{points[idcs[subwrite_counter]][0]:.16f} " - f"{points[idcs[subwrite_counter]][1]:.16f} " - f"{points[idcs[subwrite_counter]][2]:.16f}\n" + f"{points[idcs[subwrite_counter]][0]:.16e} " + f"{points[idcs[subwrite_counter]][1]:.16e} " + f"{points[idcs[subwrite_counter]][2]:.16e}\n" ) return mod_line