内存问题?



  • 在运行某Foam的时候,出现这样的错误:

    new cannot satisfy memory request.
    This does not necessarily mean you have run out of virtual memory.
    It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library

    这个是啥原因呢?


  • 版主

    应该是内存不够吧



  • @wwzhao 不是,我程序中有一句写的不对

    const vectorField& Cf = patch.Cf()/delta1VD;
    
    vectorField meanVelocity(Cf.size());
    

    我改成:

    vectorField Cf = patch.Cf()/delta1VD;
    vectorField meanVelocity(Cf.size());
    

    或者

    tmp<vectorField> tCf =  patch.Cf()/delta1VD;
    const vectorField& Cf = tCf();
    vectorField meanVelocity(Cf.size());
    

    就可以了


登录后回复
 

与 CFD 中国 的连接断开,我们正在尝试重连,请耐心等待