/[lmdze]/trunk/Sources/misc/coefpoly.f
ViewVC logotype

Annotation of /trunk/Sources/misc/coefpoly.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (hide annotations)
Mon Jul 8 18:12:18 2013 UTC (10 years, 10 months ago) by guez
Original Path: trunk/libf/dyn3d/coefpoly.f
File size: 1445 byte(s)
No reason to call inidissip in ce0l.

In inidissip, set random seed to 1 beacuse PGI compiler does not
accept all zeros.

dq was computed needlessly in caladvtrac. Arguments masse and dq of
calfis not used.

Replaced real*8 by double precision.

Pass arrays with inverted order of vertical levels to conflx instead
of creating local variables for this inside conflx.

1 guez 3 !
2     ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/coefpoly.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $
3     !
4     SUBROUTINE coefpoly ( Xf1, Xf2, Xprim1, Xprim2, xtild1,xtild2 ,
5     , a0,a1,a2,a3 )
6     IMPLICIT NONE
7     c
8     c ... Auteur : P. Le Van ...
9     c
10     c
11     c Calcul des coefficients a0, a1, a2, a3 du polynome de degre 3 qui
12     c satisfait aux 4 equations suivantes :
13    
14     c a0 + a1*xtild1 + a2*xtild1*xtild1 + a3*xtild1*xtild1*xtild1 = Xf1
15     c a0 + a1*xtild2 + a2*xtild2*xtild2 + a3*xtild2*xtild2*xtild2 = Xf2
16     c a1 + 2.*a2*xtild1 + 3.*a3*xtild1*xtild1 = Xprim1
17     c a1 + 2.*a2*xtild2 + 3.*a3*xtild2*xtild2 = Xprim2
18    
19     c On en revient a resoudre un systeme de 4 equat.a 4 inconnues a0,a1,a2,a3
20    
21 guez 71 DOUBLE PRECISION Xf1, Xf2,Xprim1,Xprim2, xtild1,xtild2, xi
22     DOUBLE PRECISION Xfout, Xprim
23     DOUBLE PRECISION a1,a2,a3,a0, xtil1car, xtil2car,derr,x1x2car
24 guez 3
25     xtil1car = xtild1 * xtild1
26     xtil2car = xtild2 * xtild2
27    
28     derr= 2. *(Xf2-Xf1)/( xtild1-xtild2)
29    
30     x1x2car = ( xtild1-xtild2)*(xtild1-xtild2)
31    
32     a3 = (derr + Xprim1+Xprim2 )/x1x2car
33     a2 = ( Xprim1 - Xprim2 + 3.* a3 * ( xtil2car-xtil1car ) ) /
34     / ( 2.* ( xtild1 - xtild2 ) )
35    
36     a1 = Xprim1 -3.* a3 * xtil1car -2.* a2 * xtild1
37     a0 = Xf1 - a3 * xtild1* xtil1car -a2 * xtil1car - a1 *xtild1
38    
39     RETURN
40     END

  ViewVC Help
Powered by ViewVC 1.1.21