[Oopse-developers] more spline links

Dan Gezelter gezelter at nd.edu
Thu Apr 13 13:59:26 EDT 2006


Look at:

   http://www.csit.fsu.edu/~burkardt/f_src/pppack/pppack.f90

(In particular, the subroutines spline_hermite_set and  
spline_hermite_val,
cubset, cubslo)

For some of our intended uses (i.e. LJ), we can generate the  
derivatives at
the knots in advance (we require the function and 1st derivatives, so  
we'll
need up to 2nd derivatives analytically).    If we do this, we could  
call
spline_hermite_set directly.

For EAM and other tabulated functions, we have only the function values
themselves, and we'll need to do cubset (which does a cubslo to get
the derivatives and then calls spline_hermite_set itself).

Note that these routines don't assume uniform grids (just monotonic),
so they are probably not as efficient as they could be for our uses.
The portion that finds the interval would be particularly inefficient:

!
!  Find the interval J = [ TDATA(J), TDATA(J+1) ] that contains
!  or is nearest to TVAL.
!
   j = ndata - 1

   do i = 1, ndata-2

     if ( tval < tdata(i+1) ) then
       j = i
       exit
     end if

   end do




***********************************************
   J. Daniel Gezelter
   Associate Professor
   Department of Chemistry and Biochemistry
   251 Nieuwland Science Hall
   University of Notre Dame
   Notre Dame, IN 46556-5670

   phone:  +1 (574) 631-7595
   fax:    +1 (574) 631-6652
   e-mail: gezelter at nd.edu
   web:    http://www.nd.edu/~gezelter
************************************************





More information about the Openmd-developers mailing list