// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
QString AttributeMatrix::writeXdmfAttributeData(IDataArray::Pointer array, const QString& centering, const QString& dataContainerName, const QString& hdfFileName, const uint8_t gridType)
{
    QString xdmfText;
    QTextStream out(&xdmfText);

    int precision = 0;
    QString xdmfTypeName;
    array->getXdmfTypeAndSize(xdmfTypeName, precision);
    if (0 == precision)
    {
        out << "<!-- " << array->getName() << " has unkown type or unsupported type or precision for XDMF to understand" << " -->" << "\n";
        return xdmfText;
    }
    int numComp = array->getNumberOfComponents();
    QString attrType = "";
    if(numComp == 1)
    {
        attrType = "Scalar";
    }
    //we are assuming a component of 2 is for scalars on either side of a single object (ie faceIds)
    if(numComp == 2)
    {
        attrType = "Scalar";
    }
    if(numComp == 3)
    {
        attrType = "Vector";
    }
    if(numComp == 6)
    {
        attrType = "Vector";
    }
    //  if(numComp == 6) { attrType = "Tensor6"; }
    if(numComp == 9)
    {
        attrType = "Tensor";
    }
    QString block = writeXdmfAttributeDataHelper(numComp, attrType, dataContainerName, array, centering, precision, xdmfTypeName, hdfFileName, gridType);

    out << block;

    return xdmfText;
}