Commit 605db515 authored by David E. DeMarle's avatar David E. DeMarle

Merge branch 'michal/add-finite-element-function' into 'master'

Fix to_string

See merge request !43
parents 89824919 96bea77f
...@@ -81,8 +81,13 @@ XdmfAttribute::getItemProperties() const ...@@ -81,8 +81,13 @@ XdmfAttribute::getItemProperties() const
mType->getProperties(attributeProperties); mType->getProperties(attributeProperties);
mCenter->getProperties(attributeProperties); mCenter->getProperties(attributeProperties);
attributeProperties.insert(std::make_pair("ItemType", mItemType)); attributeProperties.insert(std::make_pair("ItemType", mItemType));
std::stringstream elemDeg;
elemDeg << mElementDegree;
attributeProperties.insert(std::make_pair("ElementDegree", attributeProperties.insert(std::make_pair("ElementDegree",
std::to_string(mElementDegree))); elemDeg.str()));
attributeProperties.insert(std::make_pair("ElementFamily", mElementFamily)); attributeProperties.insert(std::make_pair("ElementFamily", mElementFamily));
attributeProperties.insert(std::make_pair("ElementCell", mElementCell)); attributeProperties.insert(std::make_pair("ElementCell", mElementCell));
return attributeProperties; return attributeProperties;
...@@ -151,7 +156,7 @@ XdmfAttribute::populateItem( ...@@ -151,7 +156,7 @@ XdmfAttribute::populateItem(
std::map<std::string, std::string>::const_iterator element_degree = std::map<std::string, std::string>::const_iterator element_degree =
itemProperties.find("ElementDegree"); itemProperties.find("ElementDegree");
if(element_degree != itemProperties.end()) { if(element_degree != itemProperties.end()) {
mElementDegree = std::stoi(element_degree->second); mElementDegree = atoi(element_degree->second.c_str());
} }
std::map<std::string, std::string>::const_iterator element_family = std::map<std::string, std::string>::const_iterator element_family =
...@@ -173,7 +178,7 @@ XdmfAttribute::populateItem( ...@@ -173,7 +178,7 @@ XdmfAttribute::populateItem(
} }
bool first = true; bool first = true;
for (std::vector<shared_ptr<XdmfItem>>::const_iterator iter = for (std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
childItems.begin(); iter != childItems.end(); ++iter) { childItems.begin(); iter != childItems.end(); ++iter) {
if (shared_ptr<XdmfArray> array = shared_dynamic_cast<XdmfArray>(*iter)) if (shared_ptr<XdmfArray> array = shared_dynamic_cast<XdmfArray>(*iter))
{ {
......
Markdown is supported
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