80 const bool haveV = (VPtr_ !=
nullptr);
81 const bool haveSf = (SfPtr_ !=
nullptr);
82 const bool haveMagSf = (magSfPtr_ !=
nullptr);
83 const bool haveCP = (CPtr_ !=
nullptr);
84 const bool haveCf = (CfPtr_ !=
nullptr);
118 clearGeomNotOldVol();
157 meshObject::clear<fvMesh, TopologicalMeshObject>(*
this);
158 meshObject::clear<lduMesh, TopologicalMeshObject>(*
this);
169 <<
" Storing old time volumes since from time " << curTimeIndex_
170 <<
" and time now " << time().timeIndex()
173 if (V00Ptr_ && V0Ptr_)
182 V0Ptr_->scalarField::operator=(V);
208 curTimeIndex_ = time().timeIndex();
213 <<
" Stored old time volumes V0:" << V0Ptr_->size()
219 <<
" Stored oldold time volumes V00:" << V00Ptr_->size()
377 std::move(allNeighbour),
481 std::move(allNeighbour),
498 static_cast<const
data&>(baseMesh)
548 static_cast<const
data&>(baseMesh)
634 const bool validBoundary
640 <<
" boundary already exists"
644 addPatches(plist, validBoundary);
652 const bool validBoundary
658 addFvPatches(plist, validBoundary);
668 boundary_.setSize(0);
723 <<
"Calculating fvMeshLduAddressing from nFaces:"
745 <<
" nCells:" << nCells()
758 <<
"mapPolyMesh does not correspond to the old mesh."
759 <<
" nCells:" << nCells()
772 MapGeometricFields<scalar, fvPatchField, fvMeshMapper, volMesh>
774 MapGeometricFields<vector, fvPatchField, fvMeshMapper, volMesh>
776 MapGeometricFields<sphericalTensor, fvPatchField, fvMeshMapper, volMesh>
778 MapGeometricFields<symmTensor, fvPatchField, fvMeshMapper, volMesh>
780 MapGeometricFields<tensor, fvPatchField, fvMeshMapper, volMesh>
784 MapGeometricFields<scalar, fvsPatchField, fvMeshMapper, surfaceMesh>
786 MapGeometricFields<vector, fvsPatchField, fvMeshMapper, surfaceMesh>
793 MapGeometricFields<symmTensor, fvsPatchField, fvMeshMapper, surfaceMesh>
795 MapGeometricFields<tensor, fvsPatchField, fvMeshMapper, surfaceMesh>
799 MapDimensionedFields<scalar, fvMeshMapper, volMesh>(mapper);
800 MapDimensionedFields<vector, fvMeshMapper, volMesh>(mapper);
801 MapDimensionedFields<sphericalTensor, fvMeshMapper, volMesh>(mapper);
802 MapDimensionedFields<symmTensor, fvMeshMapper, volMesh>(mapper);
803 MapDimensionedFields<tensor, fvMeshMapper, volMesh>(mapper);
823 V0[i] = savedV0[cellMap[i]];
839 label celli = -index-2;
841 V0[celli] += savedV0[oldCelli];
848 <<
"Mapping old time volume V0. Merged "
849 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
865 V00[i] = savedV00[cellMap[i]];
881 label celli = -index-2;
883 V00[celli] += savedV00[oldCelli];
889 <<
"Mapping old time volume V00. Merged "
890 << nMerged <<
" out of " << nCells() <<
" cells" <<
endl;
933 if (phiPtr_->timeIndex() != time().
timeIndex())
948 updateGeomNotOldVol();
951 boundary_.movePoints();
956 meshObject::movePoints<fvMesh>(*
this);
957 meshObject::movePoints<lduMesh>(*
this);
988 if (VPtr_ && (VPtr_->size() != mpm.
nOldCells()))
991 <<
"V:" << VPtr_->size()
992 <<
" not equal to the number of old cells "
996 if (V0Ptr_ && (V0Ptr_->size() != mpm.
nOldCells()))
999 <<
"V0:" << V0Ptr_->size()
1000 <<
" not equal to the number of old cells "
1004 if (V00Ptr_ && (V00Ptr_->size() != mpm.
nOldCells()))
1007 <<
"V0:" << V00Ptr_->size()
1008 <<
" not equal to the number of old cells "
1039 clearGeomNotOldVol();
1048 clearAddressing(
true);
1050 meshObject::updateMesh<fvMesh>(*
this, mpm);
1051 meshObject::updateMesh<lduMesh>(*
this, mpm);
1064 ok = phiPtr_->write(valid);
1072 ok = V0Ptr_->write(valid);
1086typename Foam::pTraits<Foam::sphericalTensor>::labelType
1089 return Foam::pTraits<Foam::sphericalTensor>::labelType(1);
1097 return &rhs !=
this;
1103 return &rhs ==
this;
Graphite solid properties.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
void setSize(const label n)
Alias for resize()
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void size(const label n)
Older name for setAddressableSize.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Database for solution data, solver performance and other reduced data.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
virtual bool write()
Write the output fields.
Maps input fields from local mesh to secondary mesh at runtime.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SolverPerformance< Type > solveSegregatedOrCoupled(const dictionary &)
Solve segregated or coupled returning the solution statistics.
Foam::fvMeshLduAddressing.
Class holds all the necessary information for mapping fields associated with fvMesh.
Mesh data needed to do the Finite Volume discretisation.
virtual bool movePoints()
Avoid masking surfaceInterpolation method.
slicedSurfaceVectorField * SfPtr_
Face area vectors.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
void addFvPatches(polyPatchList &plist, const bool validBoundary=true)
Add boundary patches. Constructor helper.
slicedSurfaceVectorField * CfPtr_
Face centres.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
void clearGeom()
Clear local geometry.
SlicedDimensionedField< scalar, volMesh > * VPtr_
Cell volumes.
void clearOutLocal()
Clear local-only storage (geometry, addressing etc)
virtual ~fvMesh()
Destructor.
void updateGeomNotOldVol()
Clear geometry like clearGeomNotOldVol but recreate any.
void clearGeomNotOldVol()
Clear geometry but not the old-time cell volumes.
void storeOldVol(const scalarField &)
Preserve old volume(s)
void clearAddressing(const bool isMeshUpdate=false)
Clear local addressing.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write the underlying polyMesh and other data.
slicedVolVectorField * CPtr_
Cell centres.
surfaceScalarField * magSfPtr_
Mag face area vectors.
void clearOut()
Clear all geometry and addressing.
virtual void updateGeom()
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...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
label nOldCells() const
Number of old cells.
const labelList & faceMap() const
Old face map.
const labelList & reverseCellMap() const
Reverse cell map.
const labelList & cellMap() const
Old cell map.
label nOldFaces() const
Number of old faces.
const scalarField & oldCellVolumes() const
static void clearUpto(objectRegistry &obr)
void movePoints()
Update for new mesh geometry.
void updateMesh()
Update for new mesh topology.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
void removeBoundary()
Remove boundary patches.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
friend bool operator!=(const refineCell &rc1, const refineCell &rc2)
friend bool operator==(const refineCell &rc1, const refineCell &rc2)
Cell to surface interpolation scheme. Included in fvMesh.
void clearOut()
Clear all geometry and addressing.
virtual void updateGeom()
Update all geometric data.
Mesh data needed to do the Finite Volume discretisation.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
Foam::pTraits< Foam::sphericalTensor >::labelType Foam::fvMesh::validComponents< Foam::sphericalTensor >() const
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Generic Geometric field mapper. For "real" mapping, add template specialisations for mapping of inter...
#define DebugInfo
Report an information message using Foam::Info.
#define DebugInFunction
Report an information message using Foam::Info.
#define InfoInFunction
Report an information message using Foam::Info.
const fileOperation & fileHandler()
Get current file handler.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void mapClouds(const objectRegistry &db, const mapPolyMesh &mapper)
Generic Geometric field mapper.
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
void MapGeometricFields(const MeshMapper &mapper)
Generic Geometric field mapper.
static constexpr const zero Zero
Global zero (0)
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
const dimensionSet dimVolume(pow3(dimLength))
errorManipArg< error, int > exit(error &err, const int errNo=1)
void deleteDemandDrivenData(DataPtr &dataPtr)
#define forAll(list, i)
Loop across all elements in list.