hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

Solve issues that occur when viewing angles are along walls #19

Open astrofrog opened 12 years ago

astrofrog commented 12 years ago

When one or more of the viewing angles are along a wall, or pass through the corner or edges of the cells, the following warnings are raised:

WARNING: not in correct cell - killing [grid_integrate]
WARNING: not in correct cell - killing [grid_integrate]
WARNING: not in correct cell - killing [grid_integrate]
WARNING: not in correct cell - killing [grid_integrate]
WARNING: not in correct cell - killing [grid_integrate]

and the photons get killed.

astrofrog commented 12 years ago

This is only really an issue for point sources, because it is the only source type where the starting position of a photon is exact, and may result in alignment with the grid walls, or cell vertices.

astrofrog commented 12 years ago

Actually, this could happen to any source provided that its dimensions are much smaller than the typical grid cell size.

astrofrog commented 12 years ago

In addition, even if the viewing angles are not aligned along walls, the current code will have difficulties with photons emitted from a point source that falls on a wall.

astrofrog commented 12 years ago

This has now been fixed for cartesian, spherical polar, and cylindrical polar grids.