4 // Copyright (C) 2009-2013 CEA/DEN, EDF R&D
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include "HexElements.hxx"
24 #include "HexDocument.hxx"
25 #include "HexVector.hxx"
26 #include "HexVertex.hxx"
27 #include "HexHexa.hxx"
28 #include "HexEdge.hxx"
29 #include "HexGlobale.hxx"
38 // ====================================================== Constructeur
39 Elements::Elements (Document* doc) : EltBase (doc, EL_GRID)
41 glob = Globale::getInstance ();
44 size_qx = size_ex = size_vx = size_hx = 0;
45 size_qy = size_ey = size_vy = size_hy = 0;
46 size_qz = size_ez = size_vz = size_hz = 0;
47 size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
49 nbr_hexas = nbr_quads = nbr_edges = nbr_vertex = 0;
54 cyl_dispo = CYL_NOFILL;
57 val_absolues = false; // Version Hexa6
61 // ====================================================== Constructeur
62 Elements::Elements (Document* doc, int nx, int ny, int nz)
63 : EltBase (doc, EL_GRID)
65 glob = Globale::getInstance ();
68 size_qx = size_ex = size_vx = size_hx = 0;
69 size_qy = size_ey = size_vy = size_hy = 0;
70 size_qz = size_ez = size_vz = size_hz = 0;
71 size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
73 nbr_hexas = nbr_quads = nbr_edges = nbr_vertex = 0;
76 cyl_dispo = CYL_NOFILL;
78 resize (GR_CYLINDRIC, nx, ny, nz);
83 // ====================================================== Constructeur (clonage)
84 Elements::Elements (Elements* orig) : EltBase (orig->el_root)
86 glob = Globale::getInstance ();
88 grid_type = orig->grid_type;
89 cyl_closed = orig->cyl_closed;
90 cyl_fill = orig->cyl_fill;
91 cyl_dispo = orig->cyl_dispo;
93 size_qx = size_ex = size_vx = size_hx = 0;
94 size_qy = size_ey = size_vy = size_hy = 0;
95 size_qz = size_ez = size_vz = size_hz = 0;
96 size_qvplus = size_qhplus = size_ehplus = size_evplus = size_hplus = 0;
97 nbr_hexas = nbr_quads = nbr_edges = nbr_vertex = 0;
99 resize (orig->grid_type, orig->size_hx, orig->size_hy, orig->size_hz);
100 cyl_closed = orig->cyl_closed;
101 cyl_phimax = orig->cyl_phimax;
103 // ====================================================== resize
104 void Elements::resize (EnumGrid type, int nx, int ny, int nz, int nplus)
115 size_hx = std::max (nx, 1);
116 size_hy = std::max (ny, 1);
117 size_hz = std::max (nz, 1);
119 size_qx = size_ex = size_vx = size_hx + 1;
120 size_qy = size_ey = size_vy = size_hy + 1;
121 size_qz = size_ez = size_vz = size_hz + 1;
123 nbr_hexas = size_hx * size_hy * size_hz;
124 nbr_quads = size_qx * size_qy * size_qz * DIM3;
125 nbr_edges = size_ex * size_ey * size_ez * DIM3;
126 nbr_vertex = size_vx * size_vy * size_vz;
130 size_qx = size_ex = size_vx = size_hx = 0;
131 size_qy = size_ey = size_vy = size_hy = 0;
132 size_qz = size_ez = size_vz = size_hz = 0;
133 nbr_quads = nbr_edges = nbr_vertex = 0;
134 gr_rayon = std::max (nx, 1);
136 nbr_hexas = 1 + gr_rayon*HQ_MAXI;
138 ker_vertex = nbr_vertex;
142 nbr_orig = std::max (nx, 1);
143 gr_hauteur = std::max (ny, 1);
146 size_hz = gr_hauteur;
148 nbr_hexas = nbr_orig * gr_hauteur;
149 nbr_vertex = nbr_hexas * QUAD4;
150 nbr_vertex = nbr_orig * (gr_hauteur+1)*QUAD4;
151 nbr_quads = nbr_vertex;
152 nbr_edges = 2*nbr_vertex;
156 nbr_orig = std::max (nx, 1); // nb quads du pattern
157 gr_hauteur = ny + 1; // Hauteur des hexas
158 pat_nbvertex = std::max (nz, 1); // nb vertex du pattern
159 pat_nbedges = std::max (nplus, 1); // nb edges du pattern
162 size_hz = gr_hauteur;
164 nbr_hexas = nbr_orig * gr_hauteur;
165 nbr_vertex = pat_nbvertex * (gr_hauteur+1);
166 nbr_edges = pat_nbedges * (gr_hauteur+1) + pat_nbvertex*gr_hauteur;
167 nbr_quads = nbr_orig * (gr_hauteur+1) + pat_nbedges *gr_hauteur;
176 size_qx = size_ex = size_vx = size_hx + 1;
177 size_qy = size_ey = size_vy = size_hy + 1;
178 size_qz = size_ez = size_vz = size_hz + 1;
180 nbr_hexas = size_hx * size_hy * size_hz;
181 nbr_quads = size_qx * size_qy * size_qz * DIM3;
182 nbr_edges = size_ex * size_ey * size_ez * DIM3;
183 nbr_vertex = size_vx * size_vy * size_vz;
187 tab_hexa .resize (nbr_hexas, NULL);
188 tab_quad .resize (nbr_quads, NULL);
189 tab_edge .resize (nbr_edges, NULL);
190 tab_vertex.resize (nbr_vertex, NULL);
192 ker_vertex = nbr_vertex;
194 // ====================================================== saveVtk
195 int Elements::saveVtk (cpchar nomfic)
197 DumpStart ("saveVtk", nomfic);
199 pfile vtk = fopen (nomfic, "w");
205 // -- 1) Raz numerotation precedente
206 for (int nro=0 ; nro<nbr_hexas ; nro++)
208 Hexa* cell = tab_hexa[nro];
209 if (cell!=NULL && cell->isHere())
212 for (int nro=0 ; nro<size_hplus ; nro++)
214 Hexa* cell = ker_hexa[nro];
215 if (cell!=NULL && cell->isHere())
223 for (int nro=0 ; nro<nbr_hexas ; nro++)
225 Hexa* cell = tab_hexa[nro];
226 if (cell!=NULL && cell->isHere())
229 nbnodes += cell->countNodes ();
233 for (int nro=0 ; nro<size_hplus ; nro++)
235 Hexa* cell = ker_hexa[nro];
236 if (cell!=NULL && cell->isHere())
239 nbnodes += cell->countNodes ();
243 fprintf (vtk, "# vtk DataFile Version 3.1\n");
244 fprintf (vtk, "%s \n", nomfic);
245 fprintf (vtk, "ASCII\n");
246 fprintf (vtk, "DATASET UNSTRUCTURED_GRID\n");
247 fprintf (vtk, "POINTS %d float\n", nbnodes);
251 for (int nro=0 ; nro<nbr_hexas ; nro++)
253 Hexa* cell = tab_hexa[nro];
254 if (cell!=NULL && cell->isHere())
255 cell->printNodes (vtk, nronode);
257 for (int nro=0 ; nro<size_hplus ; nro++)
259 Hexa* cell = ker_hexa[nro];
260 if (cell!=NULL && cell->isHere())
261 cell->printNodes (vtk, nronode);
265 fprintf (vtk, "CELLS %d %d\n", nbcells, nbcells*(HV_MAXI+1));
267 for (int nro=0 ; nro<nbr_hexas ; nro++)
269 Hexa* cell = tab_hexa[nro];
270 if (cell!=NULL && cell->isHere())
271 cell->printHexa (vtk);
273 for (int nro=0 ; nro<size_hplus ; nro++)
275 Hexa* cell = ker_hexa[nro];
276 if (cell!=NULL && cell->isHere())
277 cell->printHexa (vtk);
280 fprintf (vtk, "CELL_TYPES %d\n", nbcells);
281 for (int nro=0 ; nro<nbcells ; nro++)
282 fprintf (vtk, "%d\n", HE_MAXI);
288 // ============ = = = = = = = = = Vertices ..........
289 // ====================================================== newEdge
290 Edge* Elements::newEdge (Vertex* v1, Vertex* v2)
292 if (v1==NULL || v2==NULL)
295 Edge* elt = new Edge (v1, v2);
298 // ====================================================== newQuad
299 Quad* Elements::newQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4)
301 if (e1==NULL || e2==NULL || e3==NULL|| e4==NULL)
304 Quad* elt = new Quad (e1, e2, e3, e4);
307 // ====================================================== newHexa
308 Hexa* Elements::newHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd,
311 if (qa==NULL || qb==NULL || qc==NULL|| qd==NULL || qe==NULL|| qf==NULL)
314 Hexa* elt = new Hexa (qa, qb, qc, qd, qe, qf);
317 // ======================================================== coupler
318 int Elements::coupler (int nquad, Quad* dest, StrOrient* orient)
320 Quad* orig = tab_orig [nquad];
322 setQuad (orig, dir_z, 0, 0, 0);
323 setQuad (dest, dir_z, nquad, 0, 0);
325 int n11 = orig->indexVertex (orient->v11);
326 int n12 = orig->indexVertex (orient->v12);
327 int n21 = dest->indexVertex (orient->v21);
328 int n22 = dest->indexVertex (orient->v22);
330 // ---------------- Les 4 sommets initiaux
331 Vertex* vorig[QUAD4] = { orient->v11, orient->v12,
332 orig->getVertex((n11+2) MODULO QUAD4),
333 orig->getVertex((n12+2) MODULO QUAD4) };
335 Vertex* vdest[QUAD4] = { orient->v21, orient->v22,
336 dest->getVertex((n21+2) MODULO QUAD4),
337 dest->getVertex((n22+2) MODULO QUAD4) };
340 printf ("Quad nro %d : ", nquad);
341 orig->printName (" est couple avec ");
342 dest->printName ("\n");
343 printf ("Orientation : (");
344 for (int ii=0 ; ii<QUAD4 ; ii++) printf("%s ", vorig[ii]->getName());
347 for (int ii=0 ; ii<QUAD4 ; ii++) printf("%s ", vdest[ii]->getName());
351 // ---------------- Les sommets + les aretes verticales
352 for (int ns=0 ; ns< QUAD4 ; ns++)
354 Vertex* nd1 = vorig[ns];
355 Vertex* nd2 = vdest[ns];
356 int nref0 = nd1->getMark();
357 tab_vertex [nroVertex (nquad,ns,0)] = nd1;
361 double px0 = nd1->getX();
362 double py0 = nd1->getY();
363 double pz0 = nd1->getZ();
365 double dxt = nd2->getX() - px0;
366 double dyt = nd2->getY() - py0;
367 double dzt = nd2->getZ() - pz0;
369 nd1->setMark (indVertex (nquad, ns, 0));
372 for (int nh=0 ; nh<gr_hauteur ; nh++)
374 double coeff = under_v6 ? ((double)(nh+1))/gr_hauteur : cum_values [nh];
376 if (nh == gr_hauteur-1)
379 nd = el_root->addVertex (px0 + coeff*dxt, py0 + coeff*dyt,
381 int nv = indVertex (nquad, ns, nh);
382 tab_vertex [nv] = nd;
383 tab_edge [nv] = el_root->addEdge (ndp, nd);
385 printf (" Edge vertical nro %d = %s = (%s, %s)\n", nv,
386 tab_edge[nv]->getName(),
387 ndp->getName(), nd->getName());
392 for (int nh=0 ; nh<gr_hauteur ; nh++)
394 int nv = indVertex (nquad, ns, nh);
395 int nv0 = indVertex (nref0, nh);
396 tab_vertex [nv] = tab_vertex [nv0];
397 tab_edge [nv] = tab_edge [nv0];
401 // ---------------- Les quads verticaux + aretes horiz
402 for (int ns=0 ; ns< QUAD4 ; ns++)
404 int next = (ns+1) MODULO QUAD4;
405 Edge* arete = orig->findEdge (vorig[ns], vorig[next]);
406 int nref0 = arete->getMark();
407 int nref = indVertex (nquad, ns, 0);
408 // Construction des faces & aretes H
411 arete->setMark (nref);
416 for (int nh=0 ; nh< gr_hauteur ; nh++)
418 nva = indVertex (nquad, ns, nh);
419 nvb = indVertex (nquad, next, nh);
420 nha = nroEdgeH (nva);
425 if (nh==gr_hauteur-1)
426 ea = dest->findEdge (vdest[ns], vdest[next]);
428 ea = el_root->addEdge (tab_vertex [nva], tab_vertex [nvb]);
430 propagateAssociation (ec, ea, eb);
431 tab_quad [nva] = newQuad (ea, eb, ec, ed);
432 if (BadElement (tab_quad [nva]))
437 // L'arete a deja ete traitee
440 for (int nh=0 ; nh<gr_hauteur ; nh++)
442 int nva = indVertex (nquad, ns, nh);
443 int nha = nroEdgeH (nva);
445 int nvb = indVertex (nref0, nh);
446 int nhb = nroEdgeH (nvb);
448 tab_quad [nva] = tab_quad [nvb];
449 tab_edge [nha] = tab_edge [nhb];
453 // -------------------------------- Les Hexas
455 Quad *fa, *fc, *fd, *fe, *ff;
456 for (int nh=0 ; nh< gr_hauteur ; nh++)
459 if (nh == gr_hauteur-1)
462 fb = newQuad (tab_edge [nroEdgeH (nquad, E_A, nh)],
463 tab_edge [nroEdgeH (nquad, E_B, nh)],
464 tab_edge [nroEdgeH (nquad, E_C, nh)],
465 tab_edge [nroEdgeH (nquad, E_D, nh)]);
467 fc = tab_quad [indVertex (nquad, E_A, nh)];
468 fd = tab_quad [indVertex (nquad, E_C, nh)];
469 fe = tab_quad [indVertex (nquad, E_B, nh)];
470 ff = tab_quad [indVertex (nquad, E_D, nh)];
472 tab_hexa [nroHexa(nquad,nh)] = newHexa (fa,fb,fc,fd,fe,ff);
473 if (BadElement (tab_hexa [nroHexa(nquad,nh)]))
478 // ====================================================== transform
479 int Elements::transform (Matrix* matrice)
482 for (int nro=0 ; nro<nbr_hexas ; nro++)
484 Hexa* cell = tab_hexa[nro];
485 if (cell!=NULL && cell->isHere())
489 for (int nro=0 ; nro<nbr_hexas ; nro++)
491 Hexa* cell = tab_hexa[nro];
492 if (cell!=NULL && cell->isHere())
493 cell->moveNodes (matrice);
498 // -- Cas pathologique : il n'y avait pas d'hexas
499 // -- On se rabat sur les sommets
501 for (int nro=0 ; nro<nbr_vertex ; nro++)
503 Vertex* node = tab_vertex[nro];
504 if (node!=NULL && node->isHere())
505 matrice->perform (node);
510 // ====================================================== cutHexas
511 int Elements::cutHexas (const Edges& t_edges, int nbcuts)
513 // 1) marquage des hexas
514 el_root->markAll (NO_USED);
516 vector <Quad*> q_amont;
517 vector <Quad*> q_aval;
518 map <Vertex*, Vertex*> vis_a_vis;
520 int nbnodes = t_edges.size();
521 vector <Vertex*> v_amont (nbnodes);
522 vector <Vertex*> v_aval (nbnodes);
525 for (int nro=0; nro<nbnodes ; nro++)
527 Edge* arete = t_edges [nro];
528 v_amont [nro] = arete->getAmont ();
529 v_aval [nro] = arete->getAval ();
532 printf (" %3d : Edge = (", nro);
533 v_amont[nro]->printName (", ");
534 v_aval [nro]->printName (")\n");
537 vis_a_vis [v_amont[nro]] = v_aval[nro];
538 vis_a_vis [v_aval[nro]] = v_amont[nro];
539 int nbcells = arete->getNbrParents ();
541 for (int nq=0 ; nq<nbcells ; nq++)
543 Quad* quad = arete->getParent (nq);
544 if (quad->getMark () != IS_USED)
546 quad->setMark (IS_USED);
547 int nbcubes = quad->getNbrParents ();
548 for (int nh=0 ; nh<nbcubes ; nh++)
550 Hexa* hexa = quad->getParent (nh);
551 if (hexa->getMark () != IS_USED)
553 hexa->setMark (IS_USED);
554 int namont = hexa->getBase (v_amont[nro], arete);
555 int naval = glob->getOpposedQuad (namont);
556 q_amont.push_back (hexa->getQuad (namont));
557 q_aval .push_back (hexa->getQuad (naval ));
561 printf (" %3d : Quad = ", nbfaces);
562 hexa->printName (", ");
563 printf (" Faces = (");
564 hexa->getQuad (namont)->printName (", ");
565 hexa->getQuad (naval )->printName (")\n");
573 // ------------------- Dimensionnement
574 int nbcells = q_amont.size ();
575 nbr_vertex = nbnodes*(nbcuts+2);
576 int nbpiliers = nbnodes*(nbcuts+1); // aretes verticales
577 int nbpoutres = nbcells*(nbcuts+2)*QUAD4; // aretes horizontales
578 nbr_edges = nbpoutres;
579 nbr_quads = nbcells*(nbcuts+1)*QUAD4; // faces Verticales
580 nbr_hexas = nbcells*(nbcuts+1);
582 // ------------------- Les noeuds et les aretes verticales
583 tab_quad.resize (nbr_quads, NULL);
584 tab_edge.resize (nbr_edges, NULL);
585 tab_hexa.resize (nbr_hexas, NULL);
586 tab_vertex.resize (nbr_vertex, NULL);
587 vector <Edge*> tab_pilier (nbpiliers);
589 int nbinter = nbcuts + 1;
590 for (int ned=0; ned<nbnodes ; ned++)
593 t_edges [ned]->remove ();
594 Vertex* ndamont = v_amont [ned];
595 Vertex* ndaval = v_aval [ned];
597 double lgx = ndaval->getX() - ndamont->getX();
598 double lgy = ndaval->getY() - ndamont->getY();
599 double lgz = ndaval->getZ() - ndamont->getZ();
601 Vertex* nd0 = tab_vertex [ned] = ndamont;
602 for (int nc=0; nc<nbcuts ; nc++)
605 double coeff = under_v6 ? ((double)(nc+1))/nbinter : cum_values[nc];
606 Vertex* nd1 = el_root->addVertex (ndamont->getX() + coeff*lgx,
607 ndamont->getY() + coeff*lgy,
608 ndamont->getZ() + coeff*lgz);
609 tab_vertex [nc1*nbnodes + ned] = nd1;
610 tab_pilier [nc *nbnodes + ned] = newEdge (nd0, nd1);
611 ass_edges.push_back (tab_pilier [nc *nbnodes + ned]);
614 tab_vertex [nbinter*nbnodes + ned] = ndaval;
615 tab_pilier [nbcuts *nbnodes + ned] = newEdge (nd0, ndaval);
616 ass_edges.push_back (tab_pilier[nbcuts *nbnodes + ned]);
617 ndamont->setMark (ned);
618 if (t_edges[ned]->isAssociated())
619 cutAssociation (t_edges[ned], ass_edges);
621 // ------------------- Les aretes horizontales
622 // ------------------- Les faces verticales
623 HexDisplay (nbcells);
624 int sizelig = nbcells*QUAD4;
625 for (int nro=0; nro<nbcells ; nro++)
627 Quad* sol = q_amont [nro];
628 Quad* toit = q_aval [nro];
629 for (int ns=0; ns<QUAD4 ; ns++)
631 Edge* plinthe = sol->getEdge (ns);
632 int nmur = nro*QUAD4 + ns;
633 int nmur0 = plinthe->getMark();
636 for (int nc=0 ; nc<nbinter ; nc++)
638 tab_edge [nc*sizelig + nmur] = tab_edge [nc*sizelig + nmur0];
639 tab_quad [nc*sizelig + nmur] = tab_quad [nc *sizelig + nmur0];
642 printf (" %2d : %d quad_vertical [%02d] =", nro, ns,
644 printf (" quad_vertical [%02d]\n", nc*sizelig + nmur0);
647 tab_edge [nbinter*sizelig+nmur] = tab_edge[nbinter*sizelig+nmur0];
651 plinthe->setMark (nmur);
652 Vertex* vs1 = sol->getVertex (ns);
653 Vertex* vs2 = sol->getVertex ((ns+1) MODULO QUAD4);
654 int nd1 = vs1->getMark ();
655 int nd2 = vs2->getMark ();
656 Edge* ed0 = tab_edge [nmur] = plinthe;
660 for (int nc=0 ; nc<nbinter ; nc++)
665 v1 = tab_vertex [nc1*nbnodes + nd1];
666 v2 = tab_vertex [nc1*nbnodes + nd2];
667 ed2 = newEdge (v1, v2);
671 v1 = vis_a_vis [vs1];
672 v2 = vis_a_vis [vs2];
673 ed2 = toit->findEdge (v1, v2);
676 tab_edge [nc1*sizelig + nmur] = ed2;
677 tab_quad [nc *sizelig + nmur] = newQuad (ed0,
678 tab_pilier [nc*nbnodes + nd1], ed2,
679 tab_pilier [nc*nbnodes + nd2]);
683 printf (" %2d : %d quad_vertical [%02d] = ", nro, ns,
685 PrintName (tab_quad [nc *sizelig + nmur]);
692 // ------------------- Les faces horizontales
693 // ------------------- Les hexas
694 // Rappel : sizelig = nbcells*QUAD4
695 for (int nro=0; nro<nbcells ; nro++)
697 Quad* qa = q_amont [nro];
698 for (int nc=0 ; nc<nbinter ; nc++)
700 int quadv = nc*nbcells*QUAD4 + nro*QUAD4;
701 Quad* qb = q_aval[nro];
704 int edh = (nc+1)*nbcells*QUAD4 + nro*QUAD4;
705 qb = newQuad (tab_edge[edh], tab_edge[edh+1],
706 tab_edge[edh+2], tab_edge[edh+3]);
710 Quad* qc = tab_quad [quadv];
711 Quad* qd = tab_quad [quadv + 2];
712 Quad* qe = tab_quad [quadv + 1];
713 Quad* qf = tab_quad [quadv + 3];
714 Hexa* hexa = newHexa (qa, qb, qc, qd, qe, qf);
715 if (BadElement(hexa))
717 tab_hexa [nc*nbcells + nro] = hexa;
723 // ====================================================== clear_associations
724 void clear_associations (std::vector<Quad*>& table)
726 int nbelts = table.size();
727 for (int nro=0 ; nro<nbelts ; nro++)
729 Quad* elt = table [nro];
730 if (elt != NULL && elt->isValid())
731 elt->clearAssociation ();
734 // ====================================================== clear_associations
735 void clear_associations (std::vector<Edge*>& table)
737 int nbelts = table.size();
738 for (int nro=0 ; nro<nbelts ; nro++)
740 Edge* elt = table [nro];
741 if (elt != NULL && elt->isValid())
742 elt->clearAssociation ();
745 // ====================================================== clear_associations
746 void clear_associations (std::vector<Vertex*>& table)
748 int nbelts = table.size();
749 for (int nro=0 ; nro<nbelts ; nro++)
751 Vertex* elt = table [nro];
752 if (elt != NULL && elt->isValid())
753 elt->clearAssociation ();
756 // ====================================================== clearAssociation
757 void Elements::clearAssociation ()
759 clear_associations (tab_quad);
760 clear_associations (tab_edge);
761 clear_associations (tab_vertex);
764 clear_associations (ker_hquad);
765 clear_associations (ker_vquad);
766 clear_associations (ker_hedge);
767 clear_associations (ker_vedge);
769 // ============================================================ findVertex
770 int Elements::findVertex (double vx, double vy, double vz)
772 double tol = el_root->getTolerance ();
773 double xmin = vx - tol;
774 double xmax = vx + tol;
775 double ymin = vy - tol;
776 double ymax = vy + tol;
777 double zmin = vz - tol;
778 double zmax = vz + tol;
780 int nbre = tab_vertex.size();
781 for (int nro=0 ; nro<nbre ; nro++)
783 Vertex* node = tab_vertex [nro];
784 if (node != NULL && node->isHere ()
785 && node->isin (xmin, xmax, ymin, ymax, zmin, zmax))
790 // ============================================================ findQuad
791 Quad* Elements::findQuad (Edge* e1, Edge* e2)
793 int nbre = tab_quad.size();
794 for (int nro=0 ; nro<nbre ; nro++)
796 Quad* quad = tab_quad [nro];
797 if (quad != NULL && quad->isHere ()
798 && quad->definedBy (e1, e2))