54 #include "surfaceInterpolate.H"
66 void Foam::fvMesh::clearGeomNotOldVol()
99 void Foam::fvMesh::updateGeomNotOldVol()
101 bool haveV = (VPtr_ !=
nullptr);
102 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
103 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
104 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
105 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
107 clearGeomNotOldVol();
133 void Foam::fvMesh::clearGeom()
140 clearGeomNotOldVol();
162 TopologicalMeshObject,
171 TopologicalMeshObject,
180 meshObjects::clear<fvMesh, TopologicalMeshObject>(*
this);
181 meshObjects::clear<lduMesh, TopologicalMeshObject>(*
this);
194 void Foam::fvMesh::storeOldVol(
const scalarField& V)
201 <<
" Storing old time volumes since from time " << curTimeIndex_
202 <<
" and time now " << time().timeIndex()
207 if (V00Ptr_ && V0Ptr_)
216 V0Ptr_->scalarField::operator=(V);
221 V0Ptr_ =
new DimensionedField<scalar, volMesh>
245 <<
" Stored old time volumes V0:" << V0Ptr_->size()
250 <<
" Stored oldold time volumes V00:" << V00Ptr_->size()
258 void Foam::fvMesh::storeOldTimeFields()
260 storeOldTimeFields<PointField>();
261 storeOldTimeFields<VolField>();
262 storeOldTimeFields<SurfaceField>();
266 void Foam::fvMesh::nullOldestTimeFields()
268 nullOldestTimeFields<PointField>();
269 nullOldestTimeFields<VolField>();
270 nullOldestTimeFields<SurfaceField>();
298 if (isA<nonConformalFvPatch>(fvp))
300 wantedPatchTypes[
patchi] =
305 return wantedPatchTypes;
311 if (!polyFacesBfPtr_)
316 return *polyFacesBfPtr_;
332 boundary_(*this, boundaryMesh()),
334 topoChanger_(nullptr),
335 distributor_(nullptr),
338 polyFacesBfPtr_(nullptr),
339 polyBFaceOffsetsPtr_(nullptr),
340 polyBFaceOffsetPatchesPtr_(nullptr),
341 polyBFaceOffsetPatchFacesPtr_(nullptr),
342 polyBFacePatchesPtr_(nullptr),
343 polyBFacePatchFacesPtr_(nullptr),
348 SfSlicePtr_(nullptr),
350 magSfSlicePtr_(nullptr),
354 CfSlicePtr_(nullptr),
426 const word& defaultBoundaryPatchName,
427 const word& defaultBoundaryPatchType,
439 defaultBoundaryPatchName,
440 defaultBoundaryPatchType,
445 boundary_(*this, boundaryMesh()),
447 topoChanger_(nullptr),
448 distributor_(nullptr),
451 polyFacesBfPtr_(nullptr),
452 polyBFaceOffsetsPtr_(nullptr),
453 polyBFaceOffsetPatchesPtr_(nullptr),
454 polyBFaceOffsetPatchFacesPtr_(nullptr),
455 polyBFacePatchesPtr_(nullptr),
456 polyBFacePatchFacesPtr_(nullptr),
461 SfSlicePtr_(nullptr),
463 magSfSlicePtr_(nullptr),
467 CfSlicePtr_(nullptr),
494 std::move(allNeighbour),
499 boundary_(*this, boundaryMesh()),
501 topoChanger_(nullptr),
502 distributor_(nullptr),
505 polyFacesBfPtr_(nullptr),
506 polyBFaceOffsetsPtr_(nullptr),
507 polyBFaceOffsetPatchesPtr_(nullptr),
508 polyBFaceOffsetPatchFacesPtr_(nullptr),
509 polyBFacePatchesPtr_(nullptr),
510 polyBFacePatchFacesPtr_(nullptr),
515 SfSlicePtr_(nullptr),
517 magSfSlicePtr_(nullptr),
521 CfSlicePtr_(nullptr),
553 topoChanger_(nullptr),
554 distributor_(nullptr),
557 polyFacesBfPtr_(nullptr),
558 polyBFaceOffsetsPtr_(nullptr),
559 polyBFaceOffsetPatchesPtr_(nullptr),
560 polyBFaceOffsetPatchFacesPtr_(nullptr),
561 polyBFacePatchesPtr_(nullptr),
562 polyBFacePatchFacesPtr_(nullptr),
567 SfSlicePtr_(nullptr),
569 magSfSlicePtr_(nullptr),
573 CfSlicePtr_(nullptr),
589 boundary_(
Foam::move(mesh.boundary_)),
590 stitcher_(
Foam::move(mesh.stitcher_)),
591 topoChanger_(
Foam::move(mesh.topoChanger_)),
592 distributor_(
Foam::move(mesh.distributor_)),
593 mover_(
Foam::move(mesh.mover_)),
594 lduPtr_(
Foam::move(mesh.lduPtr_)),
595 polyFacesBfPtr_(
Foam::move(mesh.polyFacesBfPtr_)),
596 polyBFaceOffsetsPtr_(
Foam::move(mesh.polyBFaceOffsetsPtr_)),
597 polyBFaceOffsetPatchesPtr_(
Foam::move(mesh.polyBFaceOffsetPatchesPtr_)),
598 polyBFaceOffsetPatchFacesPtr_
600 Foam::move(mesh.polyBFaceOffsetPatchFacesPtr_)
602 polyBFacePatchesPtr_(
Foam::move(mesh.polyBFacePatchesPtr_)),
603 polyBFacePatchFacesPtr_(
Foam::move(mesh.polyBFacePatchFacesPtr_)),
604 curTimeIndex_(mesh.curTimeIndex_),
605 VPtr_(
Foam::move(mesh.VPtr_)),
606 V0Ptr_(
Foam::move(mesh.V0Ptr_)),
607 V00Ptr_(
Foam::move(mesh.V00Ptr_)),
608 SfSlicePtr_(
Foam::move(mesh.SfSlicePtr_)),
609 SfPtr_(
Foam::move(mesh.SfPtr_)),
610 magSfSlicePtr_(
Foam::move(mesh.magSfSlicePtr_)),
611 magSfPtr_(
Foam::move(mesh.magSfPtr_)),
612 CSlicePtr_(
Foam::move(mesh.CSlicePtr_)),
613 CPtr_(
Foam::move(mesh.CPtr_)),
614 CfSlicePtr_(
Foam::move(mesh.CfSlicePtr_)),
615 CfPtr_(
Foam::move(mesh.CfPtr_)),
616 phiPtr_(
Foam::move(mesh.phiPtr_))
637 return topoChanger_->dynamic();
643 return topoChanger_->dynamic() || mover_->dynamic();
651 stitcher_->stitches()
652 || topoChanger_->dynamic()
653 || distributor_->dynamic()
659 if (!conformal()) stitcher_->disconnect(
true,
true);
661 const bool hasV00 = V00Ptr_;
670 topoChanged_ =
false;
671 bool updated = topoChanger_->update();
672 topoChanged_ = updated;
680 updated = distributor_->update() || updated;
700 if (!conformal()) stitcher_->disconnect(
true,
true);
702 if (curTimeIndex_ < time().
timeIndex() && stitcher_->stitches())
708 storeOldTimeFields();
714 const bool moved = mover_->update();
716 curTimeIndex_ = time().timeIndex();
718 stitcher_->connect(
true,
true,
false);
727 const bool validBoundary
733 <<
" boundary already exists"
738 addPatches(
p, validBoundary);
739 boundary_.addPatches(boundaryMesh());
752 boundary_.setSize(0);
768 clearAddressing(
true);
772 auto updatePatches = []
800 updatePatches(boundaryMesh(), boundary_);
801 updatePatches(otherMesh.
boundaryMesh(), otherMesh.boundary_);
819 boundary_.readUpdate(boundaryMesh());
825 && stitch != stitchType::none
829 stitcher_->disconnect(
false, stitch == stitchType::geometric);
836 Info<<
"Boundary and topological update" <<
endl;
845 Info<<
"Topological update" <<
endl;
854 Info<<
"Point motion update" <<
endl;
870 && stitch != stitchType::none
874 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
882 && stitcher_->stitches()
912 return !(polyFacesBfPtr_ && SfPtr_);
934 if (!polyFacesBfPtr_)
941 polyFacesPatchTypes(),
942 boundaryMesh().types()
946 return *polyFacesBfPtr_;
953 if (!polyBFacePatchesPtr_)
955 const label nPolyBFaces = nFaces() - nInternalFaces();
958 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
959 labelList& offsets = *polyBFaceOffsetsPtr_;
964 const label polyBFacei =
967 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
972 offsets[polyBFacei + 1] ++;
975 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
977 offsets[polyBFacei + 1] += offsets[polyBFacei];
983 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
985 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
990 const label polyBFacei =
993 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
998 patchFaces[offsets[polyBFacei]] = patchFacei;
999 offsets[polyBFacei] ++;
1006 label polyBFacei = nPolyBFaces - 1;
1011 offsets[polyBFacei + 1] = offsets[polyBFacei];
1016 polyBFacePatchesPtr_ =
1018 polyBFacePatchFacesPtr_ =
1022 return *polyBFacePatchesPtr_;
1029 if (!polyBFacePatchFacesPtr_)
1034 return *polyBFacePatchFacesPtr_;
1046 return topoChanger_();
1052 return distributor_();
1068 <<
" nCells:" << nCells()
1070 <<
" nFaces:" << nFaces()
1083 <<
"polyTopoChangeMap does not correspond to the old mesh."
1084 <<
" nCells:" << nCells()
1087 <<
" nFaces:" << nFaces()
1097 #define mapVolFieldType(Type, nullArg) \
1098 MapGeometricFields<Type, fvPatchField, fvMeshMapper, volMesh>(fvMap);
1102 #define mapSurfaceFieldType(Type, nullArg) \
1103 MapGeometricFields<Type, fvsPatchField, fvMeshMapper, surfaceMesh> \
1108 #define mapVolInternalFieldType(Type, nullArg) \
1109 MapDimensionedFields<Type, fvMeshMapper, volMesh>(fvMap);
1117 #define mapPointFieldType(Type, nullArg) \
1118 MapGeometricFields \
1138 boundary_.movePoints();
1141 meshObjects::movePoints<fvMesh>(*
this);
1142 meshObjects::movePoints<lduMesh>(*
this);
1144 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1169 this->time().
name(),
1182 if (phiPtr_->timeIndex() != time().
timeIndex())
1192 scalar rDeltaT = 1.0/time().deltaTValue();
1209 phibf[
patchi] *= rDeltaT;
1218 updateGeomNotOldVol();
1222 boundary_.movePoints();
1225 meshObjects::movePoints<fvMesh>(*
this);
1226 meshObjects::movePoints<lduMesh>(*
this);
1228 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1243 if (V0Ptr_ && !V0Ptr_->registered())
1249 if (VPtr_ && (VPtr_->size() != map.
nOldCells()))
1252 <<
"V:" << V().size()
1253 <<
" not equal to the number of old cells "
1258 if (V0Ptr_ && (V0Ptr_->size() != map.
nOldCells()))
1261 <<
"V0:" << V0Ptr_->size()
1262 <<
" not equal to the number of old cells "
1269 clearGeomNotOldVol();
1272 if (V0Ptr_ && !V0Ptr_->registered())
1283 if (cellMap[i] > -1)
1285 V0[i] = savedV0[cellMap[i]];
1301 label celli = -index-2;
1303 V0[celli] += savedV0[oldCelli];
1311 Info<<
"Mapping old time volume V0. Merged "
1312 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
1323 clearAddressing(
true);
1325 meshObjects::topoChange<fvMesh>(*
this, map);
1326 meshObjects::topoChange<lduMesh>(*
this, map);
1328 const_cast<Time&
>(time()).functionObjects().topoChange(map);
1330 if (topoChanger_.valid())
1332 topoChanger_->topoChange(map);
1335 if (distributor_.valid())
1337 distributor_->topoChange(map);
1342 mover_->topoChange(map);
1353 clearGeomNotOldVol();
1359 clearAddressing(
true);
1361 meshObjects::mapMesh<fvMesh>(*
this, map);
1362 meshObjects::mapMesh<lduMesh>(*
this, map);
1364 const_cast<Time&
>(time()).functionObjects().mapMesh(map);
1366 topoChanger_->mapMesh(map);
1367 distributor_->mapMesh(map);
1368 mover_->mapMesh(map);
1378 clearGeomNotOldVol();
1384 clearAddressing(
true);
1386 meshObjects::distribute<fvMesh>(*
this, map);
1387 meshObjects::distribute<lduMesh>(*
this, map);
1389 const_cast<Time&
>(time()).functionObjects().distribute(map);
1391 topoChanger_->distribute(map);
1392 distributor_->distribute(map);
1393 mover_->distribute(map);
1400 clearGeomNotOldVol();
1406 clearAddressing(
true);
1413 phiRef().oldTime(i) = phi.
oldTime(i);
1429 clearGeomNotOldVol();
1435 clearAddressing(
true);
1444 polyFacesBfRef() == polyFacesBf;
1478 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1495 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1500 refCast<const processorFvPatch>(CBf[
patchi].patch())
1514 phiRef().oldTime(i) = phi.
oldTime(i);
1522 const label insertPatchi,
1525 const word& defaultPatchFieldType,
1526 const bool validBoundary
1534 clearGeomNotOldVol();
1540 clearAddressing(
true);
1543 const label sz = boundary_.size();
1550 defaultPatchFieldType,
1554 boundary_.setSize(sz+1);
1560 boundaryMesh()[insertPatchi],
1566 AddPatchFields<volScalarField>
1571 defaultPatchFieldType,
1574 AddPatchFields<volVectorField>
1579 defaultPatchFieldType,
1582 AddPatchFields<volSphericalTensorField>
1587 defaultPatchFieldType,
1590 AddPatchFields<volSymmTensorField>
1595 defaultPatchFieldType,
1598 AddPatchFields<volTensorField>
1603 defaultPatchFieldType,
1609 AddPatchFields<surfaceScalarField>
1614 defaultPatchFieldType,
1617 AddPatchFields<surfaceVectorField>
1622 defaultPatchFieldType,
1625 AddPatchFields<surfaceSphericalTensorField>
1630 defaultPatchFieldType,
1633 AddPatchFields<surfaceSymmTensorField>
1638 defaultPatchFieldType,
1641 AddPatchFields<surfaceTensorField>
1646 defaultPatchFieldType,
1655 const bool validBoundary
1660 boundary_.shuffle(newToOld, validBoundary);
1663 ReorderPatchFields<volScalarField>(db, newToOld);
1664 ReorderPatchFields<volVectorField>(db, newToOld);
1665 ReorderPatchFields<volSphericalTensorField>(db, newToOld);
1666 ReorderPatchFields<volSymmTensorField>(db, newToOld);
1667 ReorderPatchFields<volTensorField>(db, newToOld);
1669 ReorderPatchFields<surfaceScalarField>(db, newToOld);
1670 ReorderPatchFields<surfaceVectorField>(db, newToOld);
1671 ReorderPatchFields<surfaceSphericalTensorField>(db, newToOld);
1672 ReorderPatchFields<surfaceSymmTensorField>(db, newToOld);
1673 ReorderPatchFields<surfaceTensorField>(db, newToOld);
1706 ok = ok && phiPtr_->write(
write);
1712 ok = ok && V0Ptr_->write(
write);
1715 if (topoChanger_.valid())
1717 topoChanger_->write(
write);
1720 if (distributor_.valid())
1722 distributor_->write(
write);
1727 mover_->write(
write);
1742 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1750 if (!fvSchemes_.valid())
1761 if (!fvSolution_.valid())
static const Foam::dimensionedScalar C("C", Foam::dimTemperature, 234.5)
#define forAll(list, i)
Loop across all elements in list.
static pointMesh & New(const polyMesh &mesh)
static bool found(const polyMesh &mesh)
Return true if this DemandDrivenMeshObject is found.
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 internal field.
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
label nOldTimes() const
Return the number of old time fields stored.
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...
readOption
Enumeration defining the read options.
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.
void setSize(const label)
Reset size of List.
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.
Database for solution and other reduced data.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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...
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 Time & time() const
Return the top-level database.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const DimensionedField< scalar, volMesh > & V00() const
Return old-old-time cell volumes.
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.
virtual ~fvMesh()
Destructor.
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 fvSchemes.
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.
IOobject polyFacesBfIO(IOobject::readOption r) const
Get the poly faces IO object.
bool update()
Update the mesh for topology change, mesh to mesh mapping.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
const word & name() const
Return reference to name.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
fvMesh(const IOobject &io, const bool changers=true, const stitchType stitch=stitchType::geometric)
Construct from IOobject.
bool dynamic() const
Is this mesh dynamic?
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.
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.
const labelList & reverseCellMap() const
Reverse cell map.
label nOldFaces() const
Number of old faces.
const scalarField & oldCellVolumes() const
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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.
errorManip< error > abort(error &err)
const dimensionSet dimless
SurfaceField< scalar > surfaceScalarField
FOR_ALL_FIELD_TYPES(DefineContiguousFvWallLocationDataType)
void deleteDemandDrivenData(DataPtr &dataPtr)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Field< label > labelField
Specialisation of Field<T> for label.
prefixOSstream Pout(cout, "Pout")
const dimensionSet dimArea
word name(const complex &)
Return a string representation of a complex.
faceListList boundary(nPatches)