← Back to team overview

dolfin team mailing list archive

Re: XML format for Higher Order meshes

 



On Mon, 25 Aug 2008, Anders Logg wrote:

The XML format could be something like

 <mesh celltype="triangle" dim="2">
   <vertices size="2868">
     <vertex index="0" x="0.534923" y="0.326073"/>
     ...
   </vertices>
   <cells size="5400">
     <triangle index="0" v0="76" v1="914" v2="1153"/>
     ...
   </cells>
   <coordinates>
     <function>

     </function>
   </coordinates>
 <mesh


<coordinates degree="2">

and then have the boolean affine="true"/"false" inside the cell tags.

ok, here is another example format:

<dolfin xmlns:dolfin="http://www.fenics.org/dolfin/";>
  <mesh celltype="triangle" dim="2">

    <vertices size="4">
      <vertex index="0" x="0.0"  y="0.0"/>
      <vertex index="1" x="1.0"  y="0.0"/>
      <vertex index="2" x="0.0"  y="1.0"/>
      <vertex index="3" x="-1.0" y="0.0"/>
    </vertices>

    <cells size="2">
      <triangle index="0" v0="0" v1="1" v2="2"/>
      <triangle index="1" v0="3" v1="0" v2="2"/>
    </cells>

    <coordinates degree="2">
      <function>
        <mesh celltype="triangle" dim="2">
          <vertices size="4">
            <vertex index="0" x="0.0"  y="0.0"/>
            <vertex index="1" x="1.0"  y="0.0"/>
            <vertex index="2" x="0.0"  y="1.0"/>
            <vertex index="3" x="-1.0" y="0.0"/>
          </vertices>
          <cells size="2">
            <triangle index="0" affine="false" v0="0" v1="1" v2="2"/>
            <triangle index="1" affine="true"  v0="3" v1="0" v2="2"/>
          </cells>
        </mesh>

        <vector size="18">
          <entry row="0" value="0.0"/> # 0th pair
          <entry row="1" value="0.0"/> # of coordinates
          <entry row="2" value="1.0"/> # 1st pair
          <entry row="3" value="0.0"/> # of coordinates
          <entry row="4" value="0.0"/>
          <entry row="5" value="1.0"/>
          <entry row="6" value="-1.0"/>
          <entry row="7" value="0.0"/>

          <entry row="8" value="0.5"/>
          <entry row="9" value="0.05"/>
          <entry row="10" value="0.6"/>
          <entry row="11" value="0.6"/>
          <entry row="12" value="0.0"/>
          <entry row="13" value="0.5"/>
          <entry row="14" value="-0.5"/>
          <entry row="15" value="0.0"/>
          <entry row="16" value="-0.5"/>
          <entry row="17" value="0.5"/>
        </vector>
      </function>
      <dofmap ?????/>
    </coordinates>

  </mesh>
</dolfin>

Does this sort of look correct?

- Shawn


References