lookup Class Reference

A zoneGenerator which looks-up and returns a zoneSet containing point, and/or cell and/or faces zones. More...

Inheritance diagram for lookup:
Collaboration diagram for lookup:

Public Member Functions

 TypeName ("lookup")
 Runtime type information. More...
 
 lookup (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~lookup ()
 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...
 

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 looks-up and returns a zoneSet containing point, and/or cell and/or faces zones.

Usage
Property Description Required Default value
type Type: lookup no lookup
name Name of the zone(s) no zoneGenerator name
zoneType Type of zone no all the zone types

A full specification for the zoneGenerators::lookup requires the keyword which is the name of the zoneGenerator, the type of the zoneGenerator, i.e. lookup, the name and type of the zone to be looked-up, e.g.

        <zoneGenerator name>
        {
            type        lookup;
            name        box;
            zoneType    cell;
        }

However usually the name of the zoneGenerator can be chosen to match the name of the zone to be looked-up so the name entry defaults to the zoneGenerator keyword to make the specification simpler, e.g.

        box
        {
            type        lookup;
            zoneType    cell;
        }

To further simplify the specification of the lookup, given that it will be commonly used in a zoneGenerator sequence, lookup is the default type, so the box cellZone can be looked-up with the following simple specification:

        box
        {
            zoneType    cell;
        }

If the zoneType is omitted the zoneSet returned by lookup will contain each of the three zone types corresponding to the zone name that are present in the lists of zones. Usually there will only be the one zone type of the given name so the zoneType entry can often be omitted and this form of default lookup can simply be specified as the name of the zone only, e.g.

        box;

There is a special all zone of each type generated and cached automatically by the corresponding zoneList which holds an identity map of all the points, cells or faces and is returned by lookup using the reserved zone name "all", e.g. to return the cellZone corresponding to all the cells in the mesh use:

        all
        {
            zoneType    cell;
        }
See also
zoneGenerator zoneSet zoneGeneratorList
Source files

Definition at line 136 of file lookup.H.

Constructor & Destructor Documentation

◆ lookup()

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

Construct from dictionary.

Definition at line 87 of file lookup.C.

References Foam::all.

◆ ~lookup()

~lookup ( )
virtual

Destructor.

Definition at line 104 of file lookup.C.

Member Function Documentation

◆ TypeName()

TypeName ( "lookup"  )

Runtime type information.

◆ generate()

Foam::zoneSet generate ( ) const
virtual

Generate and return the zoneSet.

Implements zoneGenerator.

Definition at line 110 of file lookup.C.

References Foam::all, Foam::cell, zoneSet::cZone(), Foam::exit(), Foam::face, Foam::FatalIOError, FatalIOErrorInFunction, found, zoneSet::fZone(), Zone< ZoneType, ZonesType >::moveUpdate(), Foam::point, and zoneSet::pZone().

Here is the call graph for this function:

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