在src\overset\cellCellStencil\cellCellStencil.C中
Foam::autoPtr<Foam::cellCellStencil> Foam::cellCellStencil::New
(
const fvMesh& mesh,
const dictionary& dict,
const bool update
)
{
DebugInFunction << "Constructing cellCellStencil" << endl;
const word stencilType(dict.get<word>("method"));
auto cstrIter = meshConstructorTablePtr_->cfind(stencilType);
if (!cstrIter.found())
{
FatalIOErrorInLookup
(
dict,
"cellCellStencil",
stencilType,
*meshConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<cellCellStencil>(cstrIter()(mesh, dict, update));
}
这段代码读取了fvSchemes里oversetInterpolation里的method信息并且在最后构造了cellCellStencil对象。
在oversetSrc\cellCellStencil\inverseDistance.C中
Foam::cellCellStencils::inverseDistance::inverseDistance
(
const fvMesh& mesh,
const dictionary& dict,
const bool doUpdate
)
:
cellCellStencil(mesh),
dict_(dict),
smallVec_(Zero),
cellTypes_(labelList(mesh.nCells(), CALCULATED)),
interpolationCells_(0),
cellInterpolationMap_(),
cellStencil_(0),
cellInterpolationWeights_(0),
cellInterpo

本文解析了C++代码中关于`cellCellStencil`的构造过程,重点介绍了`inverseDistance`子类的构造方法,以及在`dynamicOversetFvMesh`中的更新和地址计算操作。讨论了如何通过`fvMesh`和`dictionary`设置oversetInterpolation方法,并关注了非插值字段的管理和插值策略的调整。
最低0.47元/天 解锁文章
1408

被折叠的 条评论
为什么被折叠?



