QCFortran.hpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------------//
00002 //                                                                                    //
00003 //   Copyright (c) 2001                                                               //
00004 //      INRIA                                                                         //
00005 //      54600 VILLERS LES NANCY                                                       //
00006 //      France                                                                        //
00007 //                                                                                    //
00008 //------------------------------------------------------------------------------------//
00009 //                                                                                    //
00010 //                 * NOTICE OF PROPRIETARY INFORMATION *                              //
00011 //                                                                                    //
00012 // The information contained in this file is considered proprietary and the exclusive //
00013 // property of  INRIA. This information may not be disclosed, duplicated              //
00014 // or used, in whole or in part, for  any purpose  whatsoever without express written //
00015 // authorization from INRIA                                                           //
00016 //                                                                                    //
00017 //------------------------------------------------------------------------------------//
00018 
00019 
00020 #ifndef QC_Fortran_H_
00021 #define QC_Fortran_H_
00022 
00023 
00024 #include "QCCommon.hpp"
00025 
00026 
00032 #ifdef F77_DUMMY_MAIN
00033 #  ifdef __cplusplus
00034      extern "C"
00035 #  endif
00036    int F77_DUMMY_MAIN() { return 1; }
00037 #endif
00038 
00039 
00043 #define   QCFortran(name)   F77_FUNC(name,name)
00044 
00045 
00046 
00047 #ifdef f2c_i2
00048 /* for -i2 */
00049 typedef short ftnlen;
00050 #else
00051 typedef long ftnlen;
00052 #endif
00053 
00054 
00055 BEGIN_C_DECLARATION
00056 
00057 
00058 /**********************
00059  *     INTEGRALS      *
00060  **********************/
00068 void QCFortran(overlp)
00069      (//
00070       // atom B
00071       const int& atomicNbZB,
00072       const int& nbOAOfB,
00073       const int& quantumNumberNB,
00074       const QCFloat& dzetaSB,
00075       const QCFloat& dzetaPB,
00076       const QCFloat& dzetaDB,
00077       const QCFloat& xCoordB,
00078       const QCFloat& yCoordB,
00079       const QCFloat& zCoordB,
00080       const QCFloat* ExpHalfVectorB,
00081       //
00082       // atom A
00083       const int& atomicNbZA,
00084       const int& nbOAOfA,
00085       const int& quantumNumberNA,
00086       const QCFloat& dzetaSA,
00087       const QCFloat& dzetaPA,
00088       const QCFloat& dzetaDA,
00089       const QCFloat& xCoordA,
00090       const QCFloat& yCoordA,
00091       const QCFloat& zCoordA,
00092       const QCFloat* ExpHalfVectorA,
00093       //
00095       const QCFloat& rAB, 
00096       //
00098       QCFloat* overlapSABElems
00099       );
00100 
00105 void QCFortran(fillexhalf)
00106      (
00107       const int*, 
00108       const QCFloat*, 
00109       QCFloat*
00110       );
00111 
00119 void QCFortran(repul)
00120      (//
00122       const int& compressedFormatInt,
00123       //
00124       // atom B
00125       const int& atomicNbZB, 
00126       const int& nbCalculatedOAOfB, 
00127       const QCFloat& ro0B,
00128       const QCFloat& ro1B, 
00129       const QCFloat& ro2B, 
00130       const QCFloat& D1B,
00131       const QCFloat& D2B, 
00132       const QCFloat& xCoordB,
00133       const QCFloat& yCoordB, 
00134       const QCFloat& zCoordB, 
00135       //
00136       // atom A
00137       const int& atomicNbZ, 
00138       const int& nbCalculatedOAOfA, 
00139       const QCFloat& ro0A,
00140       const QCFloat& ro1A, 
00141       const QCFloat& ro2A, 
00142       const QCFloat& D1A,
00143       const QCFloat& D2A, 
00144       const QCFloat& xCoordA,
00145       const QCFloat& yCoordA, 
00146       const QCFloat& zCoordA, 
00147       //
00149       const QCFloat& rAB,
00150       //
00152       QCFloat* repElems
00153       );
00154 
00155 
00156 
00157 /**********************
00158  *     GEOMETRY       *
00159  **********************/
00160 
00166 void QCFortran(dspevd)
00167      (//
00168       // "V" if you want all eigenvalues and all eigenvectors.
00169       const char *,
00170       //
00171       // "U" for upper, "L" for lower
00172       const char *,
00173       //
00174       // the size
00175       const int *,
00176       //
00177       // the matrix
00178       const QCFloat*,
00179       //
00180       // the eigenvalues
00181       QCFloat*,
00182       //
00183       // the eigenvectors
00184       QCFloat*,
00185       //
00186       // the size again
00187       const int*,
00188       //
00189       // the first working array
00190       QCFloat*,
00191       //
00192       // and its size
00193       const int*,
00194       //
00195       // the second working array
00196       int*,
00197       //
00198       // and its size
00199       const int*,
00200       //
00201       // error code
00202       int*
00203       );
00204 
00208 int QCFortran(ilaenv)
00209      (//
00210       // a code that specify the kind of return value
00211       const int&,
00212       //
00213       // subroutine name
00214       const char*,
00215       //
00216       // its options
00217       const char*,
00218       //
00219       // The sizes of the problem
00220       const int&,  
00221       const int&, 
00222       const int&, 
00223       const int&,
00224       ftnlen,
00225       ftnlen);
00226 
00230 void QCFortran(setulb)
00231      (//
00232       // the size of the problem
00233       const int& n,
00234       //
00235       // the maximum number of variable metric corrections
00236       // used to define the limited memory matrix.
00237       const int& m,
00238       //
00239       // an approximation to the solution
00240       QCFloat* x, 
00241       //
00242       // the lower bounds.
00243       const QCFloat* l,
00244       //
00245       // the upper bounds.
00246       const QCFloat* u, 
00247       //
00248       // the number of bounds.
00249       const int* nbd,
00250       //
00251       // the value of the function and the gradients
00252       const QCFloat&  f, 
00253       const QCFloat* g,
00254       //
00255       // tolerance factors
00256       const QCFloat& factr, 
00257       const QCFloat& pgtol,
00258       //
00259       // working spaces
00260       QCFloat* wa, 
00261       int* iwa,
00262       //
00263       // working string of characters of length 60 indicating
00264       // the current job when entering and quitting this subroutine
00265       char* task,
00266       //
00267       // control of the frequency and of the type of output generated:
00268       const int* iprint,
00269       //
00270       // working arrays that hold informations on exit.
00271       char* csave,
00272       int* lsave, 
00273       int* isave, 
00274       QCFloat* dsave
00275       );
00276 
00280 void QCFortran(dmng)
00281      (//
00282       // size of the problem
00283       const int& n,
00284       //
00285       // scale vector
00286       const QCFloat* scaleVector,
00287       //
00288       // the variables 
00289       QCFloat* x, 
00290       //
00291       // the value of the function and the gradients
00292       const QCFloat& f, 
00293       const QCFloat* g,
00294       //
00295       // some working spaces
00296       int* workingArray1,
00297       const int& workingArray1Size,
00298       const int&  workingArray2Sise,
00299       QCFloat* workingArray2,
00300       int* workingArray3,
00301       //
00302       // working string of characters of length 60 indicating
00303       // the current job when entering and quitting this subroutine
00304       char* task
00305       );
00306 
00311 void QCFortran(cgfam)
00312      (//
00313       // size of the problem
00314       const int* n,
00315       //
00316       // The iterate
00317       QCFloat* x ,
00318       //
00319       // the value of the function and the gradients
00320       QCFloat *f, 
00321       const QCFloat* g,
00322       // the direction
00323       const QCFloat* d,
00324       // 
00325       const QCFloat* gold, 
00326       //
00327       // iprint =  frequency and type of printing
00328       //     iprint(1) < 0 : no output is generated
00329       //     iprint(1) = 0 : output only at first and last iteration
00330       //     iprint(1) > 0 : output every iprint(1) iterations
00331       //     iprint(2)     : specifies the type of output generated;
00332       //                     the larger the value (between 0 and 3),
00333       //                     the more information
00334       //     iprint(2) = 0 : no additional information printed
00335       //     iprint(2) = 1 : initial x and gradient vectors printed
00336       //     iprint(2) = 2 : x vector printed every iteration
00337       //     iprint(2) = 3 : x vector and gradient vector printed 
00338       int * iprint,
00339       // Convergence constant
00340       const QCFloat *eps,
00341       // Working array 
00342       const QCFloat* w,
00343       //     iflag  =  controls termination of code, and return to main
00344       //               program to evaluate function and gradient
00345       //       iflag = -3 : improper input parameters
00346       //       iflag = -2 : descent was not obtained
00347       //       iflag = -1 : line search failure
00348       //       iflag =  0 : initial entry or 
00349       //                    successful termination without error   
00350       //       iflag =  1 : indicates a re-entry with new function values
00351       //       iflag =  2 : indicates a re-entry with a new iterate
00352       int * iflag,
00353       // irest  =  0 (no restarts); 1 (restart every n steps)
00354       int * irest,
00355       //method =  1 : fletcher-reeves 
00356       //          2 : polak-ribiere
00357       //          3 : positive polak-ribiere ( beta=max{beta,0} )
00358       const int * method,
00359       bool * finish
00360       );
00361 
00362 
00363 END_C_DECLARATION
00364 
00365 
00366 
00367 #endif // QC_Fortran_H_

Generated on Sat Jan 28 21:07:26 2006 for QC++ by  doxygen 1.4.4