MCPcopy Create free account
hub / github.com/Kitware/VTK / Serialize

Method Serialize

Parallel/Core/vtkFieldDataSerializer.cxx:107–129  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

105
106//------------------------------------------------------------------------------
107void vtkFieldDataSerializer::Serialize(vtkFieldData* fieldData, vtkMultiProcessStream& bytestream)
108{
109 if (fieldData == nullptr)
110 {
111 vtkGenericWarningMacro("Field data is nullptr!");
112 return;
113 }
114
115 // STEP 0: Write the number of arrays
116 bytestream << fieldData->GetNumberOfArrays();
117
118 if (fieldData->GetNumberOfArrays() == 0)
119 {
120 return;
121 }
122
123 // STEP 1: Loop through each array and serialize its metadata
124 for (int array = 0; array < fieldData->GetNumberOfArrays(); ++array)
125 {
126 vtkDataArray* dataArray = fieldData->GetArray(array);
127 bytestream.Push(dataArray);
128 } // END for all arrays
129}
130
131//------------------------------------------------------------------------------
132void vtkFieldDataSerializer::SerializeTuples(

Callers

nothing calls this directly

Calls 3

GetNumberOfArraysMethod · 0.45
GetArrayMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected