Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. declareRunTimeSelectionTable在基类中可否同时调用两个?

declareRunTimeSelectionTable在基类中可否同时调用两个?

已定时 已固定 已锁定 已移动 OpenFOAM
1 帖子 1 发布者 1.3k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 吴 离线
    吴 离线
    吴优
    写于 最后由 编辑
    #1

    各位前辈好,我最近准备从其他版本移植一个动网格功能时发现新旧版本之间motionSolver类在调用declareRunTimeSelectionTable函数时存在不同,旧版本中argList使用了Istream,新版本改为了Iodictionary。这导致旧版本的派生类移植到新版本遇到问题,如果直接改新版本的话又会导致其他派生类出现问题。因此可否在基类motionSolver中调用两次declareRunTimeSelectionTable,argList分别使用Istream和Iodictionary?
    事实上我在polyPatch.H中看到了调用两个declareRunTimeSelectionTable的例子:

    TypeName("patch");
    
        //- Debug switch to disallow the use of genericPolyPatch
        static int disallowGenericPolyPatch;
    
    
        // Declare run-time constructor selection tables
    
            declareRunTimeSelectionTable
            (
                autoPtr,
                polyPatch,
                word,
                (
                    const word& name,
                    const label size,
                    const label start,
                    const label index,
                    const polyBoundaryMesh& bm,
                    const word& patchType
                ),
                (name, size, start, index, bm, patchType)
            );
    
            declareRunTimeSelectionTable
            (
                autoPtr,
                polyPatch,
                dictionary,
                (
                    const word& name,
                    const dictionary& dict,
                    const label index,
                    const polyBoundaryMesh& bm,
                    const word& patchType
                ),
                (name, dict, index, bm, patchType)
            );
    

    但是不清楚是否是为了实现上述的功能?

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]