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

Method FillDataTypes

IO/ParallelXML/vtkXMLPMultiBlockDataWriter.cxx:129–156  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

127
128//------------------------------------------------------------------------------
129void vtkXMLPMultiBlockDataWriter::FillDataTypes(vtkCompositeDataSet* hdInput)
130{
131 // FillDataTypes is called before the actual data writing begins.
132 // Every process fills up an array with the data types for all the leaf nodes.
133 // (Since the composite data structure is same on all the processes, the
134 // number of leaf nodes is same on all processes as well).
135 // Then we gather this list on to the root node, since the root node is the
136 // one that is writing out the vtmb file.
137 this->Superclass::FillDataTypes(hdInput);
138
139 if (!this->Controller)
140 {
141 return;
142 }
143
144 unsigned int numBlocks = this->GetNumberOfDataTypes();
145 int* myDataTypes = this->GetDataTypesPointer();
146
147 this->XMLPMultiBlockDataWriterInternal->Allocate(
148 numBlocks, this->Controller->GetNumberOfProcesses());
149
150 // gather on to root node.
151 if (numBlocks)
152 {
153 this->Controller->Gather(
154 myDataTypes, this->XMLPMultiBlockDataWriterInternal->PieceProcessList.data(), numBlocks, 0);
155 }
156}
157
158//------------------------------------------------------------------------------
159int vtkXMLPMultiBlockDataWriter::WriteComposite(

Callers

nothing calls this directly

Calls 6

GetNumberOfDataTypesMethod · 0.80
GetDataTypesPointerMethod · 0.80
GetNumberOfProcessesMethod · 0.80
AllocateMethod · 0.45
GatherMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected