71 globalCellIDs[cellI] = globalNumbering.
toGlobal(cellI);
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();
598 return allInterfaces_;
639 return baseName(
name.substr(0,
name.size()-2));
654 this->schemesDict().findDict(
"oversetInterpolationSuppressed")
661 interpolate<volScalarField>(suppressed);
662 interpolate<volVectorField>(suppressed);
663 interpolate<volSphericalTensorField>(suppressed);
664 interpolate<volSymmTensorField>(suppressed);
665 interpolate<volTensorField>(suppressed);
700 zeroGradientFvPatchScalarField::typeName
724 zeroGradientFvPatchScalarField::typeName
732 volZoneID[cellI] =
zoneID[cellI];
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;
static const Foam::dimensionedScalar C("", Foam::dimTemperature, 234.5)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Geometric agglomerated algebraic multigrid agglomeration class.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
label size() const noexcept
The number of elements in table.
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()
void append(const T &val)
Append an element at the end of the list.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
static int & msgType() noexcept
Message tag of standard messages.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
const T * set(const label i) const
void setSize(const label n)
Alias for resize()
label size() const noexcept
The number of elements in the list.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
virtual const mapDistribute & cellInterpolationMap() const
Return a communication schedule.
virtual const labelUList & cellTypes() const
Return the cell type list.
virtual const labelListList & cellStencil() const
Per interpolated cell the neighbour cells (in terms of slots as.
static const labelIOList & zoneID(const fvMesh &)
Helper: get reference to registered zoneID. Loads volScalarField.
A cell is defined as a list of faces with extra functionality.
static int debug
Debug switch.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
wordList toc() const
Return the table of contents.
Abstract base class for geometry and/or topology changing fvMesh.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
virtual bool update()
Update the mesh for both mesh motion and topology change.
dynamicFvMesh with support for overset meshes.
void writeAgglomeration(const GAMGAgglomeration &agglom) const
Debug: dump agglomeration.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
virtual bool interpolateFields()
Update fields when mesh is updated.
virtual ~dynamicOversetFvMesh()
Destructor.
virtual const lduAddressing & lduAddr() const
Return ldu addressing. If active: is (extended)
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
PtrList< const lduPrimitiveProcessorInterface > remoteStencilInterfaces_
Added (processor)lduInterfaces for remote bits of stencil.
autoPtr< fvMeshPrimitiveLduAddressing > lduPtr_
Extended addressing (extended with local interpolation stencils)
labelListList stencilFaces_
Corresponding faces (in above lduPtr) to the stencil.
virtual bool updateAddressing() const
Calculate the extended lduAddressing.
labelListList stencilPatches_
Corresponding patches (in above lduPtr) to the stencil.
const fvMeshPrimitiveLduAddressing & primitiveLduAddr() const
Return extended ldu addressing.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
virtual bool update()
Update the mesh for both mesh motion and topology change.
lduInterfacePtrsList allInterfaces_
Interfaces for above mesh. Contains both original and.
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.
labelList reverseFaceMap_
From old to new face labels.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
lduInterfacePtrsList interfaces() const
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
Smooth ATC in cells next to a set of patches supplied by type.
Variant of fvMeshLduAddressing that contains addressing instead of slices.
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)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global index.
label toLocal(const label i) const
From global to local on current processor.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
label size() const
Return number of equations.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
Concrete implementation of processor interface. Used to temporarily store settings.
virtual const labelUList & faceCells() const
Return faceCell addressing.
label constructSize() const noexcept
Constructed data size.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Boundary condition for use on overset patches. To be run in combination with special dynamicFvMesh ty...
label nCells() const noexcept
Number of mesh cells.
int myProcNo() const noexcept
Return processor number.
virtual bool write(const bool valid=true) const
Write using setting from DB.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
bool ends_with(const std::string &s) const
True if string ends with the given suffix (cf. C++20)
const word & baseName() const
Return const access to the base name of the sub-model.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const cellCellStencilObject & overlap
const labelIOList & zoneID
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
labelListList invertOneToMany(const label len, const labelUList &map)
Invert one-to-many map. Unmapped elements will be size 0.
cellMask correctBoundaryConditions()
const labelList & cellTypes
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
#define forAll(list, i)
Loop across all elements in list.