Go to the documentation of this file.
29 #include <standards.h>
30 #include <sys/endian.h>
34 #ifdef __DARWIN_BYTE_ORDER
35 #if __DARWIN_BYTE_ORDER==__DARWIN_BIG_ENDIAN
42 #if defined(LITTLE_ENDIAN) \
43 || defined(_LITTLE_ENDIAN) \
44 || defined(__LITTLE_ENDIAN)
45 # define LITTLEENDIAN 1
46 #elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN)
49 # error "Cannot find LITTLE_ENDIAN or BIG_ENDIAN symbol defined."
50 # error "Please add to compilation options"
57 char* mem =
reinterpret_cast<char*
>(&word32);
71 for (
label i = 0; i < nWords; i++)
88 swapWords(fField.
size(),
reinterpret_cast<label*
>(fField.begin()));
92 reinterpret_cast<char*
>(fField.begin()),
93 fField.
size()*
sizeof(
float)
104 if (i > 0 && (i % 10) == 0)
141 swapWords(elems.
size(),
reinterpret_cast<label*
>(elems.begin()));
145 reinterpret_cast<char*
>(elems.begin()),
157 if (i > 0 && (i % 10) == 0)
188 const std::string& title
191 os <<
"# vtk DataFile Version 2.0" <<
std::endl
212 os <<
"CELL_DATA " << nCells <<
std::endl
213 <<
"FIELD attributes " << nFields <<
std::endl;
225 <<
"FIELD attributes " << nFields <<
std::endl;
239 dest.
append(
float(src[cmpt]));
252 dest.
append(
float(src[cmpt]));
274 for (
direction cmpt = 0; cmpt < tensor::nComponents; ++cmpt)
276 dest.
append(
float(src[cmpt]));
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
@ nComponents
Number of components in this vector space.
Ostream & endl(Ostream &os)
Add newline and flush stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component,...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.