rotatedBoxToCell Class Reference

A topoSetSource to select cells based on cell centres inside a rotated and/or skewed box. More...

Inheritance diagram for rotatedBoxToCell:
Collaboration diagram for rotatedBoxToCell:

Public Member Functions

 TypeName ("rotatedBoxToCell")
 Runtime type information. More...
 
 rotatedBoxToCell (const polyMesh &mesh, const vector &origin, const vector &i, const vector &j, const vector &k)
 Construct from components. More...
 
 rotatedBoxToCell (const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~rotatedBoxToCell ()
 Destructor. More...
 
virtual sourceType setType () const
 
virtual void applyToSet (const topoSetSource::setAction action, topoSet &) const
 
- Public Member Functions inherited from topoSetSource
 TypeName ("topoSetSource")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, topoSetSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
 
 topoSetSource (const polyMesh &mesh)
 Construct from components. More...
 
 topoSetSource (const topoSetSource &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< topoSetSourceclone () const
 Clone. More...
 
virtual ~topoSetSource ()
 Destructor. More...
 
const polyMeshmesh () const
 
void operator= (const topoSetSource &)=delete
 Disallow default bitwise assignment. More...
 

Additional Inherited Members

- Public Types inherited from topoSetSource
enum  sourceType {
  CELLSETSOURCE, FACESETSOURCE, POINTSETSOURCE, CELLZONESOURCE,
  FACEZONESOURCE, POINTZONESOURCE
}
 Enumeration defining the types of sources. More...
 
enum  setAction {
  CLEAR, NEW, INVERT, ADD,
  DELETE, SUBSET, LIST, REMOVE
}
 Enumeration defining the valid actions. More...
 
- Static Public Member Functions inherited from topoSetSource
static setAction toAction (const word &actionName)
 Convert string to action. More...
 
static autoPtr< topoSetSourceNew (const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict)
 Return a reference to the selected topoSetSource. More...
 
- Protected Member Functions inherited from topoSetSource
void addOrDelete (topoSet &set, const label celli, const bool) const
 Add (if bool) celli to set or delete celli from set. More...
 
- Protected Attributes inherited from topoSetSource
const polyMeshmesh_
 

Detailed Description

A topoSetSource to select cells based on cell centres inside a rotated and/or skewed box.

The box can be defined with an origin and three vectors; i, j, and k. The origin is one corner of the box, and the vectors are the edges connected to that corner.

For example, the following defines a box rotated 45 degrees around the z-axis, with width and depth of 0.2, height of 200, and with a bottom left corner at (0.4 0.4 -100):

    origin  (0.4 0.4 -100);
    i       (0.141421 0.141421 0);
    j       (-0.141421 0.141421 0);
    k       (0 0 200);

Alternatively, the box can be defined using a non-rotated box and details of how it should be rotated. This syntax is triggered by the presence of the keyword "box". A standard bounding box is supplied, along with a centre of rotation and two vectors, n1 and n2. The rotation is taken to be that which transforms n1 onto n2.

The above example can be equivalently specified in this alternative form as follows:

    box     (0.4 0.4 -100) (0.6 0.6 100);
    centre  (0.4 0.4 0);
    n1      (1 0 0);
    n2      (1 1 0);
Source files

Definition at line 81 of file rotatedBoxToCell.H.

Constructor & Destructor Documentation

◆ rotatedBoxToCell() [1/2]

rotatedBoxToCell ( const polyMesh mesh,
const vector origin,
const vector i,
const vector j,
const vector k 
)

Construct from components.

Definition at line 106 of file rotatedBoxToCell.C.

◆ rotatedBoxToCell() [2/2]

rotatedBoxToCell ( const polyMesh mesh,
const dictionary dict 
)

Construct from dictionary.

Definition at line 123 of file rotatedBoxToCell.C.

References Foam::constant::universal::c, dictionary::found(), dictionary::lookup(), dictionary::lookupOrDefault(), Foam::normalised(), R, and Foam::rotationTensor().

Here is the call graph for this function:

◆ ~rotatedBoxToCell()

~rotatedBoxToCell ( )
virtual

Destructor.

Definition at line 161 of file rotatedBoxToCell.C.

References rotatedBoxToCell::applyToSet().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "rotatedBoxToCell"  )

Runtime type information.

◆ setType()

virtual sourceType setType ( ) const
inlinevirtual

Implements topoSetSource.

Definition at line 132 of file rotatedBoxToCell.H.

References rotatedBoxToCell::applyToSet(), and topoSetSource::CELLSETSOURCE.

Here is the call graph for this function:

◆ applyToSet()

void applyToSet ( const topoSetSource::setAction  action,
topoSet set 
) const
virtual

Implements topoSetSource.

Definition at line 168 of file rotatedBoxToCell.C.

References topoSetSource::ADD, Foam::combine(), topoSetSource::DELETE, Foam::endl(), Foam::Info, and topoSetSource::NEW.

Referenced by rotatedBoxToCell::setType(), and rotatedBoxToCell::~rotatedBoxToCell().

Here is the call graph for this function:
Here is the caller graph for this function:

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