Go to the documentation of this file.
70 globalCellIDs[cellI] = globalNumbering.toGlobal(cellI);
72 overlap.cellInterpolationMap().distribute(globalCellIDs);
91 Pout<<
"dynamicOversetFvMesh::update() : extended addressing from"
93 <<
" to nFaces:" << lowerAddr.size()
94 <<
" nExtraFaces:" << nExtraFaces <<
endl;
119 const label nbrCelli = nbrs[nbri];
120 label globalNbr = globalCellIDs[nbrCelli];
121 label proci = globalNumbering.whichProcID(globalNbr);
122 label remoteCelli = globalNumbering.toLocal(proci, globalNbr);
127 procOwner[proci].
append(celli);
128 dynProcNeighbour[proci].
append(remoteCelli);
140 procNeighbour[i] = std::move(dynProcNeighbour[i]);
143 Pstream::exchange<labelList, label>(procNeighbour, mySendCells);
148 if (procOwner[proci].
size())
152 if (mySendCells[proci].
size())
173 Pout<<
"Adding interface " << nbri
174 <<
" to receive my " << procOwner[proci].size()
175 <<
" from " << proci <<
endl;
177 procToInterface[proci] = nbri;
195 Pout<<
"Adding interface " << nbri
196 <<
" to send my " << mySendCells[proci].size()
197 <<
" to " << proci <<
endl;
219 Pout<<
"Adding interface " << nbri
220 <<
" to receive my " << procOwner[proci].size()
221 <<
" from " << proci <<
endl;
223 procToInterface[proci] = nbri;
241 Pout<<
"Adding interface " << nbri
242 <<
" to send my " << mySendCells[proci].size()
243 <<
" to " << proci <<
endl;
289 patchAddr[patchI] = &fvp[patchI].faceCells();
293 label patchI = fvp.size()+i;
309 lduPrimitiveMesh::nonBlockingSchedule<processorLduInterface>
320 std::move(lowerAddr),
321 std::move(upperAddr),
333 Pout<<
"Adapted addressing:"
340 Pout<<
" " << patchI <<
"\tpatchAddr:"
350 if (iFaces.
set(patchI))
352 Pout<<
" " << patchI <<
"\tinterface:"
353 << iFaces[patchI].type() <<
endl;
379 for (
const label facei : cFaces)
381 if (isInternalFace(facei))
383 label nbrCelli = (own[facei] == celli ? nei[facei] : own[facei]);
384 if (norm[nbrCelli] == -GREAT)
387 if (isFront.
set(facei))
395 avg += norm[nbrCelli];
401 if (nbrNorm[facei-nInternalFaces()] == -GREAT)
403 if (isFront.
set(facei))
410 avg += nbrNorm[facei-nInternalFaces()];
454 fld[celli] = cellToCoarse[celli];
462 scalarAgglomeration.write();
464 Info<<
"Writing initial cell distribution to "
465 << this->time().timeName() <<
endl;
469 for (
label level = 0; level < agglom.
size(); level++)
476 <<
" current size : "
478 <<
" agglomerated size : "
483 const labelList& cellLabels = coarseToCell[fineI];
486 cellToCoarse[cellLabels[i]] = addr[fineI];
510 fld[celli] = cellToCoarse[celli];
521 scalarAgglomeration.write();
529 Foam::dynamicOversetFvMesh::dynamicOversetFvMesh(
const IOobject& io)
575 return allInterfaces_;
616 return baseName(
name.substr(0,
name.size()-2));
631 this->schemesDict().findDict(
"oversetInterpolationSuppressed")
635 suppressed.insert(dictPtr->toc());
638 interpolate<volScalarField>(suppressed);
639 interpolate<volVectorField>(suppressed);
640 interpolate<volSphericalTensorField>(suppressed);
641 interpolate<volSymmTensorField>(suppressed);
642 interpolate<volTensorField>(suppressed);
679 zeroGradientFvPatchScalarField::typeName
687 volTypes.writeObject(fmt, ver, cmp, valid);
703 zeroGradientFvPatchScalarField::typeName
711 volZoneID[cellI] =
zoneID[cellI];
714 volZoneID.writeObject(fmt, ver, cmp, valid);
743 zeroGradientFvPatchScalarField::typeName
746 forAll(cellStencil, cellI)
748 const labelList& stencil = cellStencil[cellI];
751 volDonorZoneID[cellI] = donorZoneID[stencil[0]];
752 for (
label i = 1; i < stencil.size(); i++)
754 if (donorZoneID[stencil[i]] != volDonorZoneID[cellI])
757 << cellI <<
" at " <<
C()[cellI]
760 volDonorZoneID[cellI] = -2;
767 volDonorZoneID.writeObject(fmt, ver, cmp, valid);
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
The class contains the addressing required by the lduMatrix: upper, lower and losort.
label size() const noexcept
The number of elements in table.
labelListList stencilPatches_
Corresponding patches (in above lduPtr) to the stencil.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label size() const noexcept
The number of elements in the list.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Concrete implementation of processor interface. Used to temporarily store settings.
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Geometric agglomerated algebraic multigrid agglomeration class.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
virtual bool update()
Update the mesh for both mesh motion and topology change.
static constexpr const zero Zero
Global zero.
labelList reverseFaceMap_
From old to new face labels.
static const labelIOList & zoneID(const fvMesh &)
Helper: get reference to registered zoneID. Loads volScalarField.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool valid) const
Write the underlying polyMesh and other data.
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
static label nProcs(const label communicator=0)
Number of processes in parallel run.
virtual const labelUList & cellTypes() const
Return the cell type list.
static const Type & New(const Mesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
void writeAgglomeration(const GAMGAgglomeration &agglom) const
Debug: dump agglomeration.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
void set(const bitSet &bitset)
Set specified bits from another bitset.
const T * set(const label i) const
Return const pointer to element (if set) or nullptr.
void append(const T &val)
Append an element at the end of the list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
autoPtr< fvMeshPrimitiveLduAddressing > lduPtr_
Extended addressing (extended with local interpolation stencils)
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
#define forAll(list, i)
Loop across all elements in list.
virtual const labelUList & faceCells() const
Return faceCell addressing.
cellMask correctBoundaryConditions()
PtrList< const lduPrimitiveProcessorInterface > remoteStencilInterfaces_
Added (processor)lduInterfaces for remote bits of stencil.
static int debug
Debug switch.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
static labelList addAddressing(const lduAddressing &addr, const labelListList &nbrCells, label &nExtraFaces, labelList &lower, labelList &upper, labelListList &nbrCellFaces, const globalIndex &, const labelList &globalCellIDs, labelListList &localFaceCells, labelListList &remoteFaceCells)
Given additional addressing (in the form of additional neighbour.
label nCells() const
Number of mesh cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Representation of a major/minor version number.
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
word name(const complex &c)
Return string representation of complex.
Variant of fvMeshLduAddressing that contains addressing instead of slices.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool valid) const
Write using given format, version and compression.
virtual bool interpolateFields()
Update fields when mesh is updated.
streamFormat
Data format (ascii | binary)
virtual ~dynamicOversetFvMesh()
Destructor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
const labelIOList & zoneID
virtual bool updateAddressing() const
Calculate the extended lduAddressing.
errorManip< error > abort(error &err)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
virtual const mapDistribute & cellInterpolationMap() const
Return a communication schedule.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
void correctBoundaryConditions()
Correct boundary field.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
static int & msgType()
Message tag of standard messages.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const lduAddressing & lduAddr() const
Return ldu addressing. If active: is (extended)
const labelList & cellTypes
lduInterfacePtrsList allInterfaces_
Interfaces for above mesh. Contains both original and.
virtual const labelListList & cellStencil() const
Per interpolated cell the neighbour cells (in terms of slots as.
labelListList stencilFaces_
Corresponding faces (in above lduPtr) to the stencil.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
bool ends_with(const std::string &s) const
True if string ends with the given suffix (cf. C++20)
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
const fvMeshPrimitiveLduAddressing & primitiveLduAddr() const
Return extended ldu addressing.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
const polyBoundaryMesh & patches
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
Boundary condition for use on overset patches. To be run in combination with special dynamicFvMesh ty...
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
A List with indirect addressing.
virtual bool update()
Dummy update function which does not change the mesh.
const cellCellStencilObject & overlap
static word baseName(const word &name)
Helper: strip off trailing _0.
void setSize(const label newSize)
Alias for resize(const label)
labelListList invertOneToMany(const label len, const labelUList &map)
Invert one-to-many map. Unmapped elements will be size 0.
scalar cellAverage(const labelList &types, const labelList &nbrTypes, const scalarField &norm, const scalarField &nbrNorm, const label celli, bitSet &isFront) const
Average norm of valid neighbours.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
void setSize(const label newLen)
Same as resize()