54 #include "surfaceInterpolate.H"
88 void Foam::fvMesh::clearFvGeomNotOldVol()
118 void Foam::fvMesh::clearFvGeom()
122 clearFvGeomNotOldVol();
130 void Foam::fvMesh::updateGeomNotOldVol()
132 bool haveV = (VPtr_ !=
nullptr);
133 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
134 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
135 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
136 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
138 clearFvGeomNotOldVol();
164 void Foam::fvMesh::storeOldTimeFields()
166 storeOldTimeFields<PointField>();
167 storeOldTimeFields<VolField>();
168 storeOldTimeFields<SurfaceField>();
172 void Foam::fvMesh::nullOldestTimeFields()
174 nullOldestTimeFields<PointField>();
175 nullOldestTimeFields<VolField>();
176 nullOldestTimeFields<SurfaceField>();
184 Pout<<
"fvMesh allocated :" <<
endl;
193 Pout<<
" Poly-faces boundary field" <<
endl;
196 if (polyBFacePatchesPtr_)
198 Pout<<
" Poly-boundary-face to fv-patch and fv-patch-face map"
204 Pout<<
" Owner boundary field" <<
endl;
209 Pout<<
" Old-time cell volumes field" <<
endl;
214 Pout<<
" Old-old-time cell volumes field" <<
endl;
219 Pout<<
" Non-sliced face areas field" <<
endl;
224 Pout<<
" Non-sliced face area magnitudes field" <<
endl;
229 Pout<<
" Non-sliced cell centres field" <<
endl;
234 Pout<<
" Non-sliced face centres field" <<
endl;
285 meshObjects::clear<fvMesh, DeletableMeshObject>(*
this);
286 meshObjects::clear<lduMesh, DeletableMeshObject>(*
this);
325 if (isA<nonConformalFvPatch>(fvp))
327 wantedPatchTypes[
patchi] =
328 refCast<const nonConformalFvPatch>(fvp).polyFacesType();
332 return wantedPatchTypes;
338 if (!polyFacesBfPtr_)
343 setPolyFacesBfInstance(
time().
name());
345 return *polyFacesBfPtr_;
361 boundary_(*this, poly().
boundary()),
363 topoChanger_(nullptr),
364 distributor_(nullptr),
367 polyFacesBfIOPtr_(nullptr),
368 polyFacesBfPtr_(nullptr),
369 polyBFaceOffsetsPtr_(nullptr),
370 polyBFaceOffsetPatchesPtr_(nullptr),
371 polyBFaceOffsetPatchFacesPtr_(nullptr),
372 polyBFacePatchesPtr_(nullptr),
373 polyBFacePatchFacesPtr_(nullptr),
374 ownerBfPtr_(nullptr),
379 SfSlicePtr_(nullptr),
381 magSfSlicePtr_(nullptr),
385 CfSlicePtr_(nullptr),
406 const word& defaultBoundaryPatchName,
407 const word& defaultBoundaryPatchType,
419 defaultBoundaryPatchName,
420 defaultBoundaryPatchType,
425 boundary_(*this, poly().
boundary()),
427 topoChanger_(nullptr),
428 distributor_(nullptr),
431 polyFacesBfIOPtr_(nullptr),
432 polyFacesBfPtr_(nullptr),
433 polyBFaceOffsetsPtr_(nullptr),
434 polyBFaceOffsetPatchesPtr_(nullptr),
435 polyBFaceOffsetPatchFacesPtr_(nullptr),
436 polyBFacePatchesPtr_(nullptr),
437 polyBFacePatchFacesPtr_(nullptr),
438 ownerBfPtr_(nullptr),
443 SfSlicePtr_(nullptr),
445 magSfSlicePtr_(nullptr),
449 CfSlicePtr_(nullptr),
473 std::move(allNeighbour),
478 boundary_(*this, poly().
boundary()),
480 topoChanger_(nullptr),
481 distributor_(nullptr),
484 polyFacesBfIOPtr_(nullptr),
485 polyFacesBfPtr_(nullptr),
486 polyBFaceOffsetsPtr_(nullptr),
487 polyBFaceOffsetPatchesPtr_(nullptr),
488 polyBFaceOffsetPatchFacesPtr_(nullptr),
489 polyBFacePatchesPtr_(nullptr),
490 polyBFacePatchFacesPtr_(nullptr),
491 ownerBfPtr_(nullptr),
496 SfSlicePtr_(nullptr),
498 magSfSlicePtr_(nullptr),
502 CfSlicePtr_(nullptr),
531 topoChanger_(nullptr),
532 distributor_(nullptr),
535 polyFacesBfIOPtr_(nullptr),
536 polyFacesBfPtr_(nullptr),
537 polyBFaceOffsetsPtr_(nullptr),
538 polyBFaceOffsetPatchesPtr_(nullptr),
539 polyBFaceOffsetPatchFacesPtr_(nullptr),
540 polyBFacePatchesPtr_(nullptr),
541 polyBFacePatchFacesPtr_(nullptr),
542 ownerBfPtr_(nullptr),
547 SfSlicePtr_(nullptr),
549 magSfSlicePtr_(nullptr),
553 CfSlicePtr_(nullptr),
566 boundary_(
Foam::move(
mesh.boundary_)),
567 stitcher_(
Foam::move(
mesh.stitcher_)),
568 topoChanger_(
Foam::move(
mesh.topoChanger_)),
569 distributor_(
Foam::move(
mesh.distributor_)),
572 polyFacesBfIOPtr_(
Foam::move(
mesh.polyFacesBfIOPtr_)),
573 polyFacesBfPtr_(
Foam::move(
mesh.polyFacesBfPtr_)),
574 polyBFaceOffsetsPtr_(
Foam::move(
mesh.polyBFaceOffsetsPtr_)),
575 polyBFaceOffsetPatchesPtr_(
Foam::move(
mesh.polyBFaceOffsetPatchesPtr_)),
576 polyBFaceOffsetPatchFacesPtr_
578 Foam::move(
mesh.polyBFaceOffsetPatchFacesPtr_)
580 polyBFacePatchesPtr_(
Foam::move(
mesh.polyBFacePatchesPtr_)),
581 polyBFacePatchFacesPtr_(
Foam::move(
mesh.polyBFacePatchFacesPtr_)),
582 ownerBfPtr_(
Foam::move(
mesh.ownerBfPtr_)),
583 curTimeIndex_(
mesh.curTimeIndex_),
587 SfSlicePtr_(
Foam::move(
mesh.SfSlicePtr_)),
589 magSfSlicePtr_(
Foam::move(
mesh.magSfSlicePtr_)),
590 magSfPtr_(
Foam::move(
mesh.magSfPtr_)),
591 CSlicePtr_(
Foam::move(
mesh.CSlicePtr_)),
593 CfSlicePtr_(
Foam::move(
mesh.CfSlicePtr_)),
624 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
685 return topoChanger_.valid() && topoChanger_->dynamic();
691 return distributor_.valid() && distributor_->dynamic();
698 (topoChanger_.valid() && topoChanger_->dynamic())
699 || (mover_.valid() && mover_->dynamic());
707 stitcher_->stitches()
708 || topoChanger_->dynamic()
709 || distributor_->dynamic()
728 phiPtr_->nullOldestTime();
733 topoChanged_ =
false;
735 topoChanged_ = topoChanger_->update();
737 const bool distributed = distributor_->update();
739 return topoChanged_ || distributed;
747 const bool moved = mover_->update();
749 curTimeIndex_ =
time().timeIndex();
751 stitcher_->connect(
true,
true,
false);
760 const bool validBoundary
766 <<
" boundary already exists"
771 addPatches(
p, validBoundary);
772 boundary_.addPatches(poly().
boundary());
782 boundary_.setSize(0);
798 clearAddressing(
true);
802 auto updatePatches = []
830 updatePatches(poly().
boundary(), boundary_);
831 updatePatches(otherMesh.
poly().
boundary(), otherMesh.boundary_);
842 const fileName instance0 = instance();
843 const bool forward = readUpdateIsForward();
855 Info<<
" Boundary and topological change" <<
endl;
858 Info<<
" Topological change" <<
endl;
869 const bool reStitch =
871 && stitcher_->stitches()
875 ||
time().findInstance
882 != (forward ? instance0 : polyFacesBfIOPtr_->instance())
887 stitcher_->disconnect(
false,
false);
897 boundary_.readUpdate(poly().
boundary());
912 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
919 return reStitch ? STITCHED : UNCHANGED;
921 return reStitch ? STITCHED : POINTS_MOVED;
925 return TOPO_PATCH_CHANGE;
951 return !(polyFacesBfPtr_ && SfPtr_);
957 if (!polyFacesBfPtr_)
976 polyFacesPatchTypes(),
981 return *polyFacesBfPtr_;
988 if (!polyBFacePatchesPtr_)
990 const label nPolyBFaces = nFaces() - nInternalFaces();
993 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
994 labelList& offsets = *polyBFaceOffsetsPtr_;
999 const label polyBFacei =
1002 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1007 offsets[polyBFacei + 1] ++;
1010 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
1012 offsets[polyBFacei + 1] += offsets[polyBFacei];
1018 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
1020 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
1025 const label polyBFacei =
1028 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1033 patchFaces[offsets[polyBFacei]] = patchFacei;
1034 offsets[polyBFacei] ++;
1041 label polyBFacei = nPolyBFaces - 1;
1046 offsets[polyBFacei + 1] = offsets[polyBFacei];
1051 polyBFacePatchesPtr_ =
1053 polyBFacePatchFacesPtr_ =
1057 return *polyBFacePatchesPtr_;
1064 if (!polyBFacePatchFacesPtr_)
1069 return *polyBFacePatchFacesPtr_;
1097 return *ownerBfPtr_;
1115 return topoChanger_();
1121 return distributor_();
1135 <<
" nCells:" << nCells()
1137 <<
" nFaces:" << nFaces()
1148 <<
"polyTopoChangeMap does not correspond to the old mesh."
1149 <<
" nCells:" << nCells()
1152 <<
" nFaces:" << nFaces()
1162 #define mapVolFieldType(Type, nullArg) \
1163 MapGeometricFields<Type, fvMeshMapper, fvMesh>(fvMap);
1167 #define mapSurfaceFieldType(Type, nullArg) \
1168 MapGeometricFields<Type, fvMeshMapper, surfaceMesh>(fvMap);
1172 #define mapVolInternalFieldType(Type, nullArg) \
1173 MapDimensionedFields<Type, fvMeshMapper, fvMesh>(fvMap);
1181 #define mapPointFieldType(Type, nullArg) \
1182 MapGeometricFields<Type, pointMeshMapper, pointMesh>(mapper);
1190 stitcher_->disconnect(
true,
true);
1203 meshObjects::movePoints<fvMesh>(*
this);
1204 meshObjects::movePoints<lduMesh>(*
this);
1206 const_cast<Time&
>(
time()).functionObjects().movePoints(*
this);
1220 if (V00Ptr_ &&
notNull(V00Ptr_))
1223 <<
"Old-old volumes should not be maintained across mesh "
1264 V0Ptr_->scalarField::operator=(V());
1288 phiPtr_->storeOldTimes();
1295 scalar rDeltaT = 1.0/
time().deltaTValue();
1312 phibf[
patchi] *= rDeltaT;
1321 updateGeomNotOldVol();
1326 meshObjects::movePoints<fvMesh>(*
this);
1327 meshObjects::movePoints<lduMesh>(*
this);
1329 const_cast<Time&
>(
time()).functionObjects().movePoints(*
this);
1340 <<
"The mesh was not disconnected prior to topology change"
1348 clearFvGeomNotOldVol();
1354 <<
"It is not possible to use mesh motion, topology change, and "
1355 <<
"second order time schemes simultaneously"
1366 clearAddressing(
true);
1368 meshObjects::topoChange<fvMesh>(*
this, map);
1369 meshObjects::topoChange<lduMesh>(*
this, map);
1371 const_cast<Time&
>(
time()).functionObjects().topoChange(map);
1373 if (stitcher_.valid())
1375 stitcher_->topoChange(map);
1378 if (topoChanger_.valid())
1380 topoChanger_->topoChange(map);
1383 if (distributor_.valid())
1385 distributor_->topoChange(map);
1390 mover_->topoChange(map);
1400 <<
"The mesh was not disconnected prior to mesh-to-mesh mapping"
1408 clearFvGeomNotOldVol();
1414 clearAddressing(
true);
1416 meshObjects::mapMesh<fvMesh>(*
this, map);
1417 meshObjects::mapMesh<lduMesh>(*
this, map);
1419 const_cast<Time&
>(
time()).functionObjects().mapMesh(map);
1421 stitcher_->mapMesh(map);
1422 topoChanger_->mapMesh(map);
1423 distributor_->mapMesh(map);
1424 mover_->mapMesh(map);
1433 <<
"The mesh was not disconnected prior to distribution"
1441 clearFvGeomNotOldVol();
1447 clearAddressing(
true);
1449 meshObjects::distribute<fvMesh>(*
this, map);
1450 meshObjects::distribute<lduMesh>(*
this, map);
1452 const_cast<Time&
>(
time()).functionObjects().distribute(map);
1454 stitcher_->distribute(map);
1455 topoChanger_->distribute(map);
1456 distributor_->distribute(map);
1457 mover_->distribute(map);
1463 if (!polyFacesBfPtr_)
1468 polyFacesBfIOPtr_->instance() = inst;
1475 if (!polyFacesBfPtr_)
1477 return facesInstance();
1480 return polyFacesBfIOPtr_->instance();
1487 clearFvGeomNotOldVol();
1493 clearAddressing(
true);
1500 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1516 clearFvGeomNotOldVol();
1522 clearAddressing(
true);
1560 if (sync &&
time().completeCase())
1568 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1585 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1590 refCast<const processorFvPatch>(CBf[
patchi].patch())
1604 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1612 const label insertPatchi,
1621 clearFvGeomNotOldVol();
1627 clearAddressing(
true);
1629 const label boundarySize0 = boundary_.size();
1633 boundary_.setSize(boundarySize0 + 1);
1644 #define AddPatchFieldsType(Type, FieldType, DefaultPatchFieldType) \
1645 AddPatchFields<FieldType<Type>> \
1647 const_cast<objectRegistry&>(db()), \
1649 DefaultPatchFieldType \
1663 #undef AddPatchFieldsType
1670 const bool validBoundary
1675 boundary_.shuffle(newToOld, validBoundary);
1677 #define ReorderPatchFieldsType(Type, FieldType) \
1678 ReorderPatchFields<FieldType<Type>> \
1680 const_cast<objectRegistry&>(db()), \
1685 #undef ReorderPatchFieldsType
1717 unsigned int precision0 =
1721 if (phiPtr_ && V00Ptr_)
1723 ok = ok && phiPtr_->write(
write);
1727 if (V0Ptr_ && V00Ptr_)
1729 ok = ok && V0Ptr_->write(
write);
1735 if (stitcher_.valid())
1737 stitcher_->write(
write);
1740 if (topoChanger_.valid())
1742 topoChanger_->write(
write);
1745 if (distributor_.valid())
1747 distributor_->write(
write);
1752 mover_->write(
write);
1777 ok = ok & polyFaces.
write();
1786 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1794 if (!fvSchemes_.valid())
1805 if (!fvSolution_.valid())
1834 return refCast<const fvMesh>(io.
db());
#define forAll(list, i)
Loop across all elements in list.
static bool found(const word &name, const polyMesh &mesh)
Return true if the DemandDrivenMeshObject with the given name.
static zonesGenerator & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
SubField< scalar > subField
Declare type of subField.
static const char *const typeName
Generic GeometricBoundaryField class.
void evaluate()
Evaluate boundary conditions.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
GeometricBoundaryField< Type, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static const GeometricField< Type, GeoMesh, PrimitiveField > & null()
Return a null geometric field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const objectRegistry & db() const
Return the local objectRegistry.
static unsigned int fullPrecision()
Return a full precision for writing data that is *very*.
streamFormat
Enumeration for the format of data in the stream.
static unsigned int defaultPrecision()
Return the default precision.
compressionType
Enumeration for the format of data in the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
label nOldTimes(const bool includeNull=true) const
Return the number of old-time fields stored.
const Field0Type & oldTime() const
Return the old-time field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Unallocated base class of CompactListList.
T & last()
Return the last element of the list.
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun()
Is this a parallel run?
static commsTypes defaultCommsType
Default commsType.
label size() const
Return the number of elements in the UPtrList.
Foam::calculatedFvsPatchField.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling file names.
Abstract base class for fvMesh movers.
static autoPtr< fvMeshDistributor > New(fvMesh &)
Select, construct and return the fvMeshDistributor.
Foam::fvMeshLduAddressing.
Class holds all the necessary information for mapping fields associated with fvMesh.
Abstract base class for fvMesh movers.
static autoPtr< fvMeshMover > New(fvMesh &)
Select, construct and return the fvMeshMover.
Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to crea...
static autoPtr< fvMeshStitcher > New(fvMesh &, bool changing)
Select, construct and return the fvMeshStitcher.
Abstract base class for fvMesh topology changers.
static autoPtr< fvMeshTopoChanger > New(fvMesh &, const dictionary &dict)
Select, construct and return the fvMeshTopoChanger.
Mesh data needed to do the Finite Volume discretisation.
static const HashSet< word > curGeometryFields
Set of names of registered current-time geometric fields.
const fileName & polyFacesBfInstance() const
Get the current instance for the poly faces boundary field.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
stitchType
Extent to which to stitch on read and readUpdate. By default, a.
void postConstruct(const bool changers, const bool zones, const stitchType stitch)
Complete construction of the mesh.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
const fvMeshDistributor & distributor() const
Return the distributor function class.
const fvSchemes & schemes() const
Return the fvSchemes.
void clearGeom()
Clear geometry.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual ~fvMesh()
Destructor.
const GeometricBoundaryField< label, surfaceMesh > & ownerBf() const
Return face-owner addressing.
static const HashSet< word > geometryFields
Set of names of registered geometric fields.
const fvMeshStitcher & stitcher() const
Return the stitcher function class.
void preChange()
Prepare for a mesh change.
const fvSolution & solution() const
Return the fvSolution.
void addFvPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches. Constructor helper.
void swap(fvMesh &)
Swap mesh.
const GeometricBoundaryField< label, surfaceMesh > & polyFacesBf() const
Return face-poly-face addressing.
bool operator==(const fvMesh &) const
void clearAddressing(const bool isMeshUpdate=false)
Clear addressing.
const UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
bool operator!=(const fvMesh &) const
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the mesh data and all objects in the registry.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void mapFields(const polyTopoChangeMap &map)
Map all fields in time using given map.
bool update()
Update the mesh for topology change, mesh to mesh mapping.
void setPolyFacesBfInstance(const fileName &)
Set the instance for the poly faces boundary field.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
bool distributing() const
Does the mesh get redistributed?
void printAllocated() const
Print a list of all the currently allocated mesh data.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
void unconform(const GeometricBoundaryField< label, surfaceMesh > &polyFacesBf, const surfaceVectorField &Sf, const surfaceVectorField &Cf, const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >(), const bool sync=true)
Unconform the fvMesh from the polyMesh.
bool dynamic() const
Is this mesh dynamic?
fvMesh(const IOobject &io, const bool doPost=true)
Construct from IOobject.
const fvMeshTopoChanger & topoChanger() const
Return the topo-changer function class.
virtual void topoChange(const polyTopoChangeMap &map)
Update mesh corresponding to the given map.
bool topoChanging() const
Does the mesh topology change?
virtual bool writeMesh() const
Write the mesh data only.
virtual void addPatch(const label insertPatchi, const polyPatch &patch)
Add/insert single patch.
void clearOut()
Clear all geometry and addressing.
bool move()
Move the mesh.
virtual void setPoints(const pointField &)
Reset the points.
const fvMeshMover & mover() const
Return the mover function class.
void conform(const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >())
Conform the fvMesh to the polyMesh.
bool conformal() const
Return whether the fvMesh is conformal with the polyMesh.
const polyMesh & poly() const
Return reference to polyMesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static autoPtr< fvPatch > New(const polyPatch &, const fvBoundaryMesh &)
Return a pointer to a new patch created on freestore from polyPatch.
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
Selector class for finite volume solution solution. fvMesh is derived from fvSolution so that all fie...
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
static void clearUpto(objectRegistry &)
Clear all meshObjects derived from FromType up to (but not including)
Traits class for primitives.
Class holds all the necessary information for mapping fields associated with pointMesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundary() const
Return boundary mesh.
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
void clearGeom()
Clear geometry.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void swap(polyMesh &)
Swap mesh.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the mesh data and all objects in the registry.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void printAllocated() const
Print a list of all the currently allocated mesh data.
void removeBoundary()
Remove boundary patches.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
virtual bool writeMesh() const
Write the mesh data only.
virtual void addPatch(const label insertPatchi, const polyPatch &patch)
Add/insert single patch.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
virtual void setPoints(const pointField &)
Reset the points.
A patch is a list of labels that address the faces in the global face list.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
label nOldCells() const
Number of old cells.
const labelList & cellMap() const
Old cell map.
label nOldFaces() const
Number of old faces.
const labelList & faceMap() const
Old face map.
virtual bool write(const bool write=true) const
Write using setting from DB.
Cell to surface interpolation scheme. Included in fvMesh.
bool movePoints()
Do what is necessary if the mesh has moved.
void printAllocated() const
Print a list of all the currently allocated data.
void clearOut()
Clear all geometry and addressing.
Mesh data for surface fields.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define nullOldestTimeFields(Type, nullArg)
#define ReorderPatchFieldsType(Type, FieldType)
#define mapVolInternalFieldType(Type, nullArg)
#define mapPointFieldType(Type, nullArg)
#define AddPatchFieldsType(Type, FieldType, DefaultPatchFieldType)
#define mapVolFieldType(Type, nullArg)
#define mapSurfaceFieldType(Type, nullArg)
Reconstruct volField from a face flux field.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
const fvPatchList & patches
#define DebugInFunction
Report an information message using Foam::Info.
static const coefficient C("C", dimTemperature, 234.5)
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
const fileOperation & fileHandler()
Get current file handler.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet & dimless
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
SurfaceField< scalar > surfaceScalarField
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
const dimensionSet & dimVolume
const fvMesh & region(const dictionary &dict)
Cast the give dictionary to the corresponding region fvMesh.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
const dimensionSet & dimTime
Field< label > labelField
Specialisation of Field<T> for label.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
prefixOSstream Pout(cout, "Pout")
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimArea
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void nullDemandDrivenData(DataType *&dataPtr)
faceListList boundary(nPatches)