Commit 9b662e70 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: fvMeshSubset improvements (issue #951)

- what was previously termed 'setLargeCellSubset()' is now simply
  'setCellSubset()' and supports memory efficient interfaces.

  The new parameter ordering avoids ambiguities caused by default
  parameters.

  Old parameter order:

      setLargeCellSubset
      (
          const labelList& region,
          const label currentRegion,
          const label patchID = -1,
          const bool syncCouples = true
      );

  New parameter order:

      setCellSubset
      (
          const label regioni,
          const labelUList& regions,
          const label patchID = -1,
          const bool syncCouples = true
      );

   And without ambiguity:

      setCellSubset
      (
          const labelUList& selectedCells,
          const label patchID = -1,
          const bool syncCouples = true
      );

- support bitSet directly for specifying the selectedCells for
  memory efficiency and ease of use.

- Additional constructors to perform setCellSubset() immediately,
  which simplifies coding.

  For example,

      meshParts.set
      (
          zonei,
          new fvMeshSubset(mesh, selectedCells)
      );

  Or even

      return autoPtr<fvMeshSubset>::New(mesh, selectedCells);
parent 208953f5
......@@ -423,8 +423,7 @@ void Foam::vtkPVFoam::convertMeshCellZones()
if (!vtkgeom)
{
fvMeshSubset subsetter(mesh);
subsetter.setLargeCellSubset(zMesh[zoneId]);
fvMeshSubset subsetter(mesh, zMesh[zoneId]);
vtkgeom = vtuData.subset(subsetter, this->decomposePoly_);
}
......@@ -490,8 +489,7 @@ void Foam::vtkPVFoam::convertMeshCellSets()
if (!vtkgeom)
{
fvMeshSubset subsetter(mesh);
subsetter.setLargeCellSubset(cellSet(mesh, partName));
fvMeshSubset subsetter(mesh, cellSet(mesh, partName));
vtkgeom = vtuData.subset(subsetter, this->decomposePoly_);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment