Go to the documentation of this file.
42 if (!Pstream::parRun())
50 if (sparseInputLocations.
empty())
55 compactFld[i] =
fld[i];
60 if (
fld.size() != sparseInputLocations.
size())
63 <<
"Input field size (" <<
fld.size()
64 <<
" != sparse ids size ("
65 << sparseInputLocations.
size() <<
")\n"
70 forAll(sparseInputLocations, i)
72 const label idx = sparseInputLocations[i];
75 compactFld[idx] =
fld[i];
82 mapDistributeBase::distribute<Type>(compactFld);
96 this->distributeSparse(
fld, sparseInputLocations, boundaryToCompact_);
static constexpr const zero Zero
Global zero (0)
#define forAll(list, i)
Loop across all elements in list.
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))
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void distributeSparse(List< Type > &fld, const labelUList &sparseInputLocations, const labelUList &compactOutputMapping) const
Distribute sparse data.
A List with indirect addressing.
void size(const label n)
Older name for setAddressableSize.