ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/SimInfo.cpp
(Generate patch)

Comparing trunk/src/brains/SimInfo.cpp (file contents):
Revision 1983 by gezelter, Tue Apr 15 20:36:19 2014 UTC vs.
Revision 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 70 | Line 70 | namespace OpenMD {
70    
71    SimInfo::SimInfo(ForceField* ff, Globals* simParams) :
72      forceField_(ff), simParams_(simParams),
73 <    ndf_(0), fdf_local(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0),
73 >    nAtoms_(0), nBonds_(0), nBends_(0), nTorsions_(0), nInversions_(0),
74 >    nRigidBodies_(0), nIntegrableObjects_(0), nCutoffGroups_(0),
75 >    nConstraints_(0), nFluctuatingCharges_(0),    
76      nGlobalMols_(0), nGlobalAtoms_(0), nGlobalCutoffGroups_(0),
77      nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0),
78      nGlobalFluctuatingCharges_(0), nGlobalBonds_(0), nGlobalBends_(0),
79      nGlobalTorsions_(0), nGlobalInversions_(0), nGlobalConstraints_(0),
80 <    nAtoms_(0), nBonds_(0), nBends_(0), nTorsions_(0), nInversions_(0),
81 <    nRigidBodies_(0), nIntegrableObjects_(0), nCutoffGroups_(0),
82 <    nConstraints_(0), nFluctuatingCharges_(0), sman_(NULL),
83 <    topologyDone_(false), calcBoxDipole_(false), useAtomicVirial_(true),
82 <    hasNGlobalConstraints_(false) {    
80 >    hasNGlobalConstraints_(false),
81 >    ndf_(0), fdf_local(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0),
82 >    sman_(NULL), topologyDone_(false), calcBoxDipole_(false),
83 >    calcBoxQuadrupole_(false), useAtomicVirial_(true) {    
84      
85      MoleculeStamp* molStamp;
86      int nMolWithSameStamp;
# Line 751 | Line 752 | namespace OpenMD {
752  
753      int nproc;
754      MPI_Comm_size( MPI_COMM_WORLD, &nproc);
754    // int nproc = MPI::COMM_WORLD.Get_size();
755  
756      // we need arrays to hold the counts and displacement vectors for
757      // all processors
# Line 761 | Line 761 | namespace OpenMD {
761      // fill the counts array
762      MPI_Allgather(&count_local, 1, MPI_INT, &counts[0],
763                    1, MPI_INT, MPI_COMM_WORLD);
764    // MPI::COMM_WORLD.Allgather(&count_local, 1, MPI::INT, &counts[0],
765    //                           1, MPI::INT);
764    
765      // use the processor counts to compute the displacement array
766      disps[0] = 0;    
# Line 779 | Line 777 | namespace OpenMD {
777      MPI_Allgatherv(&foundTypes[0], count_local, MPI_INT,
778                     &ftGlobal[0], &counts[0], &disps[0],
779                     MPI_INT, MPI_COMM_WORLD);
782    // MPI::COMM_WORLD.Allgatherv(&foundTypes[0], count_local, MPI::INT,
783    //                            &ftGlobal[0], &counts[0], &disps[0],
784    //                            MPI::INT);
780  
781      vector<int>::iterator j;
782  
# Line 828 | Line 823 | namespace OpenMD {
823        if ( simParams_->getAccumulateBoxDipole() ) {
824          calcBoxDipole_ = true;      
825        }
826 +    // we only call setAccumulateBoxQuadrupole if the accumulateBoxQuadrupole
827 +    // parameter is true
828 +    calcBoxQuadrupole_ = false;
829 +    if ( simParams_->haveAccumulateBoxQuadrupole() )
830 +      if ( simParams_->getAccumulateBoxQuadrupole() ) {
831 +        calcBoxQuadrupole_ = true;      
832 +      }
833      
834      set<AtomType*>::iterator i;
835      set<AtomType*> atomTypes;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines