ENH: make sourceInfo sub-dictionary optional for topoSet (#1060)

- helps reduce clutter in the topoSetDict files.

  Caveats when using this.

  The older specification styles using "name" will conflict with the
  set name. Eg,

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        sourceInfo
        {
            name   inlet;
        }
    }

    would flattened to the following
    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        name   inlet;
    }
    which overwrites the "name" used for the faceSet.

    The solution is to use the updated syntax:

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        patch   inlet;
    }
This commit is contained in:
Mark Olesen
2018-11-07 10:33:36 +01:00
parent 6090faedef
commit 5f556ffb4a
120 changed files with 612 additions and 1851 deletions

View File

@ -22,10 +22,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 -0.2)(100 100 100);
}
box (-100 -100 -0.2)(100 100 100);
}
{
@ -33,11 +30,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
{
@ -51,11 +45,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -65,10 +56,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.32 -100 -100)(100 100 100);
}
box (-0.32 -100 -100)(100 100 100);
}
{
@ -76,11 +64,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
{
@ -94,11 +79,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -108,11 +90,8 @@ actions
type cellSet;
action new;
source sphereToCell;
sourceInfo
{
origin (-0.3 -0.3 -0.3);
radius 0.4;
}
origin (-0.3 -0.3 -0.3);
radius 0.4;
}
{
@ -120,11 +99,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set sp;
option all;
}
set sp;
option all;
}
{
@ -138,11 +114,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set sp;
option all;
}
set sp;
option all;
}
);

View File

@ -139,8 +139,8 @@ FoamFile
// source fieldToCell;
// {
// field U; // Note: uses mag(U) since volVectorField
// min 0.1;
// max 0.5;
// min 0.1;
// max 0.5;
// }
//
// // Mesh region (non-face connected part of (subset of)mesh)
@ -204,7 +204,7 @@ FoamFile
// // Faces with normal to within certain angle aligned with vector.
// source normalToFace;
// {
// normal (0 0 1); // Vector
// normal (0 0 1); // Vector
// cos 0.01; // Tolerance (max cos of angle)
// }
//
@ -222,15 +222,15 @@ FoamFile
// // Select based on cellSet
// source cellToPoint;
// {
// set c0;
// option all; // all points of cell
// set c0;
// option all; // all points of cell
// }
//
// // Select based on faceSet
// source faceToPoint;
// {
// set f0; // name of faceSet
// option all; // all points of face
// set f0; // name of faceSet
// option all; // all points of face
// }
//
// // Select by explicitly providing point labels
@ -304,7 +304,7 @@ actions
name background;
type cellSet;
action new;
source surfaceToCell;
source surfaceToCell;
sourceInfo
{
file "constant/triSurface/flange.obj";

View File

@ -26,10 +26,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 $zSlice)(100 100 100);
}
box (-100 -100 $zSlice)(100 100 100);
}
{
@ -37,11 +34,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
{
@ -55,11 +49,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -69,10 +60,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 $ySlice -100)(100 100 100);
}
box (-100 $ySlice -100)(100 100 100);
}
{
@ -80,11 +68,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set y;
option all;
}
set y;
option all;
}
{
@ -98,11 +83,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set y;
option all;
}
set y;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -112,10 +94,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box ($xSlice -100 -100)(100 100 100);
}
box ($xSlice -100 -100)(100 100 100);
}
{
@ -123,11 +102,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
{
@ -141,11 +117,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
);

View File

@ -22,10 +22,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 0)(100 100 100);
}
box (-100 -100 0)(100 100 100);
}
{
@ -33,11 +30,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
{
@ -51,11 +45,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set z;
option all;
}
set z;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -65,10 +56,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.1 -100)(100 100 100);
}
box (-100 0.1 -100)(100 100 100);
}
{
@ -76,11 +64,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set y;
option all;
}
set y;
option all;
}
{
@ -94,11 +79,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set y;
option all;
}
set y;
option all;
}
// ~~~~~~~~~~~~~~~~ //
@ -108,10 +90,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.3 -100 -100)(100 100 100);
}
box (0.3 -100 -100)(100 100 100);
}
{
@ -119,11 +98,8 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
{
@ -137,11 +113,8 @@ actions
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set x;
option all;
}
set x;
option all;
}
);

View File

@ -23,20 +23,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (1.5 -10 -10) (2 10 10);
}
box (1.5 -10 -10) (2 10 10);
}
{
name filter;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set filterCells;
}
set filterCells;
}
@ -45,40 +39,28 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-10 -10 -10) (1.5 10 10);
}
box (-10 -10 -10) (1.5 10 10);
}
{
name leftFluid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftFluidCells;
}
set leftFluidCells;
}
{
name rightFluidCells;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (2 -1 -1) (10 10 10);
}
box (2 -1 -1) (10 10 10);
}
{
name rightFluid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightFluidCells;
}
set rightFluidCells;
}
@ -88,22 +70,16 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set filterCells;
option all;
}
set filterCells;
option all;
}
{
name cycLeftFaces;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set leftFluidCells;
option all;
}
set leftFluidCells;
option all;
}
// Create faceZone from cycLeft
{
@ -111,10 +87,7 @@ actions
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet cycLeftFaces; // name of faceSet
}
faceSet cycLeftFaces; // name of faceSet
}
// cycRight
@ -123,22 +96,16 @@ actions
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set filterCells;
option all;
}
set filterCells;
option all;
}
{
name cycRightFaces;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set rightFluidCells;
option all;
}
set rightFluidCells;
option all;
}
// Create faceZone from cycRight
{
@ -146,10 +113,7 @@ actions
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet cycRightFaces; // name of faceSet
}
faceSet cycRightFaces; // name of faceSet
}
);

View File

@ -21,13 +21,10 @@ actions
name range1;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 13.36;
max 18.47;
}
source fieldToCell;
field radiusFieldXY;
min 13.36;
max 18.47;
}
);

View File

@ -21,13 +21,10 @@ actions
name range1;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 7.00;
max 18.47;
}
source fieldToCell;
field radiusFieldXY;
min 7.0;
max 18.47;
}
);

View File

@ -21,13 +21,10 @@ actions
name range1;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 3.67;
max 18.47;
}
source fieldToCell;
field radiusFieldXY;
min 3.67;
max 18.47;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier1;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 0.64;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 0.64;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier2;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 1.03;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 1.03;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier3;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 1.94;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 1.94;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier4;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 3.67;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 3.67;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier5;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 7.00;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 7.0;
}
);

View File

@ -21,13 +21,10 @@ actions
name tier6;
type cellSet;
action new;
source fieldToCell;
sourceInfo
{
field radiusFieldXY;
min 0.0;
max 13.36;
}
source fieldToCell;
field radiusFieldXY;
min 0;
max 13.36;
}
);

View File

@ -23,31 +23,22 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100e-3 -100e-3 -100e-3) (2e-3 100e-3 100e-3);
}
box (-100e-3 -100e-3 -100e-3) (2e-3 100e-3 100e-3);
}
{
name A;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (1.999e-3 -100e-3 -100e-3) (2.001e-3 100e-3 100e-3);
}
box (1.999e-3 -100e-3 -100e-3) (2.001e-3 100e-3 100e-3);
}
{
name A;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet A; // name of faceSet
cellSet leftA; // name of cellSet of slave side
}
faceSet A; // name of faceSet
cellSet leftA; // name of cellSet of slave side
}
@ -57,31 +48,22 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100e-3 -100e-3 -100e-3) (8e-3 100e-3 100e-3);
}
box (-100e-3 -100e-3 -100e-3) (8e-3 100e-3 100e-3);
}
{
name B;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (7.999e-3 -100e-3 -100e-3) (8.001e-3 100e-3 100e-3);
}
box (7.999e-3 -100e-3 -100e-3) (8.001e-3 100e-3 100e-3);
}
{
name B;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet B; // name of faceSet
cellSet leftB; // name of cellSet of slave side
}
faceSet B; // name of faceSet
cellSet leftB; // name of cellSet of slave side
}
);

View File

@ -22,13 +22,10 @@ actions
type cellSet;
action new;
source regionToCell;
sourceInfo
{
insidePoints
(
(0.99 0.99 0.99)
);
}
insidePoints
(
(0.99 0.99 0.99)
);
}
{
@ -36,10 +33,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-1 -1 -1)(0.5 0.5 0.5);
}
box (-1 -1 -1)(0.5 0.5 0.5);
}
{
@ -47,10 +41,7 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set corner;
}
set corner;
}
{
@ -58,10 +49,7 @@ actions
type cellSet;
action subtract;
source cellToCell;
sourceInfo
{
set outer;
}
set outer;
}
{
@ -69,10 +57,7 @@ actions
type cellSet;
action subtract;
source cellToCell;
sourceInfo
{
set corner;
}
set corner;
}
{
@ -86,20 +71,14 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set outer;
}
set outer;
}
{
name final;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set inner;
}
set inner;
}
);

View File

@ -19,10 +19,7 @@ newFromPatch
type faceSet;
action new;
source patchToFace;
sourceInfo
{
patch outer;
}
patch outer;
}
subsetNormal
@ -30,10 +27,7 @@ subsetNormal
type faceSet;
action subset;
source normalToFace;
sourceInfo
{
cos 0.1;
}
cos 0.1;
}
actions
@ -47,10 +41,7 @@ actions
{
name outerx;
$subsetNormal;
sourceInfo
{
normal (-1 0 0);
}
normal (-1 0 0);
}
// outery
@ -62,10 +53,7 @@ actions
{
name outery;
$subsetNormal;
sourceInfo
{
normal (0 -1 0);
}
normal (0 -1 0);
}
// outerz
@ -77,10 +65,7 @@ actions
{
name outerz;
$subsetNormal;
sourceInfo
{
normal (0 0 -1);
}
normal (0 0 -1);
}
);