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


C++ dictionary类代码示例

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


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


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