Go to the documentation of this file.
71 globalCellIDs[cellI] = globalNumbering.toGlobal(cellI);
73 overlap.cellInterpolationMap().distribute(globalCellIDs);
92 Pout<<
"dynamicOversetFvMesh::update() : extended addressing from"
94 <<
" to nFaces:" << lowerAddr.size()
95 <<
" nExtraFaces:" << nExtraFaces <<
endl;
120 const label nbrCelli = nbrs[nbri];
121 label globalNbr = globalCellIDs[nbrCelli];
122 label proci = globalNumbering.whichProcID(globalNbr);
123 label remoteCelli = globalNumbering.toLocal(proci, globalNbr);
128 procOwner[proci].
append(celli);
129 dynProcNeighbour[proci].
append(remoteCelli);
141 procNeighbour[i] = std::move(dynProcNeighbour[i]);
144 Pstream::exchange<labelList, label>(procNeighbour, mySendCells);
149 if (procOwner[proci].
size())
153 if (mySendCells[proci].
size())
174 Pout<<
"Adding interface " << nbri
175 <<
" to receive my " << procOwner[proci].size()
176 <<
" from " << proci <<
endl;
178 procToInterface[proci] = nbri;
196 Pout<<
"Adding interface " << nbri
197 <<
" to send my " << mySendCells[proci].size()
198 <<
" to " << proci <<
endl;
220 Pout<<
"Adding interface " << nbri
221 <<
" to receive my " << procOwner[proci].size()
222 <<
" from " << proci <<
endl;
224 procToInterface[proci] = nbri;
242 Pout<<
"Adding interface " << nbri
243 <<
" to send my " << mySendCells[proci].size()
244 <<
" to " << proci <<
endl;
294 const label patchi = fvp.size()+i;
310 lduPrimitiveMesh::nonBlockingSchedule<processorLduInterface>
321 std::move(lowerAddr),
322 std::move(upperAddr),
334 Pout<<
"Adapted addressing:"
341 Pout<<
" " << patchI <<
"\tpatchAddr:"
351 if (iFaces.
set(patchI))
353 Pout<<
" " << patchI <<
"\tinterface:"
354 << iFaces[patchI].type() <<
endl;
380 for (
const label facei : cFaces)
382 if (isInternalFace(facei))
384 label nbrCelli = (own[facei] == celli ? nei[facei] : own[facei]);
385 if (norm[nbrCelli] == -GREAT)
388 if (isFront.
set(facei))
396 avg += norm[nbrCelli];
402 if (nbrNorm[facei-nInternalFaces()] == -GREAT)
404 if (isFront.
set(facei))
411 avg += nbrNorm[facei-nInternalFaces()];
455 fld[celli] = cellToCoarse[celli];
463 scalarAgglomeration.write();
465 Info<<
"Writing initial cell distribution to "
466 << this->time().timeName() <<
endl;
470 for (label level = 0; level < agglom.
size(); level++)
473 label coarseSize =
max(addr)+1;
477 <<
" current size : "
479 <<
" agglomerated size : "
484 const labelList& cellLabels = coarseToCell[fineI];
487 cellToCoarse[cellLabels[i]] = addr[fineI];
511 fld[celli] = cellToCoarse[celli];
522 scalarAgglomeration.write();
530 Foam::dynamicOversetFvMesh::dynamicOversetFvMesh
598 return allInterfaces_;
639 return baseName(
name.substr(0,
name.size()-2));
654 this->schemesDict().findDict(
"oversetInterpolationSuppressed")
658 suppressed.insert(dictPtr->toc());
661 interpolate<volScalarField>(suppressed);
662 interpolate<volVectorField>(suppressed);
663 interpolate<volSphericalTensorField>(suppressed);
664 interpolate<volSymmTensorField>(suppressed);
665 interpolate<volTensorField>(suppressed);
700 zeroGradientFvPatchScalarField::typeName
708 volTypes.writeObject(streamOpt, valid);
724 zeroGradientFvPatchScalarField::typeName
732 volZoneID[cellI] =
zoneID[cellI];
735 volZoneID.writeObject(streamOpt, valid);
764 zeroGradientFvPatchScalarField::typeName
767 forAll(cellStencil, cellI)
769 const labelList& stencil = cellStencil[cellI];
772 volDonorZoneID[cellI] = donorZoneID[stencil[0]];
773 for (label i = 1; i < stencil.size(); i++)
775 if (donorZoneID[stencil[i]] != volDonorZoneID[cellI])
778 << cellI <<
" at " <<
C()[cellI]
781 volDonorZoneID[cellI] = -2;
788 volDonorZoneID.writeObject(streamOpt, valid);
int debug
Static debugging option.
static int debug
Debug switch.
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.
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 (0)
labelList reverseFaceMap_
From old to new face labels.
static const labelIOList & zoneID(const fvMesh &)
Helper: get reference to registered zoneID. Loads volScalarField.
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
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 setSize(const label n)
Alias for resize()
void set(const bitSet &bitset)
Set specified bits from another bitset.
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
OSstream wrapped stdout (std::cout) with parallel prefix.
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.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
#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.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
label nCells() const noexcept
Number of mesh cells.
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)
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
void setSize(const label n)
Alias for resize()
The IOstreamOption is a simple container for options an IOstream can normally have.
Variant of fvMeshLduAddressing that contains addressing instead of slices.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
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 interpolateFields()
Update fields when mesh is updated.
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.
void correctBoundaryConditions()
Correct boundary field.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const lduAddressing & lduAddr() const
Return ldu addressing. If active: is (extended)
const labelList & cellTypes
const T * set(const label i) const
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.
static int & msgType() noexcept
Message tag of standard messages.
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
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 bool init(const bool doInit)
Initialise all non-demand-driven data.
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...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
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 size(const label n)
Older name for setAddressableSize.
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.
Smooth ATC in cells next to a set of patches supplied by type.
static label nProcs(const label communicator=worldComm)
Number of processes in parallel run, and 1 for serial run.
const dimensionSet dimless
Dimensionless.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write the underlying polyMesh and other data.