View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011486Xdmf(No Category)public2010-11-19 10:502010-11-19 10:50
Reporterxunlei 
Assigned To 
PriorityhighSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformuniversalOSOS Version
Summary0011486: Missing Format="HDF" string in XdmfValuesHDF::DataItemFromHDF()
DescriptionMissing 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 ReproduceXdmfValuesHDF *x_ValuesHDF = new XdmfValuesHDF();
XdmfString x_String = x_ValuesHDF->DataItemFromHDF(h5_item_string);
x_Geometry->SetDataXml(x_String);
Additional InformationI 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);
}
TagsNo tags attached.
Attached Files

 Relationships

  Notes
There are no notes attached to this issue.

 Issue History
Date Modified Username Field Change
2010-11-19 10:50 xunlei New Issue


Copyright © 2000 - 2018 MantisBT Team