source: trunk/LMDZ.PLUTO.old/libf/dyn3d/coefpoly.F @ 3436

Last change on this file since 3436 was 3175, checked in by emillour, 11 months ago

Pluto PCM:
Add the old Pluto LMDZ for reference (required prior step to making
an LMDZ.PLUTO using the same framework as the other physics packages).
TB+EM

File size: 1.4 KB
Line 
1c $Header: /users/lmdz/cvsroot/LMDZ.3.3/libf/dyn3d/coefpoly.F,v 1.1 2001/04/23 08:43:28 lmdz Exp $
2      SUBROUTINE coefpoly ( Xf1, Xf2, Xprim1, Xprim2, xtild1,xtild2 ,
3     ,                                          a0,a1,a2,a3         )
4      IMPLICIT NONE
5c
6c   ...  Auteur :   P. Le Van  ...
7c
8c
9c    Calcul des coefficients a0, a1, a2, a3 du polynome de degre 3 qui
10c      satisfait aux 4 equations  suivantes :
11
12c    a0 + a1*xtild1 + a2*xtild1*xtild1 + a3*xtild1*xtild1*xtild1 = Xf1
13c    a0 + a1*xtild2 + a2*xtild2*xtild2 + a3*xtild2*xtild2*xtild2 = Xf2
14c               a1  +     2.*a2*xtild1 +     3.*a3*xtild1*xtild1 = Xprim1
15c               a1  +     2.*a2*xtild2 +     3.*a3*xtild2*xtild2 = Xprim2
16
17c  On en revient a resoudre un systeme de 4 equat.a 4 inconnues a0,a1,a2,a3
18
19      REAL*8 Xf1, Xf2,Xprim1,Xprim2, xtild1,xtild2, xi
20      REAL*8 Xfout, Xprim
21      REAL*8 a1,a2,a3,a0, xtil1car, xtil2car,derr,x1x2car
22
23      xtil1car = xtild1 * xtild1
24      xtil2car = xtild2 * xtild2
25
26      derr= 2. *(Xf2-Xf1)/( xtild1-xtild2)
27
28      x1x2car = ( xtild1-xtild2)*(xtild1-xtild2)
29
30      a3 = (derr + Xprim1+Xprim2 )/x1x2car
31      a2     = ( Xprim1 - Xprim2 + 3.* a3 * ( xtil2car-xtil1car ) )    /
32     /           (  2.* ( xtild1 - xtild2 )  )
33
34      a1     = Xprim1 -3.* a3 * xtil1car     -2.* a2 * xtild1
35      a0     =  Xf1 - a3 * xtild1* xtil1car -a2 * xtil1car - a1 *xtild1
36
37      RETURN
38      END
Note: See TracBrowser for help on using the repository browser.