diff --git a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C index 352e884ee2..f080b56643 100644 --- a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C +++ b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C @@ -59,7 +59,7 @@ Foam::scalar Foam::shapeToCell::featureCos = Foam::cos(degToRad(10.0)); void Foam::shapeToCell::combine(topoSet& set, const bool add) const { - if (type_ == "splitHex") + if (shape_ == "splitHex") { for (label celli = 0; celli < mesh_.nCells(); ++celli) { @@ -73,7 +73,7 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const } else { - const cellModel& wantedModel = cellModel::ref(type_); + const cellModel& wantedModel = cellModel::ref(shape_); const cellShapeList& cellShapes = mesh_.cellShapes(); @@ -97,12 +97,12 @@ Foam::shapeToCell::shapeToCell ) : topoSetCellSource(mesh), - type_(shapeName) + shape_(shapeName) { - if (!cellModel::ptr(type_) && type_ != "splitHex") + if (!cellModel::ptr(shape_) && shape_ != "splitHex") { FatalErrorInFunction - << "Illegal cell type " << type_ << exit(FatalError); + << "Illegal cell shape " << shape_ << exit(FatalError); } } @@ -113,7 +113,7 @@ Foam::shapeToCell::shapeToCell const dictionary& dict ) : - shapeToCell(mesh, dict.get("type")) + shapeToCell(mesh, dict.getCompat("shape", {{"type", 1806}})) {} @@ -124,12 +124,12 @@ Foam::shapeToCell::shapeToCell ) : topoSetCellSource(mesh), - type_(checkIs(is)) + shape_(checkIs(is)) { - if (!cellModel::ptr(type_) && type_ != "splitHex") + if (!cellModel::ptr(shape_) && shape_ != "splitHex") { FatalErrorInFunction - << "Illegal cell type " << type_ << exit(FatalError); + << "Illegal cell shape " << shape_ << exit(FatalError); } } @@ -146,8 +146,7 @@ void Foam::shapeToCell::applyToSet { if (verbose_) { - Info<< " Adding all cells of type " << type_ - << " ..." << endl; + Info<< " Adding all " << shape_ << " cells ..." << endl; } combine(set, true); @@ -156,8 +155,7 @@ void Foam::shapeToCell::applyToSet { if (verbose_) { - Info<< " Removing all cells of type " << type_ - << " ..." << endl; + Info<< " Removing all " << shape_ << " cells ..." << endl; } combine(set, false); diff --git a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.H b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.H index cb53bee831..cdc097e14e 100644 --- a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.H +++ b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.H @@ -32,8 +32,9 @@ Description \heading Dictionary parameters \table - Property | Description | Required | Default - type | The cell model type (hex, ..) | yes | + Property | Description | Required | Default + shape | The cell model (hex, ..) | yes | + type | Older specification for 'shape' | no | \endtable SourceFiles @@ -65,8 +66,8 @@ class shapeToCell //- Add usage string static addToUsageTable usage_; - //- Name of cell type - word type_; + //- Name of cell shape/type + word shape_; // Private Member Functions