30 template<
class SubListA,
class SubListB>
49 const distributionMap& map,
50 List<List<Type>>& data
53 distributionMapBase::distribute
55 Pstream::commsTypes::nonBlocking,
63 ListAppendEqOp<Type>(),
74 const distributionMap& map,
75 List<DynamicList<Type>>& data
78 List<List<Type>> tData;
90 for (
direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
99 template<
class Type,
class LabelList,
class ScalarList>
102 const List<LabelList>& localOtherFaces,
103 const List<ScalarList>& weights,
104 const autoPtr<distributionMap>& otherMapPtr,
105 const Field<Type>& otherFld
109 tmp<Field<Type>> tLocalOtherFld;
110 if (otherMapPtr.valid())
112 tLocalOtherFld = tmp<Field<Type>>(
new Field<Type>(otherFld));
113 otherMapPtr->distribute(tLocalOtherFld.ref());
115 const Field<Type>& localOtherFld =
116 otherMapPtr.valid() ? tLocalOtherFld() : otherFld;
119 tmp<Field<Type>> tFld(
new Field<Type>(localOtherFaces.size(), NaN<Type>()));
120 Field<Type>&
fld = tFld.ref();
123 forAll(localOtherFaces, facei)
128 forAll(localOtherFaces[facei], i)
130 const scalar w = weights[facei][i];
132 sumWF += w*localOtherFld[localOtherFaces[facei][i]];
135 if (localOtherFaces[facei].size())
137 fld[facei] = sumWF/sumW;
145 template<
class Type,
class LabelList,
class ScalarList>
148 const List<LabelList>& localOtherFaces,
149 const List<ScalarList>& weights,
150 const autoPtr<distributionMap>& otherMapPtr,
151 const Field<Type>& otherFld,
152 const Field<Type>& leftOverFld
156 tmp<Field<Type>> tLocalOtherFld;
157 if (otherMapPtr.valid())
159 tLocalOtherFld = tmp<Field<Type>>(
new Field<Type>(otherFld));
160 otherMapPtr->distribute(tLocalOtherFld.ref());
162 const Field<Type>& localOtherFld =
163 otherMapPtr.valid() ? tLocalOtherFld() : otherFld;
166 tmp<Field<Type>> tFld(
new Field<Type>(localOtherFaces.size(), NaN<Type>()));
167 Field<Type>&
fld = tFld.ref();
170 forAll(localOtherFaces, facei)
175 forAll(localOtherFaces[facei], i)
177 const scalar w = weights[facei][i];
179 sumWF += w*localOtherFld[localOtherFaces[facei][i]];
182 fld[facei] = sumWF + (1 - sumW)*leftOverFld[facei];
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label & setComponent(label &l, const direction)