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

C++ pointPatch类代码示例

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

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



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

示例1:

sixDoFRigidBodyDisplacementPointPatchVectorField::
sixDoFRigidBodyDisplacementPointPatchVectorField
(
    const pointPatch& p,
    const DimensionedField<vector, pointMesh>& iF
)
:
    fixedValuePointPatchField<vector>(p, iF),
    motion_(),
    initialPoints_(p.localPoints()),
    rhoInf_(1.0),
    rhoName_("rho"),
    lookupGravity_(-1),
    g_(vector::zero),
    curTimeIndex_(-1)
{}
开发者ID:Rodbourn,项目名称:OpenFOAM-dev,代码行数:16,代码来源:sixDoFRigidBodyDisplacementPointPatchVectorField.C


示例2: exit

Foam::emptyPointPatchField<Type>::emptyPointPatchField
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
:
    pointPatchField<Type>(p, iF, dict)
{
    if (!isType<emptyPointPatch>(p))
    {
        FatalIOErrorInFunction
        (
            dict
        )   << "patch " << this->patch().index() << " not empty type. "
            << "Patch type = " << p.type()
            << exit(FatalIOError);
    }
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:19,代码来源:emptyPointPatchField.C


示例3: exit

Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
:
    basicSymmetryPointPatchField<Type>(p, iF, dict),
    symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p))
{
    if (!isType<symmetryPlanePointPatch>(p))
    {
        FatalIOErrorInFunction
        (
            dict
        )   << "patch " << this->patch().index() << " not symmetry type. "
            << "Patch type = " << p.type()
            << exit(FatalIOError);
    }
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:20,代码来源:symmetryPlanePointPatchField.C


示例4: exit

Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
:
    coupledPointPatchField<Type>(p, iF, dict),
    cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p)),
    ppiPtr_(NULL),
    nbrPpiPtr_(NULL)
{
    if (!isType<cyclicACMIPointPatch>(p))
    {
        FatalIOErrorInFunction
        (
            dict
        )   << "patch " << this->patch().index() << " not cyclicACMI type. "
            << "Patch type = " << p.type()
            << exit(FatalIOError);
    }
}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:22,代码来源:cyclicACMIPointPatchField.C


示例5:

uniformFixedValuePointPatchField<Type>::
uniformFixedValuePointPatchField
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
:
    fixedValuePointPatchField<Type>(p, iF, dict, false),
    uniformValue_(DataEntry<Type>::New("uniformValue", dict))
{
    if (dict.found("value"))
    {
        fixedValuePointPatchField<Type>::operator==
        (
            Field<Type>("value", dict, p.size())
        );
    }
    else
    {
        const scalar t = this->db().time().timeOutputValue();
        fixedValuePointPatchField<Type>::operator=(uniformValue_->value(t));
    }
}
开发者ID:Kiiree,项目名称:CONSELFcae-dev,代码行数:24,代码来源:uniformFixedValuePointPatchField.C


示例6: vectorField

Foam::
dissolMotionPointPatchVectorField::
dissolMotionPointPatchVectorField
(
    const pointPatch& p,
    const DimensionedField<vector, pointMesh>& iF,
    const dictionary& dict
)
:
  fixedValuePointPatchField<vector>(p, iF)
{
  if(debug) {
    Info << "dissolMotionPointPatchVectorField constructor 2"<<endl;
  }
  
  if (dict.found("value"))
  {
    this->operator==
    (
      vectorField("value", dict, p.size())
    );
  }
  else
  {
    WarningIn(
        "dissolMotionPointPatchVectorField constructor 2"
        "("
        "const pointPatch& p,"
        "const DimensionedField<vector, pointMesh>& iF,"
        "const dictionary& dict"
        ")"
    ) << "No value defined for " << this->internalField().name()
        << " on " << this->patch().name()
        << endl;
  }
  
  
  if (!dict.readIfPresent<scalar>("rlxTol", rlxTol))
  {
    rlxTol = 1.0e-6;
    WarningIn
    (
      "dissolMotionPointPatchVectorField constructor 2"
      "("
      "const fvPatch& p,"
      "const DimensionedField<Type, volMesh>& iF,"
      "const dictionary& dict"
      ")"
    )
      << "No value defined for rlxTol"
      << " on " << this->patch().name() << " therefore using "
      << rlxTol
      << endl;
  }
  if (!dict.readIfPresent<int>("q_norm_recalc", q_norm_recalc))
  {
    q_norm_recalc = 1;
    WarningIn
    (
      "dissolMotionPointPatchVectorField constructor 2"
      "("
      "const fvPatch& p,"
      "const DimensionedField<Type, volMesh>& iF,"
      "const dictionary& dict"
      ")"
    )
      << "No value defined for q_norm_recalc"
      << " on " << this->patch().name() << " therefore using "
      << q_norm_recalc
      << endl;
  }
  if (!dict.readIfPresent<scalar>("k_1", k_1))
  {
    k_1 = 1.0;
    WarningIn
    (
      "dissolMotionPointPatchVectorField constructor 2"
      "("
      "const fvPatch& p,"
      "const DimensionedField<Type, volMesh>& iF,"
      "const dictionary& dict"
      ")"
    )
      << "No value defined for k_1"
      << " on " << this->patch().name() << " therefore using "
      << k_1
      << endl;
  }
  if (!dict.readIfPresent<scalar>("k_2", k_2))
  {
    k_2 = 1.0;
    WarningIn
    (
      "dissolMotionPointPatchVectorField constructor 2"
      "("
      "const fvPatch& p,"
      "const DimensionedField<Type, volMesh>& iF,"
      "const dictionary& dict"
      ")"
    )
//.........这里部分代码省略.........
开发者ID:vitst,项目名称:libsFoamAux,代码行数:101,代码来源:dissolMotionPointPatchVectorField.C


示例7: exit

Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
(
    const word& patchFieldType,
    const word& actualPatchType,
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF
)
{
    if (debug)
    {
        Info<< "PointPatchField<Type>::"
               "New(const word&, const word&"
                ", const pointPatch&, const Field<Type>&) : "
               "constructing pointPatchField<Type>"
            << endl;
    }

    typename pointPatchConstructorTable::iterator cstrIter =
        pointPatchConstructorTablePtr_->find(patchFieldType);

    if (cstrIter == pointPatchConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "PointPatchField<Type>::New"
            "(const word&, const word&, const pointPatch&, const Field<Type>&)"
        )   << "Unknown patchFieldType type "
            << patchFieldType << nl << nl
            << "Valid patchField types are :" << endl
            << pointPatchConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF));

    if
    (
        actualPatchType == word::null
     || actualPatchType != p.type()
    )
    {
        if (pfPtr().constraintType() != p.constraintType())
        {
            // Use default constraint type
            typename pointPatchConstructorTable::iterator patchTypeCstrIter =
                pointPatchConstructorTablePtr_->find(p.type());

            if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
            {
                FatalErrorIn
                (
                    "PointPatchField<Type>::New"
                    "(const word&, const word&"
                    ", const pointPatch&, const Field<Type>&)"
                )   << "inconsistent patch and patchField types for \n"
                    << "    patch type " << p.type()
                    << " and patchField type " << patchFieldType
                    << exit(FatalError);
            }

            return patchTypeCstrIter()(p, iF);
        }
    }

    return pfPtr;
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:66,代码来源:pointPatchFieldNew.C


示例8: patchFieldType

Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
{
    if (debug)
    {
        Info<< "PointPatchField<Type>::"
               "New(const pointPatch&, const Field<Type>&, const dictionary&)"
               " : constructing pointPatchField<Type>"
            << endl;
    }

    word patchFieldType(dict.lookup("type"));

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

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        if (!disallowGenericPointPatchField)
        {
            cstrIter = dictionaryConstructorTablePtr_->find("generic");
        }

        if (cstrIter == dictionaryConstructorTablePtr_->end())
        {
            FatalIOErrorIn
            (
                "PointPatchField<Type>::"
                "New(const pointPatch&, const Field<Type>&, const dictionary&)",
                dict
            )   << "Unknown patchField type " << patchFieldType
                << " for patch type " << p.type() << nl << nl
                << "Valid patchField types are :" << endl
                << dictionaryConstructorTablePtr_->sortedToc()
                << exit(FatalIOError);
        }
    }

    // Construct (but not necesarily returned)
    autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF, dict));

    if
    (
       !dict.found("patchType")
     || word(dict.lookup("patchType")) != p.type()
    )
    {
        if (pfPtr().constraintType() == p.constraintType())
        {
            // Compatible (constraint-wise) with the patch type
            return pfPtr;
        }
        else
        {
            // Use default constraint type
            typename dictionaryConstructorTable::iterator patchTypeCstrIter
                = dictionaryConstructorTablePtr_->find(p.type());

            if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
            {
                FatalIOErrorIn
                (
                    "PointPatchField<Type>const pointPatch&, "
                    "const Field<Type>&, const dictionary&)",
                    dict
                )   << "inconsistent patch and patchField types for \n"
                    << "    patch type " << p.type()
                    << " and patchField type " << patchFieldType
                    << exit(FatalIOError);
            }

            return patchTypeCstrIter()(p, iF, dict);
        }
    }

    return cstrIter()(p, iF, dict);
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:81,代码来源:pointPatchFieldNew.C



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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