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

fvMesh Class Reference

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

#include <finiteVolume/fvMesh.H>


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 76 of file fvMesh.H.

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.
tmp< DimensionedField< scalar,
volMesh > >  
Vsc () const
 Return sub-cycle cell volumes.
tmp< DimensionedField< scalar,
volMesh > >  
Vsc0 () const
 Return sub-cycl 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

Member Typedef Documentation

typedef fvMesh Mesh

Reimplemented from polyMesh.

Definition at line 157 of file fvMesh.H.

Reimplemented from polyMesh.

Definition at line 158 of file fvMesh.H.


Constructor & Destructor Documentation

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 235 of file fvMesh.C.

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

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 266 of file fvMesh.C.

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

~fvMesh (  ) [virtual]

Definition at line 297 of file fvMesh.C.


Member Function Documentation

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

Add boundary patches. Constructor helper.

Definition at line 306 of file fvMesh.C.

References Foam::abort(), boundary(), Foam::FatalError, and FatalErrorIn.

Referenced by polyTopoChange::makeMesh().

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

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

directories

Reimplemented from polyMesh.

Definition at line 344 of file fvMesh.C.

References Foam::endl(), Foam::Info, polyMesh::POINTS_MOVED, polyMesh::readUpdate(), polyMesh::TOPO_CHANGE, and polyMesh::TOPO_PATCH_CHANGE.

const Time& time (  ) const [inline]

Return the top-level database.

Reimplemented from objectRegistry.

Definition at line 218 of file fvMesh.H.

Referenced by autoLayerDriver::addLayers(), fieldToCell::applyToSet(), Foam::compressible::autoCreateAlphat(), Foam::compressible::autoCreateLowReMut(), Foam::incompressible::autoCreateLowReNut(), Foam::compressible::autoCreateMut(), Foam::incompressible::autoCreateNut(), basicMultiComponentMixture::basicMultiComponentMixture(), autoSnapDriver::calcNearestSurface(), motionDirectionalDiffusivity::correct(), inverseVolumeDiffusivity::correct(), inverseDistanceDiffusivity::correct(), cubic< Type >::correction(), linearUpwindV< Type >::correction(), linearUpwind< Type >::correction(), hsRhoMixtureThermo< MixtureType >::Cp(), hRhoMixtureThermo< MixtureType >::Cp(), hsPsiMixtureThermo< MixtureType >::Cp(), hPsiMixtureThermo< MixtureType >::Cp(), hhuMixtureThermo< MixtureType >::Cp(), hsRhoThermo< MixtureType >::Cp(), hRhoThermo< MixtureType >::Cp(), hsPsiThermo< MixtureType >::Cp(), hPsiThermo< MixtureType >::Cp(), ePsiThermo< MixtureType >::Cp(), autoSnapDriver::createZoneBaffles(), hsRhoThermo< MixtureType >::Cv(), hRhoThermo< MixtureType >::Cv(), hsPsiThermo< MixtureType >::Cv(), hPsiThermo< MixtureType >::Cv(), ePsiThermo< MixtureType >::Cv(), autoRefineDriver::doRefine(), autoSnapDriver::doSnap(), kOmega::epsilon(), kOmegaSST::epsilon(), Foam::MULES::explicitSolve(), steadyStateD2dt2Scheme< Type >::fvcD2dt2(), EulerD2dt2Scheme< Type >::fvcD2dt2(), steadyStateDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), CrankNicholsonDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), boundedBackwardDdtScheme::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), ddtScheme< Type >::fvcDdtPhiCoeff(), steadyStateDdtScheme< Type >::fvcDdtPhiCorr(), SLTSDdtScheme< Type >::fvcDdtPhiCorr(), localEulerDdtScheme< Type >::fvcDdtPhiCorr(), EulerDdtScheme< Type >::fvcDdtPhiCorr(), CrankNicholsonDdtScheme< Type >::fvcDdtPhiCorr(), CoEulerDdtScheme< Type >::fvcDdtPhiCorr(), backwardDdtScheme< Type >::fvcDdtPhiCorr(), fvDOM::fvDOM(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), fvMesh::fvMesh(), hsRhoMixtureThermo< MixtureType >::hc(), hRhoMixtureThermo< MixtureType >::hc(), hsPsiMixtureThermo< MixtureType >::hc(), hPsiMixtureThermo< MixtureType >::hc(), hhuMixtureThermo< MixtureType >::hc(), Foam::MULES::implicitSolve(), FreeStream< CloudType >::inflow(), localMin< Type >::interpolate(), localMax< Type >::interpolate(), fvMeshSubset::interpolate(), PhiScheme< Type, PhiLimiter >::limiter(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), Foam::MULES::limiter(), readFields::loadField(), Foam::MapConsistentVolFields(), Foam::MapLagrangianFields(), Foam::MapVolFields(), movingConeTopoFvMesh::movingConeTopoFvMesh(), sampledThresholdCellFaces::needsUpdate(), sampledIsoSurfaceCell::needsUpdate(), sampledIsoSurface::needsUpdate(), hsReactionThermo::New(), hReactionThermo::New(), hsCombustionThermo::New(), hhuCombustionThermo::New(), hCombustionThermo::New(), rhoChemistryModel::New(), psiChemistryModel::New(), basicRhoThermo::New(), basicPsiThermo::New(), hsReactionThermo::NewType(), hReactionThermo::NewType(), hsCombustionThermo::NewType(), hCombustionThermo::NewType(), fvMesh::phi(), autoSnapDriver::preSmoothPatch(), dynamicRefineFvMesh::readDict(), autoSnapDriver::repatchToSurface(), forces::rho(), autoSnapDriver::scaleMesh(), skewCorrected< Type >::skewCorrection(), autoSnapDriver::smoothDisplacement(), dynamicRefineFvMesh::update(), movingWallVelocityFvPatchVectorField::updateCoeffs(), fvMesh::V(), fvMesh::V00(), fvMesh::Vsc(), fvMesh::Vsc0(), extendedFaceToCellStencil::weightedSum(), extendedUpwindCellToFaceStencil::weightedSum(), extendedCellToFaceStencil::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().

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

Return the object registry - resolve conflict polyMesh/lduMesh.

Reimplemented from lduMesh.

Definition at line 224 of file fvMesh.H.

Referenced by MeshObjectMovePoints().

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 232 of file fvMesh.H.

Referenced by autoLayerDriver::addLayers(), engineMesh::engineMesh(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::K(), and turbulentTemperatureCoupledBaffleFvPatchScalarField::K().

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

Return ldu addressing.

Implements lduMesh.

Definition at line 402 of file fvMesh.C.

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

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 245 of file fvMesh.H.

References fvMesh::boundary(), and fvBoundaryMesh::interfaces().

Return cell volumes.

Definition at line 215 of file fvMeshGeometry.C.

References primitiveMesh::cellVolumes(), Foam::dimVolume, IOobject::NO_READ, IOobject::NO_WRITE, fvMesh::time(), and timeName.

Referenced by actuationDiskSource::addSu(), KinematicCloud< ParcelType >::alpha(), anisotropicFilter::anisotropicFilter(), ThermoCloud< ParcelType >::ap(), inverseVolumeDiffusivity::correct(), Foam::resError::div(), ThermoCloud< ParcelType >::Ep(), spray::evaporationSource(), explicitSource::explicitSource(), EulerD2dt2Scheme< Type >::fvcD2dt2(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), CrankNicholsonDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), boundedBackwardDdtScheme::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), EulerD2dt2Scheme< Type >::fvmD2dt2(), SLTSDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), CrankNicholsonDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), boundedBackwardDdtScheme::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), fvMesh::fvMesh(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), spray::heatTransferSource(), laplaceFilter::laplaceFilter(), spray::momentumSource(), parcel::move(), KinematicCloud< ParcelType >::rhoEff(), ThermoCloud< ParcelType >::sigmap(), Foam::fvm::Sp(), ReactingCloud< ParcelType >::Srho(), Foam::fvm::Su(), Foam::fvc::surfaceIntegrate(), Foam::fvm::SuSp(), KinematicCloud< ParcelType >::theta(), fvMesh::Vsc(), and fvMesh::Vsc0().

void clearOut (  )

Clear all geometry and addressing.

Reimplemented from surfaceInterpolation.

Definition at line 134 of file fvMesh.C.

References polyMesh::clearOut(), surfaceInterpolation::clearOut(), and Foam::deleteDemandDrivenData().

Referenced by fvMeshAdder::add(), autoLayerDriver::addLayers(), and meshRefinement::addPatch().

void updateMesh ( const mapPolyMesh &   mpm  ) [virtual]

Update mesh corresponding to the given map.

Reimplemented from polyMesh.

Definition at line 613 of file fvMesh.C.

References surfaceInterpolation::clearOut(), surfaceInterpolation::movePoints(), and polyMesh::updateMesh().

Referenced by autoLayerDriver::addLayers().

void mapFields ( const mapPolyMesh &   mpm  ) [virtual]

Map all fields in time using given map.

Definition at line 413 of file fvMesh.C.

References mapPolyMesh::cellMap(), forAll, Foam::mapClouds(), and List< T >::setSize().

void removeFvBoundary (  )

Remove boundary patches. Warning: fvPatchFields hold ref to.

these fvPatches.

Definition at line 326 of file fvMesh.C.

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

surfaceScalarField & setPhi (  )

Return cell face motion fluxes.

Definition at line 411 of file fvMeshGeometry.C.

References Foam::exit(), Foam::FatalError, and FatalErrorIn.

Return old-time cell volumes.

Definition at line 252 of file fvMeshGeometry.C.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

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

Write the underlying polyMesh and other data.

Definition at line 636 of file fvMesh.C.

References objectRegistry::writeObject().

Referenced by dynamicRefineFvMesh::writeObject().

bool write (  ) const [virtual]

Write mesh using IO settings from time.

Write mesh using IO settings from the time.

Reimplemented from IOdictionary.

Definition at line 647 of file fvMesh.C.

References regIOobject::write().

Referenced by autoLayerDriver::addLayers(), autoSnapDriver::createZoneBaffles(), autoSnapDriver::preSmoothPatch(), autoSnapDriver::scaleMesh(), and autoSnapDriver::smoothDisplacement().

bool operator!= ( const fvMesh &   bm  ) const

Definition at line 655 of file fvMesh.C.

bool operator== ( const fvMesh &   bm  ) const

Definition at line 661 of file fvMesh.C.


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