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


C++ dictionary::dictName方法代码示例

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


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

示例1: exit

Foam::autoPtr<Foam::thermophysicalProperties>
Foam::thermophysicalProperties::New
(
    const dictionary& dict
)
{
    if (debug)
    {
        InfoInFunction << "Constructing thermophysicalProperties" << endl;
    }

    const word& thermophysicalPropertiesTypeName = dict.dictName();

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(thermophysicalPropertiesTypeName);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown thermophysicalProperties type "
            << thermophysicalPropertiesTypeName << nl << nl
            << "Valid thermophysicalProperties types are:" << nl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<thermophysicalProperties>(cstrIter()(dict));
}
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:28,代码来源:thermophysicalProperties.C

示例2: blendingMethodType

Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
(
    const dictionary& dict,
    const wordList& phaseNames
)
{
    word blendingMethodType(dict.lookup("type"));

    Info<< "Selecting " << dict.dictName() << " blending method: "
        << blendingMethodType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(blendingMethodType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn("blendingMethod::New")
            << "Unknown blendingMethodType type "
            << blendingMethodType << endl << endl
            << "Valid blendingMethod types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(dict, phaseNames);
}
开发者ID:GJOMAA,项目名称:OpenFOAM-dev,代码行数:26,代码来源:newBlendingMethod.C

示例3: defaultCoeffs

Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
(
    const dictionary& dict
)
{
    if (debug)
    {
        Info<< "liquidProperties::New(const dictionary&):"
            << "constructing liquidProperties" << endl;
    }

    const word& liquidPropertiesTypeName = dict.dictName();

    const Switch defaultCoeffs(dict.lookup("defaultCoeffs"));

    if (defaultCoeffs)
    {
        ConstructorTable::iterator cstrIter =
            ConstructorTablePtr_->find(liquidPropertiesTypeName);

        if (cstrIter == ConstructorTablePtr_->end())
        {
            FatalErrorIn
            (
                "liquidProperties::New(const dictionary&, const word&)"
            )   << "Unknown liquidProperties type "
                << liquidPropertiesTypeName << nl << nl
                << "Valid liquidProperties types are:" << nl
                << ConstructorTablePtr_->sortedToc()
                << abort(FatalError);
        }

        return autoPtr<liquidProperties>(cstrIter()());
    }
    else
    {
        dictionaryConstructorTable::iterator cstrIter =
            dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName);

        if (cstrIter == dictionaryConstructorTablePtr_->end())
        {
            FatalErrorIn
            (
                "liquidProperties::New(const dictionary&, const word&)"
            )   << "Unknown liquidProperties type "
                << liquidPropertiesTypeName << nl << nl
                << "Valid liquidProperties types are:" << nl
                << dictionaryConstructorTablePtr_->sortedToc()
                << abort(FatalError);
        }

        return autoPtr<liquidProperties>
        (
            cstrIter()(dict.subDict(liquidPropertiesTypeName + "Coeffs"))
        );
    }
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-2.0.x,代码行数:57,代码来源:liquidProperties.C

示例4: solidType

Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
(
    const dictionary& dict
)
{
    if (debug)
    {
        Info<< "solidProperties::New(const dictionary&): constructing solid"
            << endl;
    }

    const word solidType(dict.dictName());
    const Switch defaultCoeffs(dict.lookup("defaultCoeffs"));

    if (defaultCoeffs)
    {
        ConstructorTable::iterator cstrIter =
            ConstructorTablePtr_->find(solidType);

        if (cstrIter == ConstructorTablePtr_->end())
        {
            FatalErrorIn("solidProperties::New(const dictionary&)")
                << "Unknown solidProperties type " << solidType << nl << nl
                << "Valid solidProperties types are :" << endl
                << ConstructorTablePtr_->sortedToc()
                << exit(FatalError);
        }

        return autoPtr<solidProperties>(cstrIter()());
    }
    else
    {
        dictionaryConstructorTable::iterator cstrIter =
            dictionaryConstructorTablePtr_->find(solidType);

        if (cstrIter == dictionaryConstructorTablePtr_->end())
        {
            FatalErrorIn("solidProperties::New(const dictionary&)")
                << "Unknown solidProperties type " << solidType << nl << nl
                << "Valid solidProperties types are :" << endl
                << dictionaryConstructorTablePtr_->sortedToc()
                << exit(FatalError);
        }

        return autoPtr<solidProperties>(cstrIter()(dict));
    }
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:47,代码来源:solidPropertiesNew.C

示例5: mixtureViscosityModel

Foam::mixtureViscosityModels::slurry::slurry
(
    const word& name,
    const dictionary& viscosityProperties,
    const volVectorField& U,
    const surfaceScalarField& phi,
    const word modelName
)
:
    mixtureViscosityModel(name, viscosityProperties, U, phi),
    alpha_
    (
        U.mesh().lookupObject<volScalarField>
        (
            IOobject::groupName
            (
                viscosityProperties.lookupOrDefault<word>("alpha", "alpha"),
                viscosityProperties.dictName()
            )
        )
    )
{}
开发者ID:BarisCumhur,项目名称:OpenFOAM-2.3.x,代码行数:22,代码来源:slurry.C

示例6:

Foam::specie::specie(const dictionary& dict)
:
    name_(dict.dictName()),
    nMoles_(readScalar(dict.subDict("specie").lookup("nMoles"))),
    molWeight_(readScalar(dict.subDict("specie").lookup("molWeight")))
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:6,代码来源:specie.C

示例7: New

Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
(
    const dictionary& dict
)
{
    if (debug)
    {
        InfoInFunction << "Constructing liquidProperties" << endl;
    }

    const word& liquidPropertiesTypeName = dict.dictName();

    if (dict.found("defaultCoeffs"))
    {
        // Backward-compatibility

        if (Switch(dict.lookup("defaultCoeffs")))
        {
            return New(liquidPropertiesTypeName);
        }
        else
        {
            dictionaryConstructorTable::iterator cstrIter =
                dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName);

            if (cstrIter == dictionaryConstructorTablePtr_->end())
            {
                FatalErrorInFunction
                    << "Unknown liquidProperties type "
                    << liquidPropertiesTypeName << nl << nl
                    << "Valid liquidProperties types are:" << nl
                    << dictionaryConstructorTablePtr_->sortedToc()
                    << exit(FatalError);
            }

            return autoPtr<liquidProperties>
            (
                cstrIter()
                (
                    dict.optionalSubDict(liquidPropertiesTypeName + "Coeffs")
                )
            );
        }
    }
    else
    {
        dictionaryConstructorTable::iterator cstrIter =
            dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName);

        if (cstrIter == dictionaryConstructorTablePtr_->end())
        {
            FatalErrorInFunction
                << "Unknown liquidProperties type "
                << liquidPropertiesTypeName << nl << nl
                << "Valid liquidProperties types are:" << nl
                << dictionaryConstructorTablePtr_->sortedToc()
                << exit(FatalError);
        }

        return autoPtr<liquidProperties>(cstrIter()(dict));
    }
}
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:62,代码来源:liquidProperties.C


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