ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/types/ShapeAtomType.cpp
Revision: 1689
Committed: Fri Oct 29 22:28:45 2004 UTC (19 years, 8 months ago) by chrisfen
File size: 1592 byte(s)
Log Message:
still debugging

File Contents

# Content
1 #include "types/ShapeAtomType.hpp"
2
3 using namespace oopse;
4
5 ShapeAtomType::~ShapeAtomType() {
6 vector<RealSphericalHarmonic*>::iterator iter;
7 for (iter = contactFuncs.begin(); iter != contactFuncs.end(); ++iter)
8 delete (*iter);
9 for (iter = rangeFuncs.begin(); iter != rangeFuncs.end(); ++iter)
10 delete (*iter);
11 for (iter = strengthFuncs.begin(); iter != strengthFuncs.end(); ++iter)
12 delete (*iter);
13 contactFuncs.clear();
14 rangeFuncs.clear();
15 strengthFuncs.clear();
16 }
17
18 double ShapeAtomType::getContactValueAt(double costheta, double phi) {
19
20 vector<RealSphericalHarmonic*>::iterator contactIter;
21 double contactVal;
22
23 contactVal = 0.0;
24
25 for(contactIter = contactFuncs.begin(); contactIter != contactFuncs.end();
26 ++contactIter)
27 contactVal += (*contactIter)->getValueAt(costheta, phi);
28
29 return contactVal;
30 }
31
32 double ShapeAtomType::getRangeValueAt(double costheta, double phi) {
33
34 vector<RealSphericalHarmonic*>::iterator rangeIter;
35 double rangeVal;
36
37 rangeVal = 0.0;
38
39 for(rangeIter = rangeFuncs.begin(); rangeIter != rangeFuncs.end();
40 ++rangeIter)
41 rangeVal += (*rangeIter)->getValueAt(costheta, phi);
42
43 return rangeVal;
44 }
45
46 double ShapeAtomType::getStrengthValueAt(double costheta, double phi) {
47
48 vector<RealSphericalHarmonic*>::iterator strengthIter;
49 double strengthVal;
50
51 strengthVal = 0.0;
52
53 for(strengthIter = strengthFuncs.begin();
54 strengthIter != strengthFuncs.end();
55 ++strengthIter)
56 strengthVal += (*strengthIter)->getValueAt(costheta, phi);
57
58 return strengthVal;
59 }