changed back the handling of verbose flag

This commit is contained in:
Gerhard Holzinger
2018-09-24 10:20:30 +02:00
parent 5c21513b64
commit 2230f51421
13 changed files with 31 additions and 39 deletions

View File

@ -78,11 +78,11 @@ cfdemCloud::cfdemCloud
IOobject::NO_WRITE
)
),
solveFlow_(couplingProperties_.lookupOrDefault<bool>("solveFlow", true)),
verbose_(couplingProperties_.lookupOrDefault<bool>("verbose", false)),
ignore_(couplingProperties_.lookupOrDefault<bool>("ignore", false)),
solveFlow_(couplingProperties_.found("solveFlow")),
verbose_(couplingProperties_.found("verbose")),
ignore_(couplingProperties_.found("ignore")),
allowCFDsubTimestep_(true),
limitDEMForces_(couplingProperties_.lookupOrDefault<bool>("limitDEMForces",false)),
limitDEMForces_(couplingProperties_.found("limitDEMForces")),
maxDEMForce_(0.),
modelType_(couplingProperties_.lookup("modelType")),
positions_(NULL),
@ -224,8 +224,7 @@ cfdemCloud::cfdemCloud
buildInfo.info();
Info << "If BC are important, please provide volScalarFields -imp/expParticleForces-" << endl;
/*if (couplingProperties_.found("solveFlow"))
solveFlow_=Switch(couplingProperties_.lookup("solveFlow"));*/
if (couplingProperties_.found("imExSplitFactor"))
imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor"));

View File

@ -64,16 +64,16 @@ KochHillRWDrag::KochHillRWDrag
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
verbose_(propsDict_.found("verbose")),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
interpolation_(propsDict_.lookupOrDefault<bool>("interpolation", false)),
interpolation_(propsDict_.found("interpolation")),
scale_(1.),
randomTauE_(propsDict_.lookupOrDefault<bool>("randomTauE", false)),
randomTauE_(propsDict_.found("randomTauE")),
partTime_(NULL),
partUfluct_(NULL),
RanGen_(label(0))

View File

@ -64,7 +64,7 @@ SchillerNaumannDrag::SchillerNaumannDrag
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
verbose_(propsDict_.found("verbose")),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_))
{

View File

@ -63,8 +63,8 @@ ShirgaonkarIB::ShirgaonkarIB
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
twoDimensional_(propsDict_.lookupOrDefault<bool>("twoDimensional", false)),
verbose_(propsDict_.found("verbose")),
twoDimensional_(propsDict_.found("twoDimensional")),
depth_(1),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),

View File

@ -62,9 +62,9 @@ noDrag::noDrag
:
forceModel(dict,sm),
propsDict_(dict),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
noDEMForce_(propsDict_.lookupOrDefault<bool>("noDEMForce", false)),
keepCFDForce_(propsDict_.lookupOrDefault<bool>("keepCFDForce", false))
verbose_(propsDict_.found("verbose")),
noDEMForce_(propsDict_.found("noDEMForce")),
keepCFDForce_(propsDict_.found("keepCFDForce"))
{
if(dict.found(word(typeName + "Props")))
propsDict_=dictionary(dict.subDict(typeName + "Props"));

View File

@ -94,7 +94,7 @@ particleCellVolume::particleCellVolume
),
upperThreshold_(readScalar(propsDict_.lookup("upperThreshold"))),
lowerThreshold_(readScalar(propsDict_.lookup("lowerThreshold"))),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false))
verbose_(propsDict_.found("verbose"))
{
}

View File

@ -70,7 +70,7 @@ virtualMassForce::virtualMassForce
phiFieldName_(propsDict_.lookup("phiFieldName")),
phi_(sm.mesh().lookupObject<surfaceScalarField> (phiFieldName_)),
UrelOld_(NULL),
splitUrelCalculation_(propsDict_.lookupOrDefault<bool>("splitUrelCalculation", false)),
splitUrelCalculation_(propsDict_.found("splitUrelCalculation")),
Cadd_(0.5)
{

View File

@ -69,7 +69,7 @@ volWeightedAverage::volWeightedAverage
vectorFieldNames_(propsDict_.lookup("vectorFieldNames")),
upperThreshold_(readScalar(propsDict_.lookup("upperThreshold"))),
lowerThreshold_(readScalar(propsDict_.lookup("lowerThreshold"))),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false))
verbose_(propsDict_.found("verbose"))
{
// create vol weighted average scalar fields
scalarFields_.setSize(scalarFieldNames_.size());

View File

@ -66,10 +66,7 @@ runLiggghts::runLiggghts
command_("run"),
preNo_(propsDict_.lookupOrDefault<bool>("preNo", true))
{
if (propsDict_.found("verbose"))
{
verbose_ = propsDict_.lookup("verbose");
}
verbose_ = propsDict_.found("verbose");
runEveryCouplingStep_ = true;
@ -94,11 +91,10 @@ const char* runLiggghts::command(int commandLine)
string runLiggghts::createCommand( word command, int interval, word appendix, word appendix2, word appendix3, word appendix4)
{
fileName add;
char h[50];
sprintf(h, "%d", interval);
add = h;
command += " " + add + " " + appendix + " " + appendix2 + " " + appendix3 + " " + appendix4;
OStringStream oStrStream;
oStrStream << interval;
command += " " + oStrStream.str() + " " + appendix + " " + appendix2 + " " + appendix3 + " " + appendix4;
return string(command);
}

View File

@ -70,10 +70,7 @@ writeLiggghts::writeLiggghts
overwrite_(false)
{
// check if verbose
if (propsDict_.found("verbose"))
{
verbose_ = propsDict_.lookup("verbose");
}
verbose_ = propsDict_.found("verbose");
if (propsDict_.found("path"))
{

View File

@ -68,16 +68,16 @@ particleProbe::particleProbe
propsDict_(dict.subDict(typeName + "Props")),
name_(typeName),
particleCloud_(sm),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
verboseToFile_(propsDict_.lookupOrDefault<bool>("verboseToFile", false)),
verbose_(propsDict_.found("verbose")),
verboseToFile_(propsDict_.found("verboseToFile")),
writePrecision_(propsDict_.lookupOrDefault<int>("writePrecision", 3)),
dirName_("particleProbes"),
rank_(-1),
sPtr(NULL),
printEvery_(propsDict_.lookupOrDefault<int>("printEvery", 1)),
sampleAll_(propsDict_.lookupOrDefault<bool>("sampleAll", false)),
probeDebug_(propsDict_.lookupOrDefault<bool>("probeDebug", false)),
includePosition_(propsDict_.lookupOrDefault<bool>("includePosition", false)),
sampleAll_(propsDict_.found("sampleAll")),
probeDebug_(propsDict_.found("probeDebug")),
includePosition_(propsDict_.found("includePosition")),
particleIDsToSample_(propsDict_.lookup("particleIDsToSample")),
itemCounter_(0),
currItemId_(0),

View File

@ -68,7 +68,7 @@ constDiffSmoothing::constDiffSmoothing
smoothingLength_(dimensionedScalar("smoothingLength", dimLength, readScalar(propsDict_.lookup("smoothingLength")))),
smoothingLengthReferenceField_(dimensionedScalar("smoothingLengthReferenceField", dimLength, readScalar(propsDict_.lookup("smoothingLength")))),
DT_("DT", dimensionSet(0,2,-1,0,0), 0.),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false))
verbose_(propsDict_.found("verbose"))
{
if(propsDict_.found("smoothingLengthReferenceField"))
{

View File

@ -64,12 +64,12 @@ dividedVoidFraction::dividedVoidFraction
:
voidFractionModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
verbose_(propsDict_.lookupOrDefault<bool>("verbose", false)),
verbose_(propsDict_.found("verbose")),
procBoundaryCorrection_(propsDict_.lookupOrDefault<Switch>("procBoundaryCorrection", false)),
alphaMin_(readScalar(propsDict_.lookup("alphaMin"))),
alphaLimited_(0),
tooMuch_(0.0),
interpolation_(propsDict_.lookupOrDefault<bool>("interpolation", false)),
interpolation_(propsDict_.found("interpolation")),
cfdemUseOnly_(propsDict_.lookupOrDefault<bool>("cfdemUseOnly", false))
{
maxCellsPerParticle_ = numberOfMarkerPoints;