コード例 #1
0
ファイル: searchableBox.C プロジェクト: davidlni/OpenFOAM-dev
Foam::tmp<Foam::pointField> Foam::searchableBox::coordinates() const
{
    tmp<pointField> tCtrs = tmp<pointField>(new pointField(6));
    pointField& ctrs = tCtrs();

    const pointField pts(treeBoundBox::points());
    const faceList& fcs = treeBoundBox::faces;

    forAll(fcs, i)
    {
        ctrs[i] = fcs[i].centre(pts);
    }
コード例 #2
0
Foam::tmp<Foam::pointField> Foam::searchableCylinder::coordinates() const
{
    tmp<pointField> tCtrs(new pointField(1, 0.5*(point1_ + point2_)));

    return tCtrs;
}