ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/types/ShapeAtomType.cpp
Revision: 1652
Committed: Tue Oct 26 22:25:19 2004 UTC (19 years, 8 months ago) by gezelter
File size: 1598 byte(s)
Log Message:
Making ShapeType into a ShapeAtomType, fixing some isXXX

File Contents

# User Rev Content
1 gezelter 1652 #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     }