diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C index 7714d038daa27ec43bf7e98a4df7efe425da0a47..377a36d4550de36beab35edd85ab8f01230af576 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C @@ -87,15 +87,12 @@ Foam::boxToCell::boxToCell topoSetSource(mesh), bbs_() { - if (dict.found("box")) + // Look for 'boxes' or 'box' + if (!dict.readIfPresent("boxes", bbs_)) { bbs_.resize(1); dict.readEntry("box", bbs_.first()); } - else - { - dict.readEntry("boxes", bbs_); - } } diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H index 7360bd0e90a093fd81286819ec0e33d13b565721..ce69cda4eb641834a7508d55b1f2695439d684ff 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H @@ -29,13 +29,14 @@ Description \heading Dictionary parameters \table - Property | Description | Required | Default - box | A single bounding box | partly | - boxes | Multiple bounding boxes | partly | + Property | Description | Required | Default + box | A single bounding box | partly | + boxes | Multiple bounding boxes | partly | \endtable Note - Must specify either "box" or "boxes" + Must specify either "box" or "boxes". + The selection of multiple boxes has precedence. SourceFiles boxToCell.C diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C index c589fcecb060d2043ba33fb9afd2e9fb352d519f..2c388468c60e477e0d82bc804706030e56fc4c18 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C @@ -87,15 +87,12 @@ Foam::boxToFace::boxToFace topoSetSource(mesh), bbs_() { - if (dict.found("box")) + // Look for 'boxes' or 'box' + if (!dict.readIfPresent("boxes", bbs_)) { bbs_.resize(1); dict.readEntry("box", bbs_.first()); } - else - { - dict.readEntry("boxes", bbs_); - } } diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.H b/src/meshTools/sets/faceSources/boxToFace/boxToFace.H index 6a9bc01cea769e7f330464dd7ac64d49900a4311..96c17c4e839e4c89e687f8db361e6641f5531826 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.H +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.H @@ -29,13 +29,14 @@ Description \heading Dictionary parameters \table - Property | Description | Required | Default - box | A single bounding box | partly | - boxes | Multiple bounding boxes | partly | + Property | Description | Required | Default + box | A single bounding box | partly | + boxes | Multiple bounding boxes | partly | \endtable Note - Must specify either "box" or "boxes" + Must specify either "box" or "boxes". + The selection of multiple boxes has precedence. SourceFiles boxToFace.C diff --git a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C index b907152dcc5735d1aad7ec98d62d5f2de85547a5..3987f7373a8c690c1930c2fe34f22ee415068962 100644 --- a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C +++ b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C @@ -87,15 +87,12 @@ Foam::boxToPoint::boxToPoint topoSetSource(mesh), bbs_() { - if (dict.found("box")) + // Look for 'boxes' or 'box' + if (!dict.readIfPresent("boxes", bbs_)) { bbs_.resize(1); dict.readEntry("box", bbs_.first()); } - else - { - dict.readEntry("boxes", bbs_); - } } diff --git a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.H b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.H index 474c1538ffc04ac9ff9138996a2c3bfe6bd80acb..545418f257d4d8df81ef19972ef05556d5a11eab 100644 --- a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.H +++ b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.H @@ -29,13 +29,14 @@ Description \heading Dictionary parameters \table - Property | Description | Required | Default - box | A single bounding box | partly | - boxes | Multiple bounding boxes | partly | + Property | Description | Required | Default + box | A single bounding box | partly | + boxes | Multiple bounding boxes | partly | \endtable Note - Must specify either "box" or "boxes" + Must specify either "box" or "boxes". + The selection of multiple boxes has precedence. SourceFiles boxToPoint.C