Commit 7bcbfe72 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Performance improvements for large reads/writes

Eliminate getRealPath calls which are expensive and not necessary in many cases
Parse XML node content only when necessary (parsing arrays)
Fix cases where copies were made of strings instead of using references
Use "map.insert()" rather than "map[] =" when adding properties to map
parent 8c27cc2d
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttribute.hpp"
#include "XdmfAttributeCenter.hpp"
#include "XdmfAttributeType.hpp"
......@@ -56,7 +57,7 @@ std::map<std::string, std::string>
XdmfAttribute::getItemProperties() const
{
std::map<std::string, std::string> attributeProperties;
attributeProperties["Name"] = mName;
attributeProperties.insert(std::make_pair("Name", mName));
mType->getProperties(attributeProperties);
mCenter->getProperties(attributeProperties);
return attributeProperties;
......@@ -82,7 +83,7 @@ XdmfAttribute::getType() const
void
XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......@@ -93,7 +94,9 @@ XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemPrope
mName = name->second;
}
else {
XdmfError::message(XdmfError::FATAL,"'Name' not found in itemProperties in XdmfAttribute::populateItem");
XdmfError::message(XdmfError::FATAL,
"'Name' not found in itemProperties in "
"XdmfAttribute::populateItem");
}
mCenter = XdmfAttributeCenter::New(itemProperties);
......@@ -104,8 +107,8 @@ XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemPrope
++iter) {
if(shared_ptr<XdmfArray> array = shared_dynamic_cast<XdmfArray>(*iter)) {
this->swap(array);
break;
}
// TODO: If multiple dataitems.
}
}
......
......@@ -109,7 +109,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttributeCenter.hpp"
#include "XdmfError.hpp"
......@@ -79,37 +80,38 @@ XdmfAttributeCenter::New(const std::map<std::string, std::string> & itemProperti
{
std::map<std::string, std::string>::const_iterator center =
itemProperties.find("Center");
if(center != itemProperties.end()) {
const std::string centerVal = center->second;
if(centerVal.compare("Grid") == 0) {
return Grid();
if(center == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"'Center' not found in itemProperties in "
"XdmfAttributeCenter::New");
}
const std::string & centerVal = center->second;
if(centerVal.compare("Node") == 0) {
return Node();
}
else if(centerVal.compare("Cell") == 0) {
return Cell();
}
else if(centerVal.compare("Grid") == 0) {
return Grid();
}
else if(centerVal.compare("Face") == 0) {
return Face();
}
else if(centerVal.compare("Edge") == 0) {
return Edge();
}
else if(centerVal.compare("Node") == 0) {
return Node();
}
else {
XdmfError::message(XdmfError::FATAL,
"Center not of 'Grid','Cell','Face','Edge','Node' "
"in XdmfAttributeCenter::New");
}
}
XdmfError::message(XdmfError::FATAL,
"'Center' not found in itemProperties in "
"XdmfAttributeCenter::New");
return shared_ptr<const XdmfAttributeCenter>();
}
void
XdmfAttributeCenter::getProperties(std::map<std::string, std::string> & collectedProperties) const
{
collectedProperties["Center"] = mName;
collectedProperties.insert(std::make_pair("Center", mName));
}
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttributeType.hpp"
#include "XdmfError.hpp"
......@@ -98,12 +99,14 @@ XdmfAttributeType::New(const std::map<std::string, std::string> & itemProperties
if(type == itemProperties.end()) {
type = itemProperties.find("AttributeType");
}
if(type != itemProperties.end()) {
const std::string typeVal = type->second;
if(typeVal.compare("None") == 0) {
return NoAttributeType();
if(type == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'AttributeType' found in "
"itemProperties in XdmfAttributeType::New");
}
else if(typeVal.compare("Scalar") == 0) {
const std::string & typeVal = type->second;
if(typeVal.compare("Scalar") == 0) {
return Scalar();
}
else if(typeVal.compare("Vector") == 0) {
......@@ -121,21 +124,20 @@ XdmfAttributeType::New(const std::map<std::string, std::string> & itemProperties
else if(typeVal.compare("GlobalId") == 0) {
return GlobalId();
}
else {
else if(typeVal.compare("None") == 0) {
return NoAttributeType();
}
XdmfError::message(XdmfError::FATAL,
"Type not of 'None','Scalar','Vector','Tensor', "
"'Matrix','Tensor6', or 'GlobalId' in "
"XdmfAttributeType::New");
}
}
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'AttributeType' found in "
"itemProperties in XdmfAttributeType::New");
return shared_ptr<const XdmfAttributeType>();
}
void
XdmfAttributeType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{
collectedProperties["Type"] = mName;
collectedProperties.insert(std::make_pair("Type", mName));
}
......@@ -244,7 +244,7 @@ XdmfCurvilinearGrid::getGeometry()
void
XdmfCurvilinearGrid::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfGrid::populateItem(itemProperties, childItems, reader);
......
......@@ -131,7 +131,7 @@ protected:
void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -81,7 +81,7 @@ XdmfDomain::getItemTag() const
void
XdmfDomain::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......
......@@ -76,7 +76,7 @@ protected:
XdmfDomain();
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -73,7 +73,7 @@ XdmfGeometry::getType() const
void
XdmfGeometry::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......@@ -84,8 +84,8 @@ XdmfGeometry::populateItem(const std::map<std::string, std::string> & itemProper
++iter) {
if(shared_ptr<XdmfArray> array = shared_dynamic_cast<XdmfArray>(*iter)) {
this->swap(array);
break;
}
// TODO: If multiple dataitems.
}
}
......
......@@ -84,7 +84,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfGeometryType.hpp"
#include "XdmfError.hpp"
......@@ -65,9 +66,13 @@ XdmfGeometryType::New(const std::map<std::string, std::string> & itemProperties)
if(type == itemProperties.end()) {
type = itemProperties.find("GeometryType");
}
if(type == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'GeometryType' in itemProperties "
"in XdmfGeometryType::New");
}
const std::string & typeVal = type->second;
if(type != itemProperties.end()) {
const std::string typeVal = type->second;
if(typeVal.compare("None") == 0) {
return NoGeometryType();
}
......@@ -77,14 +82,10 @@ XdmfGeometryType::New(const std::map<std::string, std::string> & itemProperties)
else if(typeVal.compare("XY") == 0) {
return XY();
}
else {
XdmfError::message(XdmfError::FATAL, "Type not 'None', 'XYZ', or 'XY' "
"in XdmfGeometryType::New");
}
}
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'GeometryType' in itemProperties in "
"XdmfGeometryType::New");
return shared_ptr<const XdmfGeometryType>();
}
......@@ -103,5 +104,5 @@ XdmfGeometryType::getName() const
void
XdmfGeometryType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{
collectedProperties["Type"] = mName;
collectedProperties.insert(std::make_pair("Type", mName));
}
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttribute.hpp"
#include "XdmfGeometry.hpp"
#include "XdmfGrid.hpp"
......@@ -59,7 +60,7 @@ std::map<std::string, std::string>
XdmfGrid::getItemProperties() const
{
std::map<std::string, std::string> gridProperties;
gridProperties["Name"] = mName;
gridProperties.insert(std::make_pair("Name", mName));
return gridProperties;
}
......@@ -96,7 +97,7 @@ XdmfGrid::getTopology() const
void
XdmfGrid::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......
......@@ -130,7 +130,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
shared_ptr<XdmfGeometry> mGeometry;
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfGeometry.hpp"
#include "XdmfTopology.hpp"
#include "XdmfGridCollection.hpp"
......@@ -51,7 +52,7 @@ XdmfGridCollection::getItemProperties() const
{
std::map<std::string, std::string> collectionProperties =
XdmfGrid::getItemProperties();
collectionProperties["GridType"] = "Collection";
collectionProperties.insert(std::make_pair("GridType", "Collection"));
mType->getProperties(collectionProperties);
return collectionProperties;
}
......@@ -76,7 +77,7 @@ XdmfGridCollection::insert(const shared_ptr<XdmfInformation> information)
void
XdmfGridCollection::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
mType = XdmfGridCollectionType::New(itemProperties);
......
......@@ -97,7 +97,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -21,8 +21,9 @@
/* */
/*****************************************************************************/
#include "XdmfGridCollectionType.hpp"
#include <utility>
#include "XdmfError.hpp"
#include "XdmfGridCollectionType.hpp"
// Supported XdmfGridCollectionTypes
shared_ptr<const XdmfGridCollectionType>
......@@ -63,8 +64,13 @@ XdmfGridCollectionType::New(const std::map<std::string, std::string> & itemPrope
{
std::map<std::string, std::string>::const_iterator type =
itemProperties.find("CollectionType");
if(type != itemProperties.end()) {
const std::string typeVal = type->second;
if(type == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"'CollectionType' not in itemProperties in "
"XdmfGridCollectionType::New");
}
const std::string & typeVal = type->second;
if(typeVal.compare("None") == 0) {
return NoCollectionType();
}
......@@ -74,20 +80,16 @@ XdmfGridCollectionType::New(const std::map<std::string, std::string> & itemPrope
else if(typeVal.compare("Temporal") == 0) {
return Temporal();
}
else {
XdmfError::message(XdmfError::FATAL,
"'CollectionType' not of 'None', 'Spatial', or "
"'Temporal' in XdmfGridCollectionType::New");
}
}
XdmfError::message(XdmfError::FATAL,
"'CollectionType' not in itemProperties in "
"XdmfGridCollectionType::New");
return shared_ptr<const XdmfGridCollectionType>();
}
void
XdmfGridCollectionType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{
collectedProperties["CollectionType"] = mName;
collectedProperties.insert(std::make_pair("CollectionType", mName));
}
......@@ -80,13 +80,11 @@ XdmfItemFactory::createItem(const std::string & itemTag,
}
if(type != itemProperties.end()) {
const std::string typeVal = type->second;
const std::string & typeVal = type->second;
if(typeVal.compare("ORIGIN_DXDY") == 0 ||
typeVal.compare("ORIGIN_DXDYDZ") == 0) {
shared_ptr<XdmfArray> origin =
shared_ptr<XdmfArray>();
shared_ptr<XdmfArray> brickSize =
shared_ptr<XdmfArray>();
shared_ptr<XdmfArray> origin = shared_ptr<XdmfArray>();
shared_ptr<XdmfArray> brickSize = shared_ptr<XdmfArray>();
for(std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
childItems.begin();
iter != childItems.end();
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttribute.hpp"
#include "XdmfError.hpp"
#include "XdmfGridCollection.hpp"
......@@ -93,7 +94,7 @@ std::map<std::string, std::string>
XdmfMap::getItemProperties() const
{
std::map<std::string, std::string> mapProperties;
mapProperties["Name"] = mName;
mapProperties.insert(std::make_pair("Name", mName));
return mapProperties;
}
......@@ -142,7 +143,7 @@ bool XdmfMap::isInitialized() const
void
XdmfMap::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......
......@@ -186,7 +186,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -373,7 +373,7 @@ XdmfRectilinearGrid::getDimensions() const
void
XdmfRectilinearGrid::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfGrid::populateItem(itemProperties, childItems, reader);
......
......@@ -165,7 +165,7 @@ protected:
XdmfRectilinearGrid(const std::vector<shared_ptr<XdmfArray> > & axesCoordinates);
void populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -397,7 +397,7 @@ XdmfRegularGrid::getOrigin() const
void
XdmfRegularGrid::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfGrid::populateItem(itemProperties, childItems, reader);
......
......@@ -188,7 +188,7 @@ protected:
const shared_ptr<XdmfArray> origin);
void populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfAttribute.hpp"
#include "XdmfHDF5Controller.hpp"
#include "XdmfSet.hpp"
......@@ -52,7 +53,7 @@ std::map<std::string, std::string>
XdmfSet::getItemProperties() const
{
std::map<std::string, std::string> setProperties;
setProperties["Name"] = mName;
setProperties.insert(std::make_pair("Name", mName));
mType->getProperties(setProperties);
return setProperties;
}
......@@ -77,7 +78,7 @@ XdmfSet::getType() const
void
XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......
......@@ -107,7 +107,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <utility>
#include "XdmfSetType.hpp"
#include "XdmfError.hpp"
......@@ -77,12 +78,14 @@ XdmfSetType::New(const std::map<std::string, std::string> & itemProperties)
if(type == itemProperties.end()) {
type = itemProperties.find("SetType");
}
if(type != itemProperties.end()) {
const std::string typeVal = type->second;
if(typeVal.compare("None") == 0) {
return NoSetType();
if(type == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'SetType' found in itemProperties "
"in XdmfSetType::New");
}
else if(typeVal.compare("Node") == 0) {
const std::string & typeVal = type->second;
if(typeVal.compare("Node") == 0) {
return Node();
}
else if(typeVal.compare("Cell") == 0) {
......@@ -94,20 +97,19 @@ XdmfSetType::New(const std::map<std::string, std::string> & itemProperties)
else if(typeVal.compare("Edge") == 0) {
return Edge();
}
else {
else if(typeVal.compare("None") == 0) {
return NoSetType();
}
XdmfError::message(XdmfError::FATAL,
"Type not of 'None', 'Node', 'Cell', 'Face', or "
"'Edge' in XdmfSetType::New");
}
}
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'SetType' found in itemProperties "
"in XdmfSetType::New");
return shared_ptr<const XdmfSetType>();
}
void
XdmfSetType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{
collectedProperties["Type"] = this->mName;
collectedProperties.insert(std::make_pair("Type", mName));
}
......@@ -22,6 +22,7 @@
/*****************************************************************************/
#include <sstream>
#include <utility>
#include "XdmfTime.hpp"
#include "XdmfError.hpp"
......@@ -49,7 +50,7 @@ XdmfTime::getItemProperties() const
std::map<std::string, std::string> timeProperties;
std::stringstream value;
value << mValue;
timeProperties["Value"] = value.str();
timeProperties.insert(std::make_pair("Value", value.str()));
return timeProperties;
}
......@@ -67,7 +68,7 @@ XdmfTime::getValue() const
void
XdmfTime::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......@@ -77,7 +78,9 @@ XdmfTime::populateItem(const std::map<std::string, std::string> & itemProperties
mValue = atof(value->second.c_str());
}
else {
XdmfError::message(XdmfError::FATAL, "'Value' not in itemProperties in XdmfTime::populateItem");
XdmfError::message(XdmfError::FATAL,
"'Value' not in itemProperties in "
"XdmfTime::populateItem");
}
}
......
......@@ -74,7 +74,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -22,6 +22,7 @@
/*****************************************************************************/
#include <sstream>
#include <utility>
#include "XdmfError.hpp"
#include "XdmfTopology.hpp"
#include "XdmfTopologyType.hpp"
......@@ -58,7 +59,7 @@ XdmfTopology::getItemProperties() const
if(mType->getCellType() != XdmfTopologyType::Structured) {
std::stringstream numElements;
numElements << this->getNumberElements();
topologyProperties["Dimensions"] = numElements.str();
topologyProperties.insert(std::make_pair("Dimensions", numElements.str()));
}
return topologyProperties;
}
......@@ -116,7 +117,7 @@ XdmfTopology::getType() const
void
XdmfTopology::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......
......@@ -99,7 +99,7 @@ protected:
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<shared_ptr<XdmfItem> > & childItems,
const std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
......
......@@ -23,6 +23,7 @@
#include <cctype>
#include <sstream>
#include <utility>
#include "XdmfError.hpp"
#include "XdmfTopologyType.hpp"
......@@ -413,15 +414,20 @@ XdmfTopologyType::New(const std::map<std::string, std::string> & itemProperties)
if(type == itemProperties.end()) {
type = itemProperties.find("TopologyType");
}
std::map<std::string, std::string>::const_iterator nodesPerElement =
itemProperties.find("NodesPerElement");
if(type != itemProperties.end()) {
if(type == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'TopologyType' found in "
"itemProperties in XdmfTopologyType::New");
}
std::string typeVal = type->second;
std::transform(typeVal.begin(),
typeVal.end(),
typeVal.begin(),
(int(*)(int))toupper);
std::map<std::string, std::string>::const_iterator nodesPerElement =
itemProperties.find("NodesPerElement");
if(typeVal.compare("NOTOPOLOGY") == 0) {
return NoTopologyType();
}
......@@ -516,14 +522,10 @@ XdmfTopologyType::New(const std::map<std::string, std::string> & itemProperties)
else if(typeVal.compare("MIXED") == 0) {
return Mixed();
}
else {
XdmfError::message(XdmfError::FATAL,
"Invalid Type selected in XdmfTopologyType::New");
}
}
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'TopologyType' found in "
"itemProperties in XdmfTopologyType::New");
return shared_ptr<const XdmfTopologyType>();
}
......@@ -566,10 +568,11 @@ XdmfTopologyType::getNodesPerElement() const