Go to the documentation of this file.
101 template<
class Type,
class CombineOp>
108 const label myComm = getCommunicator();
114 case NEARESTPATCHFACEAMI:
118 lst = AMI().interpolateToSource(
Field<Type>(std::move(lst)), cop);
128 map().constructSize(),
131 map().constructMap(),
150 const label myComm = getCommunicator();
156 case NEARESTPATCHFACEAMI:
160 lst = AMI().interpolateToTarget(
Field<Type>(std::move(lst)));
166 map().reverseDistribute(sampleSize(), lst);
175 template<
class Type,
class CombineOp>
182 const label myComm = getCommunicator();
188 case NEARESTPATCHFACEAMI:
192 lst = AMI().interpolateToTarget(
Field<Type>(std::move(lst)), cop);
198 label cSize = sampleSize();
204 map().constructMap(),
230 const auto* fldPtr = isA<IOField<Type>>(obj);
233 const auto&
fld = *fldPtr;
317 const word& fieldName,
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A class for handling words, derived from Foam::string.
A templated class for holding compound tokens.
nearest patch face + AMI interpolation
A primitive field of type <T> with automated input and output.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const mapDistribute & map() const
Return reference to the parallel distribution map.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
static void storeField(objectRegistry &obr, const word &fieldName, const Field< Type > &values)
Store an IOField on the objectRegistry relative to obr.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
const sampleMode mode_
What to sample.
A token holds an item read from Istream.
bool sameWorld() const
Is sample world the local world?
static commsTypes defaultCommsType
Default commsType.
const compound & compoundToken() const
Read access for compound token.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
static bool constructIOField(const word &name, token &tok, Istream &is, objectRegistry &obr)
Attempt to read an IOField<Type> and store on objectRegistry.
Registry of regIOobjects.
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Generic templated field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
label getCommunicator() const
Get the communicator (worldComm or world-to-world)
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Distribute data. Note:schedule only used for.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
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))
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool masterWorld() const
Is my world ordered before the sampleWorld?
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
List< token > tokenList
List of tokens, used for a IOdictionary entry.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
static int & msgType() noexcept
Message tag of standard messages.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
To & dynamicCast(From &r)
static label worldComm
Default communicator (all processors)
A traits class, which is primarily used for primitives.
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
bool isCompound() const noexcept
Token is COMPOUND.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Functor to negate primitives. Dummy for most other types.
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.