CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
bsort.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine bsort (n, x, y, xmin, xmax, ymin, ymax, dmax, bin, list)
 

Function/Subroutine Documentation

◆ bsort()

subroutine bsort ( integer  n,
real*8, dimension(*)  x,
real*8, dimension(*)  y,
real*8  xmin,
real*8  xmax,
real*8  ymin,
real*8  ymax,
real*8  dmax,
integer, dimension(*)  bin,
integer, dimension(*)  list 
)
24 !
25  implicit none
26 !
27  integer list(*),bin(*),n,i,j,k,p,ndiv
28 !
29  real*8 x(*),y(*),factx,facty,xmin,xmax,ymin,ymax,dmax
30 !
31  ndiv=nint(real(n)**0.25d0)
32  factx=real(ndiv)/((xmax-xmin)*1.01d0/dmax)
33  facty=real(ndiv)/((ymax-ymin)*1.01d0/dmax)
34  do 10 k=1,n
35  p=list(k)
36  i=int(y(p)*facty)
37  j=int(x(p)*factx)
38  if(mod(i,2).eq.0)then
39  bin(p)=i*ndiv+j+1
40  else
41  bin(p)=(i+1)*ndiv-j
42  end if
43  10 continue
44  call qsorti(n,list,bin)
subroutine qsorti(n, list, key)
Definition: qsorti.f:24
Hosted by OpenAircraft.com, (Michigan UAV, LLC)