FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

cyclicPolyPatch Class Reference

Cyclic plane patch. More...

#include <OpenFOAM/cyclicPolyPatch.H>


Detailed Description

Cyclic plane patch.

Note: morph patch face ordering uses geometric matching so with the following restrictions: -halves should be flat planes. -no rotation in patch plane

Uses a featureCos to find the two halves (or should be fully disconnected). Uses coupledPolyPatch::calcFaceTol to calculate tolerance per face which might need tweaking.

Switch on 'cyclicPolyPatch' debug flag to write .obj files to show the matching.

Source files

Definition at line 66 of file cyclicPolyPatch.H.

Inheritance diagram for cyclicPolyPatch:
Collaboration diagram for cyclicPolyPatch:

List of all members.

Public Member Functions

 TypeName ("cyclic")
 Runtime type information.
 cyclicPolyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
 Construct from components.
 cyclicPolyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm)
 Construct from dictionary.
 cyclicPolyPatch (const cyclicPolyPatch &, const polyBoundaryMesh &)
 Construct as copy, resetting the boundary mesh.
 cyclicPolyPatch (const cyclicPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart)
 Construct given the original patch and resetting the.
virtual autoPtr< polyPatch >  clone (const polyBoundaryMesh &bm) const
 Construct and return a clone, resetting the boundary mesh.
virtual autoPtr< polyPatch >  clone (const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
 Construct and return a clone, resetting the face list.
virtual  ~cyclicPolyPatch ()
const edgeList &  coupledPoints () const
 Return connected points (in patch local point indexing). Demand.
const edgeList &  coupledEdges () const
 Return connected edges (in patch local edge indexing). Demand.
vector  separation (const label facei) const
const tensor &  transformT (const label facei) const
template<class T >
T  transform (const T &t, const label facei) const
label  transformLocalFace (const label facei) const
label  transformGlobalFace (const label facei) const
transformType  transform () const
 Type of transform.
const vector &  rotationAxis () const
 Axis of rotation for rotational cyclics.
const point &  rotationCentre () const
 point on axis of rotation for rotational cyclics
const vector &  separationVector () const
 Translation vector for translational cyclics.
virtual void  initOrder (const primitivePatch &) const
 Initialize ordering for primitivePatch. Does not.
virtual bool  order (const primitivePatch &, labelList &faceMap, labelList &rotation) const
 Return new ordering for primitivePatch.
virtual void  write (Ostream &) const
 Write the polyPatch data as a dictionary.

Protected Member Functions

virtual void  initGeometry ()
 Initialise the calculation of the patch geometry.
virtual void  calcGeometry ()
 Calculate the patch geometry.
virtual void  initMovePoints (const pointField &)
 Initialise the patches for moving points.
virtual void  movePoints (const pointField &)
 Correct patches after moving points.
virtual void  initUpdateMesh ()
 Initialise the update of the patch topology.
virtual void  updateMesh ()
 Update of the patch topology.

Constructor & Destructor Documentation

cyclicPolyPatch ( const word &   name,
const label   size,
const label   start,
const label   index,
const polyBoundaryMesh &   bm  
)

Construct from components.

Definition at line 819 of file cyclicPolyPatch.C.

Referenced by cyclicPolyPatch::clone().

cyclicPolyPatch ( const word &   name,
const dictionary &   dict,
const label   index,
const polyBoundaryMesh &   bm  
)
cyclicPolyPatch ( const cyclicPolyPatch &   pp,
const polyBoundaryMesh &   bm  
)

Construct as copy, resetting the boundary mesh.

Definition at line 903 of file cyclicPolyPatch.C.

cyclicPolyPatch ( const cyclicPolyPatch &   pp,
const polyBoundaryMesh &   bm,
const label   index,
const label   newSize,
const label   newStart  
)

Construct given the original patch and resetting the.

face list and boundary mesh information

Definition at line 920 of file cyclicPolyPatch.C.

~cyclicPolyPatch (  ) [virtual]

Definition at line 941 of file cyclicPolyPatch.C.

References Foam::deleteDemandDrivenData().


Member Function Documentation

void initGeometry (  ) [protected, virtual]

Initialise the calculation of the patch geometry.

Implements coupledPolyPatch.

Definition at line 951 of file cyclicPolyPatch.C.

References polyPatch::initGeometry().

void calcGeometry (  ) [protected, virtual]

Calculate the patch geometry.

Implements coupledPolyPatch.

Definition at line 956 of file cyclicPolyPatch.C.

References polyPatch::calcGeometry().

void initMovePoints ( const pointField &   p  ) [protected, virtual]

Initialise the patches for moving points.

Implements coupledPolyPatch.

Definition at line 962 of file cyclicPolyPatch.C.

References polyPatch::initMovePoints().

void movePoints ( const pointField &   p  ) [protected, virtual]

Correct patches after moving points.

Implements coupledPolyPatch.

Definition at line 967 of file cyclicPolyPatch.C.

References polyPatch::movePoints().

void initUpdateMesh (  ) [protected, virtual]

Initialise the update of the patch topology.

Implements coupledPolyPatch.

Definition at line 973 of file cyclicPolyPatch.C.

References polyPatch::initUpdateMesh().

void updateMesh (  ) [protected, virtual]

Update of the patch topology.

Implements coupledPolyPatch.

Definition at line 978 of file cyclicPolyPatch.C.

References Foam::deleteDemandDrivenData(), and polyPatch::updateMesh().

TypeName ( "cyclic"    )

Runtime type information.

virtual autoPtr<polyPatch> clone ( const polyBoundaryMesh &   bm  ) const [inline, virtual]

Construct and return a clone, resetting the boundary mesh.

Reimplemented from polyPatch.

Definition at line 224 of file cyclicPolyPatch.H.

References cyclicPolyPatch::cyclicPolyPatch().

virtual autoPtr<polyPatch> clone ( const polyBoundaryMesh &   bm,
const label   index,
const label   newSize,
const label   newStart  
) const [inline, virtual]

Construct and return a clone, resetting the face list.

and boundary mesh

Reimplemented from polyPatch.

Definition at line 232 of file cyclicPolyPatch.H.

References cyclicPolyPatch::cyclicPolyPatch().

const Foam::edgeList & coupledPoints (  ) const

Return connected points (in patch local point indexing). Demand.

driven calculation. Does primitivePatch::clearOut after calculation!

Definition at line 986 of file cyclicPolyPatch.C.

References b, Foam::endl(), forAll, mesh, OFstream::name(), Foam::nl, nPoints, points, Foam::Pout, List< T >::setSize(), List< T >::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by syncTools::getMasterPoints(), syncTools::syncPointList(), and syncTools::syncPointMap().

vector separation ( const label   facei  ) const [inline]
const tensor& transformT ( const label   facei  ) const [inline]
T transform ( const T &   t,
const label   facei  
) const [inline]
label transformLocalFace ( const label   facei  ) const [inline]

Definition at line 302 of file cyclicPolyPatch.H.

label transformGlobalFace ( const label   facei  ) const [inline]

Definition at line 314 of file cyclicPolyPatch.H.

References polyPatch::start().

Referenced by Particle< ParticleType >::hitCyclicPatch(), and faceSet::sync().

transformType transform (  ) const [inline]

Type of transform.

Definition at line 327 of file cyclicPolyPatch.H.

Referenced by cyclicPolyPatch::transform().

const vector& rotationAxis (  ) const [inline]

Axis of rotation for rotational cyclics.

Definition at line 333 of file cyclicPolyPatch.H.

const point& rotationCentre (  ) const [inline]

point on axis of rotation for rotational cyclics

Definition at line 339 of file cyclicPolyPatch.H.

const vector& separationVector (  ) const [inline]

Translation vector for translational cyclics.

Definition at line 345 of file cyclicPolyPatch.H.

void initOrder ( const primitivePatch &   pp  ) const [virtual]

Initialize ordering for primitivePatch. Does not.

refer to *this (except for name() and type() etc.)

Implements coupledPolyPatch.

Definition at line 1198 of file cyclicPolyPatch.C.

bool order ( const primitivePatch &   pp,
labelList &   faceMap,
labelList &   rotation  
) const [virtual]

Return new ordering for primitivePatch.

Ordering is -faceMap: for every face index of the new face -rotation:for every new face the clockwise shift of the original face. Return false if nothing changes (faceMap is identity, rotation is 0), true otherwise.

Implements coupledPolyPatch.

Definition at line 1207 of file cyclicPolyPatch.C.

References Foam::abort(), Foam::endl(), f(), Foam::FatalError, FatalErrorIn, forAll, Foam::gAverage(), Foam::identity(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::matchPoints(), mesh, OSstream::name(), OFstream::name(), Foam::name(), Foam::nl, pFaces, PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, SeriousErrorIn, List< T >::setSize(), and Foam::meshTools::writeOBJ().

void write ( Ostream &   os  ) const [virtual]

Write the polyPatch data as a dictionary.

Reimplemented from polyPatch.

Definition at line 1702 of file cyclicPolyPatch.C.

References token::END_STATEMENT, Foam::nl, polyPatch::write(), and Ostream::writeKeyword().


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