54 #include "surfaceInterpolate.H"
88 void Foam::fvMesh::clearFvGeomNotOldVol()
118 void Foam::fvMesh::clearFvGeom()
122 clearFvGeomNotOldVol();
130 void Foam::fvMesh::updateGeomNotOldVol()
132 bool haveV = (VPtr_ !=
nullptr);
133 bool haveSf = (SfSlicePtr_ !=
nullptr || SfPtr_ !=
nullptr);
134 bool haveMagSf = (magSfSlicePtr_ !=
nullptr || magSfPtr_ !=
nullptr);
135 bool haveCP = (CSlicePtr_ !=
nullptr || CPtr_ !=
nullptr);
136 bool haveCf = (CfSlicePtr_ !=
nullptr || CfPtr_ !=
nullptr);
138 clearFvGeomNotOldVol();
164 void Foam::fvMesh::storeOldTimeFields()
166 storeOldTimeFields<PointField>();
167 storeOldTimeFields<VolField>();
168 storeOldTimeFields<SurfaceField>();
172 void Foam::fvMesh::nullOldestTimeFields()
174 nullOldestTimeFields<PointField>();
175 nullOldestTimeFields<VolField>();
176 nullOldestTimeFields<SurfaceField>();
184 Pout<<
"fvMesh allocated :" <<
endl;
193 Pout<<
" Poly-faces boundary field" <<
endl;
196 if (polyBFacePatchesPtr_)
198 Pout<<
" Poly-boundary-face to fv-patch and fv-patch-face map"
204 Pout<<
" Owner boundary field" <<
endl;
209 Pout<<
" Old-time cell volumes field" <<
endl;
214 Pout<<
" Old-old-time cell volumes field" <<
endl;
219 Pout<<
" Non-sliced face areas field" <<
endl;
224 Pout<<
" Non-sliced face area magnitudes field" <<
endl;
229 Pout<<
" Non-sliced cell centres field" <<
endl;
234 Pout<<
" Non-sliced face centres field" <<
endl;
285 meshObjects::clear<fvMesh, DeletableMeshObject>(*
this);
286 meshObjects::clear<lduMesh, DeletableMeshObject>(*
this);
325 if (isA<nonConformalFvPatch>(fvp))
327 wantedPatchTypes[
patchi] =
328 refCast<const nonConformalFvPatch>(fvp).polyFacesType();
332 return wantedPatchTypes;
338 if (!polyFacesBfPtr_)
343 setPolyFacesBfInstance(
time().
name());
345 return *polyFacesBfPtr_;
361 boundary_(*this, poly().
boundary()),
363 topoChanger_(nullptr),
364 distributor_(nullptr),
367 polyFacesBfIOPtr_(nullptr),
368 polyFacesBfPtr_(nullptr),
369 polyBFaceOffsetsPtr_(nullptr),
370 polyBFaceOffsetPatchesPtr_(nullptr),
371 polyBFaceOffsetPatchFacesPtr_(nullptr),
372 polyBFacePatchesPtr_(nullptr),
373 polyBFacePatchFacesPtr_(nullptr),
374 ownerBfPtr_(nullptr),
379 SfSlicePtr_(nullptr),
381 magSfSlicePtr_(nullptr),
385 CfSlicePtr_(nullptr),
406 const word& defaultBoundaryPatchName,
407 const word& defaultBoundaryPatchType,
419 defaultBoundaryPatchName,
420 defaultBoundaryPatchType,
425 boundary_(*this, poly().
boundary()),
427 topoChanger_(nullptr),
428 distributor_(nullptr),
431 polyFacesBfIOPtr_(nullptr),
432 polyFacesBfPtr_(nullptr),
433 polyBFaceOffsetsPtr_(nullptr),
434 polyBFaceOffsetPatchesPtr_(nullptr),
435 polyBFaceOffsetPatchFacesPtr_(nullptr),
436 polyBFacePatchesPtr_(nullptr),
437 polyBFacePatchFacesPtr_(nullptr),
438 ownerBfPtr_(nullptr),
443 SfSlicePtr_(nullptr),
445 magSfSlicePtr_(nullptr),
449 CfSlicePtr_(nullptr),
473 std::move(allNeighbour),
478 boundary_(*this, poly().
boundary()),
480 topoChanger_(nullptr),
481 distributor_(nullptr),
484 polyFacesBfIOPtr_(nullptr),
485 polyFacesBfPtr_(nullptr),
486 polyBFaceOffsetsPtr_(nullptr),
487 polyBFaceOffsetPatchesPtr_(nullptr),
488 polyBFaceOffsetPatchFacesPtr_(nullptr),
489 polyBFacePatchesPtr_(nullptr),
490 polyBFacePatchFacesPtr_(nullptr),
491 ownerBfPtr_(nullptr),
496 SfSlicePtr_(nullptr),
498 magSfSlicePtr_(nullptr),
502 CfSlicePtr_(nullptr),
531 topoChanger_(nullptr),
532 distributor_(nullptr),
535 polyFacesBfIOPtr_(nullptr),
536 polyFacesBfPtr_(nullptr),
537 polyBFaceOffsetsPtr_(nullptr),
538 polyBFaceOffsetPatchesPtr_(nullptr),
539 polyBFaceOffsetPatchFacesPtr_(nullptr),
540 polyBFacePatchesPtr_(nullptr),
541 polyBFacePatchFacesPtr_(nullptr),
542 ownerBfPtr_(nullptr),
547 SfSlicePtr_(nullptr),
549 magSfSlicePtr_(nullptr),
553 CfSlicePtr_(nullptr),
566 boundary_(
Foam::move(
mesh.boundary_)),
567 stitcher_(
Foam::move(
mesh.stitcher_)),
568 topoChanger_(
Foam::move(
mesh.topoChanger_)),
569 distributor_(
Foam::move(
mesh.distributor_)),
572 polyFacesBfIOPtr_(
Foam::move(
mesh.polyFacesBfIOPtr_)),
573 polyFacesBfPtr_(
Foam::move(
mesh.polyFacesBfPtr_)),
574 polyBFaceOffsetsPtr_(
Foam::move(
mesh.polyBFaceOffsetsPtr_)),
575 polyBFaceOffsetPatchesPtr_(
Foam::move(
mesh.polyBFaceOffsetPatchesPtr_)),
576 polyBFaceOffsetPatchFacesPtr_
578 Foam::move(
mesh.polyBFaceOffsetPatchFacesPtr_)
580 polyBFacePatchesPtr_(
Foam::move(
mesh.polyBFacePatchesPtr_)),
581 polyBFacePatchFacesPtr_(
Foam::move(
mesh.polyBFacePatchFacesPtr_)),
582 ownerBfPtr_(
Foam::move(
mesh.ownerBfPtr_)),
583 curTimeIndex_(
mesh.curTimeIndex_),
587 SfSlicePtr_(
Foam::move(
mesh.SfSlicePtr_)),
589 magSfSlicePtr_(
Foam::move(
mesh.magSfSlicePtr_)),
590 magSfPtr_(
Foam::move(
mesh.magSfPtr_)),
591 CSlicePtr_(
Foam::move(
mesh.CSlicePtr_)),
593 CfSlicePtr_(
Foam::move(
mesh.CfSlicePtr_)),
624 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
687 return topoChanger_.valid() && topoChanger_->dynamic();
693 return distributor_.valid() && distributor_->dynamic();
700 (topoChanger_.valid() && topoChanger_->dynamic())
701 || (mover_.valid() && mover_->dynamic());
709 stitcher_->stitches()
710 || topoChanger_->dynamic()
711 || distributor_->dynamic()
730 phiPtr_->nullOldestTime();
735 topoChanged_ =
false;
737 topoChanged_ = topoChanger_->update();
739 const bool distributed = distributor_->update();
741 return topoChanged_ || distributed;
749 const bool moved = mover_->update();
751 curTimeIndex_ =
time().timeIndex();
753 stitcher_->connect(
true,
true,
false);
762 const bool validBoundary
768 <<
" boundary already exists"
773 addPatches(
p, validBoundary);
774 boundary_.addPatches(poly().
boundary());
784 boundary_.setSize(0);
800 clearAddressing(
true);
804 auto updatePatches = []
832 updatePatches(poly().
boundary(), boundary_);
833 updatePatches(otherMesh.
poly().
boundary(), otherMesh.boundary_);
844 const fileName instance0 = instance();
845 const bool forward = readUpdateIsForward();
857 Info<<
" Boundary and topological change" <<
endl;
860 Info<<
" Topological change" <<
endl;
871 const bool reStitch =
873 && stitcher_->stitches()
877 ||
time().findInstance
884 != (forward ? instance0 : polyFacesBfIOPtr_->instance())
889 stitcher_->disconnect(
false,
false);
899 boundary_.readUpdate(poly().
boundary());
914 stitcher_->connect(
false, stitch == stitchType::geometric,
true);
921 return reStitch ? STITCHED : UNCHANGED;
923 return reStitch ? STITCHED : POINTS_MOVED;
927 return TOPO_PATCH_CHANGE;
953 return !(polyFacesBfPtr_ && SfPtr_);
959 if (!polyFacesBfPtr_)
978 polyFacesPatchTypes(),
983 return *polyFacesBfPtr_;
990 if (!polyBFacePatchesPtr_)
992 const label nPolyBFaces = nFaces() - nInternalFaces();
995 polyBFaceOffsetsPtr_ =
new labelList(nPolyBFaces + 1, 0);
996 labelList& offsets = *polyBFaceOffsetsPtr_;
1001 const label polyBFacei =
1004 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1009 offsets[polyBFacei + 1] ++;
1012 for (
label polyBFacei = 0; polyBFacei < nPolyBFaces; ++ polyBFacei)
1014 offsets[polyBFacei + 1] += offsets[polyBFacei];
1020 polyBFaceOffsetPatchFacesPtr_ =
new labelList(offsets.
last());
1022 labelUList& patchFaces = *polyBFaceOffsetPatchFacesPtr_;
1027 const label polyBFacei =
1030 ? (*polyFacesBfPtr_)[
patchi][patchFacei]
1035 patchFaces[offsets[polyBFacei]] = patchFacei;
1036 offsets[polyBFacei] ++;
1043 label polyBFacei = nPolyBFaces - 1;
1048 offsets[polyBFacei + 1] = offsets[polyBFacei];
1053 polyBFacePatchesPtr_ =
1055 polyBFacePatchFacesPtr_ =
1059 return *polyBFacePatchesPtr_;
1066 if (!polyBFacePatchFacesPtr_)
1071 return *polyBFacePatchFacesPtr_;
1099 return *ownerBfPtr_;
1117 return topoChanger_();
1123 return distributor_();
1137 <<
" nCells:" << nCells()
1139 <<
" nFaces:" << nFaces()
1150 <<
"polyTopoChangeMap does not correspond to the old mesh."
1151 <<
" nCells:" << nCells()
1154 <<
" nFaces:" << nFaces()
1164 #define mapVolFieldType(Type, nullArg) \
1165 MapGeometricFields<Type, fvMeshMapper, fvMesh>(fvMap);
1169 #define mapSurfaceFieldType(Type, nullArg) \
1170 MapGeometricFields<Type, fvMeshMapper, surfaceMesh>(fvMap);
1174 #define mapVolInternalFieldType(Type, nullArg) \
1175 MapDimensionedFields<Type, fvMeshMapper, fvMesh>(fvMap);
1183 #define mapPointFieldType(Type, nullArg) \
1184 MapGeometricFields<Type, pointMeshMapper, pointMesh>(mapper);
1192 stitcher_->disconnect(
true,
true);
1205 meshObjects::movePoints<fvMesh>(*
this);
1206 meshObjects::movePoints<lduMesh>(*
this);
1208 const_cast<Time&
>(
time()).functionObjects().movePoints(*
this);
1222 if (V00Ptr_ &&
notNull(V00Ptr_))
1225 <<
"Old-old volumes should not be maintained across mesh "
1266 V0Ptr_->scalarField::operator=(V());
1291 phiPtr_->storeOldTimes();
1298 scalar rDeltaT = 1.0/
time().deltaTValue();
1315 phibf[
patchi] *= rDeltaT;
1324 updateGeomNotOldVol();
1329 meshObjects::movePoints<fvMesh>(*
this);
1330 meshObjects::movePoints<lduMesh>(*
this);
1332 const_cast<Time&
>(
time()).functionObjects().movePoints(*
this);
1343 <<
"The mesh was not disconnected prior to topology change"
1351 clearFvGeomNotOldVol();
1357 <<
"It is not possible to use mesh motion, topology change, and "
1358 <<
"second order time schemes simultaneously"
1369 clearAddressing(
true);
1371 meshObjects::topoChange<fvMesh>(*
this, map);
1372 meshObjects::topoChange<lduMesh>(*
this, map);
1374 const_cast<Time&
>(
time()).functionObjects().topoChange(map);
1376 if (stitcher_.valid())
1378 stitcher_->topoChange(map);
1381 if (topoChanger_.valid())
1383 topoChanger_->topoChange(map);
1386 if (distributor_.valid())
1388 distributor_->topoChange(map);
1393 mover_->topoChange(map);
1403 <<
"The mesh was not disconnected prior to mesh-to-mesh mapping"
1411 clearFvGeomNotOldVol();
1417 clearAddressing(
true);
1419 meshObjects::mapMesh<fvMesh>(*
this, map);
1420 meshObjects::mapMesh<lduMesh>(*
this, map);
1422 const_cast<Time&
>(
time()).functionObjects().mapMesh(map);
1424 stitcher_->mapMesh(map);
1425 topoChanger_->mapMesh(map);
1426 distributor_->mapMesh(map);
1427 mover_->mapMesh(map);
1436 <<
"The mesh was not disconnected prior to distribution"
1444 clearFvGeomNotOldVol();
1450 clearAddressing(
true);
1452 meshObjects::distribute<fvMesh>(*
this, map);
1453 meshObjects::distribute<lduMesh>(*
this, map);
1455 const_cast<Time&
>(
time()).functionObjects().distribute(map);
1457 stitcher_->distribute(map);
1458 topoChanger_->distribute(map);
1459 distributor_->distribute(map);
1460 mover_->distribute(map);
1466 if (!polyFacesBfPtr_)
1471 polyFacesBfIOPtr_->instance() = inst;
1478 if (!polyFacesBfPtr_)
1480 return facesInstance();
1483 return polyFacesBfIOPtr_->instance();
1490 clearFvGeomNotOldVol();
1496 clearAddressing(
true);
1503 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1519 clearFvGeomNotOldVol();
1525 clearAddressing(
true);
1563 if (sync &&
time().completeCase())
1571 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1588 if (isA<processorFvPatch>(CBf[
patchi].patch()))
1593 refCast<const processorFvPatch>(CBf[
patchi].patch())
1607 phiRef().oldTimeRef(i) == phi.
oldTime(i);
1615 const label insertPatchi,
1624 clearFvGeomNotOldVol();
1630 clearAddressing(
true);
1632 const label boundarySize0 = boundary_.size();
1636 boundary_.setSize(boundarySize0 + 1);
1647 #define AddPatchFieldsType(Type, FieldType, DefaultPatchFieldType) \
1648 AddPatchFields<FieldType<Type>> \
1650 const_cast<objectRegistry&>(db()), \
1652 DefaultPatchFieldType \
1666 #undef AddPatchFieldsType
1673 const bool validBoundary
1678 boundary_.shuffle(newToOld, validBoundary);
1680 #define ReorderPatchFieldsType(Type, FieldType) \
1681 ReorderPatchFields<FieldType<Type>> \
1683 const_cast<objectRegistry&>(db()), \
1688 #undef ReorderPatchFieldsType
1720 unsigned int precision0 =
1724 if (phiPtr_ && V00Ptr_)
1726 ok = ok && phiPtr_->write(
write);
1730 if (V0Ptr_ && V00Ptr_)
1732 ok = ok && V0Ptr_->write(
write);
1738 if (stitcher_.valid())
1740 stitcher_->write(
write);
1743 if (topoChanger_.valid())
1745 topoChanger_->write(
write);
1748 if (distributor_.valid())
1750 distributor_->write(
write);
1755 mover_->write(
write);
1780 ok = ok & polyFaces.
write();
1789 Foam::fvMesh::validComponents<Foam::sphericalTensor>()
const
1797 if (!fvSchemes_.valid())
1808 if (!fvSolution_.valid())
1837 return refCast<const fvMesh>(io.
db());
#define forAll(list, i)
Loop across all elements in list.
static bool found(const word &name, const polyMesh &mesh)
Return true if the DemandDrivenMeshObject with the given name.
static zonesGenerator & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
SubField< scalar > subField
Declare type of subField.
static const char *const typeName
Generic GeometricBoundaryField class.
void evaluate()
Evaluate boundary conditions.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
GeometricBoundaryField< Type, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static const GeometricField< Type, GeoMesh, PrimitiveField > & null()
Return a null geometric field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const objectRegistry & db() const
Return the local objectRegistry.
static unsigned int fullPrecision()
Return a full precision for writing data that is *very*.
streamFormat
Enumeration for the format of data in the stream.
static unsigned int defaultPrecision()
Return the default precision.
compressionType
Enumeration for the format of data in the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
label nOldTimes(const bool includeNull=true) const
Return the number of old-time fields stored.
const Field0Type & oldTime() const
Return the old-time field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Unallocated base class of CompactListList.
T & last()
Return the last element of the list.
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun()
Is this a parallel run?
static commsTypes defaultCommsType
Default commsType.
label size() const
Return the number of elements in the UPtrList.
Foam::calculatedFvsPatchField.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling file names.
Abstract base class for fvMesh movers.
static autoPtr< fvMeshDistributor > New(fvMesh &)
Select, construct and return the fvMeshDistributor.
Foam::fvMeshLduAddressing.
Class holds all the necessary information for mapping fields associated with fvMesh.
Abstract base class for fvMesh movers.
static autoPtr< fvMeshMover > New(fvMesh &)
Select, construct and return the fvMeshMover.
Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to crea...
static autoPtr< fvMeshStitcher > New(fvMesh &, bool changing)
Select, construct and return the fvMeshStitcher.
Abstract base class for fvMesh topology changers.
static autoPtr< fvMeshTopoChanger > New(fvMesh &, const dictionary &dict)
Select, construct and return the fvMeshTopoChanger.
Mesh data needed to do the Finite Volume discretisation.
static const HashSet< word > curGeometryFields
Set of names of registered current-time geometric fields.
const fileName & polyFacesBfInstance() const
Get the current instance for the poly faces boundary field.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
stitchType
Extent to which to stitch on read and readUpdate. By default, a.
void postConstruct(const bool changers, const bool zones, const stitchType stitch)
Complete construction of the mesh.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
const fvMeshDistributor & distributor() const
Return the distributor function class.
const fvSchemes & schemes() const
Return the fvSchemes.
void clearGeom()
Clear geometry.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual ~fvMesh()
Destructor.
const GeometricBoundaryField< label, surfaceMesh > & ownerBf() const
Return face-owner addressing.
static const HashSet< word > geometryFields
Set of names of registered geometric fields.
const fvMeshStitcher & stitcher() const
Return the stitcher function class.
void preChange()
Prepare for a mesh change.
const fvSolution & solution() const
Return the fvSolution.
void addFvPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches. Constructor helper.
void swap(fvMesh &)
Swap mesh.
const GeometricBoundaryField< label, surfaceMesh > & polyFacesBf() const
Return face-poly-face addressing.
bool operator==(const fvMesh &) const
void clearAddressing(const bool isMeshUpdate=false)
Clear addressing.
const UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
bool operator!=(const fvMesh &) const
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the mesh data and all objects in the registry.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void mapFields(const polyTopoChangeMap &map)
Map all fields in time using given map.
bool update()
Update the mesh for topology change, mesh to mesh mapping.
void setPolyFacesBfInstance(const fileName &)
Set the instance for the poly faces boundary field.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
bool distributing() const
Does the mesh get redistributed?
void printAllocated() const
Print a list of all the currently allocated mesh data.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
void unconform(const GeometricBoundaryField< label, surfaceMesh > &polyFacesBf, const surfaceVectorField &Sf, const surfaceVectorField &Cf, const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >(), const bool sync=true)
Unconform the fvMesh from the polyMesh.
bool dynamic() const
Is this mesh dynamic?
fvMesh(const IOobject &io, const bool doPost=true)
Construct from IOobject.
const fvMeshTopoChanger & topoChanger() const
Return the topo-changer function class.
virtual void topoChange(const polyTopoChangeMap &map)
Update mesh corresponding to the given map.
bool topoChanging() const
Does the mesh topology change?
virtual bool writeMesh() const
Write the mesh data only.
virtual void addPatch(const label insertPatchi, const polyPatch &patch)
Add/insert single patch.
void clearOut()
Clear all geometry and addressing.
bool move()
Move the mesh.
virtual void setPoints(const pointField &)
Reset the points.
const fvMeshMover & mover() const
Return the mover function class.
void conform(const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >())
Conform the fvMesh to the polyMesh.
bool conformal() const
Return whether the fvMesh is conformal with the polyMesh.
const polyMesh & poly() const
Return reference to polyMesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static autoPtr< fvPatch > New(const polyPatch &, const fvBoundaryMesh &)
Return a pointer to a new patch created on freestore from polyPatch.
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
Selector class for finite volume solution solution. fvMesh is derived from fvSolution so that all fie...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
static void clearUpto(objectRegistry &)
Clear all meshObjects derived from FromType up to (but not including)
Traits class for primitives.
Class holds all the necessary information for mapping fields associated with pointMesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundary() const
Return boundary mesh.
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
void clearGeom()
Clear geometry.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void swap(polyMesh &)
Swap mesh.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the mesh data and all objects in the registry.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void printAllocated() const
Print a list of all the currently allocated mesh data.
void removeBoundary()
Remove boundary patches.
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
virtual bool writeMesh() const
Write the mesh data only.
virtual void addPatch(const label insertPatchi, const polyPatch &patch)
Add/insert single patch.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
virtual void setPoints(const pointField &)
Reset the points.
A patch is a list of labels that address the faces in the global face list.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
label nOldCells() const
Number of old cells.
const labelList & cellMap() const
Old cell map.
label nOldFaces() const
Number of old faces.
const labelList & faceMap() const
Old face map.
virtual bool write(const bool write=true) const
Write using setting from DB.
Cell to surface interpolation scheme. Included in fvMesh.
bool movePoints()
Do what is necessary if the mesh has moved.
void printAllocated() const
Print a list of all the currently allocated data.
void clearOut()
Clear all geometry and addressing.
Mesh data for surface fields.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define nullOldestTimeFields(Type, nullArg)
#define ReorderPatchFieldsType(Type, FieldType)
#define mapVolInternalFieldType(Type, nullArg)
#define mapPointFieldType(Type, nullArg)
#define AddPatchFieldsType(Type, FieldType, DefaultPatchFieldType)
#define mapVolFieldType(Type, nullArg)
#define mapSurfaceFieldType(Type, nullArg)
Reconstruct volField from a face flux field.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
const fvPatchList & patches
#define DebugInFunction
Report an information message using Foam::Info.
const dimensionSet dimless
const dimensionSet volumetricFlux
const dimensionSet volume
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.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
SurfaceField< scalar > surfaceScalarField
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
const dimensionSet & dimVolume
const fvMesh & region(const dictionary &dict)
Cast the give dictionary to the corresponding region fvMesh.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
const dimensionSet & dimTime
Field< label > labelField
Specialisation of Field<T> for label.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
prefixOSstream Pout(cout, "Pout")
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimArea
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void nullDemandDrivenData(DataType *&dataPtr)
faceListList boundary(nPatches)