38 const auto& interp =
AMI();
45 lst = interp.interpolateToSource(
Field<Type>(std::move(lst)));
62 (void)interp.interpolateToTarget
73 (void)interp.interpolateToSource
95 const auto& m =
map();
106 template<
class Type,
class CombineOp>
113 const label myComm = getCommunicator();
117 case NEARESTPATCHFACEAMI:
119 const auto& interp = AMI();
123 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();
165 case NEARESTPATCHFACEAMI:
167 const auto& interp = AMI();
171 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();
203 case NEARESTPATCHFACEAMI:
205 const auto& interp = AMI();
209 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();
250 const regIOobject& obj,
254 const auto* fldPtr = isA<IOField<Type>>(obj);
257 const auto&
fld = *fldPtr;
260 tok =
new token::Compound<List<Type>>(
fld);
262 primitiveEntry* pePtr =
new primitiveEntry
291 const word tag =
"List<" + word(pTraits<Type>::typeName) +
'>';
293 if (tok.isCompound() && tok.compoundToken().type() == tag)
295 IOField<Type>* fldPtr = obr.getObjectPtr<IOField<Type>>(
name);
302 tok.transferCompoundToken(is)
308 fldPtr =
new IOField<Type>
324 tok.transferCompoundToken(is)
342 const word& fieldName,
346 IOField<Type>* fldPtr = obr.getObjectPtr<IOField<Type>>(fieldName);
353 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.
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()
const mapDistribute & map() const
Return reference to the parallel distribution map.
List< token > tokenList
List of token, used for dictionary primitive entry (for example)
nearest patch face + AMI interpolation
static label commWarn(const label communicator) noexcept
Alter communicator debugging setting. Warns for use of any communicator differing from specified...
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.
Type & dynamicCast(U &obj)
A dynamic_cast (for references) that generates FatalError on failed casts.
static label commWorld() noexcept
Communicator for all ranks (respecting any local worlds)
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.
Request registration (bool: true)
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)