本文整理汇总了C++中argList::executable方法的典型用法代码示例。如果您正苦于以下问题:C++ argList::executable方法的具体用法?C++ argList::executable怎么用?C++ argList::executable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类argList
的用法示例。
在下文中一共展示了argList::executable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calc
//.........这里部分代码省略.........
autoPtr<compressible::LESModel> sgsModel
(
compressible::LESModel::New(rho, U, phi, thermo())
);
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pe",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mag(phi)
/(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(sgsModel->muEff())
)
)
);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
dimensionedScalar mu(transportProperties.lookup("mu"));
PePtr.set
(
new surfaceScalarField
(
IOobject
(
"Pe",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mesh.surfaceInterpolation::deltaCoeffs()
* (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu)
)
);
}
}
else
{
FatalErrorIn(args.executable())
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< abort(FatalError);
}
// can also check how many cells exceed a particular Pe limit
/*
{
label count = 0;
label PeLimit = 200;
forAll(PePtr(), i)
{
if (PePtr()[i] > PeLimit)
{
count++;
}
}
Info<< "Fraction > " << PeLimit << " = "
<< scalar(count)/Pe.size() << endl;
}
*/
Info << "Pe max : " << max(PePtr()).value() << endl;
if (writeResults)
{
PePtr().write();
}
}
else
{
Info<< " No phi" << endl;
}
Info<< "\nEnd\n" << endl;
}
示例2: objects
//.........这里部分代码省略.........
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
fol.execute(true);
}
}
else if (phi.dimensions() == dimMass/dimTime)
{
autoPtr<fluidThermo> thermo(fluidThermo::New(mesh));
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh
),
thermo->rho()
);
IOobject RASPropertiesHeader
(
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
IOobject LESPropertiesHeader
(
"LESProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (RASPropertiesHeader.headerOk())
{
IOdictionary RASProperties(RASPropertiesHeader);
autoPtr<compressible::RASModel> RASModel
(
compressible::RASModel::New
(
rho,
U,
phi,
thermo()
)
);
fol.execute(true);
}
else if (LESPropertiesHeader.headerOk())
{
IOdictionary LESProperties(LESPropertiesHeader);
autoPtr<compressible::LESModel> sgsModel
(
compressible::LESModel::New(rho, U, phi, thermo())
);
fol.execute(true);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
fol.execute(true);
}
}
else
{
FatalErrorIn(args.executable())
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< nl << exit(FatalError);
}
}
}
示例3: calc
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
bool writeResults = !args.optionFound("noWrite");
IOobject phiHeader
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (phiHeader.headerOk())
{
volScalarField Co
(
IOobject
(
"Co",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mesh,
dimensionedScalar("0", dimless, 0),
zeroGradientFvPatchScalarField::typeName
);
Info<< " Reading phi" << endl;
surfaceScalarField phi(phiHeader, mesh);
if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
Info<< " Calculating compressible Co" << endl;
Info<< " Reading rho" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Co.dimensionedInternalField() =
(0.5*runTime.deltaT())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/(rho*mesh.V());
Co.correctBoundaryConditions();
}
else if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{
Info<< " Calculating incompressible Co" << endl;
Co.dimensionedInternalField() =
(0.5*runTime.deltaT())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/mesh.V();
Co.correctBoundaryConditions();
}
else
{
FatalErrorIn(args.executable())
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< abort(FatalError);
}
Info<< "Co max : " << max(Co).value() << endl;
if (writeResults)
{
Co.write();
}
}
else
{
Info<< " No phi" << endl;
}
Info<< "\nEnd\n" << endl;
}