54 #include "surfaceInterpolate.H"
88 void Foam::fvMesh::clearFvGeomNotOldVol()
121 void Foam::fvMesh::clearFvGeom()
128 clearFvGeomNotOldVol();
136 void Foam::fvMesh::updateGeomNotOldVol()
138 bool haveV = (VPtr_ !=
nullptr);
139 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
140 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
141 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
142 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
144 clearFvGeomNotOldVol();
170 void Foam::fvMesh::storeOldTimeFields()
172 storeOldTimeFields<PointField>();
173 storeOldTimeFields<VolField>();
174 storeOldTimeFields<SurfaceField>();
178 void Foam::fvMesh::nullOldestTimeFields()
180 nullOldestTimeFields<PointField>();
181 nullOldestTimeFields<VolField>();
182 nullOldestTimeFields<SurfaceField>();
190 Pout<<
"fvMesh allocated :" <<
endl;
199 Pout<<
" Poly-faces boundary field" <<
endl;
202 if (polyBFacePatchesPtr_)
204 Pout<<
" Poly-boundary-face to fv-patch and fv-patch-face map"
210 Pout<<
" Owner boundary field" <<
endl;
215 Pout<<
" Old-time cell volumes field" <<
endl;
220 Pout<<
" Old-old-time cell volumes field" <<
endl;
225 Pout<<
" Non-sliced face areas field" <<
endl;
230 Pout<<
" Non-sliced face area magnitudes field" <<
endl;
235 Pout<<
" Non-sliced cell centres field" <<
endl;
240 Pout<<
" Non-sliced face centres field" <<
endl;
297 meshObjects::clear<fvMesh, DeletableMeshObject>(*
this);
298 meshObjects::clear<lduMesh, DeletableMeshObject>(*
this);
337 if (isA<nonConformalFvPatch>(fvp))
339 wantedPatchTypes[
patchi] =
340 refCast<const nonConformalFvPatch>(fvp).polyFacesType();
344 return wantedPatchTypes;
350 if (!polyFacesBfPtr_)
355 setPolyFacesBfInstance(time().
name());
357 return *polyFacesBfPtr_;
372 boundary_(*this, boundaryMesh()),
374 topoChanger_(nullptr),
375 distributor_(nullptr),
378 polyFacesBfIOPtr_(nullptr),
379 polyFacesBfPtr_(nullptr),
380 polyBFaceOffsetsPtr_(nullptr),
381 polyBFaceOffsetPatchesPtr_(nullptr),
382 polyBFaceOffsetPatchFacesPtr_(nullptr),
383 polyBFacePatchesPtr_(nullptr),
384 polyBFacePatchFacesPtr_(nullptr),
385 ownerBfPtr_(nullptr),
390 SfSlicePtr_(nullptr),
392 magSfSlicePtr_(nullptr),
396 CfSlicePtr_(nullptr),
420 const word& defaultBoundaryPatchName,
421 const word& defaultBoundaryPatchType,
433 defaultBoundaryPatchName,
434 defaultBoundaryPatchType,
438 boundary_(*this, boundaryMesh()),
440 topoChanger_(nullptr),
441 distributor_(nullptr),
444 polyFacesBfIOPtr_(nullptr),
445 polyFacesBfPtr_(nullptr),
446 polyBFaceOffsetsPtr_(nullptr),
447 polyBFaceOffsetPatchesPtr_(nullptr),
448 polyBFaceOffsetPatchFacesPtr_(nullptr),
449 polyBFacePatchesPtr_(nullptr),
450 polyBFacePatchFacesPtr_(nullptr),
451 ownerBfPtr_(nullptr),
456 SfSlicePtr_(nullptr),
458 magSfSlicePtr_(nullptr),
462 CfSlicePtr_(nullptr),
489 std::move(allNeighbour),
493 boundary_(*this, boundaryMesh()),
495 topoChanger_(nullptr),
496 distributor_(nullptr),
499 polyFacesBfIOPtr_(nullptr),
500 polyFacesBfPtr_(nullptr),
501 polyBFaceOffsetsPtr_(nullptr),
502 polyBFaceOffsetPatchesPtr_(nullptr),
503 polyBFaceOffsetPatchFacesPtr_(nullptr),
504 polyBFacePatchesPtr_(nullptr),
505 polyBFacePatchFacesPtr_(nullptr),
506 ownerBfPtr_(nullptr),
511 SfSlicePtr_(nullptr),
513 magSfSlicePtr_(nullptr),
517 CfSlicePtr_(nullptr),
548 topoChanger_(nullptr),
549 distributor_(nullptr),
552 polyFacesBfIOPtr_(nullptr),
553 polyFacesBfPtr_(nullptr),
554 polyBFaceOffsetsPtr_(nullptr),
555 polyBFaceOffsetPatchesPtr_(nullptr),
556 polyBFaceOffsetPatchFacesPtr_(nullptr),
557 polyBFacePatchesPtr_(nullptr),
558 polyBFacePatchFacesPtr_(nullptr),
559 ownerBfPtr_(nullptr),
564 SfSlicePtr_(nullptr),
566 magSfSlicePtr_(nullptr),
570 CfSlicePtr_(nullptr),
585 boundary_(
Foam::move(
mesh.boundary_)),
586 stitcher_(
Foam::move(
mesh.stitcher_)),
587 topoChanger_(
Foam::move(
mesh.topoChanger_)),
588 distributor_(
Foam::move(
mesh.distributor_)),
591 polyFacesBfIOPtr_(
Foam::move(
mesh.polyFacesBfIOPtr_)),
592 polyFacesBfPtr_(
Foam::move(
mesh.polyFacesBfPtr_)),
593 polyBFaceOffsetsPtr_(
Foam::move(
mesh.polyBFaceOffsetsPtr_)),
594 polyBFaceOffsetPatchesPtr_(
Foam::move(
mesh.polyBFaceOffsetPatchesPtr_)),
595 polyBFaceOffsetPatchFacesPtr_
597 Foam::move(
mesh.polyBFaceOffsetPatchFacesPtr_)
599 polyBFacePatchesPtr_(
Foam::move(
mesh.polyBFacePatchesPtr_)),
600 polyBFacePatchFacesPtr_(
Foam::move(
mesh.polyBFacePatchFacesPtr_)),
601 ownerBfPtr_(
Foam::move(
mesh.ownerBfPtr_)),
602 curTimeIndex_(
mesh.curTimeIndex_),
606 SfSlicePtr_(
Foam::move(
mesh.SfSlicePtr_)),
608 magSfSlicePtr_(
Foam::move(
mesh.magSfSlicePtr_)),
609 magSfPtr_(
Foam::move(
mesh.magSfPtr_)),
610 CSlicePtr_(
Foam::move(
mesh.CSlicePtr_)),
612 CfSlicePtr_(
Foam::move(
mesh.CfSlicePtr_)),
644 if (stitch != stitchType::none)
646 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
707 return topoChanger_.valid() && topoChanger_->dynamic();
713 return distributor_.valid() && distributor_->dynamic();
720 (topoChanger_.valid() && topoChanger_->dynamic())
721 || (mover_.valid() && mover_->dynamic());
729 stitcher_->stitches()
730 || topoChanger_->dynamic()
731 || distributor_->dynamic()
750 phiPtr_->nullOldestTime();
755 topoChanged_ =
false;
757 topoChanged_ = topoChanger_->update();
759 const bool distributed = distributor_->update();
761 return topoChanged_ || distributed;
771 const bool moved = mover_->update();
773 curTimeIndex_ = time().timeIndex();
775 if (conformal() && stitcher_->stitches())
777 stitcher_->connect(
true,
true,
false);
787 const bool validBoundary
793 <<
" boundary already exists"
798 addPatches(
p, validBoundary);
799 boundary_.addPatches(boundaryMesh());
812 boundary_.setSize(0);
828 clearAddressing(
true);
832 auto updatePatches = []
860 updatePatches(boundaryMesh(), boundary_);
861 updatePatches(otherMesh.
boundaryMesh(), otherMesh.boundary_);
885 const bool reStitch =
887 && stitcher_->stitches()
888 && stitch != stitchType::none
889 && (!conformal() || polyFacesInst != polyFacesBfIOPtr_->instance());
893 stitcher_->disconnect(
false,
false);
902 boundary_.readUpdate(boundaryMesh());
909 Info<<
"Boundary and topological update" <<
endl;
918 Info<<
"Topological update" <<
endl;
927 Info<<
"Point motion update" <<
endl;
940 if (reStitch && stitch != stitchType::none)
942 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
949 return reStitch ? STITCHED : UNCHANGED;
951 return reStitch ? STITCHED : POINTS_MOVED;
955 return TOPO_PATCH_CHANGE;
981 return !(polyFacesBfPtr_ && SfPtr_);
987 if (!polyFacesBfPtr_)
1006 polyFacesPatchTypes(),
1007 boundaryMesh().types()
1011 return *polyFacesBfPtr_;
1018 if (!polyBFacePatchesPtr_)
1020 const label nPolyBFaces = nFaces() - nInternalFaces();
1023 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
1024 labelList& offsets = *polyBFaceOffsetsPtr_;
1029 const label polyBFacei =
1032 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1037 offsets[polyBFacei + 1] ++;
1040 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
1042 offsets[polyBFacei + 1] += offsets[polyBFacei];
1048 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
1050 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
1055 const label polyBFacei =
1058 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1063 patchFaces[offsets[polyBFacei]] = patchFacei;
1064 offsets[polyBFacei] ++;
1071 label polyBFacei = nPolyBFaces - 1;
1076 offsets[polyBFacei + 1] = offsets[polyBFacei];
1081 polyBFacePatchesPtr_ =
1083 polyBFacePatchFacesPtr_ =
1087 return *polyBFacePatchesPtr_;
1094 if (!polyBFacePatchFacesPtr_)
1099 return *polyBFacePatchFacesPtr_;
1115 calculatedFvsPatchLabelField::typeName
1117 boundaryMesh().types()
1127 return *ownerBfPtr_;
1145 return topoChanger_();
1151 return distributor_();
1167 <<
" nCells:" << nCells()
1169 <<
" nFaces:" << nFaces()
1182 <<
"polyTopoChangeMap does not correspond to the old mesh."
1183 <<
" nCells:" << nCells()
1186 <<
" nFaces:" << nFaces()
1196 #define mapVolFieldType(Type, nullArg) \
1197 MapGeometricFields<Type, fvMeshMapper, volMesh>(fvMap);
1201 #define mapSurfaceFieldType(Type, nullArg) \
1202 MapGeometricFields<Type, fvMeshMapper, surfaceMesh>(fvMap);
1206 #define mapVolInternalFieldType(Type, nullArg) \
1207 MapDimensionedFields<Type, fvMeshMapper, volMesh>(fvMap);
1215 #define mapPointFieldType(Type, nullArg) \
1216 MapGeometricFields<Type, pointMeshMapper, pointMesh>(mapper);
1224 stitcher_->disconnect(
true,
true);
1237 meshObjects::movePoints<fvMesh>(*
this);
1238 meshObjects::movePoints<lduMesh>(*
this);
1240 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1254 if (V00Ptr_ &&
notNull(V00Ptr_))
1257 <<
"Old-old volumes should not be maintained across mesh "
1298 V0Ptr_->scalarField::operator=(V());
1310 this->time().
name(),
1322 phiPtr_->storeOldTimes();
1329 scalar rDeltaT = 1.0/time().deltaTValue();
1346 phibf[
patchi] *= rDeltaT;
1355 updateGeomNotOldVol();
1360 meshObjects::movePoints<fvMesh>(*
this);
1361 meshObjects::movePoints<lduMesh>(*
this);
1363 const_cast<Time&
>(time()).functionObjects().movePoints(*
this);
1374 <<
"The mesh was not disconnected prior to topology change"
1382 clearFvGeomNotOldVol();
1388 <<
"It is not possible to use mesh motion, topology change, and "
1389 <<
"second order time schemes simultaneously"
1400 clearAddressing(
true);
1402 meshObjects::topoChange<fvMesh>(*
this, map);
1403 meshObjects::topoChange<lduMesh>(*
this, map);
1405 const_cast<Time&
>(time()).functionObjects().topoChange(map);
1407 if (stitcher_.valid())
1409 stitcher_->topoChange(map);
1412 if (topoChanger_.valid())
1414 topoChanger_->topoChange(map);
1417 if (distributor_.valid())
1419 distributor_->topoChange(map);
1424 mover_->topoChange(map);
1434 <<
"The mesh was not disconnected prior to mesh-to-mesh mapping"
1442 clearFvGeomNotOldVol();
1448 clearAddressing(
true);
1450 meshObjects::mapMesh<fvMesh>(*
this, map);
1451 meshObjects::mapMesh<lduMesh>(*
this, map);
1453 const_cast<Time&
>(time()).functionObjects().mapMesh(map);
1455 stitcher_->mapMesh(map);
1456 topoChanger_->mapMesh(map);
1457 distributor_->mapMesh(map);
1458 mover_->mapMesh(map);
1467 <<
"The mesh was not disconnected prior to distribution"
1475 clearFvGeomNotOldVol();
1481 clearAddressing(
true);
1483 meshObjects::distribute<fvMesh>(*
this, map);
1484 meshObjects::distribute<lduMesh>(*
this, map);
1486 const_cast<Time&
>(time()).functionObjects().distribute(map);
1488 stitcher_->distribute(map);
1489 topoChanger_->distribute(map);
1490 distributor_->distribute(map);
1491 mover_->distribute(map);
1497 if (!polyFacesBfPtr_)
1502 polyFacesBfIOPtr_->instance() = inst;
1509 if (!polyFacesBfPtr_)
1511 return facesInstance();
1514 return polyFacesBfIOPtr_->instance();
1521 clearFvGeomNotOldVol();
1527 clearAddressing(
true);
1534 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1550 clearFvGeomNotOldVol();
1556 clearAddressing(
true);
1602 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1619 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1624 refCast<const processorFvPatch>(CBf[
patchi].patch())
1638 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1646 const label insertPatchi,
1655 clearFvGeomNotOldVol();
1661 clearAddressing(
true);
1663 const label boundarySize0 = boundary_.size();
1667 boundary_.setSize(boundarySize0 + 1);
1673 boundaryMesh()[insertPatchi],
1678 #define AddPatchFieldsType(Type, FieldType, DefaultPatchFieldType) \
1679 AddPatchFields<FieldType<Type>> \
1681 const_cast<objectRegistry&>(thisDb()), \
1683 DefaultPatchFieldType \
1697 #undef AddPatchFieldsType
1704 const bool validBoundary
1709 boundary_.shuffle(newToOld, validBoundary);
1711 #define ReorderPatchFieldsType(Type, FieldType) \
1712 ReorderPatchFields<FieldType<Type>> \
1714 const_cast<objectRegistry&>(thisDb()), \
1719 #undef ReorderPatchFieldsType
1752 ok = ok && phiPtr_->write(
write);
1758 ok = ok && V0Ptr_->write(
write);
1761 if (stitcher_.valid())
1763 stitcher_->write(
write);
1766 if (topoChanger_.valid())
1768 topoChanger_->write(
write);
1771 if (distributor_.valid())
1773 distributor_->write(
write);
1778 mover_->write(
write);
1793 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1801 if (!fvSchemes_.valid())
1812 if (!fvSolution_.valid())
#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.
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...
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.
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.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
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.
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
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?
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 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.
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.
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 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 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 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.
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 printAllocated() const
Print a list of all the currently allocated data.
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.
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
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)
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.
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
const dimensionSet dimless
SurfaceField< scalar > surfaceScalarField
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
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
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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")
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)