• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisionfc17c758f1b336fcf4b24b6a9e180e18f9e36d17 (tree)
l'heure2013-05-29 02:03:02
AuteurMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Message de Log

Some methods in Am1 are inlined. #30621

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1357 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

Modification

--- a/src/am1/Am1.cpp
+++ b/src/am1/Am1.cpp
@@ -123,18 +123,6 @@ void Am1::SetEnableAtomTypes(){
123123 this->enableAtomTypes.push_back(S);
124124 }
125125
126-double Am1::GetAdditionalDiatomCoreRepulsionTerm(double k, double l, double m, double distance) const{
127- return k*exp(-l*pow(distance-m,2.0));
128-}
129-
130-double Am1::GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const{
131- return -2.0*l*(distance-m)*k*exp(-l*pow(distance-m,2.0));
132-}
133-
134-double Am1::GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const{
135- return (-2.0*l + pow(2.0*l*(distance-m),2.0))*k*exp(-l*pow(distance-m,2.0));
136-}
137-
138126 double Am1::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{
139127 // MNDO term
140128 double mndoTerm = Mndo::GetDiatomCoreRepulsionEnergy(indexAtomA, indexAtomB);
--- a/src/am1/Am1.h
+++ b/src/am1/Am1.h
@@ -41,9 +41,15 @@ protected:
4141 MolDS_base::CartesianType axisA1,
4242 MolDS_base::CartesianType axisA2) const;
4343 private:
44- double GetAdditionalDiatomCoreRepulsionTerm(double k, double l, double m, double distance) const;
45- double GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const;
46- double GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const;
44+ inline double GetAdditionalDiatomCoreRepulsionTerm (double k, double l, double m, double distance) const{
45+ return k*exp(-l*pow(distance-m,2.0));
46+ }
47+ inline double GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const{
48+ return -2.0*l*(distance-m)*k*exp(-l*pow(distance-m,2.0));
49+ }
50+ inline double GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const{
51+ return (-2.0*l + pow(2.0*l*(distance-m),2.0))*k*exp(-l*pow(distance-m,2.0));
52+ }
4753 };
4854
4955 }