/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    // EB: Create a new full cylinder named "cylinder1"
    {
        name    cylinder1;
        type    cellSet;
        action  new;
        source cylinderToCell;
        sourceInfo
	{
       	    p1       (297 98 20); // start point on cylinder axis
       	    p2       (297 98 3707);   // end point on cylinder axis
       	    radius   60.0; 
    	}
    }

    // EB: Get all faces in the cellSet 'cylinder1'
    //     and give them the name "inlet1"
    {
        name    inlet1;
        type    faceSet;
        action  new;
        source  cellToFace;
        sourceInfo
        {
            set     cylinder1;
            option  all;
        }
    }
    
    // EB: Intersect the faces 'inlet1' with the specific path belonging
    //     to the mesh construction called 'terrain'
     {
        name inlet1;
        type faceSet;
        action subset;
        source patchToFace;
        sourceInfo
        {
            patch "terrain";
        }
    }

    // EB: all the cells belonging to 'cylinder1' are deleted
    {
        name cylinder1;
        type cellSet;
        action remove;
    }
    
    // EB: inspired by
    // https://www.cfd-online.com/Forums/openfoam-pre-processing/198067-creating-circular-inlet-square-face.html    
);

// ************************************************************************* //
