<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Last trace then I'll wait:<br>
with a debugger I looked at the values in my factory.boundaryIds_
and all the entries are good, exactly what I set.<br>
But after the grid creation this map (factory.boundaryIds_) is
cleared and the ids of my boundary intersections are not the same I
set.<br>
Then it's during creation that something goes wrong.<br>
<br>
Marco<br>
<br>
Il 06/03/2013 17:22, Marco Cisternino ha scritto:
<blockquote cite="mid:51376D3B.5040401@optimad.it" type="cite">
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
I would like to say more about my problem:<br>
I build my factory on process 0 adding vertices, elements and
boundary. Then I create the grid.<br>
Before loadbalancong the grid, I ask all the boundary
intersections for their boundary ids.<br>
And their boundary ids are wrong, better, not the boundary id I
set in insertBoundary.<br>
<br>
pseudo-code:<br>
for(every line in my grid.bnd)<br>
read the vertices in vertex vector;<br>
read the boundaryId<br>
factory_.insertBoundary(Dune::GeometryType(Dune::GeometryType::cube,dim-1),vertices,boundaryId);<br>
<br>
factory_.createGrid()<br>
<br>
for(every element)<br>
for(every intersection)<br>
intersection.boundaryId()<br>
<br>
In a cube of 3x3x3 element I set 9 boundary intersection with id =
1 but I get 24 boundary intersections with boundaryId=1.<br>
The result is the same after load balancing the grid on 2
processes.<br>
What didn't I understand about boundaryId?<br>
<br>
Thanks.<br>
<br>
Marco<br>
<br>
<br>
<br>
Il 05/03/2013 19:42, Marco Cisternino ha scritto:
<blockquote cite="mid:51363CA1.4010206@optimad.it" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-15">
Hi duners,<br>
I have a problem with boundaries and integer ids.<br>
I'm using ALUGrid<3,3> and I create my grid from PROStar
files(.cel .vrt and .bnd) using a modification of mine of the
starcdreader.hh.<br>
I use Dune 2.1.1.<br>
I use insertVertex, insertElement methods of the factory and I
can build my grid successfully. I didn't modified the part of
starcdreader.hh which does this.<br>
I added some lines of code to insert boundary faces and integers
labels (id) to apply boundary conditions.<br>
My problem is in the use of insertBoundary, specifically:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-15">
insertBoundary(const GeometryType & geometry, const
std::vector< VertexId > & faceVertices, const int
id) <br>
<br>
The smallest example I can think is a grid made of just one
element:<br>
the vrt file:<br>
1 0.475528 0 -0.154508 (index of the vertex and its position in
3D) <br>
2 0 0.475528 -0.154508 <br>
3 0.293893 0 0.404508 <br>
4 0 0.293893 0.404508 <br>
5 0.951057 0 -0.309017 <br>
6 0 0.951057 -0.309017 <br>
7 0.587785 0 0.809017 <br>
8 0 0.587785 0.809017 <br>
the cel file<br>
1 1 2 4 3 5 6 8 7 1 1 1.0 (index of the element, 8 integers for
the vertices, 2 integers I don't use and one double for data to
be attached to the element)<br>
and the bnd file<br>
1 1 3 7 5 1 0 PI01 (index of the boundary face 4 integers for
the vertices, the ID, one integer I don't use, a string for my
boundary conditions)<br>
2 2 4 8 6 2 0 PO01<br>
3 1 2 6 5 3 0 WA01<br>
4 3 4 8 7 4 0 WA01<br>
5 1 2 4 3 5 0 WA01<br>
6 5 6 8 7 6 0 WA01<br>
<br>
When I read my bnd file I read the index, the vertices of the
face (putting them in a vector called vertices) and the ID
(putting it in a integer variable called boundaryId). Then I
call:<br>
factory_.insertBoundary(Dune::GeometryType(Dune::GeometryType::cube,dim-1),vertices,boundaryId);<br>
Everything seems to go in the right way: compiler compiles, the
code runs without errors, BUT<br>
when I visit boundary intersection and I ask for<br>
intersection.boundaryId()<br>
the answer is not what I expected: for the case above the answer
is 1, no matter the boundary intersection I ask (I should get 1
2 3 4 5 6, not necessarily in this order).<br>
Where's my mistake??<br>
I thought there was a way to label boundary faces(intersections)
and I thought the label would be communicated during amr and
load balancing automatically. Am I wrong??<br>
<br>
I hope that someone will be so kind to help me, because this is
crucial for my code.<br>
<br>
Thanks a lot for any hint.<br>
<br>
Bests,<br>
<br>
Marco<br>
<br>
<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
------------------------------------
Marco Cisternino, Ph.D.
OPTIMAD Engineering s.r.l.
Via Giacinto Collegno 18
10143 Torino - Italy
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.optimad.it">www.optimad.it</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:marco.cisternino@optimad.it">marco.cisternino@optimad.it</a>
+39 011 19719782
------------------------------------</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
------------------------------------
Marco Cisternino, Ph.D.
OPTIMAD Engineering s.r.l.
Via Giacinto Collegno 18
10143 Torino - Italy
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.optimad.it">www.optimad.it</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:marco.cisternino@optimad.it">marco.cisternino@optimad.it</a>
+39 011 19719782
------------------------------------</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
------------------------------------
Marco Cisternino, Ph.D.
OPTIMAD Engineering s.r.l.
Via Giacinto Collegno 18
10143 Torino - Italy
<a class="moz-txt-link-abbreviated" href="http://www.optimad.it">www.optimad.it</a>
<a class="moz-txt-link-abbreviated" href="mailto:marco.cisternino@optimad.it">marco.cisternino@optimad.it</a>
+39 011 19719782
------------------------------------</pre>
</body>
</html>