<!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>
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
 cite="mid:AANLkTikczZ2QkSDVhiXDsZvGewO+xM=owtbGKvR=iNbs@mail.gmail.com"
 type="cite">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>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Dune mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dune@dune-project.org">Dune@dune-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a>
  </pre>
</blockquote>
<br>
</body>
</html>