119 lines
3.5 KiB
C++
119 lines
3.5 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: v2312 |
|
|
| \\ / A nd | Website: www.openfoam.com |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object topoSetDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
// The topoSetDict comprises a list of actions to perform on different
|
|
// set types (cellSet, faceSet, pointSet, etc).
|
|
//
|
|
// Each action is a dictionary with e.g.
|
|
// // Name of set
|
|
// name c0;
|
|
//
|
|
// // type: pointSet/faceSet/cellSet/faceZoneSet/cellZoneSet
|
|
// type cellSet;
|
|
//
|
|
// // action to perform on set. Two types:
|
|
// // - require no source : clear/invert/remove
|
|
// // clear : clears set or zone
|
|
// // invert : select all currently non-selected elements
|
|
// // remove : removes set or zone
|
|
// // - require source : new/add/subtract/subset
|
|
// // new : create new set or zone from source
|
|
// // add : add source to contents
|
|
// // subtract : subtract source from contents
|
|
// // subset : keeps elements both in contents and source
|
|
// action new;
|
|
//
|
|
// The source entry varies according to the type of set.
|
|
//
|
|
// In OpenFOAM 1806 and earlier, it was compulsory to use a 'sourceInfo'
|
|
// sub-dictionary to define the sources.
|
|
// In OpenFOAM 1812 and later, this sub-directory is optional, unless
|
|
// there would be a name clash (Eg, 'type' or 'name' appearing at both levels).
|
|
// In most cases, the source definitions have been adjusted to avoid such
|
|
// clashes.
|
|
//
|
|
// More detailed listing in the annotated topoSetSourcesDict
|
|
|
|
actions
|
|
(
|
|
// Example: pick up internal faces on outside of cellSet
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// Load initial cellSet
|
|
{
|
|
name c0;
|
|
type cellSet;
|
|
action new;
|
|
source labelToCell;
|
|
value (12 13 56);
|
|
}
|
|
|
|
// Get all faces in cellSet
|
|
{
|
|
name f0;
|
|
type faceSet;
|
|
action new;
|
|
source cellToFace;
|
|
set c0;
|
|
option all;
|
|
}
|
|
|
|
// Determine inverse cellSet
|
|
{
|
|
name c1;
|
|
type cellSet;
|
|
action new;
|
|
source cellToCell;
|
|
set c0;
|
|
}
|
|
{
|
|
name c1;
|
|
type cellSet;
|
|
action invert;
|
|
}
|
|
|
|
// Keep in f0 all faces in c1
|
|
{
|
|
name f0;
|
|
type faceSet;
|
|
action subset;
|
|
source cellToFace;
|
|
set c1;
|
|
option all;
|
|
}
|
|
|
|
// Example: create cellZone from geometric region
|
|
{
|
|
name c0;
|
|
type cellZoneSet;
|
|
action new;
|
|
source boxToCell;
|
|
box (0.04 0 0)(0.06 100 100);
|
|
}
|
|
|
|
// Example: create faceZone from explicit contents. Assumes faceZone same
|
|
// orientation as face (flipMap is false)
|
|
{
|
|
name f0;
|
|
type faceZoneSet;
|
|
action new;
|
|
source labelToFace;
|
|
value (2);
|
|
}
|
|
);
|
|
|
|
// ************************************************************************* //
|