41 const label addressingOffset
44 directAddressing_(addressingSlice)
46 forAll(directAddressing_, i)
49 directAddressing_[i] -= addressingOffset + 1;
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];
103 const polyMesh&
mesh,
107 processorVolPatchFieldDecomposer
110 mesh.faceNeighbour(),
122 addressing_(addressingSlice.size()),
123 weights_(addressingSlice.size())
130 addressing_[i][0] =
mag(addressingSlice[i]) - 1;
136 Foam::fvFieldDecomposer::fvFieldDecomposer
139 const fvMesh& procMesh,
146 faceAddressing_(faceAddressing),
147 cellAddressing_(cellAddressing),
148 boundaryAddressing_(boundaryAddressing),
150 patchFieldDecomposerPtrs_(),
151 processorVolPatchFieldDecomposerPtrs_(),
152 processorSurfacePatchFieldDecomposerPtrs_(),
157 Foam::fvFieldDecomposer::fvFieldDecomposer
159 const fvMesh& completeMesh,
179 Foam::fvFieldDecomposer::fvFieldDecomposer
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
250 new patchFieldDecomposer
253 boundaryRanges[oldPatchi].start()
259 processorVolPatchFieldDecomposerPtrs_.set
262 new processorVolPatchFieldDecomposer
270 processorSurfacePatchFieldDecomposerPtrs_.set
273 new processorSurfacePatchFieldDecomposer
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];
310 const labelSubList localPatchSlice(fvp.patchSlice(faceAddressing_));
315 && !isA<processorLduInterface>(procMesh_.boundary()[patchi])
318 patchFieldDecomposerPtrs_.set
321 new patchFieldDecomposer
324 completeMesh.boundaryMesh()[oldPatchi].start()
330 processorVolPatchFieldDecomposerPtrs_.set
333 new processorVolPatchFieldDecomposer
340 processorSurfacePatchFieldDecomposerPtrs_.set
343 new processorSurfacePatchFieldDecomposer
345 static_cast<const labelUList&>(localPatchSlice)
359 s[i] =
sign(localPatchSlice[i]);
SubList< label > labelSubList
A SubList of labels.
dimensionedScalar sign(const dimensionedScalar &ds)
const List< T >::subList patchSlice(const List< T > &values) const
This patch slice from the complete list, which has size mesh::nFaces(), using the virtual patch size...
void size(const label n)
Older name for setAddressableSize.
static int verbose_
Output verbosity when writing.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void resize(const label len)
Adjust allocated size of list.
processorSurfacePatchFieldDecomposer(const labelUList &addressingSlice)
Construct given addressing.
void clear()
Remove all mappers.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
True if no mappers have been allocated.
void reset(const fvMesh &completeMesh)
Reset mappers using information from the complete mesh.
A List obtained as a section of another List.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Finite Volume volume and surface field decomposer.
patchFieldDecomposer(const labelUList &addressingSlice, const label addressingOffset)
Construct given addressing.
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 ...
List< label > labelList
A List of labels.
processorVolPatchFieldDecomposer(const labelUList &faceOwner, const labelUList &faceNeigbour, const labelUList &addressingSlice)
Construct addressing from details.
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))