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_);
103 this->distributeSparse(
fld, inputMeshFaces_, boundaryToCompact_);
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
static bool & parRun() noexcept
Test if this a parallel run.
label constructSize() const noexcept
Constructed data size.
#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))
A List with indirect addressing. Like IndirectList but does not store addressing. ...
void distributeSparse(List< Type > &fld, const labelUList &sparseInputLocations, const labelUList &compactOutputMapping) const
Distribute sparse data.
static constexpr const zero Zero
Global zero (0)