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;
259 primitiveEntry* pePtr =
new primitiveEntry
262 token(
new token::Compound<List<Type>>(
fld))
284 if (tok.isCompound<List<Type>>())
286 auto* fldPtr = obr.getObjectPtr<IOField<Type>>(
name);
289 fldPtr =
new IOField<Type>
306 tok.transferCompoundToken<List<Type>>(is)
322 const word& fieldName,
326 auto* fldPtr = obr.getObjectPtr<IOField<Type>>(fieldName);
329 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.
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 expressions::valueTypeCode::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 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 bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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.
static void distribute(const UPstream::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 T &nullValue, const CombineOp &cop, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Distribute combine data with specified combine operation and negate operator (for flips)...
const sampleMode mode_
What to sample.
static constexpr const zero Zero
Global zero (0)