34 Foam::functionObjects::sampledSets::sampleLocalType
47 const word&
name = fieldNames[fieldi];
54 if (!interpolations.found(name))
74 const point& position = s.positions()[i];
75 const label celli = s.cells()[i];
76 const label facei = s.faces()[i];
78 if (celli == -1 && facei == -1)
85 field[i] = interp.
interpolate(position, celli, facei);
89 fieldTypeValues.set(fieldi, tfield.
ptr());
93 return fieldTypeValues;
99 Foam::functionObjects::sampledSets::sampleType
107 sampleLocalType<Type>(seti,
fieldNames, interpolations);
109 if (Pstream::parRun())
111 forAll(fieldNames, fieldi)
113 if (fieldTypeValues.
set(fieldi))
115 fieldTypeValues[fieldi] =
118 fieldTypeValues[fieldi],
119 masterSetOrders_[seti]
125 return fieldTypeValues;
#define forAll(list, i)
Loop across all elements in list.
bool set(const label) const
Is element set.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
Traits class for primitives.
Generic GeometricField class.
A HashTable specialisation for hashing pointers.
static List< word > fieldNames
virtual Type interpolate(const vector &position, const label celli, const label facei=-1) const =0
Interpolate field to the given point in the given cell.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
word name(const complex &)
Return a string representation of a complex.
label size() const
Return the number of elements in the UPtrList.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Abstract base class for interpolation.
T * ptr() const
Return tmp pointer for reuse.
A class for managing temporary objects.