40 const auto& interp =
AMI();
48 lst = interp.interpolateToSource(
Field<Type>(std::move(lst)));
65 (void)interp.interpolateToTarget
76 (void)interp.interpolateToSource
96 const auto& m =
map();
106 template<
class Type,
class CombineOp>
113 const label myComm = getCommunicator();
118 case NEARESTPATCHFACEAMI:
121 const auto& interp = AMI();
124 lst = interp.interpolateToSource(Field<Type>(std::move(lst)), cop);
132 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
133 const auto& m = map();
161 const label myComm = getCommunicator();
166 case NEARESTPATCHFACEAMI:
169 const auto& interp = AMI();
172 lst = interp.interpolateToTarget(Field<Type>(std::move(lst)));
180 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
181 const auto& m = map();
184 m.reverseDistribute(sampleSize(), lst);
192 template<
class Type,
class CombineOp>
199 const label myComm = getCommunicator();
204 case NEARESTPATCHFACEAMI:
207 const auto& interp = AMI();
210 lst = interp.interpolateToTarget(Field<Type>(std::move(lst)), cop);
217 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
218 const auto& m = map();
219 const label cSize = sampleSize();
247 const regIOobject& obj,
251 const auto* fldPtr = isA<IOField<Type>>(obj);
254 const auto&
fld = *fldPtr;
257 tok =
new token::Compound<List<Type>>(
fld);
259 primitiveEntry* pePtr =
new primitiveEntry
288 const word tag =
"List<" + word(pTraits<Type>::typeName) +
'>';
290 if (tok.isCompound() && tok.compoundToken().type() == tag)
292 IOField<Type>* fldPtr = obr.findObject<IOField<Type>>(
name);
299 tok.transferCompoundToken(is)
305 IOField<Type>* fldPtr =
new IOField<Type>
320 tok.transferCompoundToken(is)
338 const word& fieldName,
342 IOField<Type>* fldPtr = obr.findObject<IOField<Type>>(fieldName);
349 fldPtr =
new IOField<Type>
static bool constructIOField(const word &name, token &tok, Istream &is, objectRegistry &obr)
Attempt to read an IOField<Type> and store on objectRegistry.
List< token > tokenList
List of tokens, used for a IOdictionary entry.
bool store()
Register object with its registry and transfer ownership to the registry.
static int & msgType() noexcept
Message tag of standard messages.
Ignore writing from objectRegistry::writeObject()
static label worldComm
Default world communicator (all processors). May differ from globalComm if local worlds are in use...
const mapDistribute & map() const
Return reference to the parallel distribution map.
nearest patch face + AMI interpolation
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
bool sameWorld() const
Is sample world the local world?
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Generic templated field type.
bool masterWorld() const
Is my world ordered before the sampleWorld?
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
Type & dynamicCast(U &obj)
A dynamic_cast (for references) that generates FatalError on failed casts.
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< Type > &lst) const
Wrapper around map/interpolate data distribution.
static commsTypes defaultCommsType
Default commsType.
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 > &field, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Distribute data with specified negate operator (for flips).
static bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
A class for managing temporary objects.
static void storeField(objectRegistry &obr, const word &fieldName, const Field< Type > &values)
Store an IOField on the objectRegistry relative to obr.
const sampleMode mode_
What to sample.
static constexpr const zero Zero
Global zero (0)