ENH: distinguish between cell/face/point topoSetSource (#1060)

- add intermediate classes topoSetCellSource, topoSetFaceSource,
  topoSetPointSource and corresponding New() factories
This commit is contained in:
Mark Olesen
2018-10-30 12:01:36 +00:00
parent 9a87a043d6
commit 9b638f9a71
97 changed files with 1756 additions and 741 deletions

View File

@ -38,6 +38,22 @@ namespace Foam
defineTypeNameAndDebug(fieldToCell, 0);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, word);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, istream);
addToRunTimeSelectionTable(topoSetCellSource, fieldToCell, word);
addToRunTimeSelectionTable(topoSetCellSource, fieldToCell, istream);
addNamedToRunTimeSelectionTable
(
topoSetCellSource,
fieldToCell,
word,
field
);
addNamedToRunTimeSelectionTable
(
topoSetCellSource,
fieldToCell,
istream,
field
);
}
@ -100,7 +116,7 @@ Foam::fieldToCell::fieldToCell
const scalar max
)
:
topoSetSource(mesh),
topoSetCellSource(mesh),
fieldName_(fieldName),
min_(min),
max_(max)
@ -113,10 +129,13 @@ Foam::fieldToCell::fieldToCell
const dictionary& dict
)
:
topoSetSource(mesh),
fieldName_(dict.get<word>("field")),
min_(dict.get<scalar>("min")),
max_(dict.get<scalar>("max"))
fieldToCell
(
mesh,
dict.get<word>("field"),
dict.get<scalar>("min"),
dict.get<scalar>("max")
)
{}
@ -126,7 +145,7 @@ Foam::fieldToCell::fieldToCell
Istream& is
)
:
topoSetSource(mesh),
topoSetCellSource(mesh),
fieldName_(checkIs(is)),
min_(readScalar(checkIs(is))),
max_(readScalar(checkIs(is)))