31 template<
class Type,
class WeightType>
37 const distributionMap& map,
39 const VolField<Type>&
fld,
40 const List<List<WeightType>>& stencilWeights
45 const fvMesh& mesh =
fld.mesh();
48 List<List<Type>> stencilFld;
51 tmp<VolField<WeightedType>> twf
53 new VolField<WeightedType>
62 dimensioned<WeightedType>
70 VolField<WeightedType>& wf = twf();
74 const List<Type>& stField = stencilFld[celli];
75 const List<WeightType>& stWeight = stencilWeights[celli];
79 wf[celli] += stWeight[i]*stField[i];
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
static tmp< VolField< typename outerProduct< WeightType, Type >::type > > weightedSum(const distributionMap &map, const labelListList &stencil, const VolField< Type > &fld, const List< List< WeightType >> &stencilWeights)
Sum surface field contributions to create cell values.
static void collectData(const distributionMap &map, const labelListList &stencil, const VolField< Type > &fld, List< List< Type >> &stencilFld)
Use map to get the data into stencil order.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
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))
List< labelList > labelListList
A List of labelList.