46 template<
class Type1,
class Type2>
49 if (fld1.size() != fld2.size())
52 <<
"Field lengths must be the same. Field1:" 53 << fld1.size() <<
" Field2:" << fld2.size()
57 const direction nCmpts1 = pTraits<typename Type1::value_type>::nComponents;
58 const direction nCmpts2 = pTraits<typename Type2::value_type>::nComponents;
60 label
count = data_.size();
61 data_.resize(data_.size() + fld1.size()*(nCmpts1 + nCmpts2));
void size(const label n)
Older name for setAddressableSize.
void resize(const label len)
Adjust allocated size of list.
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.
A traits class, which is primarily used for primitives.
void addData(const Type &fld)
Add data to the buffer.
#define forAll(list, i)
Loop across all elements in list.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
errorManip< error > abort(error &err)
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 component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)