-
Committer:
Anders Logg
-
Date:
2008-05-19 23:01:56 UTC
-
mto:
(2668.7.3 trunk)
-
mto:
This revision was merged to the branch mainline in
revision
2670.
-
Revision ID:
logg@simula.no-20080519230156-ipy30lx7287mdhfk
Add support for attaching arbitrarily named data to meshes
in preparation for integration with VMTK.
It is now possible to attach an arbitrary number of
MeshFunction<uint> to a mesh. Each data set is associated with a
user-specified string.
Example:
MeshFunction<uint>* f = mesh.data().create("boundary indicators", 2);
f[0] = 3
f[1] = 3
...
MeshFunction<uint>* g = mesh.data()["boundary indicators"];
File format:
<?xml version="1.0" encoding="UTF-8"?>
<dolfin xmlns:dolfin="http://www.fenics.org/dolfin/">
<mesh celltype="tetrahedron" dim="3">
<vertices size="4">
<vertex index="0" x="0.000000" y="0.000000" z="0.000000"/>
<vertex index="1" x="1.000000" y="0.000000" z="0.000000"/>
<vertex index="2" x="0.000000" y="1.000000" z="0.000000"/>
<vertex index="3" x="0.000000" y="0.000000" z="1.000000"/>
</vertices>
<cells size="1">
<tetrahedron index="0" v0="0" v1="1" v2="2" v3="3"/>
</cells>
<data>
<meshfunction name="boundary facet cells" type="uint" dim="2" size="4">
<entity index="0" value="0"/>
<entity index="1" value="0"/>
<entity index="2" value="0"/>
<entity index="3" value="0"/>
</meshfunction>
<meshfunction name="boundary facet numbers" type="uint" dim="2" size="4">
<entity index="0" value="0"/>
<entity index="1" value="1"/>
<entity index="2" value="2"/>
<entity index="3" value="3"/>
</meshfunction>
<meshfunction name="boundary indicators" type="uint" dim="2" size="4">
<entity index="0" value="0"/>
<entity index="1" value="0"/>
<entity index="2" value="1"/>
<entity index="3" value="1"/>
</meshfunction>
</data>
</mesh>
</dolfin>