| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0011486 | Xdmf | (No Category) | public | 2010-11-19 10:50 | 2010-11-19 10:50 | ||||||||
| Reporter | xunlei | ||||||||||||
| Assigned To | |||||||||||||
| Priority | high | Severity | minor | Reproducibility | always | ||||||||
| Status | new | Resolution | open | ||||||||||
| Platform | universal | OS | OS Version | ||||||||||
| Summary | 0011486: Missing Format="HDF" string in XdmfValuesHDF::DataItemFromHDF() | ||||||||||||
| Description | Missing Format="HDF" string in XdmfValuesHDF::DataItemFromHDF() in XdmfValuesHDF.cxx. This renders the output dataitem as <DataItem NumberType="Float" Precision="4" Dimensions="12345">filename.h5:/group1/group2/variable</DataItem> Such data item causes failure where loaded into ParaView. | ||||||||||||
| Steps To Reproduce | XdmfValuesHDF *x_ValuesHDF = new XdmfValuesHDF(); XdmfString x_String = x_ValuesHDF->DataItemFromHDF(h5_item_string); x_Geometry->SetDataXml(x_String); | ||||||||||||
| Additional Information | I have patched below code in XdmfValuesHDF.cxx to resolve the issue. XdmfString XdmfValuesHDF::DataItemFromHDF(XdmfConstString H5DataSet){ XdmfHDF H5; ostrstream StringOutput; char *Ptr; static XdmfString ReturnString = NULL; if(H5.Open(H5DataSet, "r") == XDMF_FAIL){ XdmfErrorMessage("Can't open H5 Dataset " << H5DataSet << " for reading"); return(NULL); } StringOutput << "<DataItem NumberType=\""; StringOutput << XdmfTypeToClassString(H5.GetNumberType()); StringOutput << "\" Precision=\""; StringOutput << H5.GetElementSize(); StringOutput << "\" Dimensions=\""; StringOutput << H5.GetShapeAsString(); //----added by Xunlei Wu---- StringOutput << "\" Format=\""; StringOutput << "HDF"; //----added by Xunlei Wu---- StringOutput << "\">" << H5DataSet << "</DataItem>"; StringOutput << ends; H5.Close(); if ( ReturnString != NULL ) delete [] ReturnString; Ptr = StringOutput.str(); ReturnString = new char[strlen(Ptr) + 2 ]; strcpy( ReturnString, Ptr ); return(ReturnString); } | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Attached Files | |||||||||||||
| Relationships | |
| Relationships |
| Notes | |
| There are no notes attached to this issue. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2010-11-19 10:50 | xunlei | New Issue | |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |