fixed reading of optional parameters; some formatting

This commit is contained in:
Gerhard Holzinger
2017-10-23 18:08:57 +02:00
parent 963b717811
commit f59b266279
2 changed files with 10 additions and 9 deletions

View File

@ -78,11 +78,12 @@ cfdemCloud::cfdemCloud
IOobject::NO_WRITE IOobject::NO_WRITE
) )
), ),
solveFlow_(true), solveFlow_(couplingProperties_.lookupOrDefault<bool>("solveFlow", true)),
verbose_(couplingProperties_.lookupOrDefault<bool>("verbose", false)), verbose_(couplingProperties_.lookupOrDefault<bool>("verbose", false)),
ignore_(couplingProperties_.lookupOrDefault<bool>("ignore", false)), ignore_(couplingProperties_.lookupOrDefault<bool>("ignore", false)),
allowCFDsubTimestep_(true), allowCFDsubTimestep_(true),
limitDEMForces_(false), limitDEMForces_(couplingProperties_.lookupOrDefault<bool>("limitDEMForces",false)),
maxDEMForce_(0.),
modelType_(couplingProperties_.lookup("modelType")), modelType_(couplingProperties_.lookup("modelType")),
positions_(NULL), positions_(NULL),
velocities_(NULL), velocities_(NULL),
@ -223,8 +224,8 @@ cfdemCloud::cfdemCloud
buildInfo.info(); buildInfo.info();
Info << "If BC are important, please provide volScalarFields -imp/expParticleForces-" << endl; Info << "If BC are important, please provide volScalarFields -imp/expParticleForces-" << endl;
if (couplingProperties_.found("solveFlow")) /*if (couplingProperties_.found("solveFlow"))
solveFlow_=Switch(couplingProperties_.lookup("solveFlow")); solveFlow_=Switch(couplingProperties_.lookup("solveFlow"));*/
if (couplingProperties_.found("imExSplitFactor")) if (couplingProperties_.found("imExSplitFactor"))
imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor")); imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor"));
@ -238,9 +239,8 @@ cfdemCloud::cfdemCloud
if (couplingProperties_.found("treatVoidCellsAsExplicitForce")) if (couplingProperties_.found("treatVoidCellsAsExplicitForce"))
treatVoidCellsAsExplicitForce_ = readBool(couplingProperties_.lookup("treatVoidCellsAsExplicitForce")); treatVoidCellsAsExplicitForce_ = readBool(couplingProperties_.lookup("treatVoidCellsAsExplicitForce"));
if (couplingProperties_.found("limitDEMForces")) if (limitDEMForces_)
{ {
limitDEMForces_=true;
maxDEMForce_ = readScalar(couplingProperties_.lookup("limitDEMForces")); maxDEMForce_ = readScalar(couplingProperties_.lookup("limitDEMForces"));
} }
if (turbulenceModelType_=="LESProperties") if (turbulenceModelType_=="LESProperties")
@ -469,9 +469,10 @@ void cfdemCloud::checkCG(bool ok)
void cfdemCloud::setPos(double**& pos) void cfdemCloud::setPos(double**& pos)
{ {
for(int index = 0;index < numberOfParticles(); ++index) for(int index = 0; index < numberOfParticles(); ++index)
{ {
for(int i=0;i<3;i++){ for(int i=0; i<3; i++)
{
positions_[index][i] = pos[index][i]; positions_[index][i] = pos[index][i];
} }
} }

View File

@ -86,7 +86,7 @@ protected:
IOdictionary liggghtsCommandDict_; IOdictionary liggghtsCommandDict_;
Switch solveFlow_; const bool solveFlow_;
const bool verbose_; const bool verbose_;