Go to the documentation of this file.
38 auto& bv = bufferViews_.create(
name);
39 bv.byteOffset() = bytes_;
40 bv.byteLength() =
fld.size()*nComponents*
sizeof(float);
45 bytes_ += bv.byteLength();
47 auto& acc = accessors_.create(
name);
48 acc.bufferViewId() = bv.id();
51 auto& obj = objects_.create(
name);
61 const label accessorId =
67 return meshes_.size() - 1;
79 if (meshi > meshes_.size() - 1)
82 <<
"Mesh " << meshi <<
" out of range "
83 << (meshes_.size() - 1)
87 const label accessorId = addField(
fld,
name);
89 meshes_[meshi].addField(
name, accessorId);
A class for handling words, derived from Foam::string.
label & accessorId() noexcept
Return the accessor ID.
label addField(const Type &fld, const word &name, const label target=-1)
Returns accessor index.
label addMesh(const Type &fld, const word &name)
Returns index of last mesh.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
label addFieldToMesh(const Type &fld, const word &name, const label meshi)
Returns accessor index.
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))
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A traits class, which is primarily used for primitives.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.