47 flatFld[celli] =
fld[celli];
56 -
fld.mesh().nInternalFaces()
61 flatFld[nCompact++] = pfld[i];
69 stencilFld.setSize(stencil.
size());
73 const labelList& compactCells = stencil[facei];
79 stencilFld[facei][i] = flatFld[compactCells[i]];
89 const mapDistribute& map,
91 const GeometricField<Type, fvPatchField, volMesh>&
fld,
92 const List<List<scalar>>& stencilWeights
95 const fvMesh&
mesh =
fld.mesh();
98 List<List<Type>> stencilFld;
99 collectData(map, stencil,
fld, stencilFld);
101 tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
103 new GeometricField<Type, fvsPatchField, surfaceMesh>
115 dimensioned<Type>(
fld.dimensions(),
Zero)
118 GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref();
123 const List<Type>& stField = stencilFld[facei];
124 const List<scalar>& stWeight = stencilWeights[facei];
128 sf[facei] += stField[i]*stWeight[i];
134 typename GeometricField<Type, fvsPatchField, surfaceMesh>::
135 Boundary& bSfCorr = sf.boundaryFieldRef();
139 fvsPatchField<Type>& pSfCorr = bSfCorr[patchi];
141 if (pSfCorr.coupled())
143 label facei = pSfCorr.patch().start();
147 const List<Type>& stField = stencilFld[facei];
148 const List<scalar>& stWeight = stencilWeights[facei];
152 pSfCorr[i] += stField[j]*stWeight[j];
List< labelList > labelListList
A List of labelList.
void size(const label n)
Older name for setAddressableSize.
const fvPatch & patch() const noexcept
Return the patch.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
label constructSize() const noexcept
Constructed data size.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Generic GeometricField class.
Ignore writing from objectRegistry::writeObject()
const Time & time() const
Return the top-level database.
#define forAll(list, i)
Loop across all elements in list.
void setSize(const label n)
Alias for resize()
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > weightedSum(const mapDistribute &map, const labelListList &stencil, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar >> &stencilWeights)
Sum vol field contributions to create face values.
label nInternalFaces() const noexcept
Number of internal faces.
static void collectData(const mapDistribute &map, const labelListList &stencil, const GeometricField< T, fvPatchField, volMesh > &fld, List< List< T >> &stencilFld)
Use map to get the data into stencil order.
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time 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.
static constexpr const zero Zero
Global zero (0)