Returns the annotation associated to a grid. If a radial function handle is given, the annotation for that radial function's grid is returned. Otherwise, the return value is the annotation for the global grid. If there is no appropriate annotation, an empty structure is returned. @param ps is a handle to the psml information @param radfunc is a handle to a radial function structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ps_t), | intent(in) | :: | ps | |||
type(ps_radfunc_t), | intent(in), | optional | :: | radfunc |
function ps_GridAnnotation(ps,radfunc) result(annotation)
type(ps_t), intent(in) :: ps
type(ps_radfunc_t), intent(in), optional :: radfunc
type(ps_annotation_t) :: annotation
type(ps_annotation_t), pointer :: annotation_p
if (present(radfunc)) then
! We are told to get the grid annotation
! for a specific radial function
if (.not. initialized(radfunc%grid)) then
call die("get_annotation: Invalid radial function")
endif
annotation_p => annotationGrid(radfunc%grid)
! If npts_data /= npts_grid, add a record to reflect this
annotation = annotation_p
else
! This is the global grid annotation
if (.not. initialized(ps%global_grid)) then
annotation = EMPTY_ANNOTATION
else
annotation_p => annotationGrid(ps%global_grid)
annotation = annotation_p
endif
endif
end function ps_GridAnnotation