QCAm1.cpp

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    //
00013 // exclusive property of  INRIA. This information may not be disclosed,        //
00014 // duplicated or used, in whole or in part, for  any purpose  whatsoever       //
00015 // without express written authorization from INRIA                            //
00016 //                                                                             //
00017 //*****************************************************************************//
00018 
00019 
00020 #include "QCAm1.hpp"
00021 #include "QCAm1Param.hpp"
00022 
00023 
00024 
00025 
00029 QCAm1::QCAm1 (const int& nbAOsp, const int& nbAOspd) :
00030   QCMndo(nbAOsp, nbAOspd)
00031 {}
00032 
00033 
00034 
00035 
00039 QCAm1::~QCAm1 (void) 
00040 {}
00041 
00042 
00043 
00044 
00048 template <class TPParam>
00049 QCAm1T<TPParam>::QCAm1T () :
00050   QCAm1( (TPParam::NB_S_ORB + TPParam::NB_P_ORB),
00051          (TPParam::NB_S_ORB + TPParam::NB_P_ORB + TPParam::NB_D_ORB) )
00052 {}
00053 
00054 
00055 
00056 
00060 template <class TPParam>
00061 QCAm1T<TPParam>::~QCAm1T () 
00062 {}
00063 
00064 
00065 
00066 
00071 template <class TPParam>
00072 QCFloat 
00073 QCAm1T<TPParam>::exponentialExpansion(const TPParam* QCRestrict parameterA, 
00074                                       const TPParam* QCRestrict parameterB,
00075                                       const QCFloat& rAB) {
00076   register QCFloat expansionVal = QC_ZERO;
00077   register QCFloat interExp, interExp2;
00078   register int i;
00079   
00080   for (i = 0; i < QCAm1Param::NB_TERM_REP_DEVEL; ++i) {
00081     interExp = QCExp( ( -parameterA->getLRepDevel(i) * 
00082                         QCPow<2>(rAB - parameterA->getMRepDevel(i)) ) );
00083     if (interExp != QC_ZERO) {
00084       expansionVal += parameterA->getKRepDevel(i) * interExp;
00085     }
00086     interExp2 = QCExp( ( -parameterB->getLRepDevel(i) * 
00087                          QCPow<2>(rAB - parameterB->getMRepDevel(i)) ) );
00088     if (interExp2 != QC_ZERO) {
00089       expansionVal += parameterB->getKRepDevel(i) * interExp2;
00090     }
00091   }
00092 
00093   return expansionVal;
00094 }
00095 
00096 
00097 
00098 
00102 template <class TPParam>
00103 QCFloat
00104 QCAm1T<TPParam>::dExponentialExpansion(const TPParam* QCRestrict parameterA, 
00105                                        const TPParam* QCRestrict parameterB, 
00106                                        const QCFloat& rAB) {
00107   register QCFloat dExpansionVal = QC_ZERO;
00108   QCFloat rABmmIA, rABmmIB;
00109   register QCFloat interExp, interExp2;
00110   register int i;
00111   
00112   for (i = 0; i < QCAm1Param::NB_TERM_REP_DEVEL; ++i) {
00113     rABmmIA = rAB - parameterA->getMRepDevel(i);
00114     interExp = QCExp(-parameterA->getLRepDevel(i) * QCPow<2>(rABmmIA) );
00115     if (interExp != QC_ZERO) {
00116       dExpansionVal += ( parameterA->getKRepDevel(i) * 
00117                          (-QC_TWO * parameterA->getLRepDevel(i) * rABmmIA) *
00118                          interExp );
00119     }
00120     rABmmIB = rAB - parameterB->getMRepDevel(i);
00121     interExp2 = QCExp(-parameterB->getLRepDevel(i) * QCPow<2>(rABmmIB) );    
00122     if (interExp2 != QC_ZERO) {
00123       dExpansionVal += ( parameterB->getKRepDevel(i) * 
00124                          (-QC_TWO * parameterB->getLRepDevel(i) * rABmmIB) *
00125                          interExp2 );
00126     }
00127   }
00128 
00129   return dExpansionVal;
00130 }
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00143 template class QCAm1T<QCAm1Param>;

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