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

Comparing trunk/OOPSE-4/src/applications/staticProps/BondOrderParameter.cpp (file contents):
Revision 2901 by chuckv, Tue Jun 27 16:19:28 2006 UTC vs.
Revision 2902 by chuckv, Tue Jun 27 16:36:25 2006 UTC

# Line 39 | Line 39
39   * such damages.
40   */
41  
42 < #include "applications/staticProps/P2OrderParameter.hpp"
42 > #include "applications/staticProps/BondOrderParameter.hpp"
43   #include "utils/simError.h"
44   #include "io/DumpReader.hpp"
45   #include "primitives/Molecule.hpp"
# Line 47 | Line 47 | P2OrderParameter::P2OrderParameter(SimInfo* info, cons
47   namespace oopse {
48  
49  
50 < P2OrderParameter::P2OrderParameter(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2)
50 > BondOrderParameter::BondOrderParameter(SimInfo* info, const std::string& filename, const std::string& sele1,
51 > const std::string& sele2, double rCut, int lNumber)
52    : StaticAnalyser(info, filename),
53 <    selectionScript1_(sele1), selectionScript2_(sele2), evaluator1_(info), evaluator2_(info),
54 <    seleMan1_(info), seleMan2_(info){
53 >    selectionScript1_(sele1), evaluator1_(info),
54 >    seleMan1_(info){
55  
56      setOutputName(getPrefix(filename) + ".p2");
57          
# Line 67 | Line 68 | P2OrderParameter::P2OrderParameter(SimInfo* info, cons
68          simError();  
69      }
70  
70    if (!evaluator2_.isDynamic()) {
71      seleMan2_.setSelectionSet(evaluator2_.evaluate());
72    }else {
73        sprintf( painCave.errMsg,
74                 "--sele2 must be static selection\n");
75        painCave.severity = OOPSE_ERROR;
76        painCave.isFatal = 1;
77        simError();  
78    }
71  
80    if (seleMan1_.getSelectionCount() != seleMan2_.getSelectionCount() ) {
81        sprintf( painCave.errMsg,
82                 "The number of selected Stuntdoubles are not the same in --sele1 and sele2\n");
83        painCave.severity = OOPSE_ERROR;
84        painCave.isFatal = 1;
85        simError();  
86
87    }
88
72    int i;
73    int j;
74    StuntDouble* sd1;
75    StuntDouble* sd2;
76 <  for (sd1 = seleMan1_.beginSelected(i), sd2 = seleMan2_.beginSelected(j);
76 >  for (sd1 = seleMan1_.beginSelected(i), sd2 = seleMan1_.beginSelected(j);
77       sd1 != NULL && sd2 != NULL;
78       sd1 = seleMan1_.nextSelected(i), sd2 = seleMan2_.nextSelected(j)) {
79  
# Line 100 | Line 83 | void P2OrderParameter::process() {
83      
84    }
85  
86 < void P2OrderParameter::process() {
86 > void BondOrderParameter::process() {
87    Molecule* mol;
88    RigidBody* rb;
89    SimInfo::MoleculeIterator mi;
# Line 176 | Line 159 | void P2OrderParameter::writeP2() {
159    
160   }
161  
162 < void P2OrderParameter::writeP2() {
162 > void BondOrderParameter::writeOrderParameter() {
163  
164      std::ofstream os(getOutputFileName().c_str());
165      os << "#radial distribution function\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines