Skip to content

Robustify cart2sph() function#24

Open
Lestropie wants to merge 1 commit into
Washington-University:masterfrom
Lestropie:robust_origin
Open

Robustify cart2sph() function#24
Lestropie wants to merge 1 commit into
Washington-University:masterfrom
Lestropie:robust_origin

Conversation

@Lestropie

Copy link
Copy Markdown
  • The hack for preventing division-by-zero where a lattice grid includes a point at the origin involves translating the whole lattice. Preserving vertex positions ensures that the field retains its expected symmetry to machine precision.

  • hypot() functions are preferable to squaring & square-rooting for preservation of floating-point precision, particularly avoiding exceeding bounds of trig functions.

  • Scaling of inputs to arctan2() have no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant