Skip to content

Commit

Permalink
Merge pull request #400 from sblauth/dev/mesh_precision
Browse files Browse the repository at this point in the history
Gmsh output has increased precision
  • Loading branch information
sblauth authored Mar 6, 2024
2 parents 2f1c577 + 4f53b23 commit a1af5dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------------
Expand Down
10 changes: 5 additions & 5 deletions cashocs/io/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1af5dd

Please sign in to comment.