<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Alex!<br>
Please write such questions to the mailing list.<br>
<br>
Do not include uggridfactory.hh directly.  Use dune/grid/uggrid.hh<br>
for the UGGrid class and dune/grid/utility/structuredgridfactory.hh<br>
for the StructuredGridFactory.<br>
<br>
Best,<br>
Oliver<br>
<br>
Am 25.12.2010 10:52, schrieb Alex Evanovic:
<blockquote
 cite="mid:AANLkTim45WKqq48EmhqRY4MEA7p3kkHqkBqXVBrE5q5Q@mail.gmail.com"
 type="cite">Just a small question again! Which header file should I
include?<br>
Should it be <font size="4"><code><<a moz-do-not-send="true"
 class="el"
 href="http://www.dune-project.org/doc/doxygen/html/uggridfactory_8hh-source.html">dune/grid/uggrid/uggridfactory.hh</a>></code></font>
?<br>
  <br>
Regards,<br>
Alex<br>
  <u>                                                                                                                                                                    &
nbsp;                              
  </u><br>
  <br>
  <div class="gmail_quote">On Sat, Dec 25, 2010 at 9:23 AM, Oliver
Sander <span dir="ltr"><<a moz-do-not-send="true"
 href="mailto:sander@mi.fu-berlin.de">sander@mi.fu-berlin.de</a>></span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffffff" text="#000000">Hi Alex!<br>
Great to hear you are using Dune.  A structured cube UGGrid is most
easily<br>
created using the StructuredGridFactory class (only available in the
svn --<br>
not in dune 2.0).  Here is a code snippet:<br>
    <br>
   const int dim = 3;<br>
   typedef UGGrid<dim> GridType;<br>
    <br>
    FieldVector<double,dim> lowerLeft(0);<br>
    FieldVector<double,dim> upperRight(1);<br>
    array<unsigned int, dim> elements;<br>
    std::fill(elements.begin(), elements.end(), 10);<br>
    <br>
    StructuredGridFactory<GridType> factory;<br>
    shared_ptr<GridType> grid =
factory.createSimplexGrid(lowerLeft, upperRight, elements);<br>
    <br>
You can write the grid into a VTK file using the following two lines:<br>
    <br>
   VTKWriter<GridType::LeafGridView>
vtkWriter(grid->leafView());<br>
   vtkWriter.write("my_filename");<br>
    <br>
BTW, what's your thesis about?<br>
    <br>
Best,<br>
Oliver<br>
    <br>
    <br>
    <br>
    <br>
Am 25.12.2010 08:52, schrieb Alex Evanovic:
    <blockquote type="cite">
      <div>
      <div class="h5">Hi,<br>
      <br>
I am Master's student, new to DUNE. I have just started my Master's
Thesis using DUNE. I want to create a 3D grid of cubes using DUNE and
then visualize it using Paraview with the VTKWriter. But I have no clue
how to go about it. I read through the dune-grid-howto documentation
and also went through the DGF Parser and stuff. But I am not sure which
is the starting point.<br>
      <br>
Can someone be kind enough to suggest me how to create and visualize a
grid in DUNE. Either by using the DGF Parser or with the UG Grid and
then visualize the grid?<br>
      <br>
Thanks,<br>
Alex<br>
      </div>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
Dune mailing list
<a moz-do-not-send="true" href="mailto:Dune@dune-project.org"
 target="_blank">Dune@dune-project.org</a>
<a moz-do-not-send="true"
 href="http://lists.dune-project.org/mailman/listinfo/dune"
 target="_blank">http://lists.dune-project.org/mailman/listinfo/dune</a>
  </pre>
    </blockquote>
    <br>
    </div>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
</body>
</html>