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

C++ tmp类代码示例

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

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



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

示例1: tfield

bool Foam::functionObjects::regionFunctionObject::store
(
    word& fieldName,
    const tmp<ObjectType>& tfield,
    bool cacheable
)
{
    if (cacheable && fieldName == tfield().name())
    {
        WarningInFunction
            << "Cannot store cache-able field with the named used in the cache."
            << nl
            << "    Either choose a different name or cache the field"
            << "    and use the 'writeObjects' functionObject."
            << endl;

        return false;
    }

    if
    (
        fieldName.size()
     && obr_.foundObject<ObjectType>(fieldName)
    )
    {
        const ObjectType& field =
        (
            obr_.lookupObject<ObjectType>(fieldName)
        );

        // If there is a result field already registered assign to the new
        // result field otherwise transfer ownership of the new result field to
        // the object registry
        if (&field != &tfield())
        {
            const_cast<ObjectType&>(field) = tfield;
        }
        else
        {
            obr_.objectRegistry::store(tfield.ptr());
        }
    }
    else
    {
        if (fieldName.size() && fieldName != tfield().name())
        {
            tfield.ref().rename(fieldName);
        }
        else
        {
            fieldName = tfield().name();
        }

        obr_.objectRegistry::store(tfield.ptr());
    }

    return true;
}
开发者ID:avamingli,项目名称:OpenFOAM-dev,代码行数:58,代码来源:regionFunctionObjectTemplates.C


示例2: tvf

tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian
(
    const tmp<edgeScalarField>& tgamma,
    const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf
)
{
    tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian
    (
        fac::laplacian(tgamma(), tvf())
    );
    tgamma.clear();
    tvf.clear();
    return Laplacian;
}
开发者ID:Haider-BA,项目名称:foam-extend-3.0,代码行数:14,代码来源:facLaplacian.C


示例3: tvf

tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
(
    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
)
{
    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
    (
        fvc::laplacian(tgamma(), tvf())
    );
    tgamma.clear();
    tvf.clear();
    return Laplacian;
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:14,代码来源:fvcLaplacian.C


示例4: tvf

tmp<GeometricField<Type, faPatchField, areaMesh> >
div
(
    const tmp<edgeScalarField>& tflux,
    const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf
)
{
    tmp<GeometricField<Type, faPatchField, areaMesh> > Div
    (
        fac::div(tflux(), tvf())
    );
    tflux.clear();
    tvf.clear();
    return Div;
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:15,代码来源:facDiv.C


示例5: tvf

tmp<GeometricField<Type, fvPatchField, volMesh> >
div
(
    const tmp<surfaceScalarField>& tflux,
    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
)
{
    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
    (
        fvc::div(tflux(), tvf())
    );
    tflux.clear();
    tvf.clear();
    return Div;
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:15,代码来源:fvcDiv.C


示例6: tvf

tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
flux
(
    const tmp<surfaceScalarField>& tphi,
    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
)
{
    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
    (
        fvc::flux(tphi(), tvf())
    );
    tphi.clear();
    tvf.clear();
    return Flux;
}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:15,代码来源:fvcFlux.C


示例7: tfaceHpsi

Foam::tmp<Foam::gpuField<Type> >
Foam::lduMatrix::faceH(const tmp<gpuField<Type> >& tpsi) const
{
    tmp<gpuField<Type> > tfaceHpsi(faceH(tpsi()));
    tpsi.clear();
    return tfaceHpsi;
}
开发者ID:Kiiree,项目名称:RapidCFD-dev,代码行数:7,代码来源:lduMatrixTemplates.C


示例8: volumeIntegrate

tmp<gpuField<Type> >
volumeIntegrate(const tmp<DimensionedField<Type, volMesh> >& tdf)
{
    tmp<gpuField<Type> > tdidf = tdf().mesh().V()*tdf().field();
    tdf.clear();
    return tdidf;
}
开发者ID:Kiiree,项目名称:RapidCFD-dev,代码行数:7,代码来源:fvcVolumeIntegrate.C


示例9: tfield

tmp<complexVectorField> fft::reverseTransform
(
    const tmp<complexVectorField>& tfield,
    const labelList& nn
)
{
    tmp<complexVectorField> tifftVectorField
    (
        new complexVectorField
        (
            tfield().size()
        )
    );

    for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
    {
        tifftVectorField().replace
        (
            cmpt,
            reverseTransform(tfield().component(cmpt), nn)
        );
    }

    tfield.clear();

    return tifftVectorField;
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:27,代码来源:fft.C


示例10: regIOobject

DimensionedField<Type, GeoMesh>::DimensionedField
(
    const tmp<DimensionedField<Type, GeoMesh> >& tdf
)
:
    regIOobject(tdf(), tdf.isTmp()),
    Field<Type>
    (
        const_cast<DimensionedField<Type, GeoMesh>&>(tdf()),
        tdf.isTmp()
    ),
    mesh_(tdf().mesh_),
    dimensions_(tdf().dimensions_)
{
    tdf.clear();
}
开发者ID:Kiiree,项目名称:CONSELFcae-dev,代码行数:16,代码来源:DimensionedField.C


示例11:

tmp
<
    GeometricField
    <
        typename outerProduct<vector,Type>::type, faPatchField, areaMesh
    >
>
grad
(
    const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf,
    const word& name
)
{
    tmp
    <
        GeometricField
        <
            typename outerProduct<vector, Type>::type, faPatchField, areaMesh
        >
    > tGrad
    (
        fac::grad(tvf(), name)
    );
    tvf.clear();
    return tGrad;
}
开发者ID:Brzous,项目名称:WindFOAM,代码行数:26,代码来源:facGrad.C


示例12: tpsi

void Foam::lduMatrix::Amul
(
    scalarField& Apsi,
    const tmp<scalarField>& tpsi,
    const FieldField<Field, scalar>& interfaceBouCoeffs,
    const lduInterfaceFieldPtrsList& interfaces,
    const direction cmpt
) const
{
    scalar* __restrict__ ApsiPtr = Apsi.begin();

    const scalarField& psi = tpsi();
    const scalar* const __restrict__ psiPtr = psi.begin();

    const scalar* const __restrict__ diagPtr = diag().begin();

    const label* const __restrict__ uPtr = lduAddr().upperAddr().begin();
    const label* const __restrict__ lPtr = lduAddr().lowerAddr().begin();

    const scalar* const __restrict__ upperPtr = upper().begin();
    const scalar* const __restrict__ lowerPtr = lower().begin();

    // Initialise the update of interfaced interfaces
    initMatrixInterfaces
    (
        interfaceBouCoeffs,
        interfaces,
        psi,
        Apsi,
        cmpt
    );

    const label nCells = diag().size();
    for (label cell=0; cell<nCells; cell++)
    {
        ApsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
    }


    const label nFaces = upper().size();

    for (label face=0; face<nFaces; face++)
    {
        ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]];
        ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]];
    }

    // Update interface interfaces
    updateMatrixInterfaces
    (
        interfaceBouCoeffs,
        interfaces,
        psi,
        Apsi,
        cmpt
    );

    tpsi.clear();
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-4.x,代码行数:59,代码来源:lduMatrixATmul.C


示例13: calculate

Foam::boundBox::boundBox(const tmp<pointField>& points, const bool doReduce)
:
    min_(Zero),
    max_(Zero)
{
    calculate(points(), doReduce);
    points.clear();
}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:8,代码来源:boundBox.C


示例14: weightedAverage

dimensioned<Type> DimensionedField<Type, GeoMesh>::weightedAverage
(
    const tmp<DimensionedField<scalar, GeoMesh> >& tweightField
) const
{
    dimensioned<Type> wa = weightedAverage(tweightField());
    tweightField.clear();
    return wa;
}
开发者ID:Kiiree,项目名称:CONSELFcae-dev,代码行数:9,代码来源:DimensionedField.C


示例15: sample

Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
(
    const tmp<Field<Type> >& tfld
) const
{
    tmp<Field<Type> > tsf = sample(tfld());
    tfld.clear();
    return tsf;
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:9,代码来源:cuttingPlaneTemplates.C


示例16: domainIntegrate

dimensioned<Type> domainIntegrate
(
    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
)
{
    dimensioned<Type> integral = domainIntegrate(tvf());
    tvf.clear();
    return integral;
}
开发者ID:Kiiree,项目名称:RapidCFD-dev,代码行数:9,代码来源:fvcVolumeIntegrate.C


示例17: sample

Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
(
    const tmp<Field<Type> >& tsf
) const
{
    tmp<Field<Type> > tint = sample(tsf());
    tsf.clear();
    return tint;
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:9,代码来源:cuttingPlaneSample.C


示例18:

Foam::SolverPerformance<Type> Foam::solve(const tmp<fvMatrix<Type>>& tfvm)
{
    SolverPerformance<Type> solverPerf =
        const_cast<fvMatrix<Type>&>(tfvm()).solve();

    tfvm.clear();

    return solverPerf;
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:9,代码来源:fvMatrixSolve.C


示例19: Curl

tmp<GeometricField<Type, fvPatchField, volMesh> >
curl
(
    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
)
{
    tmp<GeometricField<Type, fvPatchField, volMesh> > Curl(fvc::curl(tvf()));
    tvf.clear();
    return Curl;
}
开发者ID:Brzous,项目名称:WindFOAM,代码行数:10,代码来源:fvcCurl.C


示例20: Div

tmp<GeometricField<Type, fvPatchField, volMesh> >
div
(
    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
)
{
    tmp<GeometricField<Type, fvPatchField, volMesh> > Div(fvc::div(tssf()));
    tssf.clear();
    return Div;
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:10,代码来源:fvcDiv.C



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ tok_ctx类代码示例发布时间:2022-05-31
下一篇:
C++ tlistbox类代码示例发布时间: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