关于fvOption的一个疑问
-
103 Foam::fv::options& Foam::fv::options::New(const fvMesh& mesh) 104 { 105 if (mesh.thisDb().foundObject<options>(typeName)) 106 { 107 return const_cast<options&> 108 ( 109 mesh.lookupObject<options>(typeName) 110 ); 111 } 112 else 113 { 114 if (debug) 115 { 116 InfoInFunction 117 << "Constructing " << typeName 118 << " for region " << mesh.name() << endl; 119 } 120 121 options* objectPtr = new options(mesh); 122 regIOobject::store(objectPtr); 123 return *objectPtr; 124 } 125 }
追溯createfvOptions.h,里面用到了上述的New函数,但是小弟不太看得明白!!请求高人指点
-
@cfd-china 谢谢你的指点!!!
另外下面再补充本人查找的几个关于fvoption的链接吧
感觉里面说得比较详细。确实里面都明确提到了fvoption就是用来添加源项的
http://caefn.com/tag/openfoam/
http://www.cfd-online.com/Forums/openfoam-programming-development/130503-using-fvoptions-add-momentum-source.html
http://openfoam.org/release/2-2-0/fv-options/
http://www.sourceflux.de/blog/adding-source-terms-equations-fvoptions/