53 #include "surfaceInterpolate.H"
77 void Foam::fvMesh::clearGeomNotOldVol()
110 void Foam::fvMesh::updateGeomNotOldVol()
112 bool haveV = (VPtr_ !=
nullptr);
113 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
114 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
115 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
116 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
118 clearGeomNotOldVol();
144 void Foam::fvMesh::clearGeom()
151 clearGeomNotOldVol();
174 TopoChangeableMeshObject
183 TopoChangeableMeshObject
191 meshObjects::clear<fvMesh, DeletableMeshObject>(*
this);
192 meshObjects::clear<lduMesh, DeletableMeshObject>(*
this);
207 void Foam::fvMesh::storeOldTimeFields()
209 storeOldTimeFields<PointField>();
210 storeOldTimeFields<VolField>();
211 storeOldTimeFields<SurfaceField>();
215 void Foam::fvMesh::nullOldestTimeFields()
217 nullOldestTimeFields<PointField>();
218 nullOldestTimeFields<VolField>();
219 nullOldestTimeFields<SurfaceField>();
247 if (isA<nonConformalFvPatch>(fvp))
249 wantedPatchTypes[
patchi] =
250 refCast<const nonConformalFvPatch>(fvp).polyFacesType();
254 return wantedPatchTypes;
260 if (!polyFacesBfPtr_)
265 setPolyFacesBfInstance(time().
name());
267 return *polyFacesBfPtr_;
277 boundary_(*this, boundaryMesh()),
279 topoChanger_(nullptr),
280 distributor_(nullptr),
283 polyFacesBfIOPtr_(nullptr),
284 polyFacesBfPtr_(nullptr),
285 polyBFaceOffsetsPtr_(nullptr),
286 polyBFaceOffsetPatchesPtr_(nullptr),
287 polyBFaceOffsetPatchFacesPtr_(nullptr),
288 polyBFacePatchesPtr_(nullptr),
289 polyBFacePatchFacesPtr_(nullptr),
290 ownerBfPtr_(nullptr),
295 SfSlicePtr_(nullptr),
297 magSfSlicePtr_(nullptr),
301 CfSlicePtr_(nullptr),
325 const word& defaultBoundaryPatchName,
326 const word& defaultBoundaryPatchType,
338 defaultBoundaryPatchName,
339 defaultBoundaryPatchType,
343 boundary_(*this, boundaryMesh()),
345 topoChanger_(nullptr),
346 distributor_(nullptr),
349 polyFacesBfIOPtr_(nullptr),
350 polyFacesBfPtr_(nullptr),
351 polyBFaceOffsetsPtr_(nullptr),
352 polyBFaceOffsetPatchesPtr_(nullptr),
353 polyBFaceOffsetPatchFacesPtr_(nullptr),
354 polyBFacePatchesPtr_(nullptr),
355 polyBFacePatchFacesPtr_(nullptr),
356 ownerBfPtr_(nullptr),
361 SfSlicePtr_(nullptr),
363 magSfSlicePtr_(nullptr),
367 CfSlicePtr_(nullptr),
394 std::move(allNeighbour),
398 boundary_(*this, boundaryMesh()),
400 topoChanger_(nullptr),
401 distributor_(nullptr),
404 polyFacesBfIOPtr_(nullptr),
405 polyFacesBfPtr_(nullptr),
406 polyBFaceOffsetsPtr_(nullptr),
407 polyBFaceOffsetPatchesPtr_(nullptr),
408 polyBFaceOffsetPatchFacesPtr_(nullptr),
409 polyBFacePatchesPtr_(nullptr),
410 polyBFacePatchFacesPtr_(nullptr),
411 ownerBfPtr_(nullptr),
416 SfSlicePtr_(nullptr),
418 magSfSlicePtr_(nullptr),
422 CfSlicePtr_(nullptr),
453 topoChanger_(nullptr),
454 distributor_(nullptr),
457 polyFacesBfIOPtr_(nullptr),
458 polyFacesBfPtr_(nullptr),
459 polyBFaceOffsetsPtr_(nullptr),
460 polyBFaceOffsetPatchesPtr_(nullptr),
461 polyBFaceOffsetPatchFacesPtr_(nullptr),
462 polyBFacePatchesPtr_(nullptr),
463 polyBFacePatchFacesPtr_(nullptr),
464 ownerBfPtr_(nullptr),
469 SfSlicePtr_(nullptr),
471 magSfSlicePtr_(nullptr),
475 CfSlicePtr_(nullptr),
490 boundary_(
Foam::move(mesh.boundary_)),
491 stitcher_(
Foam::move(mesh.stitcher_)),
492 topoChanger_(
Foam::move(mesh.topoChanger_)),
493 distributor_(
Foam::move(mesh.distributor_)),
494 mover_(
Foam::move(mesh.mover_)),
495 lduPtr_(
Foam::move(mesh.lduPtr_)),
496 polyFacesBfIOPtr_(
Foam::move(mesh.polyFacesBfIOPtr_)),
497 polyFacesBfPtr_(
Foam::move(mesh.polyFacesBfPtr_)),
498 polyBFaceOffsetsPtr_(
Foam::move(mesh.polyBFaceOffsetsPtr_)),
499 polyBFaceOffsetPatchesPtr_(
Foam::move(mesh.polyBFaceOffsetPatchesPtr_)),
500 polyBFaceOffsetPatchFacesPtr_
502 Foam::move(mesh.polyBFaceOffsetPatchFacesPtr_)
504 polyBFacePatchesPtr_(
Foam::move(mesh.polyBFacePatchesPtr_)),
505 polyBFacePatchFacesPtr_(
Foam::move(mesh.polyBFacePatchFacesPtr_)),
506 ownerBfPtr_(
Foam::move(mesh.ownerBfPtr_)),
507 curTimeIndex_(mesh.curTimeIndex_),
508 VPtr_(
Foam::move(mesh.VPtr_)),
509 V0Ptr_(
Foam::move(mesh.V0Ptr_)),
510 V00Ptr_(
Foam::move(mesh.V00Ptr_)),
511 SfSlicePtr_(
Foam::move(mesh.SfSlicePtr_)),
512 SfPtr_(
Foam::move(mesh.SfPtr_)),
513 magSfSlicePtr_(
Foam::move(mesh.magSfSlicePtr_)),
514 magSfPtr_(
Foam::move(mesh.magSfPtr_)),
515 CSlicePtr_(
Foam::move(mesh.CSlicePtr_)),
516 CPtr_(
Foam::move(mesh.CPtr_)),
517 CfSlicePtr_(
Foam::move(mesh.CfSlicePtr_)),
518 CfPtr_(
Foam::move(mesh.CfPtr_)),
519 phiPtr_(
Foam::move(mesh.phiPtr_))
544 if (stitch != stitchType::none)
546 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
600 return topoChanger_.valid() && topoChanger_->dynamic();
606 return distributor_.valid() && distributor_->dynamic();
613 (topoChanger_.valid() && topoChanger_->dynamic())
614 || (mover_.valid() && mover_->dynamic());
622 stitcher_->stitches()
623 || topoChanger_->dynamic()
624 || distributor_->dynamic()
630 if (!conformal()) stitcher_->disconnect(
true,
true);
643 topoChanged_ =
false;
644 bool updated = topoChanger_->update();
645 topoChanged_ = updated;
647 updated = distributor_->update() || updated;
655 if (!conformal()) stitcher_->disconnect(
true,
true);
657 if (curTimeIndex_ < time().
timeIndex() && stitcher_->stitches())
663 storeOldTimeFields();
669 const bool moved = mover_->update();
671 curTimeIndex_ = time().timeIndex();
673 stitcher_->connect(
true,
true,
false);
682 const bool validBoundary
688 <<
" boundary already exists"
693 addPatches(
p, validBoundary);
694 boundary_.addPatches(boundaryMesh());
707 boundary_.setSize(0);
723 clearAddressing(
true);
727 auto updatePatches = []
755 updatePatches(boundaryMesh(), boundary_);
756 updatePatches(otherMesh.
boundaryMesh(), otherMesh.boundary_);
780 const bool reStitch =
782 && stitcher_->stitches()
783 && stitch != stitchType::none
784 && (!conformal() || polyFacesInst != polyFacesBfIOPtr_->instance());
788 stitcher_->disconnect(
false,
false);
797 boundary_.readUpdate(boundaryMesh());
804 Info<<
"Boundary and topological update" <<
endl;
813 Info<<
"Topological update" <<
endl;
822 Info<<
"Point motion update" <<
endl;
835 if (reStitch && stitch != stitchType::none)
837 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
844 return reStitch ? STITCHED : UNCHANGED;
846 return reStitch ? STITCHED : POINTS_MOVED;
850 return TOPO_PATCH_CHANGE;
876 return !(polyFacesBfPtr_ && SfPtr_);
882 if (!polyFacesBfPtr_)
901 polyFacesPatchTypes(),
902 boundaryMesh().types()
906 return *polyFacesBfPtr_;
913 if (!polyBFacePatchesPtr_)
915 const label nPolyBFaces = nFaces() - nInternalFaces();
918 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
919 labelList& offsets = *polyBFaceOffsetsPtr_;
924 const label polyBFacei =
927 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
932 offsets[polyBFacei + 1] ++;
935 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
937 offsets[polyBFacei + 1] += offsets[polyBFacei];
943 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
945 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
950 const label polyBFacei =
953 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
958 patchFaces[offsets[polyBFacei]] = patchFacei;
959 offsets[polyBFacei] ++;
966 label polyBFacei = nPolyBFaces - 1;
971 offsets[polyBFacei + 1] = offsets[polyBFacei];
976 polyBFacePatchesPtr_ =
978 polyBFacePatchFacesPtr_ =
982 return *polyBFacePatchesPtr_;
989 if (!polyBFacePatchFacesPtr_)
994 return *polyBFacePatchFacesPtr_;
1010 calculatedFvsPatchLabelField::typeName
1012 boundaryMesh().types()
1022 return *ownerBfPtr_;
1040 return topoChanger_();
1046 return distributor_();
1062 <<
" nCells:" << nCells()
1064 <<
" nFaces:" << nFaces()
1077 <<
"polyTopoChangeMap does not correspond to the old mesh."
1078 <<
" nCells:" << nCells()
1081 <<
" nFaces:" << nFaces()
1091 #define mapVolFieldType(Type, nullArg) \
1092 MapGeometricFields<Type, fvPatchField, fvMeshMapper, volMesh>(fvMap);
1096 #define mapSurfaceFieldType(Type, nullArg) \
1097 MapGeometricFields<Type, fvsPatchField, fvMeshMapper, surfaceMesh> \
1102 #define mapVolInternalFieldType(Type, nullArg) \
1103 MapDimensionedFields<Type, fvMeshMapper, volMesh>(fvMap);
1111 #define mapPointFieldType(Type, nullArg) \
1112 MapGeometricFields \
1134 meshObjects::movePoints<fvMesh>(*
this);
1135 meshObjects::movePoints<lduMesh>(*
this);
1137 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1149 if (V00Ptr_ &&
notNull(V00Ptr_))
1152 <<
"Old-old volumes should not be maintained across mesh "
1193 V0Ptr_->scalarField::operator=(V());
1205 this->time().
name(),
1217 phiPtr_->storeOldTimes();
1224 scalar rDeltaT = 1.0/time().deltaTValue();
1241 phibf[
patchi] *= rDeltaT;
1250 updateGeomNotOldVol();
1255 meshObjects::movePoints<fvMesh>(*
this);
1256 meshObjects::movePoints<lduMesh>(*
this);
1258 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1270 clearGeomNotOldVol();
1276 <<
"It is not possible to use mesh motion, topology change, and "
1277 <<
"second order time schemes simultaneously"
1288 clearAddressing(
true);
1290 meshObjects::topoChange<fvMesh>(*
this, map);
1291 meshObjects::topoChange<lduMesh>(*
this, map);
1293 const_cast<Time&
>(time()).functionObjects().topoChange(map);
1295 if (stitcher_.valid())
1297 stitcher_->topoChange(map);
1300 if (topoChanger_.valid())
1302 topoChanger_->topoChange(map);
1305 if (distributor_.valid())
1307 distributor_->topoChange(map);
1312 mover_->topoChange(map);
1323 clearGeomNotOldVol();
1329 clearAddressing(
true);
1331 meshObjects::mapMesh<fvMesh>(*
this, map);
1332 meshObjects::mapMesh<lduMesh>(*
this, map);
1334 const_cast<Time&
>(time()).functionObjects().mapMesh(map);
1336 stitcher_->mapMesh(map);
1337 topoChanger_->mapMesh(map);
1338 distributor_->mapMesh(map);
1339 mover_->mapMesh(map);
1349 clearGeomNotOldVol();
1355 clearAddressing(
true);
1357 meshObjects::distribute<fvMesh>(*
this, map);
1358 meshObjects::distribute<lduMesh>(*
this, map);
1360 const_cast<Time&
>(time()).functionObjects().distribute(map);
1362 stitcher_->distribute(map);
1363 topoChanger_->distribute(map);
1364 distributor_->distribute(map);
1365 mover_->distribute(map);
1371 if (!polyFacesBfPtr_)
1376 polyFacesBfIOPtr_->instance() = inst;
1383 if (!polyFacesBfPtr_)
1385 return facesInstance();
1388 return polyFacesBfIOPtr_->instance();
1395 clearGeomNotOldVol();
1401 clearAddressing(
true);
1408 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1424 clearGeomNotOldVol();
1430 clearAddressing(
true);
1476 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1493 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1498 refCast<const processorFvPatch>(CBf[
patchi].patch())
1512 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1520 const label insertPatchi,
1523 const word& defaultPatchFieldType,
1524 const bool validBoundary
1532 clearGeomNotOldVol();
1538 clearAddressing(
true);
1541 const label sz = boundary_.size();
1548 defaultPatchFieldType,
1552 boundary_.setSize(sz+1);
1558 boundaryMesh()[insertPatchi],
1564 AddPatchFields<volScalarField>
1569 defaultPatchFieldType,
1572 AddPatchFields<volVectorField>
1577 defaultPatchFieldType,
1580 AddPatchFields<volSphericalTensorField>
1585 defaultPatchFieldType,
1588 AddPatchFields<volSymmTensorField>
1593 defaultPatchFieldType,
1596 AddPatchFields<volTensorField>
1601 defaultPatchFieldType,
1607 AddPatchFields<surfaceScalarField>
1612 defaultPatchFieldType,
1615 AddPatchFields<surfaceVectorField>
1620 defaultPatchFieldType,
1623 AddPatchFields<surfaceSphericalTensorField>
1628 defaultPatchFieldType,
1631 AddPatchFields<surfaceSymmTensorField>
1636 defaultPatchFieldType,
1639 AddPatchFields<surfaceTensorField>
1644 defaultPatchFieldType,
1653 const bool validBoundary
1658 boundary_.shuffle(newToOld, validBoundary);
1661 ReorderPatchFields<volScalarField>(db, newToOld);
1662 ReorderPatchFields<volVectorField>(db, newToOld);
1663 ReorderPatchFields<volSphericalTensorField>(db, newToOld);
1664 ReorderPatchFields<volSymmTensorField>(db, newToOld);
1665 ReorderPatchFields<volTensorField>(db, newToOld);
1667 ReorderPatchFields<surfaceScalarField>(db, newToOld);
1668 ReorderPatchFields<surfaceVectorField>(db, newToOld);
1669 ReorderPatchFields<surfaceSphericalTensorField>(db, newToOld);
1670 ReorderPatchFields<surfaceSymmTensorField>(db, newToOld);
1671 ReorderPatchFields<surfaceTensorField>(db, newToOld);
1704 ok = ok && phiPtr_->write(
write);
1710 ok = ok && V0Ptr_->write(
write);
1713 if (stitcher_.valid())
1715 stitcher_->write(
write);
1718 if (topoChanger_.valid())
1720 topoChanger_->write(
write);
1723 if (distributor_.valid())
1725 distributor_->write(
write);
1730 mover_->write(
write);
1745 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1753 if (!fvSchemes_.valid())
1764 if (!fvSolution_.valid())
static const Foam::dimensionedScalar C("C", Foam::dimTemperature, 234.5)
#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 pointMesh & 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.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static const GeometricField< Type, PatchField, GeoMesh > & null()
Return a null geometric field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
const FieldType & oldTime() const
Return the old time field.
label nOldTimes(const bool includeNull=true) const
Return the number of old time fields stored.
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.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling file names.
static bool valid(char)
Is this character valid for a fileName?
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.
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.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
virtual void addPatch(const label insertPatchi, const polyPatch &patch, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const bool validBoundary)
Add/insert single patch. If validBoundary the new situation.
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.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual ~fvMesh()
Destructor.
const GeometricBoundaryField< label, fvsPatchField, surfaceMesh > & ownerBf() const
Return face-owner addressing.
static const HashSet< word > geometryFields
Set of names of registered geometric fields.
void unconform(const GeometricBoundaryField< label, fvsPatchField, surfaceMesh > &polyFacesBf, const surfaceVectorField &Sf, const surfaceVectorField &Cf, const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >(), const bool sync=true)
Unconform the fvMesh from the polyMesh.
const fvMeshStitcher & stitcher() const
Return the stitcher function class.
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, fvsPatchField, surfaceMesh > & polyFacesBf() const
Return face-poly-face addressing.
bool operator==(const fvMesh &) const
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 underlying polyMesh and other data.
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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
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?
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
bool dynamic() const
Is this mesh dynamic?
fvMesh(const IOobject &io, const bool doPost=true)
Construct from IOobject. Optionally prevent post-construction, so.
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?
void clearOut()
Clear all geometry and addressing.
bool move()
Move the mesh.
virtual void setPoints(const pointField &)
Reset the points.
void postConstruct(const bool changers, const stitchType stitch)
Complete construction of the mesh.
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.
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.
static void clearUpto(objectRegistry &)
Clear all meshObjects derived from FromType up to (but not including)
Registry of regIOobjects.
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.
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
virtual void addPatch(const label insertPatchi, const polyPatch &patch, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const bool validBoundary)
Add/insert single patch. If validBoundary the new situation.
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 underlying polyMesh.
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.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void removeBoundary()
Remove boundary patches.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
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.
void clearAddressing()
Clear topological data.
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 clearOut()
Clear all geometry and addressing.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
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 mapVolInternalFieldType(Type, nullArg)
#define mapPointFieldType(Type, nullArg)
#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
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)
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.
word name(const bool)
Return a word representation of a bool.
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
const dimensionSet dimless
SurfaceField< scalar > surfaceScalarField
const dimensionSet dimTime
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
const dimensionSet dimVolume
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Field< label > labelField
Specialisation of Field<T> for label.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
prefixOSstream Pout(cout, "Pout")
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
const dimensionSet dimArea
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void nullDemandDrivenData(DataType *&dataPtr)
faceListList boundary(nPatches)