34 Foam::functionObjects::sampledSets::sampleLocalType
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);
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.
Pre-declare SubField and related Field type.
Generic GeometricField class.
A HashTable specialisation for hashing pointers.
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
static bool & parRun()
Is this a parallel run?
const T & operator[](const label) const
Return element const reference.
Tuple2< coordSet, labelList > gather() const
Combine coordinate sets onto the master. Return both the combined.
const word & name() const
Return the name of this functionObject.
const fvMesh & mesh_
Reference to the fvMesh.
Abstract base class for interpolation.
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.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
bool foundObject(const word &name) const
Is the named Type in registry.
Traits class for primitives.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
A class for managing temporary objects.
T * ptr() const
Return tmp pointer for reuse.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
static List< word > fieldNames
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.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.