Skip to content

Generate mesh output from GML input

Tom Fischer requested to merge TomFischer/ogs:GMLOutput into master
  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?

The output can be specified in the output section in the prj file as follows:

    <output>
      <type>VTK</type> <!-- usual specification -->
      <prefix>1e0_{:meshname}</prefix>
      <suffix>_ts_{:timestep}_t_{:time}</suffix>
      <meshes>
        <mesh>cube_1x1x1_hex_1e0</mesh>
      </meshes>

      <geometrical_sets>
        <!-- example for point output -->
        <geometrical_set>
          <name>cube_1x1x1_geometry</name>
          <geometry>left_front_bottom</geometry>
        </geometrical_set>

        <!-- example for polyline output -->
        <geometrical_set>
          <name>cube_1x1x1_geometry</name>
          <geometry>vertical_polyline_left_front</geometry>
        </geometrical_set>

        <!-- example for surface output -->
        <geometrical_set>
          <name>cube_1x1x1_geometry</name>
          <geometry>left</geometry>
        </geometrical_set>
      </geometrical_sets>

      <variables>
        <variable> pressure </variable>
        <variable> v      </variable>
      </variables>
    </output>

An appropriate GML file has to specified in the prj file that contains the referenced geometrical objects. For instance:

<OpenGeoSysGLI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogs="http://www.opengeosys.org">
    <name>cube_1x1x1_geometry</name>
    <points>
        <point id="0" x="0" y="0" z="0" name="left_front_bottom"/>
        <point id="1" x="0" y="0" z="1" name="left_front_top"/>
        <point id="2" x="0" y="1" z="1" name="left_back_top"/>
        <point id="3" x="0" y="1" z="0" name="left_back_bottom"/>

        <point id="4" x="1" y="0" z="0" name="right_front_bottom"/>
        <point id="5" x="1" y="0" z="1" name="right_front_top"/>
        <point id="6" x="1" y="1" z="1" name="right_back_top"/>
        <point id="7" x="1" y="1" z="0" name="right_back_bottom"/>
    </points>

    <polylines>
        <polyline id="0" name="vertical_polyline_left_front">
            <pnt>0</pnt>
            <pnt>1</pnt>
        </polyline>
    </polylines>

    <surfaces>
        <surface id="0" name="left">
            <element p1="0" p2="1" p3="2"/>
            <element p1="0" p2="3" p3="2"/>
        </surface>
    </surfaces>
</OpenGeoSysGLI>

Updated xml snippet according to the reviewers recommendations

Edited by Tom Fischer

Merge request reports