source: LMDZ.3.3/trunk/libf/dyn3d/coefpoly.F @ 5306

Last change on this file since 5306 was 208, checked in by lmdz, 24 years ago

Mise en oeuvre du nouveau zoom. Modifs P. Levan
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
RevLine 
[208]1c $Header$
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.