ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/dynamicProps/DipoleCorrFunc.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/dynamicProps/DipoleCorrFunc.cpp (file contents):
Revision 2037 by tim, Wed Feb 16 19:36:30 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 43 | Line 43 | DipoleCorrFunc::DipoleCorrFunc(SimInfo* info, const st
43   #include "utils/simError.h"
44  
45   namespace oopse {
46 < DipoleCorrFunc::DipoleCorrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2)
46 >  DipoleCorrFunc::DipoleCorrFunc(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2)
47      : ParticleTimeCorrFunc(info, filename, sele1, sele2, DataStorage::dslElectroFrame){
48  
49 <    setCorrFuncType("Dipole Correlation Function");
50 <    setOutputName(getPrefix(dumpFilename_) + ".dcorr");
49 >      setCorrFuncType("Dipole Correlation Function");
50 >      setOutputName(getPrefix(dumpFilename_) + ".dcorr");
51  
52 < }
52 >    }
53  
54 < double DipoleCorrFunc::calcCorrVal(int frame1, int frame2, StuntDouble* sd1,  StuntDouble* sd2) {
54 >  double DipoleCorrFunc::calcCorrVal(int frame1, int frame2, StuntDouble* sd1,  StuntDouble* sd2) {
55      Vector3d v1 =sd1->getVel(frame1);
56      Vector3d v2 = sd2->getVel(frame2);
57  
58      return dot(v1, v2);
59 < }
59 >  }
60  
61  
62 < void DipoleCorrFunc::validateSelection(const SelectionManager& seleMan) {
62 >  void DipoleCorrFunc::validateSelection(const SelectionManager& seleMan) {
63      StuntDouble* sd;
64      int i;    
65      for (sd = seleMan1_.beginSelected(i); sd != NULL; sd = seleMan1_.nextSelected(i)) {
66 <        if (!sd->isDirectionalAtom()) {
67 <            sprintf(painCave.errMsg,
66 >      if (!sd->isDirectionalAtom()) {
67 >        sprintf(painCave.errMsg,
68                  "DipoleCorrFunc::validateSelection Error: selected atoms do not have dipole moment\n");
69 <            painCave.isFatal = 1;
70 <            simError();        
71 <        }
69 >        painCave.isFatal = 1;
70 >        simError();        
71 >      }
72      }
73      
74 < }
74 >  }
75  
76   }
77  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines