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. foam-extend-4.0 移植重叠网格 wmake编译报错

foam-extend-4.0 移植重叠网格 wmake编译报错

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

    由于特殊原因需要将fe41中的src/overset和求解器植入fe40。

    目前已经完成src/overset目录下两个文件夹:oversetDynamicFvMesh和oversetMesh的编译,至少wmake libso没有报错。
    然而,在编译pimpleDyMOversetFoam求解器时,报错:

    Making dependency list for source file pimpleDyMOversetFoam.C
    could not open file crMatrix.H for source file pimpleDyMOversetFoam.C
    SOURCE=pimpleDyMOversetFoam.C ;  g++-5 -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/gunther/foam/foam-extend-4.0/src/dynamicMesh/dynamicFvMesh/lnInclude     -I/home/gunther/foam/foam-extend-4.0/src/dynamicMesh/dynamicMesh/lnInclude     -I/home/gunther/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/gunther/foam/foam-extend-4.0/src/turbulenceModels/incompressible/turbulenceModel     -I/home/gunther/foam/foam-extend-4.0/src/transportModels     -I/home/gunther/foam/foam-extend-4.0/src/transportModels/incompressible/singlePhaseTransportModel     -I/home/gunther/foam/foam-extend-4.0/src/finiteVolume/lnInclude     -I/home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude     -I/home/gunther/foam/gunther-4.0/src/overset/oversetDynamicFvMesh/lnInclude -IlnInclude -I. -I/home/gunther/foam/foam-extend-4.0/src/foam/lnInclude -I/home/gunther/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleDyMOversetFoam.o
    In file included from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatch.H:39:0,
                     from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatchField.H:40,
                     from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatchFields.H:29,
                     from pimpleDyMOversetFoam.C:43:
    /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetLduInterface.H:44:22: fatal error: crMatrix.H: No such file or directory
    compilation terminated.
    pimpleDyMOversetFoam.dep:796: recipe for target 'Make/linux64GccDPOpt/pimpleDyMOversetFoam.o' failed
    make: *** [Make/linux64GccDPOpt/pimpleDyMOversetFoam.o] Error 1
    

    但是我在oversetLduInterface.H:中已经包含crMatrix.H,并且在Make/options中也包含了crMatrix.H的路径,并且在之前oversetDynamicFvMesh和oversetMesh的编译中没有报错。
    oversetMesh/Make/options内容如下:

    EXE_INC = \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
        -I$(LIB_SRC)/surfMesh/lnInclude \
        -I$(LIB_SRC)/sampling/lnInclude \
        -I$(LIB_SRC)/lduSolvers/lnInclude
    
    EXE_LIBS = \
        -lfiniteVolume \
        -lmeshTools \
        -lsurfMesh \
        -lsampling \
        -llduSolvers
    

    src/overset/oversetMesh/lnInclude/oversetLduInterface.H部分代码如下:

    \*---------------------------------------------------------------------------*/
    
    #ifndef oversetLduInterface_H
    #define oversetLduInterface_H
    
    #include "lduInterface.H"
    #include "primitiveFieldsFwd.H"
    
    #include "crMatrix.H"
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    

    跪求大佬指点,救救孩子!

    1 条回复 最后回复
  • bestucanB 离线
    bestucanB 离线
    bestucan 版主 大神
    写于 最后由 编辑
    #2

    直接把crMatrix.H的绝对路径写到EXE_INC里试试

    滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

    异步沟通方式(《posting style》from wiki)(下载后打开):
    https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
    提问的智慧(github在gitee的镜像):
    https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way

    G 1 条回复 最后回复
  • G 离线
    G 离线
    Gunther
    在 中回复了 bestucan 最后由 编辑
    #3

    @bestucan 感谢大佬!想详细了解一下,为什么我在overset的库中已经include了,但在编译solver时还需要include呀?

    bestucanB 1 条回复 最后回复
  • bestucanB 离线
    bestucanB 离线
    bestucan 版主 大神
    在 中回复了 Gunther 最后由 编辑
    #4

    @Gunther 已经include?你是说在源代码里写的包含头文件那句代码?

    你知道那个文件在哪,但是gcc不知道,所以得在options里写明,头文件的位置,和库文件的位置。

    头文件可以让gcc知道有哪些函数可用,头文件一般都是函数声明。库文件定义函数如何运行。所以位置都得指明。

    那些个IDE有的设定好了,把这些细节藏起来了。


    至于为什么你的options文件没有发挥作用,我看你也没把overset的头文件写进包含里呀,具体怎么写不知道,但大概应该像这个的最后一行,地址不一定对,那你觉得你之前的option文件里,第几行包含了overset的头文件呢?

    EXE_INC = \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
        -I$(LIB_SRC)/surfMesh/lnInclude \
        -I$(LIB_SRC)/sampling/lnInclude \
        -I$(LIB_SRC)/lduSolvers/lnInclude \
        -I$(LIB_SRC)/overset/lnInclude
    
    

    滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

    异步沟通方式(《posting style》from wiki)(下载后打开):
    https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
    提问的智慧(github在gitee的镜像):
    https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way

    G 李东岳李 2 条回复 最后回复
  • G 离线
    G 离线
    Gunther
    在 中回复了 bestucan 最后由 编辑
    #5

    @bestucan 大佬你好!感谢你的耐心解答,options那里我拿用绝对路径写就通过编译了。

    @bestucan 在 foam-extend-4.0 移植重叠网格 wmake编译报错 中说:

    你知道那个文件在哪,但是gcc不知道,所以得在options里写明,头文件的位置,和库文件的位置。

    这句话十分受用,感谢感谢!

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 bestucan 最后由 编辑
    #6

    @bestucan :146: :146: :146:

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复

  • 登录

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