本文整理汇总了C++中ExpressionResult::setObjectResult方法的典型用法代码示例。如果您正苦于以下问题:C++ ExpressionResult::setObjectResult方法的具体用法?C++ ExpressionResult::setObjectResult怎么用?C++ ExpressionResult::setObjectResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExpressionResult
的用法示例。
在下文中一共展示了ExpressionResult::setObjectResult方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: volScalarField
void setResultForContribution<FieldValuePluginFunction>(
const fvMesh &mesh,
ExpressionResult &result,
const scalarField &values
) {
autoPtr<volScalarField> pResult(
new volScalarField(
IOobject(
"contributionFrom_", // +Driver::driverName(),
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("contribution",dimless,0)
)
);
#ifdef FOAM_NO_DIMENSIONEDINTERNAL_IN_GEOMETRIC
const_cast<scalarField&>(pResult->internalField().field())
#else
pResult->internalField()
#endif
=values;
pResult->correctBoundaryConditions();
result.setObjectResult(pResult);
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder2.0-libraries-swak4Foam,代码行数:29,代码来源:ContributionScalarFunctionPlugin.C
示例2: areaScalarField
void setResultForContribution<FaFieldValuePluginFunction>(
const fvMesh &mesh,
ExpressionResult &result,
const scalarField &values
) {
autoPtr<areaScalarField> pResult(
new areaScalarField(
IOobject(
"contributionFrom_", // +Driver::driverName(),
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
FaCommonValueExpressionDriver::faRegionMesh(mesh),
dimensionedScalar("contribution",dimless,0)
)
);
pResult->internalField()=values;
pResult->correctBoundaryConditions();
result.setObjectResult(pResult);
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder2.0-libraries-swak4Foam,代码行数:24,代码来源:ContributionScalarFunctionPlugin.C