| 
            Last change
 on this file since 2996 was             2414, checked in by cmv, 22 years ago           | 
        
        
          | 
             
Exemple pour interface cfortan (CERN)   cmv 21/07/2003 
 
           | 
        
        
          | 
            File size:
            433 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 |       Subroutine FCN(Npar,Grad,Fval,Xval,Iflag,Futil)
 | 
|---|
| 2 |       Implicit Double Precision (a-h,o-z)
 | 
|---|
| 3 | 
 | 
|---|
| 4 |       Dimension Xval(*), Grad(*)
 | 
|---|
| 5 | 
 | 
|---|
| 6 |       Data  Xc,Yc/1.11D0,3.14d0/
 | 
|---|
| 7 | * 
 | 
|---|
| 8 | *  demo FCN 
 | 
|---|
| 9 | *  Gunter Folger, December 94
 | 
|---|
| 10 | *
 | 
|---|
| 11 | 
 | 
|---|
| 12 |        if ( Iflag.eq.1 ) Then
 | 
|---|
| 13 | *
 | 
|---|
| 14 | *      Initialaise.
 | 
|---|
| 15 | *
 | 
|---|
| 16 |        Elseif ( Iflag.eq.2) Then
 | 
|---|
| 17 | *
 | 
|---|
| 18 | *        derivatives...
 | 
|---|
| 19 | *
 | 
|---|
| 20 |        Endif
 | 
|---|
| 21 | 
 | 
|---|
| 22 |        Fval = (Xval(1)-Xc)**2 + (Xval(2)-Yc)**3*Xval(2)
 | 
|---|
| 23 | 
 | 
|---|
| 24 |        Return
 | 
|---|
| 25 | 
 | 
|---|
| 26 | *      
 | 
|---|
| 27 |        End
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.