/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_ad_moc/f2sDefs.F
ViewVC logotype

Contents of /MITgcm_contrib/heimbach/OpenAD/code_ad_moc/f2sDefs.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Sep 15 22:16:00 2008 UTC (16 years, 10 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
keep this version around

1 Subroutine oad_s_LAGRAN(i,x,a,sp,lagranRet)
2 #include "CPP_OPTIONS.h"
3 INTEGER i
4 _RS x
5 _RL a(4)
6 _RL lagranRet
7 INTEGER sp
8
9 C- local variables:
10 INTEGER k
11 _RL numer,denom
12
13 numer = 1. _d 0
14 denom = 1. _d 0
15
16 #ifdef TARGET_NEC_SX
17 !CDIR UNROLL=8
18 #endif /* TARGET_NEC_SX */
19 do k=1,sp
20 if ( k .ne. i) then
21 denom = denom*(a(i) - a(k))
22 numer = numer*(x - a(k))
23 endif
24 enddo
25
26 lagranRet = numer/denom
27
28 END
29

  ViewVC Help
Powered by ViewVC 1.1.22