<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear Ilya,</p>
    <p>can you please ask such questions on the mailing list? This way
      others can profit from the answers too (and you'll probably get an
      answer faster, too).</p>
    <p>For saving grids with associated data, we usually use the VTK
      format. You can use the VTKWriter / VTKSequenceWriter classes and
      their addCellData / addVertexData / write member functions for
      that. You can easily view them with paraview.</p>
    <p>If you want to write out a grid with data and read it in again
      later the Dune Grid Format (DGF) is also an option. Use the class
      DGFWriter to write out your grid and create a Dune::GridPtr for
      reading the file again. There is also a Dune::GmshWriter now, so
      you can write to the Gmsh file format (*.msh). However, data
      attached to cells has to have integer format. So you attach a tag
      and store the data in a separate data file where the data is
      associated with this tag. I haven't tried but I would guess that
      these approaches preserve the ID set of non-adaptive / static
      grids.<br>
    </p>
    <p>The VTK, DGF, Gmsh formats don't preserve the hierarchical grid
      structure AFAIK (in case you use adaptive grids and you want to
      reload the exact hierarchical structure e.g. to pause and resume a
      simulation). For saving and reloading _adaptive_ grids you need to
      use the Dune::BackupRestoreFacility as you tried. Unfortunately,
      this feature is, at the moment, not implemented for FoamGrid. <br>
    </p>
    <br>
    Best regards,<br>
    Timo<br>
    <br>
    <div class="moz-cite-prefix">On 31.03.2018 10:41, Ponomarev, Ilya
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+xTMOMcUUN4qt5=barVEO-SUK1Ymt3cYZeH2dvH22910GcPEA@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div
style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">
          <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">Dear
            Timo,<br>
            <br>
          </div>
          <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I
              have FoamGrid mesh 1d in 3d world and I need to save it to
              disk with additional data<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>fields</span>
              <span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">associated
                with </span>vertices and cells.</span><br>
          </div>
          <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">As
              I understand I could use Dune::BackupRestoreFacility for
              mesh and simple .txt for data, associated with id sets,
              but when I run program I get the mistake:</span></div>
          <div><span
style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">
              <div><span style="font-size:12.8px">Dune reported error:
                  NotImplemented
[backup:/home/ilya/program/DUNE_installed_on_this_computer/dune-grid/dune/grid/common/backuprestore.hh:51]:
                  backup / restore not implemented.</span></div>
              <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br>
              </div>
              <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">How
                can I save my grid, when I would like to preserve id
                set?</div>
            </span></div>
        </div>
        <div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span
            id="gmail-m_591903681547453636gmail-result_box"
            class="gmail-m_591903681547453636gmail-short_text" lang="en"><span
              class="gmail-m_591903681547453636gmail-"><span
                id="gmail-m_591903681547453636gmail-result_box"
                class="gmail-m_591903681547453636gmail-short_text"
                lang="en"><span class="gmail-m_591903681547453636gmail-"><br>
                </span></span></span></span></div>
        <span
id="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-result_box"
class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-short_text"
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"
          lang="en"><span
            class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-"><span
id="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-result_box"
class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-short_text"
              lang="en"><span
                class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-">Best
                regards,<br>
              </span></span></span></span><span
id="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-result_box"
class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-short_text"
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"
          lang="en"><span
            class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-"><span
id="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-result_box"
class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-short_text"
              lang="en"><span
                class="gmail-m_591903681547453636gmail-m_-3756288295486152163gmail-">Ilya</span></span></span></span><br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
_______________________________________________________________

Timo Koch                              phone: +49 711 685 64676
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61        email: <a class="moz-txt-link-abbreviated" href="mailto:timo.koch@iws.uni-stuttgart.de">timo.koch@iws.uni-stuttgart.de</a>
D-70569 Stuttgart            url: <a class="moz-txt-link-abbreviated" href="http://www.hydrosys.uni-stuttgart.de">www.hydrosys.uni-stuttgart.de</a>
_______________________________________________________________</pre>
  </body>
</html>