tem_sphereCubeOverlap Function

public function tem_sphereCubeOverlap(sphere, cube) result(overlap)

This function checks intesection of solid cube and sphere

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: sphere
type(tem_cube_type), intent(in) :: cube

Return Value logical


Source Code

  function tem_sphereCubeOverlap(sphere, cube) result(overlap)
    ! -------------------------------------------------------------------------!
    !interface variables
    type(tem_sphere_type), intent(in) :: sphere !< spacer geometry data
    type(tem_cube_type), intent(in) :: cube
    logical :: overlap !< return value
    ! -------------------------------------------------------------------------!
    if(sphere%only_surface) then
      overlap = hollowSphereCubeOverlap(sphere, cube)
    else
      overlap = solidSphereCubeOverlap(sphere, cube)
    endif

  end function tem_sphereCubeOverlap