42 |
|
* |
43 |
|
* Created by Charles F. Vardeman II on 10 Apr 2006. |
44 |
|
* @author Charles F. Vardeman II |
45 |
< |
* @version $Id: randomBuilder.cpp,v 1.1 2006-04-25 22:29:36 chuckv Exp $ |
45 |
> |
* @version $Id: randomBuilder.cpp,v 1.2 2006-05-17 21:51:42 tim Exp $ |
46 |
|
* |
47 |
|
*/ |
48 |
|
|
89 |
|
std::string outInitFileName; |
90 |
|
Lattice *simpleLat; |
91 |
|
int* numMol; |
92 |
< |
double latticeConstant; |
93 |
< |
std::vector<double> lc; |
94 |
< |
double mass; |
95 |
< |
const double rhoConvertConst = 1.661; |
96 |
< |
double density; |
92 |
> |
RealType latticeConstant; |
93 |
> |
std::vector<RealType> lc; |
94 |
> |
RealType mass; |
95 |
> |
const RealType rhoConvertConst = 1.661; |
96 |
> |
RealType density; |
97 |
|
int nx, |
98 |
|
ny, |
99 |
|
nz; |
182 |
|
|
183 |
|
//calculate lattice constant (in Angstrom) |
184 |
|
latticeConstant = pow(rhoConvertConst * numMolPerCell * mass / density, |
185 |
< |
1.0 / 3.0); |
185 |
> |
(RealType)(1.0 / 3.0)); |
186 |
|
|
187 |
|
//set lattice constant |
188 |
|
lc.push_back(latticeConstant); |
217 |
|
} |
218 |
|
int totComponents = 0; |
219 |
|
for (int i = 0;i<nComponents-1;i++){ /* Figure out Percent for each component */ |
220 |
< |
numMol[i] = int((double)numSites * args_info.molFraction_arg[i]); |
220 |
> |
numMol[i] = int((RealType)numSites * args_info.molFraction_arg[i]); |
221 |
|
std::cout<<numMol[i]<<std::endl; |
222 |
|
totComponents += numMol[i]; |
223 |
|
} |