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


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

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


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

示例1: abort

autoPtr<polyIntegrator> polyIntegrator::New
(
    Time& t,
    polyMoleculeCloud& molCloud,
    const dictionary& dict
)
{
    word polyIntegratorName = "velocityVerlet";
    
    if(dict.found("integrator"))
    {
        const word polyIntegratorNameTemp
        (
            dict.lookup("integrator")
        );
        
        polyIntegratorName = polyIntegratorNameTemp;
    }

    Info<< "Selecting polyIntegrator "
         << polyIntegratorName << endl;

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

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "polyIntegrator::New(const dictionary&) : " << endl
            << "    unknown polyIntegrator type "
            << polyIntegratorName
            << ", constructor not in hash table" << endl << endl
            << "    Valid types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
    }

    return autoPtr<polyIntegrator>
    (
        cstrIter()(t, molCloud, dict)
    );
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:41,代码来源:polyIntegrator.C

示例2: if

Foam::fvPatchField<Type>::fvPatchField
(
    const fvPatch& p,
    const DimensionedField<Type, volMesh>& iF,
    const dictionary& dict,
    const bool valueRequired
)
:
    Field<Type>(p.size()),
    patch_(p),
    internalField_(iF),
    updated_(false),
    patchType_(dict.lookupOrDefault<word>("patchType", word::null))
{
    if (dict.found("value"))
    {
        fvPatchField<Type>::operator=
        (
            Field<Type>("value", dict, p.size())
        );
    }
    else if (!valueRequired)
    {
        fvPatchField<Type>::operator=(pTraits<Type>::zero);
    }
    else
    {
        FatalIOErrorIn
        (
            "fvPatchField<Type>::fvPatchField"
            "("
            "const fvPatch& p,"
            "const DimensionedField<Type, volMesh>& iF,"
            "const dictionary& dict,"
            "const bool valueRequired"
            ")",
            dict
        )   << "Essential entry 'value' missing"
            << exit(FatalIOError);
    }
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:41,代码来源:fvPatchField.C

示例3: fixedValueFvPatchVectorField

Foam::myVelocityFvPatchVectorField::
myVelocityFvPatchVectorField
(
    const fvPatch& u,
    const DimensionedField<vector, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchVectorField(u, iF)
{
//	Info << "myVelocity-Konstructor 3" << endl;
//    fvPatchVectorField::operator=(alpha*patch().nf());
    if (dict.found("value"))
    {
        Info << "found" << endl;
        fixedValueFvPatchField<vector>::operator==
        (
             Field<vector>("value", dict, u.size())
        );
    }
}
开发者ID:JonasBuenger,项目名称:myFoamStuff,代码行数:21,代码来源:myVelocityFvPatchVectorField.C

示例4: scalargpuField

Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    fixedJumpFvPatchField<scalar>(p, iF)
{
    if (dict.found("value"))
    {
        fvPatchScalarField::operator=
        (
            scalargpuField("value", dict, p.size())
        );
    }
    else
    {
        evaluate(Pstream::blocking);
    }
}
开发者ID:Kiiree,项目名称:RapidCFD-dev,代码行数:21,代码来源:energyJumpFvPatchScalarField.C

示例5: fixedValuePointPatchVectorField

solidBodyMotionDisplacementPointPatchVectorField::
solidBodyMotionDisplacementPointPatchVectorField
(
    const pointPatch& p,
    const DimensionedField<vector, pointMesh>& iF,
    const dictionary& dict
)
:
    fixedValuePointPatchVectorField(p, iF, dict, false),
    SBMFPtr_(solidBodyMotionFunction::New(dict, this->db().time()))
{
    if (!dict.found("value"))
    {
        // Determine current local points and offset
        fixedValuePointPatchVectorField::operator==
        (
            transformPoints(SBMFPtr_().transformation(), localPoints0())
           -localPoints0()
        );
    }
}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:21,代码来源:solidBodyMotionDisplacementPointPatchVectorField.C

示例6: rigidBodyModel

Foam::RBD::rigidBodyMotion::rigidBodyMotion
(
    const dictionary& dict
)
:
    rigidBodyModel(dict),
    motionState_(*this, dict),
    motionState0_(motionState_),
    X00_(X0_.size()),
    aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)),
    aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
    report_(dict.lookupOrDefault<Switch>("report", false)),
    solver_(rigidBodySolver::New(*this, dict.subDict("solver")))
{
    if (dict.found("g"))
    {
        g() = vector(dict.lookup("g"));
    }

    initialize();
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-4.x,代码行数:21,代码来源:rigidBodyMotion.C

示例7: mixedUserDefinedFvPatchScalarField

Foam::backwardDiffusionFvPatchScalarField::backwardDiffusionFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    mixedUserDefinedFvPatchScalarField(p, iF)
{
    // Name of field
    nameInternal_ = dimensionedInternalField().name();

    // Set the nominal value
    omega0() = scalarField("omega0", dict, p.size());
    rho0()   = scalarField("rho0", dict, p.size());

    // Fixed value condition is forced
    alfa() = 1000.;
    eta()  = 1.;

    // Calculating epsilon
    epsilon() = 0;

    // Calculating beta
    const double Dmix = 1e-10;
    beta() = Dmix*this->patch().deltaCoeffs();

    // Read value if available
    if (dict.found("value"))
    {
        fvPatchField<scalar>::operator=
        (
            scalarField("value", dict, p.size())
        );
    }
    else
    {
        evaluate();
    }
}
开发者ID:gywukun09,项目名称:laminarSMOKE,代码行数:40,代码来源:backwardDiffusionFvPatchScalarField.C

示例8: fixedValueFvPatchVectorField

Foam::activePressureForceBaffleVelocityFvPatchVectorField::
activePressureForceBaffleVelocityFvPatchVectorField
(
    const fvPatch& p,
    const DimensionedField<vector, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchVectorField(p, iF),
    pName_(dict.lookupOrDefault<word>("p", "p")),
    cyclicPatchName_(dict.lookup("cyclicPatch")),
    cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
    orientation_(readLabel(dict.lookup("orientation"))),
    initWallSf_(0),
    initCyclicSf_(0),
    nbrCyclicSf_(0),
    openFraction_(readScalar(dict.lookup("openFraction"))),
    openingTime_(readScalar(dict.lookup("openingTime"))),
    maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))),
    curTimeIndex_(-1),
    minThresholdValue_(readScalar(dict.lookup("minThresholdValue"))),
    fBased_(readBool(dict.lookup("forceBased"))),
    baffleActivated_(0)
{
    fvPatchVectorField::operator=(vector::zero);

    if (p.size() > 0)
    {
        initWallSf_ = p.Sf();
        initCyclicSf_ = p.boundaryMesh()[cyclicPatchLabel_].Sf();
        nbrCyclicSf_ =  refCast<const cyclicFvPatch>
        (
            p.boundaryMesh()[cyclicPatchLabel_]
        ).neighbFvPatch().Sf();
    }

    if (dict.found("p"))
    {
        dict.lookup("p") >> pName_;
    }
开发者ID:ADGlassby,项目名称:OpenFOAM-2.2.x,代码行数:40,代码来源:activePressureForceBaffleVelocityFvPatchVectorField.C

示例9: variables

void Foam::addGlobalVariable::read(const dictionary& dict)
{
    if(dict.found("globalVariables")) {
        const dictionary variables(dict.subDict("globalVariables"));
        const word scope(dict.lookup("globalScope"));

        wordList names(variables.toc());
        forAll(names,i) {
            const word &name=names[i];
            const dictionary &dict=variables.subDict(name);

            ExpressionResult &res=GlobalVariablesRepository::getGlobalVariables(
                obr_
            ).addValue(
                name,
                scope,
                ExpressionResult(dict,true,true),
                false
            );
            res.noReset();
        }
    } else {
开发者ID:aliozel,项目名称:swak4Foam,代码行数:22,代码来源:addGlobalVariable.C

示例10: mixedFvPatchVectorField

Foam::temperatureDirectedInletOutletVelocityFvPatchVectorField::
temperatureDirectedInletOutletVelocityFvPatchVectorField
(
    const fvPatch& p,
    const DimensionedField<vector, volMesh>& iF,
    const dictionary& dict
)
:
    mixedFvPatchVectorField(p, iF),
    phiName_("phi"),
    TName_("T"),
    T0_("T0", dict, p.size()),
    inletDir_("inletDirection", dict, p.size()),
    cylindricalCCS_(dict.lookup("cylindricalCCS")),
    omega_(dict.lookup("omega"))
{
    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));

    if (dict.found("phi"))
    {
        dict.lookup("phi") >> phiName_;
    }
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:22,代码来源:temperatureDirectedInletOutletVelocityFvPatchVectorField.C

示例11: fixedValueFvPatchScalarField

Foam::wavyFilmHeightFvPatchScalarField::wavyFilmHeightFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchScalarField(p, iF),
    mean_(DataEntry<scalar>::New("mean", dict)),
    a_(DataEntry<scalar>::New("a", dict)),
    omega_(DataEntry<scalar>::New("omega", dict))
{
    if (dict.found("value"))
    {
        fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
    }
    else
    {
        const scalar t = db().time().timeOutputValue();
        fvPatchScalarField::operator=(mean_->value(t));
    }
}
开发者ID:ashishvinayak,项目名称:fireFoam-2.4.x,代码行数:22,代码来源:wavyFilmHeightFvPatchScalarField.C

示例12: forceType

Foam::wordList Foam::functionObjects::forces::createFileNames
(
    const dictionary& dict
) const
{
    DynamicList<word> names(1);

    const word forceType(dict.lookup("type"));
    names.append(forceType);

    if (dict.found("binData"))
    {
        const dictionary& binDict(dict.subDict("binData"));
        label nb = readLabel(binDict.lookup("nBin"));
        if (nb > 0)
        {
            names.append(forceType + "_bins");
        }
    }

    return names;
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-4.x,代码行数:22,代码来源:forces.C

示例13: mixedFvPatchScalarField

Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::
greyDiffusiveRadiationMixedFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
    :
    mixedFvPatchScalarField(p, iF),
    TName_(dict.lookup("T")),
    emissivity_(readScalar(dict.lookup("emissivity")))
{
    if (dict.found("refValue"))
    {
        fvPatchScalarField::operator=
        (
            scalarField("value", dict, p.size())
        );
        refValue() = scalarField("refValue", dict, p.size());
        refGrad() = scalarField("refGradient", dict, p.size());
        valueFraction() = scalarField("valueFraction", dict, p.size());
    }
    else
    {
        // No value given. Restart as fixedValue b.c.

        const scalarField& Tp =
            patch().lookupPatchField<volScalarField, scalar>(TName_);

        refValue() =
            emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp)
            /Foam::mathematicalConstant::pi;

        refGrad() = 0.0;
        valueFraction() = 1.0;

        fvPatchScalarField::operator=(refValue());
    }
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:39,代码来源:greyDiffusiveRadiationMixedFvPatchScalarField.C

示例14: string

groovyBCCommon<Type>::groovyBCCommon
(
    const dictionary& dict,
    bool hasGradient,
    bool isPoint,
    string fractionExpression
)
:
    evaluateDuringConstruction_(
        dict.lookupOrDefault<bool>("evaluateDuringConstruction",false)
    ),  
    debug_(dict.lookupOrDefault<bool>("debug",false)),
    hasGradient_(hasGradient),
    fractionExpression_(dict.lookupOrDefault(
                            "fractionExpression",
                            isPoint ? string("toPoint("+fractionExpression+")") : string(fractionExpression))
    )
{
    if (dict.found("valueExpression"))
    {
        dict.lookup("valueExpression") >> valueExpression_;
    } else {
开发者ID:adimako,项目名称:swak4foam,代码行数:22,代码来源:groovyBCCommon.C

示例15: fixedGradientFvPatchScalarField

Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
    :
    fixedGradientFvPatchScalarField(p, iF),
    limit_(limitControlNames_.read(dict.lookup("limit")))
{
    if (dict.found("gradient"))
    {
        gradient() = scalarField("gradient", dict, p.size());
        fixedGradientFvPatchScalarField::updateCoeffs();
        fixedGradientFvPatchScalarField::evaluate();
    }
    else
    {
        fvPatchField<scalar>::operator=(patchInternalField());
        gradient() = 0.0;
    }
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:22,代码来源:alphaContactAngleFvPatchScalarField.C


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