47 flatFld[celli] =
fld[celli];
54 label nCompact = pfld.
patch().start();
58 flatFld[nCompact++] = pfld[i];
66 stencilFld.setSize(stencil.
size());
70 const labelList& compactCells = stencil[facei];
76 stencilFld[facei][i] = flatFld[compactCells[i]];
86 const mapDistribute& map,
88 const GeometricField<Type, fvsPatchField, surfaceMesh>&
fld,
89 const List<List<scalar>>& stencilWeights
92 const fvMesh&
mesh =
fld.mesh();
95 List<List<Type>> stencilFld;
96 collectData(map, stencil,
fld, stencilFld);
98 tmp<GeometricField<Type, fvPatchField, volMesh>> tsfCorr
100 new GeometricField<Type, fvPatchField, volMesh>
109 dimensioned<Type>(
fld.dimensions(),
Zero)
112 GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr.ref();
117 const List<Type>& stField = stencilFld[celli];
118 const List<scalar>& stWeight = stencilWeights[celli];
122 sf[celli] += stField[i]*stWeight[i];
void size(const label n)
Older name for setAddressableSize.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute List data using default commsType, default flip/negate operator.
label constructSize() const noexcept
Constructed data size.
const fvPatch & patch() const noexcept
Return the patch.
Generic GeometricField class.
const Time & time() const
Return the top-level database.
List< labelList > labelListList
List of labelList.
#define forAll(list, i)
Loop across all elements in list.
static void collectData(const mapDistribute &map, const labelListList &stencil, const GeometricField< T, fvsPatchField, surfaceMesh > &fld, List< List< T >> &stencilFld)
Use map to get the data into stencil order.
void setSize(const label n)
Alias for resize()
static tmp< GeometricField< Type, fvPatchField, volMesh > > weightedSum(const mapDistribute &map, const labelListList &stencil, const GeometricField< Type, fvsPatchField, surfaceMesh > &fld, const List< List< scalar >> &stencilWeights)
Sum surface field contributions to create cell values.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Class containing processor-to-processor mapping information.
A class for managing temporary objects.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
static constexpr const zero Zero
Global zero (0)