Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase precision of Gmsh output #400

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading