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


Calls

proc~~tem_spherecubeoverlap~2~~CallsGraph proc~tem_spherecubeoverlap~2 tem_sphereCubeOverlap proc~hollowspherecubeoverlap~2 hollowSphereCubeOverlap proc~tem_spherecubeoverlap~2->proc~hollowspherecubeoverlap~2 proc~solidspherecubeoverlap~2 solidSphereCubeOverlap proc~tem_spherecubeoverlap~2->proc~solidspherecubeoverlap~2

Contents

Source Code


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