Indicator function for determining if a point is inside the gyro_surface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(GyroSurface), | intent(in) | :: | gs | Gyro-surface |
||
real(kind=Float64), | intent(in), | dimension(3) | :: | p | Point |
function in_gyro_surface(gs, p) result(in_gs)
!+ Indicator function for determining if a point is inside the gyro_surface
type(GyroSurface), intent(in) :: gs
!+ Gyro-surface
real(Float64), dimension(3), intent(in) :: p
!+ Point
logical :: in_gs
real(Float64), dimension(3) :: pp
pp = p - gs%center
in_gs = dot_product(pp, matmul(gs%A, pp)).le.1.d0
end function in_gyro_surface