mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
clean-up and pretty formatting of liggghtsCommandModel and its derived classes
removed an unused member "int stdInterval_" of the class runLiggghts
This commit is contained in:
@ -177,7 +177,8 @@ bool liggghtsCommandModel::runThisCommand(int couplingStep)
|
||||
{
|
||||
if (verbose_) Info << "couplingStep = " << couplingStep << endl;
|
||||
bool runIt=false;
|
||||
if(
|
||||
if
|
||||
(
|
||||
(!runEveryWriteStep_ && firstCouplingStep_ <= couplingStep && lastCouplingStep_ >= couplingStep) ||
|
||||
(runEveryWriteStep_ && particleCloud_.mesh().time().outputTime())
|
||||
)
|
||||
|
||||
@ -64,8 +64,6 @@ private:
|
||||
|
||||
word command_;
|
||||
|
||||
//word myName_;
|
||||
|
||||
wordList filePathList_;
|
||||
|
||||
public:
|
||||
|
||||
@ -64,8 +64,7 @@ runLiggghts::runLiggghts
|
||||
liggghtsCommandModel(dict,sm,i),
|
||||
propsDict_(dict.subOrEmptyDict(typeName + "Props")),
|
||||
command_("run"),
|
||||
preNo_(propsDict_.lookupOrDefault<bool>("preNo", true)),
|
||||
stdInterval_(0)
|
||||
preNo_(propsDict_.lookupOrDefault<bool>("preNo", true))
|
||||
{
|
||||
if (propsDict_.found("verbose"))
|
||||
{
|
||||
@ -108,9 +107,13 @@ bool runLiggghts::runCommand(int couplingStep)
|
||||
{
|
||||
//change command to "run xxx pre no"
|
||||
if (preNo_ && (couplingStep > firstCouplingStep_))
|
||||
{
|
||||
strCommand_ = createCommand(command_, particleCloud_.dataExchangeM().couplingInterval(),"pre","no","post","no");
|
||||
}
|
||||
else
|
||||
{
|
||||
strCommand_ = createCommand(command_, particleCloud_.dataExchangeM().couplingInterval());
|
||||
}
|
||||
|
||||
return runThisCommand(couplingStep);
|
||||
}
|
||||
@ -118,10 +121,14 @@ bool runLiggghts::runCommand(int couplingStep)
|
||||
void runLiggghts::set(int interval)
|
||||
{
|
||||
if (preNo_)
|
||||
{
|
||||
strCommand_ = createCommand(command_, interval,"pre","no","post","no");
|
||||
}
|
||||
else
|
||||
{
|
||||
strCommand_ = createCommand(command_, interval);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -63,8 +63,6 @@ private:
|
||||
|
||||
bool preNo_;
|
||||
|
||||
int stdInterval_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -79,10 +79,14 @@ writeLiggghts::writeLiggghts
|
||||
{
|
||||
path_ = fileName(propsDict_.lookup("path"));
|
||||
if (!checkPath(path_))
|
||||
{
|
||||
FatalError << "The path you provided in writeLiggghtsProps is incorrect: " << path_ << "\n" << abort(FatalError);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info << "Using user defined path to write LIGGGHTS restart file: " << path_ << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (propsDict_.found("writeName"))
|
||||
{
|
||||
@ -107,9 +111,13 @@ writeLiggghts::writeLiggghts
|
||||
|
||||
command_ += " " + path_ + "/" + writeName_;
|
||||
if (overwrite_)
|
||||
{
|
||||
strCommand_=string(command_);
|
||||
}
|
||||
else
|
||||
{
|
||||
command_ += "_";
|
||||
}
|
||||
|
||||
Info << "writeLiggghts: A restart file writeName_" << command_ << " is written." << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user