Пример #1
0
bool Foam::sampledPlane::update()
{
    if (!needsUpdate_)
    {
        return false;
    }

    sampledSurface::clearGeom();

    labelList selectedCells = mesh().cellZones().findMatching(zoneKey_).used();

    if (selectedCells.empty())
    {
        reCut(mesh(), triangulate_);
    }
    else
    {
        reCut(mesh(), triangulate_, selectedCells);
    }

    if (debug)
    {
        print(Pout);
        Pout<< endl;
    }

    needsUpdate_ = false;
    return true;
}
bool Foam::sampledPlane::update()
{
    if (!needsUpdate_)
    {
        return false;
    }

    sampledSurface::clearGeom();

    label zoneId = -1;
    if (zoneName_.size())
    {
        zoneId = mesh().cellZones().findZoneID(zoneName_);
    }

    if (zoneId < 0)
    {
        reCut(mesh());
    }
    else
    {
        reCut(mesh(), mesh().cellZones()[zoneId]);
    }

    if (debug)
    {
        print(Pout);
        Pout << endl;
    }

    needsUpdate_ = false;
    return true;
}