Go to the documentation of this file.
80 bool haveV = (VPtr_ != NULL);
81 bool haveSf = (SfPtr_ != NULL);
82 bool haveMagSf = (magSfPtr_ != NULL);
83 bool haveCP = (CPtr_ != NULL);
84 bool haveCf = (CfPtr_ != NULL);
114 clearGeomNotOldVol();
128 Info<<
"fvMesh::clearAddressing(const bool) :"
129 <<
" isMeshUpdate:" << isMeshUpdate <<
endl;
157 meshObject::clear<fvMesh, TopologicalMeshObject>(*
this);
158 meshObject::clear<lduMesh, TopologicalMeshObject>(*
this);
170 Info<<
"fvMesh::storeOldVol(const scalarField&) :"
171 <<
" Storing old time volumes since from time " << curTimeIndex_
172 <<
" and time now " << time().timeIndex()
178 if (V00Ptr_ && V0Ptr_)
187 V0Ptr_->scalarField::operator=(V);
209 V0.setSize(V.size());
213 curTimeIndex_ = time().timeIndex();
217 Info<<
"fvMesh::storeOldVol() :"
218 <<
" Stored old time volumes V0:" << V0Ptr_->size()
222 Info<<
"fvMesh::storeOldVol() :"
223 <<
" Stored oldold time volumes V00:" << V00Ptr_->size()
268 Info<<
"Constructing fvMesh from IOobject"
344 const word& defaultBoundaryPatchName,
345 const word& defaultBoundaryPatchType,
357 defaultBoundaryPatchName,
358 defaultBoundaryPatchType,
379 Info<<
"Constructing fvMesh from cellShapes" <<
endl;
413 Info<<
"Constructing fvMesh from components" <<
endl;
446 Info<<
"Constructing fvMesh from components" <<
endl;
464 const bool validBoundary
470 <<
" boundary already exists"
475 addPatches(
p, validBoundary);
484 Info<<
"void fvMesh::removeFvBoundary(): "
485 <<
"Removing boundary patches."
491 boundary_.setSize(0);
502 Info<<
"polyMesh::readUpdateState fvMesh::readUpdate() : "
503 <<
"Updating fvMesh. ";
512 Info<<
"Boundary and topological update" <<
endl;
524 Info<<
"Topological update" <<
endl;
533 Info<<
"Point motion update" <<
endl;
571 Info<<
"fvMesh::mapFields :"
573 <<
" nCells:" << nCells()
575 <<
" nFaces:" << nFaces()
588 <<
"mapPolyMesh does not correspond to the old mesh."
589 <<
" nCells:" << nCells()
592 <<
" nFaces:" << nFaces()
602 MapGeometricFields<scalar, fvPatchField, fvMeshMapper, volMesh>
604 MapGeometricFields<vector, fvPatchField, fvMeshMapper, volMesh>
606 MapGeometricFields<sphericalTensor, fvPatchField, fvMeshMapper, volMesh>
608 MapGeometricFields<symmTensor, fvPatchField, fvMeshMapper, volMesh>
610 MapGeometricFields<tensor, fvPatchField, fvMeshMapper, volMesh>
614 MapGeometricFields<scalar, fvsPatchField, fvMeshMapper, surfaceMesh>
616 MapGeometricFields<vector, fvsPatchField, fvMeshMapper, surfaceMesh>
618 MapGeometricFields<symmTensor, fvsPatchField, fvMeshMapper, surfaceMesh>
620 MapGeometricFields<symmTensor, fvsPatchField, fvMeshMapper, surfaceMesh>
622 MapGeometricFields<tensor, fvsPatchField, fvMeshMapper, surfaceMesh>
626 MapDimensionedFields<scalar, fvMeshMapper, volMesh>(mapper);
627 MapDimensionedFields<vector, fvMeshMapper, volMesh>(mapper);
628 MapDimensionedFields<sphericalTensor, fvMeshMapper, volMesh>(mapper);
629 MapDimensionedFields<symmTensor, fvMeshMapper, volMesh>(mapper);
630 MapDimensionedFields<tensor, fvMeshMapper, volMesh>(mapper);
644 V0.setSize(nCells());
650 V0[i] = savedV0[cellMap[i]];
666 label cellI = -index-2;
668 V0[cellI] += savedV0[oldCellI];
676 Info<<
"Mapping old time volume V0. Merged "
677 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
688 V00.setSize(nCells());
694 V00[i] = savedV00[cellMap[i]];
710 label cellI = -index-2;
712 V00[cellI] += savedV00[oldCellI];
719 Info<<
"Mapping old time volume V00. Merged "
720 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
756 if (phiPtr_->timeIndex() != time().
timeIndex())
766 scalar rDeltaT = 1.0/time().deltaTValue();
788 updateGeomNotOldVol();
792 boundary_.movePoints();
795 meshObject::movePoints<fvMesh>(*
this);
796 meshObject::movePoints<lduMesh>(*
this);
814 if (VPtr_ && (V().size() != mpm.
nOldCells()))
817 <<
"V:" << V().size()
818 <<
" not equal to the number of old cells "
822 if (V0Ptr_ && (V0Ptr_->size() != mpm.
nOldCells()))
825 <<
"V0:" << V0Ptr_->size()
826 <<
" not equal to the number of old cells "
830 if (V00Ptr_ && (V00Ptr_->size() != mpm.
nOldCells()))
833 <<
"V0:" << V00Ptr_->size()
834 <<
" not equal to the number of old cells "
845 clearGeomNotOldVol();
854 clearAddressing(
true);
856 meshObject::updateMesh<fvMesh>(*
this, mpm);
857 meshObject::updateMesh<lduMesh>(*
this, mpm);
878 ok = phiPtr_->write();
887 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
The class contains the addressing required by the lduMatrix: upper, lower and losort.
void clearOut()
Clear all geometry and addressing.
void storeOldVol(const scalarField &)
Preserve old volume(s)
virtual ~fvMesh()
Destructor.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
The internalField of a SlicedGeometricField.
#define forAll(list, i)
Loop across all elements in list.
void clearAddressing()
Clear topological data.
A class for managing temporary objects.
void updateGeomNotOldVol()
Clear geometry like clearGeomNotOldVol but recreate any.
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
void addFvPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches. Constructor helper.
Selector class for finite volume differencing schemes. fvMesh is derived from fvShemes so that all fi...
Template functions to aid in the implementation of demand driven data.
bool moving() const
Is mesh moving.
compressionType
Enumeration for the format of data in the stream.
void * VPtr_
Cell volumes old time level.
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map.
faceListList boundary(nPatches)
void clearGeomNotOldVol()
Clear geometry but not the old-time cell volumes.
void clearGeom()
Clear geometry.
virtual bool write() const
Write using setting from DB.
label nOldFaces() const
Number of old faces.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple container for copying or transferring objects of type <T>.
Mesh consisting of general polyhedral cells.
Generic Geometric field mapper. For "real" mapping, add template specialisations for mapping of inter...
Foam::fvMeshLduAddressing.
surfaceScalarField * magSfPtr_
Mag face area vectors.
slicedSurfaceVectorField * SfPtr_
Face area vectors.
Registry of regIOobjects.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
virtual bool write() const
Write mesh using IO settings from time.
void deleteDemandDrivenData(DataPtr &dataPtr)
static int debug
Debug switch.
DimensionedField< scalar, volMesh > * V0Ptr_
Cell volumes old time level.
slicedSurfaceVectorField * CfPtr_
Face centres.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
static void clearUpto(objectRegistry &)
Clear all meshObject derived from FromType up to (but not including)
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
bool operator!=(const fvMesh &) const
virtual void updateMesh(const mapPolyMesh &mpm)
Update the mesh corresponding to given map.
Selector class for finite volume solution solution. fvMesh is derived from fvSolution so that all fie...
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh corresponding to the given map.
InternalField & internalField()
Return internal field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
fvMesh(const fvMesh &)
Disallow construct as copy.
bool movePoints()
Do what is neccessary if the mesh has moved.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
bool isFile(const fileName &, const bool checkGzip=true)
Does the name exist as a FILE in the file system?
const scalarField & oldCellVolumes() const
errorManipArg< error, int > exit(error &err, const int errNo=1)
void removeBoundary()
Remove boundary patches.
readUpdateState
Enumeration defining the state of the mesh after a read update.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
bool operator==(const fvMesh &) const
slicedVolVectorField * CPtr_
Cell centres.
const labelList & reverseCellMap() const
Reverse cell map.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write the objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Class holds all the necessary information for mapping fields associated with fvMesh.
Traits class for primitives.
void mapClouds(const objectRegistry &db, const mapPolyMesh &mapper)
Generic Geometric field mapper.
label nOldCells() const
Number of old cells.
virtual bool writeObjects(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write the underlying polyMesh and other data.
const labelList & faceMap() const
Old face map.
Cell to surface interpolation scheme. Included in fvMesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Time & time() const
Return the top-level database.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
SubField< Type > subField
Declare type of subField.
void size(const label)
Override size to be inconsistent with allocated storage.
const DimensionedField< scalar, volMesh > & V00() const
Return old-old-time cell volumes.
const dimensionSet dimVolume(pow3(dimLength))
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
Database for solution data, solver performance and other reduced data.
const labelList & cellMap() const
Old cell map.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void clearOut()
Clear all geometry and addressing.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
surfaceScalarField * phiPtr_
Face motion fluxes.
streamFormat
Enumeration for the format of data in the stream.