• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ dictionary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: laminarFlameSpeed

Foam::laminarFlameSpeedModels::Gulders::Gulders
(
    const dictionary& dict,
    const hhuCombustionThermo& ct
)
:
    laminarFlameSpeed(dict, ct),

    coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
    W_(readScalar(coeffsDict_.lookup("W"))),
    eta_(readScalar(coeffsDict_.lookup("eta"))),
    xi_(readScalar(coeffsDict_.lookup("xi"))),
    f_(readScalar(coeffsDict_.lookup("f"))),
    alpha_(readScalar(coeffsDict_.lookup("alpha"))),
    beta_(readScalar(coeffsDict_.lookup("beta")))
{}
开发者ID:,项目名称:,代码行数:16,代码来源:


示例2: type

bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
{
    regionFunctionObject::read(dict);

    logFiles::resetNames(dict.lookup("clouds"));

    Info<< type() << " " << name() << ": ";
    if (names().size())
    {
        Info<< "applying to clouds:" << nl;
        forAll(names(), i)
        {
            Info<< "    " << names()[i] << nl;
        }
        Info<< endl;
    }
开发者ID:mattijsjanssens,项目名称:OpenFOAM-dev,代码行数:16,代码来源:cloudInfo.C


示例3:

Foam::liquidProperties::liquidProperties(const dictionary& dict)
:
    W_(readScalar(dict.lookup("W"))),
    Tc_(readScalar(dict.lookup("Tc"))),
    Pc_(readScalar(dict.lookup("Pc"))),
    Vc_(readScalar(dict.lookup("Vc"))),
    Zc_(readScalar(dict.lookup("Zc"))),
    Tt_(readScalar(dict.lookup("Tt"))),
    Pt_(readScalar(dict.lookup("Pt"))),
    Tb_(readScalar(dict.lookup("Tb"))),
    dipm_(readScalar(dict.lookup("dipm"))),
    omega_(readScalar(dict.lookup("omega"))),
    delta_(readScalar(dict.lookup("delta")))
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:14,代码来源:liquidProperties.C


示例4:

Foam::subModelBase::subModelBase
(
    dictionary& properties,
    const dictionary& dict,
    const word& baseName,
    const word& modelType,
    const word& dictExt
)
:
    modelName_(word::null),
    properties_(properties),
    dict_(dict),
    baseName_(baseName),
    modelType_(modelType),
    coeffDict_(dict.subDict(modelType + dictExt))
{}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:16,代码来源:subModelBase.C


示例5: clear_cache

        void texture::clear_cache(const gsgl::string & category)
        {
            for (dictionary<texture_cache, string>::iterator cat = textures.iter(); cat.is_valid(); ++cat)
            {
                if (category == L"__ALL__" || cat.get_index() == category)
                {
                    for (texture_cache::iterator i = cat->iter(); i.is_valid(); ++i)
                    {
                        if (i->get_ref_count() > 1)
                            throw runtime_exception(L"Dangling texture '%ls'!", i.get_index());
                    }

                    cat->clear();
                }
            }
        } // texture::clear_cache()
开发者ID:kulibali,项目名称:periapsis,代码行数:16,代码来源:texture.cpp


示例6: breakupModel

// Construct from components
reitzKHRT::reitzKHRT
(
    const dictionary& dict,
    spray& sm
)
:
    breakupModel(dict, sm),
    coeffsDict_(dict.subDict(typeName + "Coeffs")),
    g_(sm.g()),
    b0_(readScalar(coeffsDict_.lookup("B0"))),
    b1_(readScalar(coeffsDict_.lookup("B1"))),
    cTau_(readScalar(coeffsDict_.lookup("Ctau"))),
    cRT_(readScalar(coeffsDict_.lookup("CRT"))),
    msLimit_(readScalar(coeffsDict_.lookup("msLimit"))),
    weberLimit_(readScalar(coeffsDict_.lookup("WeberLimit")))
{}
开发者ID:,项目名称:,代码行数:17,代码来源:


示例7: generalizedNewtonianViscosityModel

Foam::laminarModels::generalizedNewtonianViscosityModels::strainRateFunction::
strainRateFunction
(
    const dictionary& viscosityProperties
)
:
    generalizedNewtonianViscosityModel(viscosityProperties),
    strainRateFunction_
    (
        Function1<scalar>::New
        (
            "function",
            viscosityProperties.optionalSubDict(typeName + "Coeffs")
        )
    )
{}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:16,代码来源:strainRateFunction.C


示例8:

Foam::SubModelBase<CloudType>::SubModelBase
(
    CloudType& owner,
    const dictionary& dict,
    const word& baseName,
    const word& modelType,
    const word& dictExt
)
:
    owner_(owner),
    dict_(dict),
    baseName_(baseName),
    modelType_(modelType),
    modelName_(word::null),
    coeffDict_(dict.subDict(modelType + dictExt))
{}
开发者ID:ADGlassby,项目名称:OpenFOAM-2.2.x,代码行数:16,代码来源:SubModelBase.C


示例9:

// Construct from components
dsmcField::dsmcField
(
    Time& t,
    const polyMesh& mesh,
    dsmcCloud& cloud,
    const dictionary& dict
)
:
    mesh_(refCast<const fvMesh>(mesh)),
    cloud_(cloud),
    timeDict_(dict.subDict("timeProperties")),
    time_(t, timeDict_),
    casePath_(),
    timePath_()
{
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:17,代码来源:dsmcField.C


示例10:

Foam::groovyFixedNormalSlipFvPatchField<Type>::groovyFixedNormalSlipFvPatchField
(
    const fvPatch& p,
    const DimensionedField<Type, volMesh>& iF,
    const dictionary& dict
)
:
    fixedNormalSlipFvPatchField<Type>(p, iF),
    fixedValueExpression_(
        dict.lookup("fixedValueExpression"),
        dict
    ),
    driver_(dict,this->patch())
{
    this->evaluate();
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder2.0-libraries-swak4Foam,代码行数:16,代码来源:groovyFixedNormalSlipFvPatchField.C


示例11: polyStateController

// Construct from components
tail::tail
(
    Time& t,
    polyMoleculeCloud& molCloud,
    const dictionary& dict
)
:
    polyStateController(t, molCloud, dict),
    propsDict_(dict.subDict(typeName + "Properties")),
    molIds_()
{

    writeInTimeDir_ = true;
    writeInCase_ = true;

//     singleValueController() = true;

    molIds_.clear();

    selectIds ids
    (
        molCloud_.cP(),
        propsDict_
    );

    molIds_ = ids.molIds();
    
    // read in tracking numbers
//     trackingNumbers_ = List<label>(propsDict_.lookup("trackingNumbers"));
    trackingNumber_ = readLabel(propsDict_.lookup("trackingNumber"));

    centre_ = propsDict_.lookup("centre");
    a_ = readScalar(propsDict_.lookup("a"));
    b_ = readScalar(propsDict_.lookup("b"));
    deltaT_ = readScalar(propsDict_.lookup("deltaT"));    
    t_ = 0.0;
    tI_= 0.0;
    
    relaxationTime_ = readScalar(propsDict_.lookup("relaxationTime"));    
    
    startPoint_ = propsDict_.lookup("startPoint");
    deltaTMD_ = time_.deltaT().value(); 
    

      
        
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:48,代码来源:tail.C


示例12: name_

Foam::coordinateSystem::coordinateSystem
(
    const dictionary& dict,
    const objectRegistry& obr
)
:
    name_(type()),
    note_(),
    origin_(point::zero),
    R_(),
    Rtr_(sphericalTensor::I)
{
    const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);

    // a simple entry is a lookup into global coordinateSystems
    if (entryPtr && !entryPtr->isDict())
    {
        word csName;
        entryPtr->stream() >> csName;

        const coordinateSystems& csLst = coordinateSystems::New(obr);

        label csId = csLst.find(csName);
        if (debug)
        {
            Info<< "coordinateSystem::coordinateSystem"
                "(const dictionary&, const objectRegistry&):"
                << nl << "using global coordinate system: "
                << csName << "=" << csId << endl;
        }

        if (csId < 0)
        {
            FatalErrorIn
            (
                "coordinateSystem::coordinateSystem"
                "(const dictionary&, const objectRegistry&)"
            )   << "could not find coordinate system: " << csName << nl
                << "available coordinate systems: " << csLst.toc() << nl << nl
                << exit(FatalError);
        }

        // copy coordinateSystem, but assign the name as the typeName
        // to avoid strange things in writeDict()
        operator=(csLst[csId]);
        name_ = typeName_();
    }
开发者ID:,项目名称:,代码行数:47,代码来源:


示例13: forceModel

// Construct from components
KochHillDrag::KochHillDrag
(
    const dictionary& dict,
    cfdemCloud& sm
)
:
    forceModel(dict,sm),
    propsDict_(dict.subDict(typeName + "Props")),
    velFieldName_(propsDict_.lookup("velFieldName")),
    U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
    voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
    voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
    UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
    UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_))
{
    // suppress particle probe
    if (probeIt_ && propsDict_.found("suppressProbe"))
        probeIt_=!Switch(propsDict_.lookup("suppressProbe"));
    if(probeIt_)
    {
        particleCloud_.probeM().initialize(typeName, typeName+".logDat");
        particleCloud_.probeM().vectorFields_.append("dragForce"); //first entry must the be the force
        particleCloud_.probeM().vectorFields_.append("Urel");        //other are debug
        particleCloud_.probeM().scalarFields_.append("Rep");          //other are debug
        particleCloud_.probeM().scalarFields_.append("beta");                 //other are debug
        particleCloud_.probeM().scalarFields_.append("voidfraction");       //other are debug
        particleCloud_.probeM().writeHeader();
    }

    // init force sub model
    setForceSubModels(propsDict_);

    // define switches which can be read from dict
    forceSubM(0).setSwitchesList(0,true); // activate search for treatExplicit switch
    forceSubM(0).setSwitchesList(2,true); // activate search for implDEM switch
    forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
    forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
    forceSubM(0).setSwitchesList(7,true); // activate implForceDEMacc switch
    forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch

    // read those switches defined above, if provided in dict
    for (int iFSub=0;iFSub<nrForceSubModels();iFSub++)
        forceSubM(iFSub).readSwitches();

    particleCloud_.checkCG(true);
}
开发者ID:CFDEMproject,项目名称:CFDEMcoupling-PUBLIC,代码行数:47,代码来源:KochHillDrag.C


示例14: topoSetSource

// Construct from dictionary
Foam::shapeToCell::shapeToCell
(
    const polyMesh& mesh,
    const dictionary& dict
)
:
    topoSetSource(mesh),
    type_(dict.lookup("type"))
{
    if (!cellModeller::lookup(type_) && (type_ != "splitHex"))
    {
        FatalErrorIn
        (
            "shapeToCell::shapeToCell(const polyMesh&, const dictionary&)"
        )   << "Illegal cell type " << type_ << exit(FatalError);
    }
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:18,代码来源:shapeToCell.C


示例15:

// Construct from dictionary
Foam::refinementParameters::refinementParameters
(
    const dictionary& dict,
    const label dummy
)
:
    maxGlobalCells_(readLabel(dict.lookup("cellLimit"))),
    maxLocalCells_(readLabel(dict.lookup("procCellLimit"))),
    minRefineCells_(readLabel(dict.lookup("minimumRefine"))),
    curvature_(readScalar(dict.lookup("curvature"))),
    nBufferLayers_(readLabel(dict.lookup("nBufferLayers"))),
    keepPoints_(dict.lookup("keepPoints")),
    allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
    maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
{}
开发者ID:ADGlassby,项目名称:OpenFOAM-2.2.x,代码行数:16,代码来源:refinementParameters.C


示例16:

Foam::combustionModel::combustionModel
(
    const word& modelType,
    const dictionary& combustionProps,
    hsCombustionThermo& thermo,
    const compressible::turbulenceModel& turbulence,
    const surfaceScalarField& phi,
    const volScalarField& rho
)
:
    coeffs_(combustionProps.subDict(modelType + "Coeffs")),
    thermo_(thermo),
    turbulence_(turbulence),
    mesh_(phi.mesh()),
    phi_(phi),
    rho_(rho)
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:17,代码来源:combustionModel.C


示例17: exit

autoPtr<initialPointsMethod> initialPointsMethod::New
(
    const dictionary& initialPointsDict,
    const Time& runTime,
    Random& rndGen,
    const conformationSurfaces& geometryToConformTo,
    const cellShapeControl& cellShapeControls,
    const autoPtr<backgroundMeshDecomposition>& decomposition
)
{
    word initialPointsMethodTypeName
    (
        initialPointsDict.lookup("initialPointsMethod")
    );

    Info<< nl << "Selecting initialPointsMethod "
        << initialPointsMethodTypeName << endl;

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

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown initialPointsMethod type "
            << initialPointsMethodTypeName
            << endl << endl
            << "Valid initialPointsMethod types are :" << endl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return
        autoPtr<initialPointsMethod>
        (
            cstrIter()
            (
                initialPointsDict,
                runTime,
                rndGen,
                geometryToConformTo,
                cellShapeControls,
                decomposition
            )
        );
}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:46,代码来源:initialPointsMethod.C


示例18:

UniformFixedValuePointPatchField
<PatchField, Mesh, PointPatch, MatrixType, Type>::
UniformFixedValuePointPatchField
(
    const PointPatch& p,
    const DimensionedField<Type, Mesh>& iF,
    const dictionary& dict
)
:
    FixedValuePointPatchField
        <PatchField, Mesh, PointPatch, MatrixType, Type>(p, iF),
    uniformValue_(pTraits<Type>(dict.lookup("uniformValue")))
{
    FixedValuePointPatchField
        <PatchField, Mesh, PointPatch, MatrixType, Type>::operator==
        (uniformValue_);
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:17,代码来源:UniformFixedValuePointPatchField.C


示例19: dsmcPatchBoundary

// Construct from components
dsmcMixedDiffuseSpecularWallFieldPatch::dsmcMixedDiffuseSpecularWallFieldPatch
(
    Time& t,
    const polyMesh& mesh,
    dsmcCloud& cloud,
    const dictionary& dict
)
:
    dsmcPatchBoundary(t, mesh, cloud, dict),
    propsDict_(dict.subDict(typeName + "Properties")),
    boundaryT_
    (
        volScalarField
        (
            IOobject
            (
                "boundaryT",
                mesh_.time().timeName(),
                mesh_,
                IOobject::MUST_READ,
                IOobject::AUTO_WRITE
            ),
            mesh_
        )
    ),
    boundaryU_
    (
        volVectorField
        (
            IOobject
            (
                "boundaryU",
                mesh_.time().timeName(),
                mesh_,
                IOobject::MUST_READ,
                IOobject::AUTO_WRITE
            ),
            mesh_
        )
    ),
    diffuseFraction_(readScalar(propsDict_.lookup("diffuseFraction")))
{
    writeInTimeDir_ = false;
    writeInCase_ = false;
    measurePropertiesAtWall_ = true;
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:47,代码来源:dsmcMixedDiffuseSpecularWallFieldPatch.C


示例20: fixedGradientFvPatchScalarField

turbulentHeatFluxTemperatureFvPatchScalarField::
turbulentHeatFluxTemperatureFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    fixedGradientFvPatchScalarField(p, iF),
    temperatureCoupledBase(patch(), dict),
    heatSource_(heatSourceTypeNames_.read(dict.lookup("heatSource"))),
    q_("q", dict, p.size()),
    QrName_(dict.lookupOrDefault<word>("Qr", "none"))
{
    fvPatchField<scalar>::operator=(patchInternalField());
    gradient() = 0.0;
}
开发者ID:ADGlassby,项目名称:OpenFOAM-2.2.x,代码行数:17,代码来源:turbulentHeatFluxTemperatureFvPatchScalarField.C



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dim4类代码示例发布时间:2022-05-31
下一篇:
C++ dict类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap