34 const label addressingOffset
37 directAddressing_(addressingSlice)
39 forAll(directAddressing_, i)
42 directAddressing_[i] -= addressingOffset + 1;
54 directAddressing_(addressingSlice.
size())
59 forAll(directAddressing_, i)
62 label ai =
mag(addressingSlice[i]) - 1;
64 if (ai < neighb.
size())
71 if (addressingSlice[i] >= 0)
74 directAddressing_[i] = neighb[ai];
78 directAddressing_[i] = own[ai];
89 directAddressing_[i] = own[ai];
101 addressing_(addressingSlice.
size()),
102 weights_(addressingSlice.
size())
106 addressing_[i].setSize(1);
107 weights_[i].setSize(1);
109 addressing_[i][0] =
mag(addressingSlice[i]) - 1;
110 weights_[i][0] =
sign(addressingSlice[i]);
115 Foam::fvFieldDecomposer::fvFieldDecomposer
117 const fvMesh& completeMesh,
124 completeMesh_(completeMesh),
126 faceAddressing_(faceAddressing),
127 cellAddressing_(cellAddressing),
128 boundaryAddressing_(boundaryAddressing),
129 patchFieldDecomposerPtrs_
131 procMesh_.boundary().size(),
134 processorVolPatchFieldDecomposerPtrs_
136 procMesh_.boundary().size(),
139 processorSurfacePatchFieldDecomposerPtrs_
141 procMesh_.boundary().size(),
149 boundaryAddressing_[
patchi] >= 0
155 procMesh_.boundary()[
patchi].patchSlice(faceAddressing_),
156 completeMesh_.boundaryMesh()
158 boundaryAddressing_[
patchi]
164 processorVolPatchFieldDecomposerPtrs_[
patchi] =
168 procMesh_.boundary()[
patchi].patchSlice(faceAddressing_)
171 processorSurfacePatchFieldDecomposerPtrs_[
patchi] =
174 static_cast<const labelUList&>
176 procMesh_.boundary()[
patchi].patchSlice
193 if (patchFieldDecomposerPtrs_[
patchi])
195 delete patchFieldDecomposerPtrs_[
patchi];
201 if (processorVolPatchFieldDecomposerPtrs_[
patchi])
203 delete processorVolPatchFieldDecomposerPtrs_[
patchi];
207 forAll(processorSurfacePatchFieldDecomposerPtrs_,
patchi)
209 if (processorSurfacePatchFieldDecomposerPtrs_[
patchi])
211 delete processorSurfacePatchFieldDecomposerPtrs_[
patchi];
dimensionedScalar sign(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
processorSurfacePatchFieldDecomposer(const labelUList &addressingSlice)
Construct given addressing.
void size(const label)
Override size to be inconsistent with allocated storage.
Patch field decomposer class.
processorVolPatchFieldDecomposer(const fvMesh &mesh, const labelUList &addressingSlice)
Construct given addressing.
Processor patch field decomposer class. Surface field is assumed.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Processor patch field decomposer class. Maps either owner or.
patchFieldDecomposer(const labelUList &addressingSlice, const label addressingOffset)
Construct given addressing.
label size() const
Return the number of elements in the UList.
virtual const labelList & faceNeighbour() const
Return face neighbour.
Mesh data needed to do the Finite Volume discretisation.
~fvFieldDecomposer()
Destructor.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual const labelList & faceOwner() const
Return face owner.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.