Commit 841b457d authored by Jerry Clarke's avatar Jerry Clarke
Browse files

Set Dimensions in Attribute

parent f1a561b8
......@@ -228,6 +228,19 @@ if( Attribute ){
Attribute = this->Get( "Dimensions" );
if( Attribute ){
this->ShapeDesc->SetShapeFromString( Attribute );
}else{
XdmfXmlNode ValuesNode;
ValuesNode = this->DOM->FindDataElement( 0, Element );
if(!ValuesNode){
XdmfErrorMessage("Dimensions of Attribute not set in XML and no DataItem found");
}
Attribute = this->DOM->Get( ValuesNode, "Dimensions" );
if(!Attribute){
XdmfErrorMessage("Dimensions of Attribute not set in XML or DataItem");
return(XDMF_FAIL);
}else{
this->ShapeDesc->SetShapeFromString( Attribute );
}
}
if(!this->Name) this->SetName(GetUnique("Attribute_"));
return( XDMF_SUCCESS );
......
......@@ -657,6 +657,14 @@ if(!Node) {
Node = this->Tree;
}
if(!Node) return(0);
/*
cout << "For " << Attribute << " DOM Returning ";
if((XdmfConstString)xmlGetProp(Node, (xmlChar *)Attribute)) {
cout << (XdmfConstString)xmlGetProp(Node, (xmlChar *)Attribute) << endl;
} else{
cout << " NULL " << endl;
}
*/
return((XdmfConstString)xmlGetProp(Node, (xmlChar *)Attribute));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment