Public Member Functions | Private Member Functions | Private Attributes | Friends
boxScaling Class Reference
Inheritance diagram for boxScaling:
Inheritance graph
[legend]
Collaboration diagram for boxScaling:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("box")
 Runtime type information. More...
 
 boxScaling ()
 Null construct. More...
 
 boxScaling (const word &name, const point &centre, const scalar lengthX, const scalar lengthY, const scalar lengthZ, const scalar scaleX=1.0, const scalar scaleY=1.0, const scalar scaleZ=1.0)
 Construct from name, cell size, centre and sizes and scaling factors. More...
 
 boxScaling (const word &name, const dictionary &dict)
 Construct from dictionary. More...
 
virtual autoPtr< coordinateModificationclone (const boxScaling &bs) const
 Construct and return a clone. More...
 
virtual point origin () const
 return the centre of the box More...
 
virtual void translateAndModifyObject (const vector &)
 
virtual vector displacement (const point &) const
 calculate the displacement vector for box scaling More...
 
virtual vector backwardDisplacement (const point &) const
 calculate the displacement vector for box scaling More...
 
virtual bool combiningPossible () const
 can this modification object be combined with other ones More...
 
virtual void boundingPlanes (PtrList< plane > &) const
 
dictionary dict (bool ignoreType=false) const
 Return as dictionary of entries. More...
 
void write (Ostream &) const
 Write. More...
 
void writeDict (Ostream &, bool subDict=true) const
 Write dictionary. More...
 
void operator= (const dictionary &)
 assign from dictionary More...
 
Ostreamoperator<< (Ostream &) const
 
- Public Member Functions inherited from coordinateModification
 TypeName ("coordinateModification")
 
 coordinateModification ()
 Null construct. More...
 
 coordinateModification (const word &name, const dictionary &)
 Construct from dictionary. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateModification, dictionary,(const word &name, const dictionary &dict),(name, dict))
 
virtual ~coordinateModification ()
 
const wordname () const
 Return name. More...
 
void setName (const word &name)
 set the name More...
 

Private Member Functions

void calculateBndBox ()
 calculate bounding box points More...
 

Private Attributes

point centre_
 centre of the box More...
 
vector lengthVec_
 length of box sides More...
 
vector scaleVec_
 scaling factors in all directions More...
 
point pMin_
 min point More...
 
point pMax_
 max point More...
 

Friends

Ostreamoperator<< (Ostream &, const boxScaling &)
 

Additional Inherited Members

- Static Public Member Functions inherited from coordinateModification
static autoPtr< coordinateModificationNew (const word &name, const dictionary &dict)
 Select constructed from dictionary. More...
 

Detailed Description

Definition at line 50 of file boxScaling.H.

Constructor & Destructor Documentation

◆ boxScaling() [1/3]

Null construct.

Definition at line 49 of file boxScaling.C.

References boxScaling::calculateBndBox().

Here is the call graph for this function:

◆ boxScaling() [2/3]

boxScaling ( const word name,
const point centre,
const scalar  lengthX,
const scalar  lengthY,
const scalar  lengthZ,
const scalar  scaleX = 1.0,
const scalar  scaleY = 1.0,
const scalar  scaleZ = 1.0 
)

Construct from name, cell size, centre and sizes and scaling factors.

Definition at line 62 of file boxScaling.C.

References Foam::name().

Here is the call graph for this function:

◆ boxScaling() [3/3]

boxScaling ( const word name,
const dictionary dict 
)

Construct from dictionary.

Definition at line 85 of file boxScaling.C.

References dict.

Member Function Documentation

◆ calculateBndBox()

void calculateBndBox ( )
private

calculate bounding box points

Definition at line 41 of file boxScaling.C.

References boxScaling::centre_, boxScaling::lengthVec_, boxScaling::pMax_, and boxScaling::pMin_.

Referenced by boxScaling::boxScaling(), boxScaling::operator=(), and boxScaling::translateAndModifyObject().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "box"  )

Runtime type information.

◆ clone()

virtual autoPtr<coordinateModification> clone ( const boxScaling bs) const
inlinevirtual

Construct and return a clone.

Definition at line 103 of file boxScaling.H.

References boxScaling::centre_, boxScaling::lengthVec_, coordinateModification::name(), boxScaling::scaleVec_, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ origin()

point origin ( ) const
virtual

return the centre of the box

Implements coordinateModification.

Definition at line 97 of file boxScaling.C.

References boxScaling::centre_.

◆ translateAndModifyObject()

void translateAndModifyObject ( const vector disp)
virtual

translate the object to the modified coordinates this is needed for backward transformation

Implements coordinateModification.

Definition at line 102 of file boxScaling.C.

References boxScaling::calculateBndBox(), boxScaling::centre_, boxScaling::lengthVec_, VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, and boxScaling::scaleVec_.

Here is the call graph for this function:

◆ displacement()

vector displacement ( const point p) const
virtual

calculate the displacement vector for box scaling

Implements coordinateModification.

Definition at line 112 of file boxScaling.C.

References boxScaling::lengthVec_, Foam::max(), Foam::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, p, boxScaling::pMin_, and boxScaling::scaleVec_.

Here is the call graph for this function:

◆ backwardDisplacement()

vector backwardDisplacement ( const point p) const
virtual

calculate the displacement vector for box scaling

Implements coordinateModification.

Definition at line 129 of file boxScaling.C.

References boxScaling::lengthVec_, Foam::max(), Foam::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, p, boxScaling::pMin_, and boxScaling::scaleVec_.

Here is the call graph for this function:

◆ combiningPossible()

bool combiningPossible ( ) const
virtual

can this modification object be combined with other ones

Implements coordinateModification.

Definition at line 147 of file boxScaling.C.

◆ boundingPlanes()

void boundingPlanes ( PtrList< plane > &  pl) const
virtual

return that "bounding planes" of the scaling region for the given object

Implements coordinateModification.

Definition at line 152 of file boxScaling.C.

References Foam::mag(), boxScaling::pMax_, boxScaling::pMin_, boxScaling::scaleVec_, PtrList::set(), PtrList::setSize(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ dict()

dictionary dict ( bool  ignoreType = false) const
virtual

Return as dictionary of entries.

Implements coordinateModification.

Definition at line 179 of file boxScaling.C.

References dictionary::add(), boxScaling::centre_, boxScaling::lengthVec_, boxScaling::scaleVec_, Foam::type(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by boxScaling::operator=().

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

◆ write()

void write ( Ostream os) const
virtual

Write.

Implements coordinateModification.

Definition at line 197 of file boxScaling.C.

References boxScaling::centre_, Foam::endl(), boxScaling::lengthVec_, boxScaling::scaleVec_, Foam::type(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by boxScaling::operator<<().

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

◆ writeDict()

void writeDict ( Ostream os,
bool  subDict = true 
) const
virtual

◆ operator=()

void operator= ( const dictionary d)
virtual

◆ operator<<()

Ostream & operator<< ( Ostream os) const

Definition at line 338 of file boxScaling.C.

References coordinateModification::name(), Foam::nl, and boxScaling::write().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const boxScaling bs 
)
friend

Definition at line 345 of file boxScaling.C.

Field Documentation

◆ centre_

point centre_
private

◆ lengthVec_

vector lengthVec_
private

◆ scaleVec_

vector scaleVec_
private

◆ pMin_

point pMin_
private

◆ pMax_

point pMax_
private

max point

Definition at line 68 of file boxScaling.H.

Referenced by boxScaling::boundingPlanes(), and boxScaling::calculateBndBox().


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