38 const auto& interp =
AMI();
43 lst = interp.interpolateToSource(
Field<Type>(std::move(lst)));
63 (void)interp.interpolateToTarget
74 (void)interp.interpolateToSource
96 const auto& m =
map();
107 template<
class Type,
class CombineOp>
114 const label myComm = getCommunicator();
118 case NEARESTPATCHFACEAMI:
120 const auto& interp = AMI();
122 label oldWarnComm(-1);
123 label oldWorldComm(-1);
130 lst = interp.interpolateToSource(Field<Type>(std::move(lst)), cop);
139 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
140 const auto& m = map();
142 label oldWarnComm(-1);
173 const label myComm = getCommunicator();
177 case NEARESTPATCHFACEAMI:
179 const auto& interp = AMI();
181 label oldWarnComm(-1);
182 label oldWorldComm(-1);
189 lst = interp.interpolateToTarget(Field<Type>(std::move(lst)));
198 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
199 const auto& m = map();
202 m.reverseDistribute(sampleSize(), lst);
210 template<
class Type,
class CombineOp>
217 const label myComm = getCommunicator();
221 case NEARESTPATCHFACEAMI:
223 const auto& interp = AMI();
225 label oldWarnComm(-1);
226 label oldWorldComm(-1);
233 lst = interp.interpolateToTarget(Field<Type>(std::move(lst)), cop);
241 (void)patch_.boundaryMesh().mesh().tetBasePtIs();
242 const auto& m = map();
243 const label cSize = sampleSize();
245 label oldWarnComm(-1);
278 const regIOobject& obj,
282 const auto* fldPtr = isA<IOField<Type>>(obj);
285 const auto&
fld = *fldPtr;
287 primitiveEntry* pePtr =
new primitiveEntry
290 token(
new token::Compound<List<Type>>(
fld))
312 if (tok.isCompound<List<Type>>())
314 auto* fldPtr = obr.getObjectPtr<IOField<Type>>(
name);
317 fldPtr =
new IOField<Type>
334 tok.transferCompoundToken<List<Type>>(is)
350 const word& fieldName,
354 auto* fldPtr = obr.getObjectPtr<IOField<Type>>(fieldName);
357 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 distribute(const UPstream::commsTypes commsType, const UList< 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)...
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)