<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
if you are interested in a simple grid creation procedure good
alternative<br>
is to use dgf. (dune-grid-howto/grids/unitcube3.dgf is a similar
example):<br>
<br>
DGF<br>
Interval<br>
-1 -1 -1 % lower left<br>
2 2 2 % upper right<br>
10 10 10 % number of cubes (or simplicies)<br>
#<br>
<br>
That should do it and works with dune 2.0.<br>
You are not restricted to UG by the way ALU or YASP works<br>
just as good with this grid file. What sort of problems did you have<br>
with dgf and the dune-grid-howto examples?<br>
<br>
BTW: we always like to hear where users are from and what they are<br>
planning to do with DUNE...<br>
<br>
Best<br>
Andreas<br>
<br>
<br>
On 12/25/2010 08:23 AM, Oliver Sander wrote:
<blockquote cite="mid:4D15A9EE.2090400@mi.fu-berlin.de" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
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 moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Dune@dune-project.org">Dune@dune-project.org</a>
<a moz-do-not-send="true" 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>
<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>