当前位置: 首页>>代码示例>>C++>>正文


C++ dimensionSet::reset方法代码示例

本文整理汇总了C++中dimensionSet::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ dimensionSet::reset方法的具体用法?C++ dimensionSet::reset怎么用?C++ dimensionSet::reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dimensionSet的用法示例。


在下文中一共展示了dimensionSet::reset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ds

void Foam::equationReader::evalDimsAcosDimCheck
(
    const equationReader * eqnReader,
    const label index,
    const label i,
    const label storageOffset,
    label& storeIndex,
    dimensionSet& xDims,
    dimensionSet sourceDims
) const
{
    if
    (
        !xDims.dimensionless() && dimensionSet::debug
    )
    {
        WarningIn("equationReader::evalDimsAcosDimCheck")
            << "Dimension error thrown for operation ["
            << equationOperation::opName
            (
                operator[](index)[i].operation()
            )
            << "] in equation " << operator[](index).name()
            << ", given by:" << token::NL << token::TAB
            << operator[](index).rawText();
    }
    dimensionedScalar ds("temp", xDims, 0.0);
    xDims.reset(acos(ds).dimensions());
    operator[](index)[i].assignOpDimsFunction
    (
        &Foam::equationReader::evalDimsAcos
    );
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:33,代码来源:equationReaderEvalDimsP.C

示例2: WarningIn

void Foam::equationReader::evalDimsMinDimCheck
(
    const equationReader * eqnReader,
    const label index,
    const label i,
    const label storageOffset,
    label& storeIndex,
    dimensionSet& xDims,
    dimensionSet sourceDims
) const
{
    if
    (
        dimensionSet::debug
     && (xDims != sourceDims)
    )
    {
        WarningIn("equationReader::evalMinDimCheck")
            << "Dimension error thrown for operation ["
            << equationOperation::opName
            (
                operator[](index)[i].operation()
            )
            << "] in equation " << operator[](index).name()
            << ", given by:" << token::NL << token::TAB
            << operator[](index).rawText();
    }
    xDims.reset(min(xDims, sourceDims));
    operator[](index)[i].assignOpDimsFunction
    (
        &Foam::equationReader::evalDimsMin
    );
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:33,代码来源:equationReaderEvalDimsP.C

示例3: FatalErrorIn

void Foam::equationReader::evalDimsYnDimCheck
(
    const equationReader * eqnReader,
    const label index,
    const label i,
    const label storageOffset,
    label& storeIndex,
    dimensionSet& xDims,
    dimensionSet sourceDims
) const
{
    if
    (
        (!sourceDims.dimensionless() || !xDims.dimensionless())
     && dimensionSet::debug
    )
    {
        FatalErrorIn("equationReader::evalDimsYnDimCheck")
            << "Dimension error thrown for operation ["
            << equationOperation::opName
            (
                operator[](index)[i].operation()
            )
            << "] in equation " << operator[](index).name()
            << ", given by:" << token::NL << token::TAB
            << operator[](index).rawText() << token::NL
            << "yn(a, b) - a and b must be dimensionless."
            << abort(FatalError);
    }
    xDims.reset(dimless);
    operator[](index)[i].assignOpDimsFunction
    (
        &Foam::equationReader::evalDimsYn
    );
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:35,代码来源:equationReaderEvalDimsP.C

示例4:

void Foam::equationReader::evalDimsRetrieve
(
    const equationReader * eqnReader,
    const label index,
    const label i,
    const label storageOffset,
    label& storeIndex,
    dimensionSet& xDims,
    dimensionSet sourceDims
) const
{
    xDims.reset(sourceDims);
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:13,代码来源:equationReaderEvalDimsP.C

示例5: dimensionSet

void Foam::equationReader::evalDimsStore
(
    const equationReader * eqnReader,
    const label index,
    const label i,
    const label storageOffset,
    label& storeIndex,
    dimensionSet& xDims,
    dimensionSet sourceDims
) const
{
    storeIndex++;
    storageDims_.setSize(storeIndex + storageOffset + 1);
    storageDims_.set
    (
        storeIndex + storageOffset,
        new dimensionSet(xDims)
    );
    xDims.reset(dimless);
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:20,代码来源:equationReaderEvalDimsP.C


注:本文中的dimensionSet::reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。