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

Comparing trunk/OOPSE/staticProps/PairCorrType.cpp (file contents):
Revision 803 by mmeineke, Fri Oct 10 17:10:22 2003 UTC vs.
Revision 879 by mmeineke, Tue Dec 16 20:49:11 2003 UTC

# Line 1 | Line 1
1   #include <iostream>
2   #include <cstdlib>
3   #include <cstring>
4 + #include <math.h>
5  
6   #include "simError.h"
7   #include "PairCorrType.hpp"
# Line 21 | Line 22 | PairCorrType::PairCorrType( char* key1, char* key2, in
22  
23    nAtoms = theNatoms;
24  
25 +  if( (nAtoms <= 0) || (nBins <= 0) ){
26 +    sprintf( painCave.errMsg,
27 +             "Pair Corr Type Error: nBins and nAtoms must be greater than 0\n"
28 +             "  nBins = %d, nAtoms = %d\n",
29 +             nBins, nAtoms );
30 +    painCave.isFatal = 1;
31 +    simError();
32 +  }
33 +
34 +
35    isAtom1 = new bool[nAtoms];
36    isAtom2 = new bool[nAtoms];
37  
# Line 101 | Line 112 | void PairCorrType::setFrameVolume( double theVolume ){
112    if( isSelfSelf ) pairDensity = nAtoms1 * (nAtoms1 - 1) / volume;
113    else  pairDensity = nAtoms1 * nAtoms2 / volume;
114  
115 <  pairConstant = ( 4.0 * M_PI * pairDens ) / 3.0;
115 >  pairConstant = ( 4.0 * M_PI * pairDensity ) / 3.0;
116    
117   }
118  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines