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

fvMesh Class Reference

Mesh data needed to do the Finite Volume discretisation. More...

Inheritance diagram for fvMesh:
Collaboration diagram for fvMesh:

List of all members.


Public Types

typedef fvMesh Mesh
typedef fvBoundaryMesh BoundaryMesh

Public Member Functions

 ClassName ("fvMesh")
 fvMesh (const IOobject &io)
 Construct from IOobject.
 fvMesh (const IOobject &io, const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< labelList > &allOwner, const Xfer< labelList > &allNeighbour, const bool syncPar=true)
 Construct from components without boundary.
 fvMesh (const IOobject &io, const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< cellList > &cells, const bool syncPar=true)
 Construct without boundary from cells rather than owner/neighbour.
virtual ~fvMesh ()
void addFvPatches (const List< polyPatch * > &, const bool validBoundary=true)
 Add boundary patches. Constructor helper.
virtual readUpdateState readUpdate ()
 Update the mesh based on the mesh files saved in time.
const Time & time () const
 Return the top-level database.
virtual const objectRegistry & thisDb () const
 Return the object registry - resolve conflict polyMesh/lduMesh.
const word & name () const
 Return reference to name.
const fvBoundaryMesh & boundary () const
 Return reference to boundary mesh.
virtual const lduAddressing & lduAddr () const
 Return ldu addressing.
virtual lduInterfacePtrsList interfaces () const
 Return a list of pointers for each patch.
const unallocLabelList & owner () const
 Internal face owner.
const unallocLabelList & neighbour () const
 Internal face neighbour.
const DimensionedField< scalar,
volMesh > & 
V () const
 Return cell volumes.
const DimensionedField< scalar,
volMesh > & 
V0 () const
 Return old-time cell volumes.
const DimensionedField< scalar,
volMesh > & 
V00 () const
 Return old-old-time cell volumes.
const surfaceVectorField & Sf () const
 Return cell face area vectors.
const surfaceScalarField & magSf () const
 Return cell face area magnitudes.
const surfaceScalarField & phi () const
 Return cell face motion fluxes.
const volVectorField & C () const
 Return cell centres as volVectorField.
const surfaceVectorField & Cf () const
 Return face centres as surfaceVectorField.
void clearOut ()
 Clear all geometry and addressing.
virtual void updateMesh (const mapPolyMesh &mpm)
 Update mesh corresponding to the given map.
virtual tmp< scalarField > movePoints (const pointField &)
 Move points, returns volumes swept by faces in motion.
virtual void mapFields (const mapPolyMesh &mpm)
 Map all fields in time using given map.
void removeFvBoundary ()
 Remove boundary patches. Warning: fvPatchFields hold ref to.
surfaceScalarField & setPhi ()
 Return cell face motion fluxes.
DimensionedField< scalar,
volMesh > & 
setV0 ()
 Return old-time cell volumes.
virtual bool writeObjects (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write the underlying polyMesh and other data.
virtual bool write () const
 Write mesh using IO settings from time.
bool operator!= (const fvMesh &) const
bool operator== (const fvMesh &) const

Detailed Description

Mesh data needed to do the Finite Volume discretisation.

NOTE ON USAGE: fvMesh contains all the topological and geometric information related to the mesh. It is also responsible for keeping the data up-to-date. This is done by deleting the cell volume, face area, cell/face centre, addressing and other derived information as required and recalculating it as necessary. The fvMesh therefore reserves the right to delete the derived information upon every topological (mesh refinement/morphing) or geometric change (mesh motion). It is therefore unsafe to keep local references to the derived data outside of the time loop.

Source files

Definition at line 71 of file fvMesh.H.


Member Typedef Documentation

typedef fvMesh Mesh

Reimplemented from polyMesh.

Definition at line 154 of file fvMesh.H.

Reimplemented from polyMesh.

Definition at line 155 of file fvMesh.H.


Constructor & Destructor Documentation

fvMesh ( const IOobject &  io  )  [explicit]

Construct from IOobject.

Definition at line 142 of file fvMesh.C.

fvMesh ( const IOobject &  io,
const Xfer< pointField > &  points,
const Xfer< faceList > &  faces,
const Xfer< labelList > &  allOwner,
const Xfer< labelList > &  allNeighbour,
const bool  syncPar = true 
)

Construct from components without boundary.

Boundary is added using addFvPatches() member function

Definition at line 227 of file fvMesh.C.

fvMesh ( const IOobject &  io,
const Xfer< pointField > &  points,
const Xfer< faceList > &  faces,
const Xfer< cellList > &  cells,
const bool  syncPar = true 
)

Construct without boundary from cells rather than owner/neighbour.

Boundary is added using addPatches() member function

Definition at line 258 of file fvMesh.C.

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

Here is the call graph for this function:

~fvMesh (  )  [virtual]

Definition at line 289 of file fvMesh.C.

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

Here is the call graph for this function:


Member Function Documentation

ClassName ( "fvMesh"   ) 

void addFvPatches ( const List< polyPatch * > &  p,
const bool  validBoundary = true 
)

Add boundary patches. Constructor helper.

Definition at line 298 of file fvMesh.C.

References fvMesh::clearOut().

Here is the call graph for this function:

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

Update the mesh based on the mesh files saved in time.

directories

Reimplemented from polyMesh.

Definition at line 336 of file fvMesh.C.

const Time& time (  )  const [inline]

Return the top-level database.

Reimplemented from objectRegistry.

Definition at line 221 of file fvMesh.H.

Referenced by Foam::compressible::autoCreateAlphat(), Foam::incompressible::autoCreateNut(), autoHexMeshDriver::autoHexMeshDriver(), basicMultiComponentMixture::basicMultiComponentMixture(), DsmcCloud< ParcelType >::cachedDeltaT(), linearUpwindV< Type >::correction(), linearUpwind< Type >::correction(), sampledThresholdCellFaces::expire(), sampledIsoSurfaceCell::expire(), sampledIsoSurface::expire(), Foam::MULES::explicitSolve(), steadyStateD2dt2Scheme< Type >::fvcD2dt2(), EulerD2dt2Scheme< Type >::fvcD2dt2(), steadyStateDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), boundedBackwardDdtScheme::fvcDdt(), localMin< Type >::interpolate(), localMax< Type >::interpolate(), fvMeshSubset::interpolate(), LESdelta::LESdelta(), PhiScheme< Type, PhiLimiter >::limiter(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), Foam::MapConsistentVolFields(), Foam::MapLagrangianFields(), Foam::MapVolFields(), multivariateScheme< Type, Scheme >::multivariateScheme(), multivariateSelectionScheme< Type >::multivariateSelectionScheme(), hReactionThermo::New(), hhuCombustionThermo::New(), hCombustionThermo::New(), rhoChemistryModel::New(), psiChemistryModel::New(), basicRhoThermo::New(), basicPsiThermo::New(), extendedUpwindCellToFaceStencil::weightedSum(), reverseLinear< Type >::weights(), clippedLinear< Type >::weights(), addSubtract::writeAddSubtractField(), addSubtract::writeAddSubtractValue(), components::writeComponentFields(), div::writeDivField(), interpolate::writeInterpolateField(), mag::writeMagField(), magGrad::writeMagGradField(), magSqr::writeMagSqrField(), and randomise::writeRandomField().

Here is the caller graph for this function:

virtual const objectRegistry& thisDb (  )  const [inline, virtual]

Return the object registry - resolve conflict polyMesh/lduMesh.

Reimplemented from lduMesh.

Definition at line 227 of file fvMesh.H.

const word& name (  )  const [inline]

Return reference to name.

Note: name() is currently ambiguous due to derivation from surfaceInterpolation

Reimplemented from IOdictionary.

Definition at line 237 of file fvMesh.H.

const Foam::lduAddressing & lduAddr (  )  const [virtual]

Return ldu addressing.

Implements lduMesh.

Definition at line 394 of file fvMesh.C.

Referenced by fvMesh::interfaces(), and fvMesh::owner().

Here is the caller graph for this function:

virtual lduInterfacePtrsList interfaces (  )  const [inline, virtual]

Return a list of pointers for each patch.

with only those pointing to interfaces being set

Implements lduMesh.

Definition at line 252 of file fvMesh.H.

References fvMesh::lduAddr(), and lduAddressing::lowerAddr().

Here is the call graph for this function:

const volScalarField::DimensionedInternalField & V0 (  )  const

Return old-time cell volumes.

Definition at line 228 of file fvMeshGeometry.C.

Referenced by Foam::MULES::explicitSolve(), EulerD2dt2Scheme< Type >::fvcD2dt2(), and EulerDdtScheme< Type >::fvcDdt().

Here is the caller graph for this function:

const volScalarField::DimensionedInternalField & V00 (  )  const

Return old-old-time cell volumes.

Definition at line 254 of file fvMeshGeometry.C.

Referenced by EulerD2dt2Scheme< Type >::fvcD2dt2().

Here is the caller graph for this function:

const surfaceVectorField & Sf (  )  const

Return cell face area vectors.

Definition at line 279 of file fvMeshGeometry.C.

Referenced by linearUpwind< Type >::correction(), PhiScheme< Type, PhiLimiter >::limiter(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), and Foam::fvc::reconstruct().

Here is the caller graph for this function:

const surfaceScalarField & magSf (  )  const

const surfaceScalarField & phi (  )  const

Return cell face motion fluxes.

Definition at line 323 of file fvMeshGeometry.C.

const volVectorField & C (  )  const

Return cell centres as volVectorField.

Definition at line 301 of file fvMeshGeometry.C.

Referenced by linearUpwindV< Type >::correction(), linearUpwind< Type >::correction(), Foam::resError::div(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), and Foam::fv::makeFvGradScheme().

Here is the caller graph for this function:

const surfaceVectorField & Cf (  )  const

Return face centres as surfaceVectorField.

Definition at line 312 of file fvMeshGeometry.C.

Referenced by linearUpwindV< Type >::correction(), linearUpwind< Type >::correction(), Foam::resError::div(), and Foam::fv::makeFvGradScheme().

Here is the caller graph for this function:

void clearOut (  ) 

Clear all geometry and addressing.

Reimplemented from surfaceInterpolation.

Definition at line 126 of file fvMesh.C.

Referenced by fvMesh::addFvPatches(), and meshRefinement::mergePatchFaces().

Here is the caller graph for this function:

void updateMesh ( const mapPolyMesh &  mpm  )  [virtual]

Update mesh corresponding to the given map.

Reimplemented from polyMesh.

Definition at line 605 of file fvMesh.C.

Referenced by meshRefinement::mergePatchFaces().

Here is the caller graph for this function:

Foam::tmp< Foam::scalarField > movePoints ( const pointField &  p  )  [virtual]

Move points, returns volumes swept by faces in motion.

Reimplemented from polyMesh.

Definition at line 502 of file fvMesh.C.

Referenced by meshRefinement::mergePatchFaces().

Here is the caller graph for this function:

void mapFields ( const mapPolyMesh &  mpm  )  [virtual]

Map all fields in time using given map.

Definition at line 405 of file fvMesh.C.

void removeFvBoundary (  ) 

Remove boundary patches. Warning: fvPatchFields hold ref to.

these fvPatches.

Definition at line 318 of file fvMesh.C.

surfaceScalarField & setPhi (  ) 

Return cell face motion fluxes.

Definition at line 343 of file fvMeshGeometry.C.

References Foam::dimTime, and Foam::dimVolume.

Return old-time cell volumes.

Definition at line 241 of file fvMeshGeometry.C.

bool writeObjects ( IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  cmp 
) const [virtual]

Write the underlying polyMesh and other data.

Definition at line 628 of file fvMesh.C.

bool write (  )  const [virtual]

Write mesh using IO settings from time.

Write mesh using IO settings from the time.

Reimplemented from regIOobject.

Definition at line 639 of file fvMesh.C.

References objectRegistry::writeObject().

Referenced by fvMesh::operator!=().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator!= ( const fvMesh &  bm  )  const

Definition at line 647 of file fvMesh.C.

References fvMesh::write().

Here is the call graph for this function:

bool operator== ( const fvMesh &  bm  )  const

Definition at line 653 of file fvMesh.C.


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