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() ...@@ -423,8 +423,7 @@ void Foam::vtkPVFoam::convertMeshCellZones()
if (!vtkgeom) if (!vtkgeom)
{ {
fvMeshSubset subsetter(mesh); fvMeshSubset subsetter(mesh, zMesh[zoneId]);
subsetter.setLargeCellSubset(zMesh[zoneId]);
vtkgeom = vtuData.subset(subsetter, this->decomposePoly_); vtkgeom = vtuData.subset(subsetter, this->decomposePoly_);
} }
...@@ -490,8 +489,7 @@ void Foam::vtkPVFoam::convertMeshCellSets() ...@@ -490,8 +489,7 @@ void Foam::vtkPVFoam::convertMeshCellSets()
if (!vtkgeom) if (!vtkgeom)
{ {
fvMeshSubset subsetter(mesh); fvMeshSubset subsetter(mesh, cellSet(mesh, partName));
subsetter.setLargeCellSubset(cellSet(mesh, partName));
vtkgeom = vtuData.subset(subsetter, this->decomposePoly_); vtkgeom = vtuData.subset(subsetter, this->decomposePoly_);
} }
......
Supports Markdown
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