~chaffra/dolfin/float128

« back to all changes in this revision

Viewing changes to dolfin/io/XMLMeshValueCollection.h

  • Committer: Garth N. Wells
  • Date: 2012-04-03 09:33:31 UTC
  • Revision ID: gnw20@cam.ac.uk-20120403093331-umbo2i20a2358sbm
Add 'name' attribute to XML MeshValueCollections

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    dolfin_assert(mvc_node);
60
60
 
61
61
    // Get attributes
 
62
    const std::string name = mvc_node->attribute("name").value();
62
63
    const std::string type_file = mvc_node->attribute("type").value();
63
64
    const uint dim = mvc_node->attribute("dim").as_uint();
64
65
 
 
66
    // Attach name to mesh value collection object
 
67
    mesh_value_collection.rename(name, "a mesh value collection");
 
68
 
65
69
    // Set dim
66
70
    mesh_value_collection.set_dim(dim);
67
71
 
148
152
 
149
153
    // Add mesh function node and attributes
150
154
    pugi::xml_node mf_node = xml_node.append_child("mesh_value_collection");
 
155
    mf_node.append_attribute("name") = mesh_value_collection.name().c_str();
151
156
    mf_node.append_attribute("type") = type.c_str();
152
157
    mf_node.append_attribute("dim") = mesh_value_collection.dim();
153
158
    mf_node.append_attribute("size") = mesh_value_collection.size();