36#ifndef Foam_MapLagrangianFields_H
37#define Foam_MapLagrangianFields_H
52template<
class SourceIOFieldType,
class TargetIOFieldType>
64 Info<<
" mapping lagrangian " << msg <<
' ' <<
io.name() <<
endl;
70 SourceIOFieldType fieldSource(
io);
73 TargetIOFieldType fieldTarget
85 min(fieldSource.size(), addParticles.
size())
88 if (!fieldSource.empty())
92 fieldTarget[i] = fieldSource[addParticles[i]];
95 else if (cloud::debug && !addParticles.
empty())
97 Pout<<
"Not mapping " <<
io.name()
98 <<
" since source size = 0 and cloud size = "
const word cloudName(propsDict.get< word >("cloud"))
A Field of objects of type <T> with automated input and output using a compact storage....
A primitive field of type <T> with automated input and output.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
UPtrList< const IOobject > csorted() const
The sorted list of IOobjects with headerClassName == Type::typeName.
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
static const word prefix
The prefix to local: lagrangian.
const Time & time() const noexcept
Return time registry.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
void MapLagrangianFields(const string &cloudName, const IOobjectList &objects, const meshToMesh0 &meshToMesh0Interp, const labelList &addParticles, const char *msg)
Gets the indices of (source)particles that have been appended to the.
#define forAll(list, i)
Loop across all elements in list.