volume Class Referenceabstract

Abstract zoneGenerator which selects points, cells or faces with centres either inside a volume. More...

Inheritance diagram for volume:
Collaboration diagram for volume:

Public Member Functions

 volume (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~volume ()
 Destructor. More...
 
virtual zoneSet generate () const =0
 Generate and return the zoneSet. More...
 
template<class ZoneType , class UnaryOp , class ZoneGenType >
Foam::labelList select (const ZoneGenType &zoneGen, const vectorField &pts, const UnaryOp &uop) const
 
template<class ZoneType , class UnaryOp , class ZoneGenType >
Foam::labelList select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, const UnaryOp &uop) const
 
template<class ZoneType , class ZoneGenType >
Foam::labelList selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts) const
 
template<class UnaryOp , class ZoneGenType >
Foam::labelList select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap, const UnaryOp &uop) const
 
template<class ZoneGenType >
Foam::labelList selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap) const
 
template<class ZoneGenType >
Foam::zoneSet generate (const ZoneGenType &zoneGen) const
 
- 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 Types

enum class  selection { inside , outside }
 Enumeration for inside/outside selection. More...
 

Protected Member Functions

template<class ZoneType , class UnaryOp , class ZoneGenType >
labelList select (const ZoneGenType &zoneGen, const vectorField &pts, const UnaryOp &uop) const
 
template<class ZoneType , class UnaryOp , class ZoneGenType >
labelList select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, const UnaryOp &uop) const
 
template<class ZoneType , class ZoneGenType >
labelList selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts) const
 
template<class UnaryOp , class ZoneGenType >
labelList select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap, const UnaryOp &uop) const
 
template<class ZoneGenType >
labelList selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap) const
 
template<class ZoneGenType >
zoneSet generate (const ZoneGenType &zone) const
 Generate the zone of the given type. More...
 

Static Protected Member Functions

static NamedEnum< selection, 2 >::namesType selectionNames_ ()
 Initialisation function for selection enumeration names. More...
 

Protected Attributes

zoneTypes zoneType_
 
selection select_
 Inside/outside selection. More...
 
zoneGeneratorList zoneGenerators_
 Optional list of zoneGenerators which provide the zones to sub-set. 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...
 

Static Protected Attributes

static const NamedEnum< selection, 2 > selectionNames
 Enumeration names for inside/outside selection. 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...
 

Detailed Description

Abstract zoneGenerator which selects points, cells or faces with centres either inside a volume.

By default all the points, cells or faces of the mesh are tested for being inside or outside the volume but an optional single zone or list of zones may be provided and those points, cells or faces are tested instead. This provides an efficient method of hierarchical sub-division of space where an initial selection of points cells or faces is refined by selecting the sub-set inside or outside the given volume rather than having to generate another zone to intersect with.

Usage
Property Description Required Default value
type Type of volume yes
name Name of the zone no zoneGenerator name
zoneType Type of zone yes
select Select either the inside or outside no inside
moveUpdate Switch to update after mesh motion no false
zone Optional zone to sub-set no
zones Optional list of zones to sub-set no
Source files

Definition at line 111 of file volume.H.

Member Enumeration Documentation

◆ selection

enum selection
strongprotected

Enumeration for inside/outside selection.

Enumerator
inside 
outside 

Definition at line 122 of file volume.H.

Constructor & Destructor Documentation

◆ volume()

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

Construct from dictionary.

Definition at line 36 of file volume.C.

◆ ~volume()

~volume ( )
virtual

Destructor.

Definition at line 52 of file volume.C.

Member Function Documentation

◆ selectionNames_()

static NamedEnum<selection, 2>::namesType selectionNames_ ( )
inlinestaticprotected

Initialisation function for selection enumeration names.

Definition at line 128 of file volume.H.

◆ select() [1/6]

labelList select ( const ZoneGenType &  zoneGen,
const vectorField pts,
const UnaryOp &  uop 
) const
protected

◆ select() [2/6]

labelList select ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
const UnaryOp &  uop 
) const
protected

◆ selectOp() [1/4]

labelList selectOp ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts 
) const
protected

◆ select() [3/6]

labelList select ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
boolList flipMap,
const UnaryOp &  uop 
) const
protected

◆ selectOp() [2/4]

labelList selectOp ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
boolList flipMap 
) const
protected

◆ generate() [1/3]

zoneSet generate ( const ZoneGenType &  zone) const
protected

Generate the zone of the given type.

◆ generate() [2/3]

virtual zoneSet generate ( ) const
pure virtual

◆ select() [4/6]

Foam::labelList select ( const ZoneGenType &  zoneGen,
const vectorField pts,
const UnaryOp &  uop 
) const
inline

Definition at line 32 of file volumeTemplates.C.

References forAll, zoneGenerator::indices(), List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

◆ select() [5/6]

Foam::labelList select ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
const UnaryOp &  uop 
) const
inline

Definition at line 57 of file volumeTemplates.C.

References forAll, List< T >::size(), and zoneSet::zone().

Here is the call graph for this function:

◆ selectOp() [3/4]

Foam::labelList selectOp ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts 
) const
inline

Definition at line 92 of file volumeTemplates.C.

◆ select() [6/6]

Foam::labelList select ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
boolList flipMap,
const UnaryOp &  uop 
) const
inline

Definition at line 123 of file volumeTemplates.C.

References List< T >::clear(), faceZone::flipMap(), forAll, zoneSet::fZone(), faceZone::oriented(), List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

◆ selectOp() [4/4]

Foam::labelList selectOp ( const ZoneGenType &  zoneGen,
const zoneGeneratorList zoneGenerators,
const vectorField pts,
boolList flipMap 
) const
inline

Definition at line 188 of file volumeTemplates.C.

◆ generate() [3/3]

Foam::zoneSet generate ( const ZoneGenType &  zoneGen) const

Definition at line 222 of file volumeTemplates.C.

References Foam::cell, Foam::face, Foam::point, and List< T >::size().

Here is the call graph for this function:

Member Data Documentation

◆ zoneType_

zoneTypes zoneType_
protected

Definition at line 119 of file volume.H.

◆ selectionNames

const Foam::NamedEnum< Foam::zoneGenerators::volume::selection, 2 > selectionNames
staticprotected

Enumeration names for inside/outside selection.

Definition at line 125 of file volume.H.

◆ select_

selection select_
protected

Inside/outside selection.

Definition at line 134 of file volume.H.

◆ zoneGenerators_

zoneGeneratorList zoneGenerators_
protected

Optional list of zoneGenerators which provide the zones to sub-set.

Default selection is all of the points, cells or faces

Definition at line 138 of file volume.H.


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