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

Comparing trunk/OOPSE-4/src/integrators/SMIPDForceManager.cpp (file contents):
Revision 3516 by gezelter, Wed Jul 22 15:00:21 2009 UTC vs.
Revision 3517 by gezelter, Thu Jul 23 18:49:45 2009 UTC

# Line 50 | Line 50 | namespace oopse {
50    SMIPDForceManager::SMIPDForceManager(SimInfo* info) : ForceManager(info) {
51  
52      simParams = info->getSimParams();
53    thermo = new Thermo(info);
53      veloMunge = new Velocitizer(info);
54      
55      // Create Hull, Convex Hull for now, other options later.
# Line 63 | Line 62 | namespace oopse {
62      if (!simParams->haveTargetTemp()) {
63        sprintf(painCave.errMsg,
64                "SMIPDynamics error: You can't use the SMIPD integrator\n"
65 <              "   without a targetTemp (K)!\n");      
65 >              "\twithout a targetTemp (K)!\n");      
66        painCave.isFatal = 1;
67        painCave.severity = OOPSE_ERROR;
68        simError();
# Line 74 | Line 73 | namespace oopse {
73      if (!simParams->haveTargetPressure()) {
74        sprintf(painCave.errMsg,
75                "SMIPDynamics error: You can't use the SMIPD integrator\n"
76 <              "   without a targetPressure (atm)!\n");      
76 >              "\twithout a targetPressure (atm)!\n");      
77        painCave.isFatal = 1;
78        simError();
79      } else {
# Line 86 | Line 85 | namespace oopse {
85      if (simParams->getUsePeriodicBoundaryConditions()) {
86        sprintf(painCave.errMsg,
87                "SMIPDynamics error: You can't use the SMIPD integrator\n"
88 <              "   with periodic boundary conditions!\n");    
88 >              "\twith periodic boundary conditions!\n");    
89        painCave.isFatal = 1;
90        simError();
91      }
# Line 94 | Line 93 | namespace oopse {
93      if (!simParams->haveThermalConductivity()) {
94        sprintf(painCave.errMsg,
95                "SMIPDynamics error: You can't use the SMIPD integrator\n"
96 <              "   without a thermalConductivity (W m^-1 K^-1)!\n");
96 >              "\twithout a thermalConductivity (W m^-1 K^-1)!\n");
97        painCave.isFatal = 1;
98        painCave.severity = OOPSE_ERROR;
99        simError();
# Line 106 | Line 105 | namespace oopse {
105      if (!simParams->haveThermalLength()) {
106        sprintf(painCave.errMsg,
107                "SMIPDynamics error: You can't use the SMIPD integrator\n"
108 <              "   without a thermalLength (Angstroms)!\n");
108 >              "\twithout a thermalLength (Angstroms)!\n");
109        painCave.isFatal = 1;
110        painCave.severity = OOPSE_ERROR;
111        simError();
# Line 142 | Line 141 | namespace oopse {
141      StuntDouble* integrableObject;
142    
143      // Compute surface Mesh
144 +
145      surfaceMesh_->computeHull(localSites_);
146  
147      // Get total area and number of surface stunt doubles
# Line 153 | Line 153 | namespace oopse {
153      // Generate all of the necessary random forces
154      std::vector<RealType>  randNums = genTriangleForces(nTriangles, variance_);
155  
156    RealType instaTemp = thermo->getTemperature();
157
156      // Loop over the mesh faces and apply external pressure to each
157      // of the faces
158      std::vector<Triangle>::iterator face;
# Line 172 | Line 170 | namespace oopse {
170        RealType thisMass = thisTriangle.getFacetMass();
171  
172        // gamma is the drag coefficient normal to the face of the triangle      
173 <      RealType gamma = thermalConductivity_ * thisMass * thisArea  
173 >      RealType gamma = thermalConductivity_ * thisMass * thisArea
174          / (2.0 * thermalLength_ * OOPSEConstant::kB);
175        
178      gamma *= fabs(1.0 - targetTemp_/instaTemp);      
179      
176        RealType extPressure = - (targetPressure_ * thisArea) /
177          OOPSEConstant::energyConvert;
178  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines