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

Comparing trunk/src/brains/SimInfo.cpp (file contents):
Revision 1089 by chrisfen, Wed Nov 1 22:22:44 2006 UTC vs.
Revision 1121 by chuckv, Mon Feb 26 04:45:42 2007 UTC

# Line 59 | Line 59
59   #include "UseTheForce/DarkSide/fElectrostaticScreeningMethod.h"
60   #include "UseTheForce/DarkSide/fSwitchingFunctionType.h"
61   #include "UseTheForce/doForces_interface.h"
62 + #include "UseTheForce/DarkSide/neighborLists_interface.h"
63   #include "UseTheForce/DarkSide/electrostatic_interface.h"
64   #include "UseTheForce/DarkSide/switcheroo_interface.h"
65   #include "utils/MemoryUtils.hpp"
# Line 67 | Line 68
68   #include "io/ForceFieldOptions.hpp"
69   #include "UseTheForce/ForceField.hpp"
70  
71 +
72   #ifdef IS_MPI
73   #include "UseTheForce/mpiComponentPlan.h"
74   #include "UseTheForce/DarkSide/simParallel_interface.h"
# Line 868 | Line 870 | namespace oopse {
870               "succesfully sent the simulation information to fortran.\n");
871      MPIcheckPoint();
872   #endif // is_mpi
873 +
874 +    // Setup number of neighbors in neighbor list if present
875 +    if (simParams_->haveNeighborListNeighbors()) {
876 +      int nlistNeighbors = simParams_->getNeighborListNeighbors();
877 +      setNeighbors(&nlistNeighbors);
878 +    }
879 +  
880 +
881    }
882  
883  
# Line 1446 | Line 1456 | namespace oopse {
1456      IOIndexToIntegrableObject= v;
1457    }
1458  
1459 +  /* Returns the Volume of the simulation based on a ellipsoid with semi-axes
1460 +     based on the radius of gyration V=4/3*Pi*R_1*R_2*R_3
1461 +     where R_i are related to the principle inertia moments R_i = sqrt(C*I_i/N), this reduces to
1462 +     V = 4/3*Pi*(C/N)^3/2*sqrt(det(I)). See S.E. Baltazar et. al. Comp. Mat. Sci. 37 (2006) 526-536.
1463 +  */
1464 +  void SimInfo::getGyrationalVolume(RealType &volume){
1465 +    Mat3x3d intTensor;
1466 +    RealType det;
1467 +    Vector3d dummyAngMom;
1468 +    RealType sysconstants;
1469 +    RealType geomCnst;
1470 +
1471 +    geomCnst = 3.0/2.0;
1472 +    /* Get the inertial tensor and angular momentum for free*/
1473 +    getInertiaTensor(intTensor,dummyAngMom);
1474 +    
1475 +    det = intTensor.determinant();
1476 +    sysconstants = geomCnst/(RealType)nGlobalIntegrableObjects_;
1477 +    volume = 4.0/3.0*NumericConstant::PI*pow(sysconstants,3.0/2.0)*sqrt(det);
1478 +    return;
1479 +  }
1480 +
1481 +  void SimInfo::getGyrationalVolume(RealType &volume, RealType &detI){
1482 +    Mat3x3d intTensor;
1483 +    Vector3d dummyAngMom;
1484 +    RealType sysconstants;
1485 +    RealType geomCnst;
1486 +
1487 +    geomCnst = 3.0/2.0;
1488 +    /* Get the inertial tensor and angular momentum for free*/
1489 +    getInertiaTensor(intTensor,dummyAngMom);
1490 +    
1491 +    detI = intTensor.determinant();
1492 +    sysconstants = geomCnst/(RealType)nGlobalIntegrableObjects_;
1493 +    volume = 4.0/3.0*NumericConstant::PI*pow(sysconstants,3.0/2.0)*sqrt(detI);
1494 +    return;
1495 +  }
1496   /*
1497     void SimInfo::setStuntDoubleFromGlobalIndex(std::vector<StuntDouble*> v) {
1498        assert( v.size() == nAtoms_ + nRigidBodies_);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines