54 #include "surfaceInterpolate.H"
78 void Foam::fvMesh::clearGeomNotOldVol()
111 void Foam::fvMesh::updateGeomNotOldVol()
113 bool haveV = (VPtr_ !=
nullptr);
114 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
115 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
116 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
117 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
119 clearGeomNotOldVol();
145 void Foam::fvMesh::clearGeom()
152 clearGeomNotOldVol();
174 TopologicalMeshObject,
183 TopologicalMeshObject,
192 meshObjects::clear<fvMesh, TopologicalMeshObject>(*
this);
193 meshObjects::clear<lduMesh, TopologicalMeshObject>(*
this);
206 void Foam::fvMesh::storeOldVol(
const scalarField& V)
213 <<
" Storing old time volumes since from time " << curTimeIndex_
214 <<
" and time now " << time().timeIndex()
219 if (V00Ptr_ && V0Ptr_)
228 V0Ptr_->scalarField::operator=(V);
233 V0Ptr_ =
new DimensionedField<scalar, volMesh>
257 <<
" Stored old time volumes V0:" << V0Ptr_->size()
262 <<
" Stored oldold time volumes V00:" << V00Ptr_->size()
270 void Foam::fvMesh::storeOldTimeFields()
272 storeOldTimeFields<PointField>();
273 storeOldTimeFields<VolField>();
274 storeOldTimeFields<SurfaceField>();
278 void Foam::fvMesh::nullOldestTimeFields()
280 nullOldestTimeFields<PointField>();
281 nullOldestTimeFields<VolField>();
282 nullOldestTimeFields<SurfaceField>();
310 if (isA<nonConformalFvPatch>(fvp))
312 wantedPatchTypes[
patchi] =
317 return wantedPatchTypes;
323 if (!polyFacesBfPtr_)
328 return *polyFacesBfPtr_;
344 boundary_(*this, boundaryMesh()),
346 topoChanger_(nullptr),
347 distributor_(nullptr),
350 polyFacesBfPtr_(nullptr),
351 polyBFaceOffsetsPtr_(nullptr),
352 polyBFaceOffsetPatchesPtr_(nullptr),
353 polyBFaceOffsetPatchFacesPtr_(nullptr),
354 polyBFacePatchesPtr_(nullptr),
355 polyBFacePatchFacesPtr_(nullptr),
360 SfSlicePtr_(nullptr),
362 magSfSlicePtr_(nullptr),
366 CfSlicePtr_(nullptr),
438 const word& defaultBoundaryPatchName,
439 const word& defaultBoundaryPatchType,
451 defaultBoundaryPatchName,
452 defaultBoundaryPatchType,
457 boundary_(*this, boundaryMesh()),
459 topoChanger_(nullptr),
460 distributor_(nullptr),
463 polyFacesBfPtr_(nullptr),
464 polyBFaceOffsetsPtr_(nullptr),
465 polyBFaceOffsetPatchesPtr_(nullptr),
466 polyBFaceOffsetPatchFacesPtr_(nullptr),
467 polyBFacePatchesPtr_(nullptr),
468 polyBFacePatchFacesPtr_(nullptr),
473 SfSlicePtr_(nullptr),
475 magSfSlicePtr_(nullptr),
479 CfSlicePtr_(nullptr),
506 std::move(allNeighbour),
511 boundary_(*this, boundaryMesh()),
513 topoChanger_(nullptr),
514 distributor_(nullptr),
517 polyFacesBfPtr_(nullptr),
518 polyBFaceOffsetsPtr_(nullptr),
519 polyBFaceOffsetPatchesPtr_(nullptr),
520 polyBFaceOffsetPatchFacesPtr_(nullptr),
521 polyBFacePatchesPtr_(nullptr),
522 polyBFacePatchFacesPtr_(nullptr),
527 SfSlicePtr_(nullptr),
529 magSfSlicePtr_(nullptr),
533 CfSlicePtr_(nullptr),
565 topoChanger_(nullptr),
566 distributor_(nullptr),
569 polyFacesBfPtr_(nullptr),
570 polyBFaceOffsetsPtr_(nullptr),
571 polyBFaceOffsetPatchesPtr_(nullptr),
572 polyBFaceOffsetPatchFacesPtr_(nullptr),
573 polyBFacePatchesPtr_(nullptr),
574 polyBFacePatchFacesPtr_(nullptr),
579 SfSlicePtr_(nullptr),
581 magSfSlicePtr_(nullptr),
585 CfSlicePtr_(nullptr),
601 boundary_(
Foam::move(mesh.boundary_)),
602 stitcher_(
Foam::move(mesh.stitcher_)),
603 topoChanger_(
Foam::move(mesh.topoChanger_)),
604 distributor_(
Foam::move(mesh.distributor_)),
605 mover_(
Foam::move(mesh.mover_)),
606 lduPtr_(
Foam::move(mesh.lduPtr_)),
607 polyFacesBfPtr_(
Foam::move(mesh.polyFacesBfPtr_)),
608 polyBFaceOffsetsPtr_(
Foam::move(mesh.polyBFaceOffsetsPtr_)),
609 polyBFaceOffsetPatchesPtr_(
Foam::move(mesh.polyBFaceOffsetPatchesPtr_)),
610 polyBFaceOffsetPatchFacesPtr_
612 Foam::move(mesh.polyBFaceOffsetPatchFacesPtr_)
614 polyBFacePatchesPtr_(
Foam::move(mesh.polyBFacePatchesPtr_)),
615 polyBFacePatchFacesPtr_(
Foam::move(mesh.polyBFacePatchFacesPtr_)),
616 curTimeIndex_(mesh.curTimeIndex_),
617 VPtr_(
Foam::move(mesh.VPtr_)),
618 V0Ptr_(
Foam::move(mesh.V0Ptr_)),
619 V00Ptr_(
Foam::move(mesh.V00Ptr_)),
620 SfSlicePtr_(
Foam::move(mesh.SfSlicePtr_)),
621 SfPtr_(
Foam::move(mesh.SfPtr_)),
622 magSfSlicePtr_(
Foam::move(mesh.magSfSlicePtr_)),
623 magSfPtr_(
Foam::move(mesh.magSfPtr_)),
624 CSlicePtr_(
Foam::move(mesh.CSlicePtr_)),
625 CPtr_(
Foam::move(mesh.CPtr_)),
626 CfSlicePtr_(
Foam::move(mesh.CfSlicePtr_)),
627 CfPtr_(
Foam::move(mesh.CfPtr_)),
628 phiPtr_(
Foam::move(mesh.phiPtr_))
649 return topoChanger_.valid() && topoChanger_->dynamic();
656 (topoChanger_.valid() && topoChanger_->dynamic())
657 || (mover_.valid() && mover_->dynamic());
665 stitcher_->stitches()
666 || topoChanger_->dynamic()
667 || distributor_->dynamic()
673 if (!conformal()) stitcher_->disconnect(
true,
true);
675 const bool hasV00 = V00Ptr_;
684 topoChanged_ =
false;
685 bool updated = topoChanger_->update();
686 topoChanged_ = updated;
688 updated = distributor_->update() || updated;
702 if (!conformal()) stitcher_->disconnect(
true,
true);
704 if (curTimeIndex_ < time().
timeIndex() && stitcher_->stitches())
710 storeOldTimeFields();
716 const bool moved = mover_->update();
718 curTimeIndex_ = time().timeIndex();
720 stitcher_->connect(
true,
true,
false);
729 const bool validBoundary
735 <<
" boundary already exists"
740 addPatches(
p, validBoundary);
741 boundary_.addPatches(boundaryMesh());
754 boundary_.setSize(0);
770 clearAddressing(
true);
774 auto updatePatches = []
802 updatePatches(boundaryMesh(), boundary_);
803 updatePatches(otherMesh.
boundaryMesh(), otherMesh.boundary_);
821 boundary_.readUpdate(boundaryMesh());
827 && stitch != stitchType::none
831 stitcher_->disconnect(
false, stitch == stitchType::geometric);
838 Info<<
"Boundary and topological update" <<
endl;
847 Info<<
"Topological update" <<
endl;
856 Info<<
"Point motion update" <<
endl;
872 && stitch != stitchType::none
876 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
884 && stitcher_->stitches()
914 return !(polyFacesBfPtr_ && SfPtr_);
936 if (!polyFacesBfPtr_)
943 polyFacesPatchTypes(),
944 boundaryMesh().types()
948 return *polyFacesBfPtr_;
955 if (!polyBFacePatchesPtr_)
957 const label nPolyBFaces = nFaces() - nInternalFaces();
960 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
961 labelList& offsets = *polyBFaceOffsetsPtr_;
966 const label polyBFacei =
969 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
974 offsets[polyBFacei + 1] ++;
977 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
979 offsets[polyBFacei + 1] += offsets[polyBFacei];
985 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
987 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
992 const label polyBFacei =
995 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1000 patchFaces[offsets[polyBFacei]] = patchFacei;
1001 offsets[polyBFacei] ++;
1008 label polyBFacei = nPolyBFaces - 1;
1013 offsets[polyBFacei + 1] = offsets[polyBFacei];
1018 polyBFacePatchesPtr_ =
1020 polyBFacePatchFacesPtr_ =
1024 return *polyBFacePatchesPtr_;
1031 if (!polyBFacePatchFacesPtr_)
1036 return *polyBFacePatchFacesPtr_;
1048 return topoChanger_();
1054 return distributor_();
1070 <<
" nCells:" << nCells()
1072 <<
" nFaces:" << nFaces()
1085 <<
"polyTopoChangeMap does not correspond to the old mesh."
1086 <<
" nCells:" << nCells()
1089 <<
" nFaces:" << nFaces()
1099 #define mapVolFieldType(Type, nullArg) \
1100 MapGeometricFields<Type, fvPatchField, fvMeshMapper, volMesh>(fvMap);
1104 #define mapSurfaceFieldType(Type, nullArg) \
1105 MapGeometricFields<Type, fvsPatchField, fvMeshMapper, surfaceMesh> \
1110 #define mapVolInternalFieldType(Type, nullArg) \
1111 MapDimensionedFields<Type, fvMeshMapper, volMesh>(fvMap);
1119 #define mapPointFieldType(Type, nullArg) \
1120 MapGeometricFields \
1140 boundary_.movePoints();
1143 meshObjects::movePoints<fvMesh>(*
this);
1144 meshObjects::movePoints<lduMesh>(*
this);
1146 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1171 this->time().
name(),
1184 if (!topoChanging() && phiPtr_->timeIndex() != time().
timeIndex())
1194 scalar rDeltaT = 1.0/time().deltaTValue();
1211 phibf[
patchi] *= rDeltaT;
1220 updateGeomNotOldVol();
1224 boundary_.movePoints();
1227 meshObjects::movePoints<fvMesh>(*
this);
1228 meshObjects::movePoints<lduMesh>(*
this);
1230 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1245 if (V0Ptr_ && !V0Ptr_->registered())
1251 if (VPtr_ && (VPtr_->size() != map.
nOldCells()))
1254 <<
"Vc:" << V().size()
1255 <<
" not equal to the number of old cells "
1260 if (V0Ptr_ && (V0Ptr_->size() != map.
nOldCells()))
1263 <<
"Vc0:" << V0Ptr_->size()
1264 <<
" not equal to the number of old cells "
1271 clearGeomNotOldVol();
1274 if (V0Ptr_ && !V0Ptr_->registered())
1285 if (cellMap[i] > -1)
1287 V0[i] = savedV0[cellMap[i]];
1303 label celli = -index-2;
1305 V0[celli] += savedV0[oldCelli];
1313 Info<<
"Mapping old time volume V0. Merged "
1314 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
1325 clearAddressing(
true);
1327 meshObjects::topoChange<fvMesh>(*
this, map);
1328 meshObjects::topoChange<lduMesh>(*
this, map);
1330 const_cast<Time&
>(time()).functionObjects().topoChange(map);
1332 if (topoChanger_.valid())
1334 topoChanger_->topoChange(map);
1337 if (distributor_.valid())
1339 distributor_->topoChange(map);
1344 mover_->topoChange(map);
1355 clearGeomNotOldVol();
1361 clearAddressing(
true);
1363 meshObjects::mapMesh<fvMesh>(*
this, map);
1364 meshObjects::mapMesh<lduMesh>(*
this, map);
1366 const_cast<Time&
>(time()).functionObjects().mapMesh(map);
1368 topoChanger_->mapMesh(map);
1369 distributor_->mapMesh(map);
1370 mover_->mapMesh(map);
1380 clearGeomNotOldVol();
1386 clearAddressing(
true);
1388 meshObjects::distribute<fvMesh>(*
this, map);
1389 meshObjects::distribute<lduMesh>(*
this, map);
1391 const_cast<Time&
>(time()).functionObjects().distribute(map);
1393 topoChanger_->distribute(map);
1394 distributor_->distribute(map);
1395 mover_->distribute(map);
1402 clearGeomNotOldVol();
1408 clearAddressing(
true);
1415 phiRef().oldTime(i) = phi.
oldTime(i);
1431 clearGeomNotOldVol();
1437 clearAddressing(
true);
1446 polyFacesBfRef() == polyFacesBf;
1480 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1497 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1502 refCast<const processorFvPatch>(CBf[
patchi].patch())
1516 phiRef().oldTime(i) = phi.
oldTime(i);
1524 const label insertPatchi,
1527 const word& defaultPatchFieldType,
1528 const bool validBoundary
1536 clearGeomNotOldVol();
1542 clearAddressing(
true);
1545 const label sz = boundary_.size();
1552 defaultPatchFieldType,
1556 boundary_.setSize(sz+1);
1562 boundaryMesh()[insertPatchi],
1568 AddPatchFields<volScalarField>
1573 defaultPatchFieldType,
1576 AddPatchFields<volVectorField>
1581 defaultPatchFieldType,
1584 AddPatchFields<volSphericalTensorField>
1589 defaultPatchFieldType,
1592 AddPatchFields<volSymmTensorField>
1597 defaultPatchFieldType,
1600 AddPatchFields<volTensorField>
1605 defaultPatchFieldType,
1611 AddPatchFields<surfaceScalarField>
1616 defaultPatchFieldType,
1619 AddPatchFields<surfaceVectorField>
1624 defaultPatchFieldType,
1627 AddPatchFields<surfaceSphericalTensorField>
1632 defaultPatchFieldType,
1635 AddPatchFields<surfaceSymmTensorField>
1640 defaultPatchFieldType,
1643 AddPatchFields<surfaceTensorField>
1648 defaultPatchFieldType,
1657 const bool validBoundary
1662 boundary_.shuffle(newToOld, validBoundary);
1665 ReorderPatchFields<volScalarField>(db, newToOld);
1666 ReorderPatchFields<volVectorField>(db, newToOld);
1667 ReorderPatchFields<volSphericalTensorField>(db, newToOld);
1668 ReorderPatchFields<volSymmTensorField>(db, newToOld);
1669 ReorderPatchFields<volTensorField>(db, newToOld);
1671 ReorderPatchFields<surfaceScalarField>(db, newToOld);
1672 ReorderPatchFields<surfaceVectorField>(db, newToOld);
1673 ReorderPatchFields<surfaceSphericalTensorField>(db, newToOld);
1674 ReorderPatchFields<surfaceSymmTensorField>(db, newToOld);
1675 ReorderPatchFields<surfaceTensorField>(db, newToOld);
1708 ok = ok && phiPtr_->write(
write);
1714 ok = ok && V0Ptr_->write(
write);
1717 if (topoChanger_.valid())
1719 topoChanger_->write(
write);
1722 if (distributor_.valid())
1724 distributor_->write(
write);
1729 mover_->write(
write);
1744 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1752 if (!fvSchemes_.valid())
1763 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.
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 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.
word name(const bool)
Return a word representation of a bool.
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
faceListList boundary(nPatches)