本文整理汇总了C++中argList::additionalArgs方法的典型用法代码示例。如果您正苦于以下问题:C++ argList::additionalArgs方法的具体用法?C++ argList::additionalArgs怎么用?C++ argList::additionalArgs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类argList
的用法示例。
在下文中一共展示了argList::additionalArgs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FatalErrorIn
void Foam::calcTypes::scalarMult::preCalc
(
const argList& args,
const Time& runTime,
const fvMesh& mesh
)
{
baseFieldName_ = args.additionalArgs()[1];
if (args.optionFound("value"))
{
scalarMultValueStr_ = args.option("value");
}
else
{
FatalErrorIn("calcTypes::scalarMult::preCalc")
<< "scalarMult requires -value option"
<< nl << exit(FatalError);
}
if (args.optionFound("resultName"))
{
resultName_ = args.option("resultName");
}
}
示例2: exit
void Foam::calcTypes::interpolate::calc
(
const argList& args,
const Time& runTime,
const fvMesh& mesh
)
{
#ifdef FOAM_DEV
const word& fieldName = args.additionalArgs()[1];
#else
const word fieldName = args[2];
#endif
IOobject fieldHeader
(
fieldName,
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check field exists
if (fieldHeader.headerOk())
{
bool processed = false;
writeInterpolateField<scalar>(fieldHeader, mesh, processed);
writeInterpolateField<vector>(fieldHeader, mesh, processed);
writeInterpolateField<sphericalTensor>(fieldHeader, mesh, processed);
writeInterpolateField<symmTensor>(fieldHeader, mesh, processed);
writeInterpolateField<tensor>(fieldHeader, mesh, processed);
if (!processed)
{
FatalError
<< "Unable to process " << fieldName << nl
<< "No call to interpolate for fields of type "
<< fieldHeader.headerClassName() << nl << nl
<< exit(FatalError);
}
}
else
{
Info<< " No " << fieldName << endl;
}
}
示例3: exit
void Foam::calcTypes::domainIntegrate::calc
(
const argList& args,
const Time& runTime,
const fvMesh& mesh
)
{
const word& fieldName = args.additionalArgs()[1];
IOobject fieldHeader
(
fieldName,
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check field exists
if (fieldHeader.headerOk())
{
bool processed = false;
calcDomainIntegrate<scalar>(fieldHeader, mesh, processed);
calcDomainIntegrate<vector>(fieldHeader, mesh, processed);
calcDomainIntegrate<sphericalTensor>(fieldHeader, mesh, processed);
calcDomainIntegrate<symmTensor>(fieldHeader, mesh, processed);
calcDomainIntegrate<tensor>(fieldHeader, mesh, processed);
if (!processed)
{
FatalError
<< "Unable to process " << fieldName << nl
<< "No call to mag for fields of type "
<< fieldHeader.headerClassName() << nl << nl
<< exit(FatalError);
}
}
else
{
Info<< " No " << fieldName << endl;
}
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:42,代码来源:domainIntegrate.C
示例4: exit
void Foam::calcTypes::div::calc
(
const argList& args,
const Time& runTime,
const fvMesh& mesh
)
{
const word& fieldName = args.additionalArgs()[1];
IOobject fieldHeader
(
fieldName,
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check field exists
if (fieldHeader.headerOk())
{
bool processed = false;
writeDivField<surfaceScalarField>(fieldHeader, mesh, processed);
writeDivField<volVectorField>(fieldHeader, mesh, processed);
if (!processed)
{
FatalError
<< "Unable to process " << fieldName << nl
<< "No call to div for fields of type "
<< fieldHeader.headerClassName() << nl << nl
<< exit(FatalError);
}
}
else
{
Info<< " No " << fieldName << endl;
}
}
示例5: rand
void Foam::calcTypes::randomise::calc
(
const argList& args,
const Time& runTime,
const fvMesh& mesh
)
{
const stringList& params = args.additionalArgs();
const scalar pertMag = readScalar(IStringStream(params[1])());
const word& fieldName = params[2];
Random rand(1234567);
IOobject fieldHeader
(
fieldName,
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
// Check field exists
if (fieldHeader.headerOk())
{
bool processed = false;
writeRandomField<vector>
(
fieldHeader,
pertMag,
rand,
mesh,
processed
);
writeRandomField<sphericalTensor>
(
fieldHeader,
pertMag,
rand,
mesh,
processed
);
writeRandomField<symmTensor>
(
fieldHeader,
pertMag,
rand,
mesh,
processed
);
writeRandomField<tensor>
(
fieldHeader,
pertMag,
rand,
mesh,
processed
);
if (!processed)
{
FatalError
<< "Unable to process " << fieldName << nl
<< "No call to randomise for fields of type "
<< fieldHeader.headerClassName() << nl << nl
<< exit(FatalError);
}
}
else
{
Info<< " No " << fieldName << endl;
}
}
示例6: dictName
//.........这里部分代码省略.........
(
!dict.readIfPresent<int>
(
"expectedNumberOfIntersections",
expectedNumberOfIntersections
)
)
{
SeriousErrorIn("preCalc")
<< "There is no expectedNumberOfIntersections parameter "
"in fieldMap2dDict dictionary"
<< exit(FatalError);
}
expNI = expectedNumberOfIntersections;
int numberOfIntegrationPoints;
if
(
!dict.readIfPresent<int>
(
"numberOfIntegrationPoints",
numberOfIntegrationPoints
)
)
{
SeriousErrorIn("preCalc")
<< "There is no numberOfIntegrationPoints parameter "
"in fieldMap2dDict dictionary"
<< exit(FatalError);
}
#ifdef FOAM_DEV
const word& processingType = args.additionalArgs()[1];
const word& Nword = args.additionalArgs()[2];
const word& Mword = args.additionalArgs()[3];
const word& Kword = args.additionalArgs()[4];
N_ = std::atoi( Nword.c_str() );
M_ = std::atoi( Mword.c_str() );
Info << "FOAM_DEV true: "<< FOAM_DEV <<nl;
#else
const word processingType = args[2];
N_ = std::atoi( args[3].c_str() );
M_ = std::atoi( args[4].c_str() );
Info << "FOAM_DEV false: " <<nl;
#endif
processingType_ = const_cast<word&>(processingType);
latDir = 3 - (intDir + majDir);
Info<<"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
<<nl
<<"Post-processing parameters:"<<nl
<<"patchName: "<< patchName<<nl
<<"geometry: "<< geometry<<nl
<<"minPoint: "<< minPoint<<nl
<<"maxPoint: "<< maxPoint<<nl
<<"major direction: "<< majDir<<nl
<<"lateral direction: "<< latDir<<nl
<<"integration direction: "<< intDir<<nl
<<"number of intersections: "<<expNI<<nl
<<"number of integration points: "<< numberOfIntegrationPoints
<<endl;
if
(