41 const label addressingOffset
44 directAddressing_(addressingSlice)
46 forAll(directAddressing_, i)
49 directAddressing_[i] -= addressingOffset + 1;
54Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer::
55processorVolPatchFieldDecomposer
62 directAddressing_(addressingSlice.size())
64 forAll(directAddressing_, i)
67 label ai =
mag(addressingSlice[i]) - 1;
69 if (ai < neigh.
size())
76 if (addressingSlice[i] >= 0)
79 directAddressing_[i] = neigh[ai];
83 directAddressing_[i] = owner[ai];
94 directAddressing_[i] = owner[ai];
100Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer::
101processorVolPatchFieldDecomposer
110 mesh.faceNeighbour(),
116Foam::fvFieldDecomposer::processorSurfacePatchFieldDecomposer::
117processorSurfacePatchFieldDecomposer
122 addressing_(addressingSlice.size()),
123 weights_(addressingSlice.size())
130 addressing_[i][0] =
mag(addressingSlice[i]) - 1;
146 faceAddressing_(faceAddressing),
147 cellAddressing_(cellAddressing),
148 boundaryAddressing_(boundaryAddressing),
150 patchFieldDecomposerPtrs_(),
151 processorVolPatchFieldDecomposerPtrs_(),
152 processorSurfacePatchFieldDecomposerPtrs_(),
159 const fvMesh& completeMesh,
200 reset(boundaryRanges, faceOwner, faceNeighbour);
208 return patchFieldDecomposerPtrs_.empty();
214 patchFieldDecomposerPtrs_.clear();
215 processorVolPatchFieldDecomposerPtrs_.clear();
216 processorSurfacePatchFieldDecomposerPtrs_.clear();
229 const label nMappers = procMesh_.boundary().size();
230 patchFieldDecomposerPtrs_.resize(nMappers);
231 processorVolPatchFieldDecomposerPtrs_.resize(nMappers);
232 processorSurfacePatchFieldDecomposerPtrs_.resize(nMappers);
233 faceSign_.resize(nMappers);
235 forAll(boundaryAddressing_, patchi)
237 const label oldPatchi = boundaryAddressing_[patchi];
238 const fvPatch& fvp = procMesh_.boundary()[patchi];
244 && !isA<processorLduInterface>(procMesh_.boundary()[patchi])
247 patchFieldDecomposerPtrs_.set
253 boundaryRanges[oldPatchi].start()
259 processorVolPatchFieldDecomposerPtrs_.set
270 processorSurfacePatchFieldDecomposerPtrs_.set
275 static_cast<const labelUList&
>(localPatchSlice)
289 s[i] =
sign(localPatchSlice[i]);
300 const label nMappers = procMesh_.boundary().size();
301 patchFieldDecomposerPtrs_.resize(nMappers);
302 processorVolPatchFieldDecomposerPtrs_.resize(nMappers);
303 processorSurfacePatchFieldDecomposerPtrs_.resize(nMappers);
304 faceSign_.resize(nMappers);
306 forAll(boundaryAddressing_, patchi)
308 const label oldPatchi = boundaryAddressing_[patchi];
309 const fvPatch& fvp = procMesh_.boundary()[patchi];
315 && !isA<processorLduInterface>(procMesh_.boundary()[patchi])
318 patchFieldDecomposerPtrs_.set
330 processorVolPatchFieldDecomposerPtrs_.set
340 processorSurfacePatchFieldDecomposerPtrs_.set
345 static_cast<const labelUList&
>(localPatchSlice)
359 s[i] =
sign(localPatchSlice[i]);
void resize(const label len)
Adjust allocated size of list.
A List obtained as a section of another List.
void size(const label n)
Older name for setAddressableSize.
void reset()
Reset to defaults.
Patch field decomposer class.
Processor patch field decomposer class. Surface field is assumed.
Processor patch field decomposer class. Maps either owner or.
Finite Volume volume and surface field decomposer.
void reset(const fvMesh &completeMesh)
Reset mappers using information from the complete mesh.
bool empty() const
True if no mappers have been allocated.
static int verbose_
Output verbosity when writing.
void clear()
Remove all mappers.
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const List< T >::subList patchSlice(const List< T > &l) const
Slice list to patch.
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar sign(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.