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;
85 template<
class Type,
class LabelList,
class ScalarList>
88 const List<LabelList>& localOtherFaces,
89 const List<ScalarList>& weights,
90 const autoPtr<distributionMap>& otherMapPtr,
91 const Field<Type>& otherFld
95 tmp<Field<Type>> tLocalOtherFld;
96 if (otherMapPtr.valid())
98 tLocalOtherFld = tmp<Field<Type>>(
new Field<Type>(otherFld));
99 otherMapPtr->distribute(tLocalOtherFld.ref());
101 const Field<Type>& localOtherFld =
102 otherMapPtr.valid() ? tLocalOtherFld() : otherFld;
105 tmp<Field<Type>> tFld
107 new Field<Type>(localOtherFaces.size(), pTraits<Type>::nan)
109 Field<Type>&
fld = tFld.ref();
112 forAll(localOtherFaces, facei)
117 forAll(localOtherFaces[facei], i)
119 const scalar w = weights[facei][i];
121 sumWF += w*localOtherFld[localOtherFaces[facei][i]];
124 if (localOtherFaces[facei].size())
126 fld[facei] = sumWF/sumW;
134 template<
class Type,
class LabelList,
class ScalarList>
137 const List<LabelList>& localOtherFaces,
138 const List<ScalarList>& weights,
139 const autoPtr<distributionMap>& otherMapPtr,
140 const Field<Type>& otherFld,
141 const Field<Type>& leftOverFld
145 tmp<Field<Type>> tLocalOtherFld;
146 if (otherMapPtr.valid())
148 tLocalOtherFld = tmp<Field<Type>>(
new Field<Type>(otherFld));
149 otherMapPtr->distribute(tLocalOtherFld.ref());
151 const Field<Type>& localOtherFld =
152 otherMapPtr.valid() ? tLocalOtherFld() : otherFld;
155 tmp<Field<Type>> tFld
157 new Field<Type>(localOtherFaces.size(), pTraits<Type>::nan)
159 Field<Type>&
fld = tFld.ref();
162 forAll(localOtherFaces, facei)
167 forAll(localOtherFaces[facei], i)
169 const scalar w = weights[facei][i];
171 sumWF += w*localOtherFld[localOtherFaces[facei][i]];
174 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.