Skip to content

[MeL/IO] XDMF: Fix pre-commit error because of empty lines in XDMF file

Tobias Meisel requested to merge TobiasMeisel/ogs:xdmf_rawstrings into master

Before generated XDMF File may contain empty lines:

<?xml version="1.0" encoding="utf-8"?>
<Xdmf xmlns:xi="http://www.w3.org/2001/XInclude" Version="3.0">
<Domain>
<Information Name="OGS_VERSION" Value="6.4.2-1020-gff5c4b3d8.dirty"/>
<Grid CollectionType="Temporal" GridType="Collection" Name="Collection">
<Grid Name="Grid" GridType="Uniform">
    <Time Value="0"/>
    
    <Geometry Origin="" Type="XYZ">
        <DataItem DataType="Float" Dimensions="64 3" Format="HDF" Precision="8">top_boundary_to_bottom_boundary_cuboid_1x1x1_hex_27.h5:/meshes/cuboid_1x1x1_hex_27/geometry|0 0 0:1 1 1:1 64 3:3 64 3</DataItem>
    </Geometry>

With this MR now empty lines in the XDMF are generated. It is fixed by using c++ raw strings.

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?

Merge request reports