OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

surfMesh Class Reference

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

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 fileNamepointsInstance () const
 Return the current instance directory for points.
const fileNamefacesInstance () 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 pointFieldpoints () const
 Return points.
virtual const faceListfaces () const
 Return faces.
virtual const surfZoneListsurfZones () 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

pointFieldstoredPoints ()
 Non-const access to global points.
faceListstoredFaces ()
 Non-const access to the faces.
surfZoneListstoredZones ()
 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

Detailed Description

A surface mesh consisting of general polygon faces.

Source files

Definition at line 51 of file surfMesh.H.


Member Typedef Documentation

typedef surfMesh Mesh

Definition at line 140 of file surfMesh.H.

typedef bool BoundaryMesh

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

Definition at line 143 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 70 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 64 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 102 of file surfMesh.C.

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

Construct copy/move from MeshedSurface.

Definition at line 148 of file surfMesh.C.

~surfMesh (  )  [virtual]

Definition at line 211 of file surfMesh.C.

References surfMesh::transfer().

Here is the call graph for this function:


Member Function Documentation

pointField& storedPoints (  )  [inline, protected]

Non-const access to global points.

Definition at line 109 of file surfMesh.H.

Referenced by surfMesh::updateFacesRef().

Here is the caller graph for this function:

faceList& storedFaces (  )  [inline, protected]

Non-const access to the faces.

Definition at line 115 of file surfMesh.H.

Referenced by surfMesh::updateRefs().

Here is the caller graph for this function:

surfZoneList& storedZones (  )  [inline, protected]

Non-const access to the zones.

Definition at line 121 of file surfMesh.H.

void updateFacesRef (  )  [protected, virtual]

Update references to storedFaces.

Definition at line 230 of file surfMesh.C.

References PrimitivePatch< face,::Foam::UList,::Foam::SubField< point >, point >::points(), and surfMesh::storedPoints().

Referenced by surfMesh::resetPrimitives().

Here is the call graph for this function:

Here is the caller graph for this function:

void updatePointsRef (  )  [protected, virtual]

Update references to storedPoints.

Definition at line 220 of file surfMesh.C.

Referenced by surfMesh::resetPrimitives().

Here is the caller graph for this function:

void updateRefs (  )  [protected, virtual]

Update references to storedPoints/storedFaces.

Definition at line 237 of file surfMesh.C.

References surfMesh::storedFaces().

Here is the call graph for this function:

TypeName ( "surfMesh"   ) 

Runtime type information.

Foam::fileName meshDir (  )  const

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

Definition at line 300 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 306 of file surfMesh.C.

const Foam::fileName & facesInstance (  )  const

Return the current instance directory for faces.

Definition at line 312 of file surfMesh.C.

void setInstance ( const fileName inst  ) 

Set the instance for mesh files.

Definition at line 23 of file surfMeshIO.C.

References IOobject::AUTO_WRITE, Foam::endl(), Foam::Info, IOobject::instance(), and MeshedSurfaceIOAllocator::storedIOPoints().

Here is the call graph for this function:

Foam::label nPoints (  )  const [virtual]

Return the number of raw points.

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

Definition at line 318 of file surfMesh.C.

Referenced by surfPointGeoMesh::size().

Here is the caller graph for this function:

Foam::label nFaces (  )  const [virtual]

Return the number of raw faces.

Definition at line 324 of file surfMesh.C.

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

Here is the caller graph for this function:

virtual label size (  )  const [inline, virtual]

Return number of faces.

Reimplemented from UList< face >.

Definition at line 213 of file surfMesh.H.

References surfMesh::nFaces().

Here is the call graph for this function:

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

Return points.

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

Definition at line 330 of file surfMesh.C.

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

Return faces.

Definition at line 336 of file surfMesh.C.

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

Return surface zones.

Definition at line 226 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOZones().

Here is the call graph for this function:

void checkZones (  ) 

Check the surface zone definitions.

Definition at line 342 of file surfMesh.C.

Referenced by surfMesh::removeFiles(), and surfMesh::transfer().

Here is the caller graph for this function:

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

Add surface zones.

Foam::surfMesh::readUpdateState readUpdate (  )  [virtual]

Update the mesh based on the mesh files saved in.

time directories

Definition at line 44 of file surfMeshIO.C.

void removeZones (  ) 

Update the mesh corresponding to given map.

Remove surface zones

Definition at line 24 of file surfMeshClear.C.

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

Here is the call graph for this function:

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 245 of file surfMesh.C.

References surfMesh::updateFacesRef(), and surfMesh::updatePointsRef().

Here is the call graph for this function:

void transfer ( MeshedSurface< face > &  surf  ) 

Transfer the contents of the argument and annull the argument.

Definition at line 266 of file surfMesh.C.

References surfMesh::checkZones().

Referenced by surfMesh::~surfMesh().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Write to file.

Definition at line 423 of file surfMesh.C.

void write ( const fileName name  ) 

Write to file.

Definition at line 434 of file surfMesh.C.

Transfer contents to the Xfer container as a MeshedSurface.

Reimplemented from HashTable< regIOobject * >.

Definition at line 282 of file surfMesh.C.

void clearGeom (  ) 

Clear geometry.

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

Definition at line 42 of file surfMeshClear.C.

void clearAddressing (  ) 

Clear addressing.

Definition at line 55 of file surfMeshClear.C.

void clearOut (  ) 

Clear all geometry and addressing unnecessary for CFD.

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

Definition at line 68 of file surfMeshClear.C.

void clearPrimitives (  ) 

Clear primitive data (points, faces and cells).

void removeFiles ( const fileName instanceDir  )  const

Remove all files from mesh instance.

Definition at line 408 of file surfMesh.C.

References surfMesh::checkZones().

Here is the call graph for this function:

void removeFiles (  )  const

Remove all files from mesh instance().

Definition at line 417 of file surfMesh.C.

References IOobject::db(), surfMesh::meshSubDir, IOobject::path(), and Foam::rm().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class MeshedSurface [friend]

Definition at line 58 of file surfMesh.H.

friend class UnsortedMeshedSurface [friend]

Definition at line 59 of file surfMesh.H.


Member Data Documentation

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

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

Definition at line 150 of file surfMesh.H.

Referenced by surfMesh::removeFiles().


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd