101template<
class Type,
class CombineOp>
108 const label myComm = getCommunicator();
114 case NEARESTPATCHFACEAMI:
118 lst = AMI().interpolateToSource(
Field<Type>(std::move(lst)), cop);
124 mapDistributeBase::distribute
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);
175template<
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();
199 mapDistributeBase::distribute
204 map().constructMap(),
230 const auto* fldPtr = isA<IOField<Type>>(obj);
233 const auto&
fld = *fldPtr;
317 const word& fieldName,
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Generic templated field type.
A primitive field of type <T> with automated input and output.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static int & msgType() noexcept
Message tag of standard messages.
static label worldComm
Default communicator (all processors)
static commsTypes defaultCommsType
Default commsType.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
const mapDistribute & map() const
Return reference to the parallel distribution map.
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
const sampleMode mode_
What to sample.
static bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
bool masterWorld() const
Is my world ordered before the sampleWorld?
label getCommunicator() const
Get the communicator (worldComm or world-to-world)
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
static bool constructIOField(const word &name, token &tok, Istream &is, objectRegistry &obr)
Attempt to read an IOField<Type> and store on objectRegistry.
static void storeField(objectRegistry &obr, const word &fieldName, const Field< Type > &values)
Store an IOField on the objectRegistry relative to obr.
bool sameWorld() const
Is sample world the local world?
Registry of regIOobjects.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A traits class, which is primarily used for primitives.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
A templated class for holding compound tokens.
A token holds an item read from Istream.
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
const compound & compoundToken() const
Read access for compound token.
bool isCompound() const noexcept
Token is COMPOUND.
A class for handling words, derived from Foam::string.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
To & dynamicCast(From &r)
Functor to negate primitives. Dummy for most other types.