void avtTraceHistoryFilter::Execute(void) { // // Write out the connectivity. "-1" is the hint to do that. // OutputTime(GetTypedInput(), -1); // // Pull out just the points. // avtDataset_p ds = InitializeDataset(); // // Put the fields from the current time step on the points and then // output those fields. // PerformIteration(0, ds, false); OutputTime(ds, 0); // // Now iterate through the time slices, displacing and evaluating. // for (int i = 0 ; i < atts.GetNumiter() ; i++) { ds->SetSource(GetInput()->GetSource()); PerformIteration(i, ds, true); OutputTime(ds, i+1); } // The operator just passes the data through. GetDataTree() = GetInputDataTree(); }
int BufferedHDF2DArray<T>::Initialize(HDFGroup &group, std::string datasetName, unsigned int _rowLength, int _bufferSize, bool createIfMissing) { bool groupContainsDataset = group.ContainsObject(datasetName); if (groupContainsDataset == false) { // // Do some error checking. // if (createIfMissing == false) { std::cout << "ERROR! Could not open dataset " << datasetName << std::endl; exit(1); } if (_rowLength == 0) { std::cout << "ERROR! Improper usage of BufferedHDF2DArray::Initialize. The 2D Array "<<std::endl << "is being created but is given a number of columns of 0." << std::endl; exit(1); } Create(&group.group, datasetName, _rowLength); } else { InitializeDataset(group.group, datasetName); try { dataspace = dataset.getSpace(); } catch(H5::DataSetIException &e) { std::cout << e.getDetailMsg() << std::endl; exit(1); } maxDims = MAX_DIMS; try { nDims = dataspace.getSimpleExtentNdims(); /* * Prevent abuse of this class for multidimensional IO. */ if (nDims != 2) { std::cout << "ERROR in HDF format: dataset: " << datasetName << " should be 1-D, but it is not." << std::endl; exit(1); } /* * Load in the size of this dataset, and make a map to the whole thing. */ if (dimSize) { delete [] dimSize; } dimSize = new hsize_t[nDims]; dataspace.getSimpleExtentDims(dimSize); rowLength = dimSize[0]; colLength = dimSize[1]; if (rowLength == 0) { dataspace.close(); return 1; } fullSourceSpace = H5::DataSpace(2, dimSize); dataspace.close(); } catch(H5::Exception &e) { std::cout << e.getDetailMsg() << std::endl; exit(1); } } return 1; }