Union Class Reference

A zoneGenerator which selects all the elements from the zones generated by the given list of zoneGenerators. More...

Inheritance diagram for Union:
Collaboration diagram for Union:

Public Member Functions

 TypeName ("union")
 Runtime type information. More...
 
 Union (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~Union ()
 Destructor. More...
 
virtual zoneSet generate () const
 Generate and return the zoneSet. More...
 
- Public Member Functions inherited from zoneGenerator
 TypeName ("zoneGenerator")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, zoneGenerator, dictionary,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
 
 zoneGenerator (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from name, polyMesh and dictionary. More...
 
 zoneGenerator (const zoneGenerator &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~zoneGenerator ()
 Destructor. More...
 
const wordname () const
 
const wordzoneName () const
 
bool moveUpdate () const
 Return true if the zoneGenerator updates any of the zones. More...
 
virtual zoneSet movePoints () const
 Regenerate the zoneSet following mesh point motion. More...
 
void operator= (const zoneGenerator &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

zoneSet generate (const bool diff, const bool all) const
 Generate the zoneSet for union or difference. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from zoneGenerator
static autoPtr< zoneGeneratorNew (const word &name, const polyMesh &mesh, const dictionary &dict)
 Select constructed from name, mesh and dictionary. More...
 
static autoPtr< zoneGeneratorNew (const word &name, const zoneTypes &zoneType, const polyMesh &mesh, const dictionary &dict)
 Select constructed from name, zoneType, mesh and dictionary. More...
 
static autoPtr< zoneGeneratorNew (const polyMesh &mesh, const dictionary &dict)
 Select constructed from mesh and first valid dictionary. More...
 
static labelList indices (const boolList &selected)
 Return the list of selected indices. More...
 
- Protected Attributes inherited from zoneGenerator
const word name_
 Name of zone generator. More...
 
const dictionary dict_
 Dictionary cached for error context. More...
 
const word zoneName_
 Name of the zone (defaults to the name of the generator) More...
 
const polyMeshmesh_
 Reference to the polyMesh. More...
 
bool moveUpdate_
 Switch to update the zones if the mesh points are moved. More...
 

Detailed Description

A zoneGenerator which selects all the elements from the zones generated by the given list of zoneGenerators.

A union of faceZones is oriented only if ALL the faceZones combined are oriented, otherwise the returned faceZone is unoriented.

Usage
Property Description Required Default value
type Type: union yes
name Name of the zone no zoneGenerator name
zoneType Type of zone no all the zone types
moveUpdate Switch to update after mesh motion no false
These options are followed by a list of any number of zoneGenerators which can either generate the zones locally or return zones from the lists of zones held by the mesh using the zoneGenerators::lookup zoneGenerator.

Each zoneGenerator returns a zoneSet containing a pointZone and/or a cellZone and/or a faceZone, the zoneGenerators::Union operation combines each of the zone types unless the zoneType is specified in which case only the zones of that type are combined.

A cellZone named coneAndAnnulus containing the cells with centres inside the union of the predefined cone1 cellZone which is looked-up from the cellZoneList and the locally defined annulus is be generated by

        coneAndAnnulus
        {
            type        union;

            cone1;

            annulus1
            {
                type        annulus;
                zoneType    cell;

                point1      (-0.0075 0 -1);
                point2      (-0.003 0.0025 1);
                outerRadius 0.002;
                innerRadius 0.001;
            }
        }
See also
zoneGenerators::difference zoneGenerators::intersection zoneGeneratorList
Source files

Definition at line 124 of file union.H.

Constructor & Destructor Documentation

◆ Union()

Union ( const word name,
const polyMesh mesh,
const dictionary dict 
)

Construct from dictionary.

Definition at line 218 of file union.C.

References Foam::all.

◆ ~Union()

~Union ( )
virtual

Destructor.

Definition at line 236 of file union.C.

Member Function Documentation

◆ generate() [1/2]

Foam::zoneSet generate ( const bool  diff,
const bool  all 
) const
protected

Generate the zoneSet for union or difference.

optionally initialising all the points and/or cells and/or faces

Definition at line 75 of file union.C.

References Foam::all, Foam::cell, List< T >::clear(), zoneSet::cValid(), zoneSet::cZone(), Foam::diff(), Foam::endl(), Foam::face, faceZone::flipMap(), forAll, zoneSet::fValid(), zoneSet::fZone(), Zone< ZoneType, ZonesType >::name(), faceZone::oriented(), Foam::point, zoneSet::pValid(), zoneSet::pZone(), List< T >::setSize(), List< T >::size(), and WarningInFunction.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "union"  )

Runtime type information.

◆ generate() [2/2]

Foam::zoneSet generate ( ) const
virtual

Generate and return the zoneSet.

Implements zoneGenerator.

Reimplemented in invert, and difference.

Definition at line 242 of file union.C.

Referenced by difference::generate(), and invert::generate().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: