| 64 |
|
Shape* shape; |
| 65 |
|
}; |
| 66 |
|
void registerHydrodynamicsModels(); |
| 67 |
+ |
void writeHydroProps(std::ostream& os); |
| 68 |
|
|
| 69 |
|
int main(int argc, char* argv[]){ |
| 70 |
|
//register force fields |
| 89 |
|
exit(1); |
| 90 |
|
} |
| 91 |
|
|
| 91 |
– |
mdFileName = dumpFileName; |
| 92 |
– |
mdFileName = mdFileName.substr(0, mdFileName.rfind(".")) + ".md"; |
| 93 |
– |
|
| 92 |
|
if (args_info.output_given){ |
| 93 |
|
prefix = args_info.output_arg; |
| 94 |
|
} else { |
| 95 |
< |
prefix = getPrefix(mdFileName); |
| 95 |
> |
prefix = getPrefix(dumpFileName); |
| 96 |
|
} |
| 97 |
|
std::string outputFilename = prefix + ".diff"; |
| 98 |
|
|
| 99 |
|
//parse md file and set up the system |
| 100 |
|
SimCreator creator; |
| 101 |
< |
SimInfo* info = creator.createSim(mdFileName, true); |
| 101 |
> |
SimInfo* info = creator.createSim(dumpFileName, true); |
| 102 |
|
|
| 103 |
|
SimInfo::MoleculeIterator mi; |
| 104 |
|
Molecule* mol; |
| 110 |
|
identMat(2,2) = 1.0; |
| 111 |
|
|
| 112 |
|
Globals* simParams = info->getSimParams(); |
| 113 |
< |
double temperature; |
| 114 |
< |
double viscosity; |
| 113 |
> |
RealType temperature; |
| 114 |
> |
RealType viscosity; |
| 115 |
|
|
| 116 |
|
if (simParams->haveViscosity()) { |
| 117 |
|
viscosity = simParams->getViscosity(); |
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 159 |
– |
std::ofstream outputDiff(outputFilename.c_str()); |
| 157 |
|
std::map<std::string, SDShape>::iterator si; |
| 158 |
|
for (si = uniqueStuntDoubles.begin(); si != uniqueStuntDoubles.end(); ++si) { |
| 159 |
|
HydrodynamicsModel* model; |
| 178 |
|
|
| 179 |
|
//if beads option is turned on, skip the calculation |
| 180 |
|
if (!args_info.beads_flag) { |
| 181 |
< |
shape->calcHydroProps(model, viscosity, temperature); |
| 182 |
< |
model->writeHydroProps(outputDiff); |
| 181 |
> |
model->calcHydroProps(shape, viscosity, temperature); |
| 182 |
> |
std::ofstream outputDiff; |
| 183 |
> |
outputDiff.open(outputFilename.c_str()); |
| 184 |
> |
model->writeHydroProps(outputDiff); |
| 185 |
> |
outputDiff.close(); |
| 186 |
|
} |
| 187 |
< |
|
| 187 |
> |
|
| 188 |
|
delete model; |
| 189 |
|
} |
| 190 |
|
|
| 200 |
|
HydrodynamicsModelFactory::getInstance()->registerHydrodynamicsModel(new HydrodynamicsModelBuilder<AnalyticalModel>("AnalyticalModel")); |
| 201 |
|
|
| 202 |
|
} |
| 203 |
– |
|