fsi中的ggi 插值是什么

版本为 foam-extend3.1

fluidStructureInterface 库下的 fluidStructureInterface.C 文件

void Foam::fluidStructureInterface::calcGgiInterpolator() const
{
    // Create extended ggi interpolation
    if (ggiInterpolatorPtr_)
    {
        FatalErrorIn
        (
            "void fluidStructureInterface::"
            "calcGgiInterpolator() const"
        )
            << "Ggi interpolator already exists"
                << abort(FatalError);
    }

    // Create copy of solid face zone primitive patch in current configuration

    deleteDemandDrivenData(currentSolidZonePatchPtr_);
    deleteDemandDrivenData(currentSolidZonePointsPtr_);

//     currentSolidZonePatch().movePoints(currentSolidZonePoints());

    Info << "Create extended GGI zone-to-zone interpolator" << endl;

    currentSolidZonePatch(),

    ggiInterpolatorPtr_ =
        new extendedGgiZoneInterpolation
        (
            fluidMesh().faceZones()[fluidZoneIndex_](),
            currentSolidZonePatch(),
//             solidMesh().faceZones()[solidZoneIndex_](),
            tensorField(0),
            tensorField(0),
            vectorField(0), // Slave-to-master separation. Bug fix
            0,              // Non-overlapping face tolerances
            0,              // HJ, 24/Oct/2008
            true,           // Rescale weighting factors.  Bug fix, MB.
            ggiInterpolation::AABB
            // N_SQUARED BB_OCTREE AABB THREE_D_DISTANCE
            // Octree search, MB.
        );


    Info << "Checking fluid-to-solid face interpolator" << endl;
    {
        vectorField fluidPatchFaceCentres =
            vectorField
            (
                fluidMesh().boundaryMesh()[fluidPatchIndex_].faceCentres()
            );

        vectorField fluidZoneFaceCentres
        (
            fluidMesh().faceZones()[fluidZoneIndex_].size(),
            vector::zero
        );

        const label fluidPatchStart =
            fluidMesh().boundaryMesh()[fluidPatchIndex_].start();

        forAll (fluidPatchFaceCentres, i)
        {
            fluidZoneFaceCentres
            [
                fluidMesh().faceZones()[fluidZoneIndex_].whichFace
                (
                    fluidPatchStart + i
                )
            ] =
                fluidPatchFaceCentres[i];
        }

        // Parallel data exchange: collect faceCentres field on all processors
        reduce(fluidZoneFaceCentres, sumOp<vectorField>());

        vectorField solidZoneFaceCentres =
            ggiInterpolatorPtr_->masterToSlave
            (
                fluidZoneFaceCentres
            );

        vectorField solidPatchFaceCentres
        (
            solidMesh().boundaryMesh()[solidPatchIndex_].size(),
            vector::zero
        );

        const label solidPatchStart =
            solidMesh().boundaryMesh()[solidPatchIndex_].start();

        forAll(solidPatchFaceCentres, i)
        {
            solidPatchFaceCentres[i] =
                solidZoneFaceCentres
                [
                    solidMesh().faceZones()[solidZoneIndex_]
                   .whichFace(solidPatchStart + i)
                ];
        }

        scalar maxDist = gMax
        (
            mag
            (
                solidPatchFaceCentres
              - solidMesh().boundaryMesh()[solidPatchIndex_].faceCentres()
            )
        );

        Info << "Fluid-to-solid face interpolation error: " << maxDist
            << endl;
    }

    Info << "Checking solid-to-fluid point interpolator (GGI)" << endl;
    {
        vectorField solidZonePoints_ =
            solidMesh().faceZones()[solidZoneIndex_]().localPoints();

        vectorField solidZonePoints =
            ggiInterpolatorPtr_->slaveToMasterPointInterpolate
            (
                solidZonePoints_
            );

        vectorField fluidZonePoints =
            fluidMesh().faceZones()[fluidZoneIndex_]().localPoints();

        scalar maxDist = gMax
        (
            mag
            (
                fluidZonePoints
              - solidZonePoints
            )
        );

        Info << "Solid-to-fluid point interpolation error (GGI): " << maxDist
            << endl;
    }

    Info << "Number of uncovered master faces: "
        << ggiInterpolatorPtr_->uncoveredMasterFaces().size() << endl;

    Info << "Number of uncovered slave faces: "
        << ggiInterpolatorPtr_ ->uncoveredSlaveFaces().size() << endl;
}

这个ggi插值到底是个是么算法,我不确定这个算法徐不需要,里面有涉及到流体一,我想如果要用到fsfi的话,就要复制并定义一个ggi2函数

void Foam::fluidStructureInterface::calcMinEdgeLength() const

还有这个最小边缘长度函数也是

ggiInterpolatorPtr_ 是网格 couple 的边界的处理。我认为,如果是两对 couples 的话,需要再做一个。