1 |
|
1 |
/*****************************************************************
|
2 |
|
|
|
3 |
|
|
m2d_frontiere.c Type:Func
|
4 |
|
|
|
5 |
|
|
Constitution des frontieres
|
6 |
|
|
|
7 |
|
|
Date de creation : Wed Feb 5 15:03:43 1997
|
8 |
|
|
|
9 |
|
|
Derniere version : Tue May 27 18:22:59 1997
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
Vincent FRANCOIS
|
17 |
|
|
|
18 |
|
|
*****************************************************************/
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
/**************************/
|
25 |
|
|
/* include */
|
26 |
|
|
#include <stdio.h>
|
27 |
|
|
#include <string.h>
|
28 |
|
|
#include <stdlib.h>
|
29 |
|
|
#include "const.h"
|
30 |
|
|
#include "memoire.h"
|
31 |
|
|
#include "struct.h"
|
32 |
|
|
#include "prototype.h"
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
/**************************/
|
36 |
|
|
/* variables globales */
|
37 |
|
|
extern struct environnment env;
|
38 |
|
|
extern struct s_mesh *mesh;
|
39 |
|
|
extern struct s_acis *acis;
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
/**************************/
|
43 |
|
|
/* programme principal */
|
44 |
|
|
|
45 |
|
|
void m2d_frontiere(struct s_face *face)
|
46 |
|
|
{
|
47 |
|
|
struct s_loop *loop;
|
48 |
|
|
struct s_coedge *coedge;
|
49 |
|
|
struct s_frontiere *ac_fr;
|
50 |
|
|
struct s_segment *seg;
|
51 |
|
|
struct s_noeud *no1,*no2;
|
52 |
|
|
int i;
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
/* constitution des frontieres */
|
58 |
|
|
for (loop=face->first_loop;loop!=NULL;loop=loop->next_loop)
|
59 |
|
|
{
|
60 |
|
|
coedge=loop->first_coedge;
|
61 |
|
|
do
|
62 |
|
|
{
|
63 |
|
|
for (i=0;i<coedge->edge->nb_segment;i++)
|
64 |
|
|
{
|
65 |
|
|
seg=coedge->edge->segment[i];
|
66 |
|
|
no1=ADRESSE(seg->n1,noeud,mesh->);
|
67 |
|
|
no2=ADRESSE(seg->n2,noeud,mesh->);
|
68 |
|
|
if (no1->indice!=face->num) eval_face(face,&no1->u,&no1->v,INVERSE,&no1->x,&no1->y,&no1->z,0.,0.);
|
69 |
|
|
if (no2->indice!=face->num) eval_face(face,&no2->u,&no2->v,INVERSE,&no2->x,&no2->y,&no2->z,0.,0.);
|
70 |
|
|
// if (no1->indice!=face->num) no1->dens=eval_fdn2b(face,no1->u,no1->v,LIMITE);
|
71 |
|
|
// if (no2->indice!=face->num) no2->dens=eval_fdn2b(face,no2->u,no2->v,LIMITE);
|
72 |
|
|
NEW_ENTITE(ac_fr,frontiere,mesh->);
|
73 |
|
|
ac_fr->num=mesh->nb_frontiere-1;
|
74 |
|
|
ac_fr->no1=no1;
|
75 |
|
|
ac_fr->no2=no2;
|
76 |
|
|
ac_fr->seg=seg;
|
77 |
|
|
no1->indice=face->num;
|
78 |
|
|
no2->indice=face->num;
|
79 |
|
|
}
|
80 |
|
|
coedge=coedge->next_coedge;
|
81 |
|
|
}
|
82 |
|
|
while (coedge!=loop->first_coedge);
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
}
|