libsim  Versione6.3.0
Tipi di dato | Funzioni/Subroutine
Riferimenti per il modulo space_utilities

Space utilities, derived from NCAR software. Continua...

Tipi di dato

interface  delete
 Distructor for triangles. Continua...
 

Funzioni/Subroutine

type(triangles) function, public triangles_new (ndp)
 initialize triangles Continua...
 
subroutine triangles_delete (this)
 delete triangles Continua...
 
integer function triangles_compute_r (XD, YD, tri)
 
integer function triangles_compute_d (XD, YD, tri)
 
integer function triangles_compute_c (co, tri)
 
integer function contng_simc (co, NT, IPT, NL, IPL)
 THIS SUBROUTINE PERFORMS TRIANGULATION. Continua...
 
integer function conxch_simc (X, Y, I1, I2, I3, I4)
 THIS FUNCTION DETERMINES WHETHER OR NOT THE EXCHANGE OF TWO TRIANGLES IS NECESSARY ON THE BASIS OF MAX-MIN-ANGLE CRITERION BY C. Continua...
 

Descrizione dettagliata

Space utilities, derived from NCAR software.

Simple example program

#include "config.h"
#ifdef HAVE_LIBNCARG
USE ncar_plot_class
#endif
IMPLICIT NONE
integer,dimension(:),allocatable :: seed
integer :: k,i
integer,parameter :: ndp=10000
type(xy), DIMENSION(ndp) :: co
integer :: status
character(len=512):: a_name
INTEGER :: category, ier
type(triangles) :: tri
#ifdef HAVE_LIBNCARG
type(ncar_plot) :: plot
#endif
!questa chiamata prende dal launcher il nome univoco
call l4f_launcher(a_name,a_name_force="example_space")
!init di log4fortran
ier=l4f_init()
!imposta a_name
category=l4f_category_get(a_name//".main")
call l4f_category_log(category,l4f_info,"start")
! create replicatable random numbers
call random_seed(size=k)
allocate (seed(k))
seed=5
call random_seed(put=seed)
call random_number(co%x)
call random_number(co%y)
tri=triangles_new(ndp)
status = triangles_compute(co,tri)
call l4f_category_log(category,l4f_info,"contng status="//t2c(status))
call l4f_category_log(category,l4f_info,"number of triangles="//t2c(tri%nt))
#ifdef HAVE_LIBNCARG
call l4f_category_log(category,l4f_info,"start plot")
call init(plot,pstype='PS', orient='LANDSCAPE',color='COLOR',file="example_space_utilities.ps")
call plot_triangles(plot,co,tri,"SIMC")
call delete(plot)
#endif
call delete(tri)
call l4f_category_log(category,l4f_info,"terminated")
!chiudo il logger
call l4f_category_delete(category)
ier=l4f_fini()
END program

Generated with Doxygen.