ForestClaw / forestclaw

Quadtree/octree adaptive PDE solver based based on p4est.
http://www.forestclaw.org
BSD 2-Clause "Simplified" License
58 stars 22 forks source link

Ray integration demo: numerical stability #214

Closed cburstedde closed 2 years ago

cburstedde commented 2 years ago

Update of the ray integration demo code in the swirl example for added stability.

We move the ray origin into the intersected element to minimize cancellation. As previously, wel skip rays that are parallel to either axis direction of an element, in the swirl demo, since error by division in the intersection computation is not unbounded.

I'd appreciate a merge by merge commit since that will include and validate the history of developing this feature (mostly covered in #213), which is so far sidelined. The diff to the official develop branch is, code-wise, minimal.

cburstedde commented 2 years ago

Hello, any comments on this PR? Basically it does two things, including relevant commit history and bumping numerical stability in corner cases.

cburstedde commented 2 years ago

This one is ready to go as well.