ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/MinimizerParameterSet.hpp
Revision: 1057
Committed: Tue Feb 17 19:23:44 2004 UTC (20 years, 4 months ago) by tim
File size: 2497 byte(s)
Log Message:
adding function shakeF in order to remove the constraint force along bond direction

File Contents

# Content
1 #ifndef _MININIZERPARAMETERSET_H_
2 #define _MININIZERPARAMETERSET_H_
3
4 const double DEFAULTTOLERANCE = 1.0e-8;
5
6 // base class of minimizer's parameter set
7 class MinimizerParameterSet{
8 public:
9
10 MinimizerParameterSet() {setDefaultParameter();}
11 MinimizerParameterSet(MinimizerParameterSet& param) {*this = param;}
12
13 void operator= (MinimizerParameterSet& param) {
14
15 maxIteration = param.maxIteration;
16 stepTol = param.stepTol;
17 lsTol = param.lsTol;
18 fTol = param.fTol;
19 gTol = param.gTol;
20 }
21
22 virtual void setDefaultParameter(){
23 maxIteration = 200;
24 stepTol = DEFAULTTOLERANCE;
25 fTol = DEFAULTTOLERANCE;
26 gTol = DEFAULTTOLERANCE;
27
28 writeFrq = maxIteration;
29 resetFrq = maxIteration;
30
31 lsMaxIteration = 50;
32 lsTol = DEFAULTTOLERANCE;
33 }
34
35 void setStepTol(double tol) { stepTol = tol;}
36 double getStepTol() { return stepTol;}
37
38 void setMaxIteration(int iter) { maxIteration = iter;}
39 int getMaxIteration() {return maxIteration;}
40
41 void setFTol(double tol) {fTol = tol;}
42 double getFTol() {return fTol;}
43
44 void setGTol(double tol) {gTol = tol;}
45 double getGTol() {return gTol;}
46
47 void setLineSearchTol(double tol) {lsTol = tol;}
48 double getLineSearchTol() {return lsTol;}
49
50 void setLineSearchMaxIteration(int iter) {lsMaxIteration = iter;}
51 int getLineSearchMaxIteration() {return lsMaxIteration;}
52
53 void setWriteFrq(int frq) {writeFrq = frq;}
54 int getWriteFrq() {return writeFrq;}
55
56 void setResetFrq(int frq) { resetFrq = frq;}
57 int getResetFrq() {return resetFrq;}
58
59 /*
60 void setAbsTol(vector<double>& tol) { absTol = tol;}
61 vector<double> getAbsTol() { return absTol;}
62
63 void setRelTol(vector<double> tol) { relTol = tol;}
64 vector<double> getRelTol() { return relTol;}
65
66 void setTotTol(vector<double>& tol) { totTol = tol;}
67 vector<double> getTotTol() { return totTol;}
68 */
69
70 protected:
71
72 int maxIteration;
73 double stepTol;
74 double fTol;
75 double gTol;
76
77 int lsMaxIteration;
78 double lsTol;
79
80 int writeFrq;
81 int resetFrq;
82 /*
83 // Absolute tolerance
84 vector<double> absTol;
85
86 // Relative tolerance
87 vector<double> relTol;
88
89 // Total specified tolerance at convergence
90 vector<double> totTol;
91
92 // Tolerance achieved at convergence.
93 vector<double> achTol;
94 */
95 };
96
97
98 #endif

Properties

Name Value
svn:executable *