<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
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 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>