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

A surface mesh consisting of general polygon faces. More...

#include <surfMesh/surfMesh.H>


Detailed Description

A surface mesh consisting of general polygon faces.

Source files

Definition at line 56 of file surfMesh.H.

Inheritance diagram for surfMesh:
Collaboration diagram for surfMesh:

List of all members.

Public Types

enum  readUpdateState { UNCHANGED, POINTS_MOVED, TOPO_CHANGE, TOPO_PATCH_CHANGE }
 

Enumeration defining the state of the mesh after a read update.

More...
typedef surfMesh  Mesh
typedef bool  BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh.

Public Member Functions

 TypeName ("surfMesh")
 Runtime type information.
 surfMesh (const IOobject &, const word &surfName="")
 Construct from IOobject, with alternative surface name.
 surfMesh (const IOobject &, const Xfer< pointField > &, const Xfer< faceList > &, const word &surfName="")
 Construct by transferring components (points, faces) without zones.
 surfMesh (const IOobject &, const Xfer< MeshedSurface< face > > &surf, const word &surfName="")
 Construct copy/move from MeshedSurface.
virtual  ~surfMesh ()
fileName  meshDir () const
 Return the local mesh directory (dbDir()/meshSubDir)
const fileName &  pointsInstance () const
 Return the current instance directory for points.
const fileName &  facesInstance () const
 Return the current instance directory for faces.
void  setInstance (const fileName &)
 Set the instance for mesh files.
virtual label  nPoints () const
 Return the number of raw points.
virtual label  nFaces () const
 Return the number of raw faces.
virtual label  size () const
 Return number of faces.
virtual const pointField &  points () const
 Return points.
virtual const faceList &  faces () const
 Return faces.
virtual const surfZoneList &  surfZones () const
 Return surface zones.
void  checkZones ()
 Check the surface zone definitions.
void  addZones (const List< surfZone > &, const bool validate=true)
 Add surface zones.
virtual readUpdateState  readUpdate ()
 Update the mesh based on the mesh files saved in.
void  removeZones ()
 Update the mesh corresponding to given map.
void  resetPrimitives (const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< surfZoneList > &zones, const bool validate=true)
 Reset mesh primitive data.
void  transfer (MeshedSurface< face > &)
 Transfer the contents of the argument and annull the argument.
void  write (const fileName &)
 Write to file.
Xfer< MeshedSurface< face > >  xfer ()
 Transfer contents to the Xfer container as a MeshedSurface.
void  clearGeom ()
 Clear geometry.
void  clearAddressing ()
 Clear addressing.
void  clearOut ()
 Clear all geometry and addressing unnecessary for CFD.
void  clearPrimitives ()
 Clear primitive data (points, faces and cells)
void  removeFiles (const fileName &instanceDir) const
 Remove all files from mesh instance.
void  removeFiles () const
 Remove all files from mesh instance()

Static Public Member Functions

static void  write (const fileName &, const surfMesh &)
 Write to file.

Static Public Attributes

static word  meshSubDir = "surfMesh"
 Return the mesh sub-directory name (normally "surfMesh")

Protected Member Functions

pointField &  storedPoints ()
 Non-const access to global points.
faceList &  storedFaces ()
 Non-const access to the faces.
surfZoneList &  storedZones ()
 Non-const access to the zones.
virtual void  updateFacesRef ()
 Update references to storedFaces.
virtual void  updatePointsRef ()
 Update references to storedPoints.
virtual void  updateRefs ()
 Update references to storedPoints/storedFaces.

Friends

class  MeshedSurface
class  UnsortedMeshedSurface

Member Typedef Documentation

typedef surfMesh Mesh

Definition at line 143 of file surfMesh.H.

typedef bool BoundaryMesh

Placeholder only, but do not remove - it is needed for GeoMesh.

Definition at line 146 of file surfMesh.H.


Member Enumeration Documentation

Enumeration defining the state of the mesh after a read update.

Used for post-processing applications, where the mesh needs to update based on the files written in time directores

Enumerator:
UNCHANGED 
POINTS_MOVED 
TOPO_CHANGE 
TOPO_PATCH_CHANGE 

Definition at line 73 of file surfMesh.H.


Constructor & Destructor Documentation

surfMesh ( const IOobject &   io,
const word &   surfName = ""  
) [explicit]

Construct from IOobject, with alternative surface name.

Definition at line 72 of file surfMesh.C.

surfMesh ( const IOobject &   io,
const Xfer< pointField > &   pointLst,
const Xfer< faceList > &   faceLst,
const word &   surfName = ""  
)

Construct by transferring components (points, faces) without zones.

surfZones are added using addZones() member function

Definition at line 110 of file surfMesh.C.

surfMesh ( const IOobject &   io,
const Xfer< MeshedSurface< face > > &   surf,
const word &   surfName = ""  
)
~surfMesh (  ) [virtual]

Definition at line 219 of file surfMesh.C.


Member Function Documentation

pointField& storedPoints (  ) [inline, protected]

Non-const access to global points.

Definition at line 112 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOPoints().

Referenced by MeshedSurface< Face >::MeshedSurface().

faceList& storedFaces (  ) [inline, protected]

Non-const access to the faces.

Definition at line 118 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOFaces().

Referenced by MeshedSurface< Face >::MeshedSurface().

surfZoneList& storedZones (  ) [inline, protected]

Non-const access to the zones.

Definition at line 124 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOZones().

Referenced by MeshedSurface< Face >::MeshedSurface(), and surfMesh::removeZones().

void updateFacesRef (  ) [protected, virtual]

Update references to storedFaces.

Definition at line 238 of file surfMesh.C.

void updatePointsRef (  ) [protected, virtual]

Update references to storedPoints.

Definition at line 228 of file surfMesh.C.

References points.

void updateRefs (  ) [protected, virtual]

Update references to storedPoints/storedFaces.

Definition at line 245 of file surfMesh.C.

TypeName ( "surfMesh"    )

Runtime type information.

Foam::fileName meshDir (  ) const

Return the local mesh directory (dbDir()/meshSubDir)

Definition at line 308 of file surfMesh.C.

const Foam::fileName & pointsInstance (  ) const

Return the current instance directory for points.

Used in the consruction of geometric mesh data dependent on points

Definition at line 314 of file surfMesh.C.

const Foam::fileName & facesInstance (  ) const

Return the current instance directory for faces.

Definition at line 320 of file surfMesh.C.

Foam::label nPoints (  ) const [virtual]

Return the number of raw points.

Reimplemented from PrimitivePatch< face,::Foam::UList,::Foam::SubField< point >, point >.

Definition at line 326 of file surfMesh.C.

References points, and List< T >::size().

Referenced by surfPointGeoMesh::size().

Foam::label nFaces (  ) const [virtual]

Return the number of raw faces.

Definition at line 332 of file surfMesh.C.

Referenced by surfMesh::size(), and surfGeoMesh::size().

virtual label size (  ) const [inline, virtual]

Return number of faces.

Reimplemented from UList< face >.

Definition at line 212 of file surfMesh.H.

References surfMesh::nFaces().

const Foam::pointField & points (  ) const [virtual]
const Foam::faceList & faces (  ) const [virtual]

Return faces.

Definition at line 344 of file surfMesh.C.

Referenced by MeshedSurface< Face >::MeshedSurface(), and surfMesh::write().

virtual const surfZoneList& surfZones (  ) const [inline, virtual]

Return surface zones.

Definition at line 225 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOZones().

Referenced by MeshedSurface< Face >::MeshedSurface(), and surfMesh::write().

void checkZones (  )

Check the surface zone definitions.

Definition at line 350 of file surfMesh.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and WarningIn.

void addZones ( const List< surfZone > &   ,
const bool   validate = true  
)

Add surface zones.

void removeZones (  )

Update the mesh corresponding to given map.

Remove surface zones

Definition at line 32 of file surfMeshClear.C.

References List< T >::clear(), surfMesh::clearOut(), Foam::endl(), Foam::Info, and surfMesh::storedZones().

void resetPrimitives ( const Xfer< pointField > &   points,
const Xfer< faceList > &   faces,
const Xfer< surfZoneList > &   zones,
const bool   validate = true  
)

Reset mesh primitive data.

Definition at line 253 of file surfMesh.C.

void transfer ( MeshedSurface< face > &   surf  )

Transfer the contents of the argument and annull the argument.

Definition at line 274 of file surfMesh.C.

References MeshedSurface< Face >::storedFaces(), MeshedSurface< Face >::storedPoints(), and MeshedSurface< Face >::storedZones().

void write ( const fileName &   name,
const surfMesh &   surf  
) [static]

Write to file.

Definition at line 431 of file surfMesh.C.

References surfMesh::faces(), surfMesh::points(), and surfMesh::surfZones().

void write ( const fileName &   name  )

Write to file.

Definition at line 442 of file surfMesh.C.

Transfer contents to the Xfer container as a MeshedSurface.

Reimplemented from HashTable< regIOobject * >.

Definition at line 290 of file surfMesh.C.

void clearGeom (  )

Clear geometry.

Reimplemented from PrimitivePatch< face,::Foam::UList,::Foam::SubField< point >, point >.

Definition at line 50 of file surfMeshClear.C.

References Foam::endl(), and Foam::Info.

void clearAddressing (  )

Clear addressing.

Definition at line 63 of file surfMeshClear.C.

References Foam::endl(), and Foam::Info.

void clearOut (  )

Clear all geometry and addressing unnecessary for CFD.

Reimplemented from PrimitivePatch< face,::Foam::UList,::Foam::SubField< point >, point >.

Definition at line 76 of file surfMeshClear.C.

Referenced by surfMesh::removeZones().

void clearPrimitives (  )

Clear primitive data (points, faces and cells)

void removeFiles ( const fileName &   instanceDir  ) const

Remove all files from mesh instance.

Definition at line 416 of file surfMesh.C.

References fileName::path(), and Foam::rm().

void removeFiles (  ) const

Remove all files from mesh instance()

Definition at line 425 of file surfMesh.C.


Friends And Related Function Documentation

friend class MeshedSurface [friend]

Definition at line 63 of file surfMesh.H.

friend class UnsortedMeshedSurface [friend]

Definition at line 64 of file surfMesh.H.


Member Data Documentation

Foam::word meshSubDir = "surfMesh" [static]

Return the mesh sub-directory name (normally "surfMesh")

Definition at line 153 of file surfMesh.H.


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