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

Comparing branches/development/src/integrators/LangevinHullForceManager.cpp (file contents):
Revision 1850 by gezelter, Wed Feb 20 15:39:39 2013 UTC vs.
Revision 1855 by gezelter, Tue Apr 2 18:31:51 2013 UTC

# Line 131 | Line 131 | namespace OpenMD {
131        viscosity_ = simParams->getViscosity();
132      }
133      
134 +    doThermalCoupling_ = true;
135 +    if ( fabs(viscosity_) < 1e-6 ) {
136 +      sprintf(painCave.errMsg,
137 +              "LangevinHullDynamics: The bath viscosity was set lower than\n"
138 +              "\t1e-6 poise.  OpenMD is turning off the thermal coupling to\n"
139 +              "\t the bath.\n");
140 +      painCave.isFatal = 0;
141 +      painCave.severity = OPENMD_INFO;
142 +      simError();
143 +      doThermalCoupling_ = false;
144 +    }
145 +
146      dt_ = simParams->getDt();
147    
148      variance_ = 2.0 * PhysicalConstants::kb * targetTemp_ / dt_;
# Line 188 | Line 200 | namespace OpenMD {
200        Vector3d extPressure = -unitNormal * (targetPressure_ * thisArea) /
201          PhysicalConstants::energyConvert;
202  
203 <      Vector3d randomForce = S * randNums[thisFacet++];
204 <      Vector3d dragForce = -hydroTensor * facetVel;
203 >      Vector3d randomForce(V3Zero);
204 >      Vector3d dragForce(V3Zero);
205 >      if (doThermalCoupling_) {
206 >        randomForce = S * randNums[thisFacet++];
207 >        dragForce = -hydroTensor * facetVel;
208 >      }
209  
210        Vector3d langevinForce = (extPressure + randomForce + dragForce);
211        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines