ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/optimisation/src/etude_com.h
Revision: 199
Committed: Tue Jul 21 15:00:12 2009 UTC (16 years, 1 month ago) by picher
Content type: text/plain
File size: 41545 byte(s)
Log Message:
Projet d'optimisation

File Contents

# User Rev Content
1 picher 199 //* [ FreSOP - base v2 ] *************************************** etude_com.h * >
2     //
3     // ver.: 20090624
4    
5     #ifndef _etude_com_h
6     #define _etude_com_h
7    
8     #include "maillage_com.h"
9    
10     #include "bib_0000.h"
11     #include "bib_m000.h"
12     #include "bib_m001.h"
13    
14     //******************************************************************************
15     // constantes globales du module etude_com
16    
17     #define co_lcc_max_exec_solveur 200
18     #define co_lcc_max_nom_etude 200
19     #define co_lcc_max_nom_solveur 40
20     #define co_lcc_max_nom_fic 210
21     #define co_lcc_max_version_fic_cfg 40
22    
23     #define co_lcc_max_ligne_fic_hae 5000
24    
25     #define co_nom_fic_export 1001
26     #define co_nom_fic_hae 1002
27     #define co_nom_fic_mail 1003
28     #define co_nom_fic_resu 1004
29    
30     //******************************************************************************
31     // structures globales du module etude_com
32    
33     //------------------------------------------------------------------------------
34     //-- structures privées (à l'usage de JM) - ne pas utiliser
35    
36     struct ty_CR_recup {
37    
38     char nom_champ[co_lcc_max_nom_champ_resu] ; // ex.: SIXX, VMIS
39     char nom_symbo[co_lcc_max_nom_symbo ] ; // ex.: SIGM_ELNO_DEPL, EPSI_ELNO_DEPL
40    
41     };
42    
43     //******************************************************************************
44     // classes globales du module etude_com
45    
46     //------------------------------------------------------------------------------
47     //-- notes:
48     //--
49     //-- (1) on suppose que la numérotation des noeuds commence à 1
50     //-- (2) on suppose que la numérotation des éléments commence à 1
51     //-- (3) on suppose que la numérotation des groupes de mailles commence à 1
52     //-- (4) on suppose que la numérotation des groupes de noeuds commence à 1
53    
54     //------------------------------------------------------------------------------
55     //-- référence rapide des méthodes publiques pour la classe o_etude_com
56     //--
57     //-- o_etude_com
58     //-- ~o_etude_com
59     //--
60     //--[accesseurs et mutateurs]---------------------------------------------------
61     //--
62     //-- def_nom_fic
63     //-- def_solveur
64     //-- def_frequences
65     //-- ren_frequences
66     //-- ren_maillage
67     //-- ren_masse
68     //-- ren_nbr_frequences
69     //-- ren_no_iteration
70     //-- ren_nom_etude
71     //-- ren_nom_etude_iter
72     //-- ren_nom_fic_comm
73     //-- ren_nom_fic_export
74     //-- ren_nom_fic_mail
75     //-- ren_nom_fic_resu
76     //-- ren_nom_solveur
77     //-- def_CR_recup
78     //-- ren_CR_recup
79     //-- ren_CRm
80     //-- ren_CRm_max
81     //-- ren_CRm_max
82     //-- ren_CRm_min
83     //-- ren_CRm_min
84     //-- ren_existence_CR_recup
85     //-- ren_item_CR
86     //-- ren_nbr_CR_recup
87     //-- ren_no_CR_recup
88     //-- ren_plage_CRm
89     //-- ren_plage_CRm
90     //-- lance_solveur
91     //-- lance_solveur_v2
92     //--
93     //--[écriture et récupération de données de l'étude dans des fichiers]----------
94     //--
95     //-- ecriture_maillage
96     //-- ecriture_maillage
97     //-- recup_mail
98     //-- recup_resu
99     //--
100     //--[méthodes d'interface avec le maillage]-------------------------------------
101     //--
102     //-- def_prms_maillage
103     //-- ren_element
104     //-- ren_elements_3D
105     //-- ren_gm
106     //-- ren_nbr_elements
107     //-- ren_nbr_elements_3D
108     //-- ren_nbr_elements_noeud
109     //-- ren_nbr_elements_type
110     //-- ren_nbr_gm
111     //-- ren_nbr_noeuds
112     //-- ren_nbr_voisins_sphere
113     //-- ren_no_element_max
114     //-- ren_no_noeud_max
115     //-- ren_nos_elements_noeud
116     //-- ren_noeuds
117     //-- ren_voisins_sphere
118     //--
119     //--[méthodes d'interface avec les éléments]------------------------------------
120     //--
121     //-- def_prms_element
122     //--
123     //--[méthodes d'interface avec les noeuds]--------------------------------------
124     //--
125     //-- def_coord_noeud
126     //-- def_coord_noeuds
127     //-- ren_nos_noeuds
128     //--
129     //--[autres méthodes]-----------------------------------------------------------
130     //--
131     //-- lance_solveur
132     //-- lance_solveur_v2
133     //--
134     //--[]--------------------------------------------------------------------------
135     //--
136     //-- trouve_voisins_sg
137     //-- trouve_voisins_sg2
138     //-- trouve_voisins_spr
139     //-- recup_frequences_v1
140     //-- recup_masse
141     //--
142     //-- recup_hae
143     //-- recup_hae_ok
144     //-- ren_hae_nbr_iterations
145     //-- ren_hae_activation
146     //-- ren_hae_activation
147    
148     class o_etude_com {
149    
150     //============================================================================
151     //=============================== ATTRIBUTS ==================================
152     //============================================================================
153    
154     char nom_etude [ co_lcc_max_nom_etude ] ;
155     char nom_etude_iter [ co_lcc_max_nom_etude ] ; // cc contenant le nom de l'étude avec le no d'itération
156    
157     char nom_fic_comm [ co_lcc_max_nom_fic ] ;
158     char nom_fic_export [ co_lcc_max_nom_fic ] ;
159     char nom_fic_hae [ co_lcc_max_nom_fic ] ;
160     char nom_fic_mail [ co_lcc_max_nom_fic ] ;
161     char nom_fic_mess [ co_lcc_max_nom_fic ] ;
162     char nom_fic_pos [ co_lcc_max_nom_fic ] ;
163     char nom_fic_resu [ co_lcc_max_nom_fic ] ;
164    
165     char exec_solveur [ co_lcc_max_exec_solveur ] ;
166     char nom_solveur [ co_lcc_max_nom_solveur ] ;
167    
168     ptr_o_maillage_com maillage ;
169    
170     vifl masse ;
171    
172     ulong nbr_frequences ;
173    
174     vifl *vfrequences ;
175    
176     //-- gestion de la récupération des résultats --------------------------------
177    
178     ulong nbr_CR_recup ;
179    
180     ty_champ_resu V_CR_recup[ co_max_champs_resu ] ;
181    
182     //-- contrainte de von Mises -------------------------------------------------
183    
184     ulong no_element_sigVMm_max ;
185     ulong no_element_sigVMm_min ;
186     vifl sigVMm_max ;
187     vifl sigVMm_min ;
188    
189     //-- historique d'activation des éléments (hae) ------------------------------
190    
191     ulong hae_nbr_iterations ; // nbr d'itérations composant l'historique
192     lint *hae_tab_activation ; // tableau contenant l'historique d'activation des éléments (topologie)
193    
194     //-- drapeaux d'exécution ----------------------------------------------------
195    
196     ty_RSLT alloc_mail_OK ;
197    
198     ty_RSLT def_solveur_OK ;
199     ty_RSLT def_nom_fic_export_OK ;
200     ty_RSLT def_nom_fic_hae_OK ;
201     ty_RSLT def_nom_fic_mail_OK ;
202     ty_RSLT def_nom_fic_resu_OK ;
203    
204     ty_RSLT recup_hae_OK ;
205    
206     //============================================================================
207     //=========================== MÉTHODES PRIVÉES ===============================
208     //============================================================================
209    
210     //============================================================================
211     //== initialisation de la classe
212    
213     ty_RSLT initialisation ( void );
214    
215     //============================================================================
216     //== gestion de mémoire
217    
218     ty_RSLT alloc_mail ( void );
219    
220     ty_RSLT alloc_vfrequences ( void );
221    
222     ty_RSLT desalloc_tout ( void );
223    
224     ty_RSLT desalloc_mail ( void );
225    
226     ty_RSLT desalloc_vfrequences ( void );
227    
228     //============================================================================
229     //== mutateurs
230    
231     ty_RSLT def_nom_fic_fresopprj( char *_nom_fic ); // méta
232    
233     ty_RSLT def_nom_fic_export ( char *_nom_fic );
234    
235     ty_RSLT def_nom_fic_hae ( char *_nom_fic );
236    
237     ty_RSLT def_nom_fic_mail ( char *_nom_fic );
238    
239     ty_RSLT def_nom_fic_resu ( char *_nom_fic );
240    
241     //============================================================================
242     //== récupération de données de l'étude dans des fichiers
243    
244     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
245     //=- maillage
246    
247     //----------------------------------------------------------------------------
248     //-- récupération de la configuration du fichier mail
249     //--
250     //-- +--------------------------------------------+-------------------------+
251     //-- ¦ condition ¦ résultat d'exécution ¦
252     //-- +--------------------------------------------+-------------------------+
253     //-- ¦ 1. prob.: ouverture du fichier mail ¦ co_probleme_1 ¦
254     //-- ¦ 0. OK ¦ co_pas_de_probleme ¦
255     //-- +--------------------------------------------+-------------------------+
256    
257     ty_RSLT recup_config_mail ( ulong *_nbr_elements ,
258     ulong *_no_element_max ,
259     ulong *_nbr_noeuds ,
260     ulong *_no_noeud_max ,
261     ulong *_nbr_gm ,
262     ulong *_nbr_gn );
263    
264     ty_RSLT recup_contenu_mail ( void );
265    
266     ty_RSLT recup_elements ( FILE *_fic_mail );
267    
268     ty_RSLT recup_gm ( FILE *_fic_mail );
269    
270     ty_RSLT recup_noeuds ( FILE *_fic_mail );
271    
272     public:
273    
274     //============================================================================
275     //========================== MÉTHODES PUBLIQUES ==============================
276     //============================================================================
277    
278     o_etude_com ( void );
279     ~o_etude_com ( void );
280    
281     //============================================================================
282     //== accesseurs et mutateurs
283    
284     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
285     //=- généraux
286    
287     //----------------------------------------------------------------------------
288     //-- définition d'un nom de fichier
289     //--
290     //-- +--------------------------------------------+-------------------------+
291     //-- ¦ condition ¦ résultat d'exécution ¦
292     //-- +--------------------------------------------+-------------------------+
293     //-- ¦ _nom_fic = NULL ¦ co_probleme_1 ¦
294     //-- ¦ extension de _nom_fic non-admissible ¦ co_probleme_2 ¦
295     //-- ¦ s'il s'agit d'un fichier export (aster) ¦ co_nom_fic_export ¦
296     //-- ¦ s'il s'agit d'un fichier d'hae ¦ co_nom_fic_hae ¦
297     //-- ¦ s'il s'agit d'un fichier de maillage ¦ co_nom_fic_mail ¦
298     //-- ¦ s'il s'agit d'un fichier de résultats ¦ co_nom_fic_resu ¦
299     //-- +--------------------------------------------+-------------------------+
300    
301     ty_RSLT def_nom_fic ( char *_nom_fic );
302    
303     //----------------------------------------------------------------------------
304     //-- définition du solveur
305     //--
306     //-- +--------------------------------------------+-------------------------+
307     //-- ¦ condition ¦ résultat d'exécution ¦
308     //-- +--------------------------------------------+-------------------------+
309     //-- ¦ _nom_solveur = NULL ¦ co_probleme_1 ¦
310     //-- ¦ _exec_solveur = NULL ¦ co_probleme_2 ¦
311     //-- +--------------------------------------------+-------------------------+
312    
313     ty_RSLT def_solveur ( char *_nom_solveur ,
314     char *_exec_solveur ); // nom complet (ex.: "/usr/local/aster/ASTK/ASTK_SERV/bin/as_run")
315    
316     //----------------------------------------------------------------------------
317    
318     ty_RSLT def_frequences ( ulong _nbr_frequences ,
319     vifl *_vfrequences );
320    
321     //----------------------------------------------------------------------------
322    
323     // ty_RSLT ren_solveur ( char *_nom_solveur ,
324     // char *_exec_solveur );
325    
326     //----------------------------------------------------------------------------
327    
328     ty_RSLT ren_frequences ( vifl *_vfrequences );
329    
330     //----------------------------------------------------------------------------
331    
332     ty_RSLT ren_maillage ( ptr_o_maillage_com *_maillage );
333    
334     //----------------------------------------------------------------------------
335    
336     ty_RSLT ren_masse ( vifl *_masse );
337    
338     //----------------------------------------------------------------------------
339    
340     ty_RSLT ren_nbr_frequences ( ulong *_nbr_frequences );
341    
342     //----------------------------------------------------------------------------
343    
344     ty_RSLT ren_no_iteration ( lint *_no_iteration_a ,
345     lint *_no_iteration_b ,
346     lint *_no_iteration_c ,
347     lint *_no_iteration_d );
348    
349     //----------------------------------------------------------------------------
350    
351     ty_RSLT ren_nom_etude ( char *_nom_etude );
352    
353     //----------------------------------------------------------------------------
354    
355     ty_RSLT ren_nom_etude_iter ( char *_nom_etude_iter );
356    
357     //----------------------------------------------------------------------------
358    
359     ty_RSLT ren_nom_fic_comm ( char *_nom_fic_comm );
360    
361     //----------------------------------------------------------------------------
362    
363     ty_RSLT ren_nom_fic_export ( char *_nom_fic_export );
364    
365     //----------------------------------------------------------------------------
366    
367     ty_RSLT ren_nom_fic_mail ( char *_nom_fic_mail );
368    
369     //----------------------------------------------------------------------------
370    
371     ty_RSLT ren_nom_fic_resu ( char *_nom_fic_resu );
372    
373     //----------------------------------------------------------------------------
374    
375     ty_RSLT ren_nom_solveur ( char *_nom_solveur );
376    
377     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
378     //=- champs résultat (CR)
379    
380     ty_RSLT def_CR_recup ( char *_nom_symbo , // nom symbolique (Code_Aster)
381     ulong _nbr_champs ,
382     char **_V_nom_champs );
383    
384     //----------------------------------------------------------------------------
385     //-- renvoie un champ résultat récupéré
386     //--
387     //-- +--------------------------------------------+-------------------------+
388     //-- ¦ condition ¦ résultat d'exécution ¦
389     //-- +--------------------------------------------+-------------------------+
390     //-- ¦ 1. prob.: _no_CR_recup = 0 ¦ co_probleme_1 ¦
391     //-- ¦ 2. prob.: _no_CR_recup > nbr_CR_recup ¦ co_probleme_2 ¦
392     //-- ¦ 3. prob.: _nom_symbo = NULL ¦ co_probleme_3 ¦
393     //-- ¦ 4. prob.: _nom_champ = NULL ¦ co_probleme_4 ¦
394     //-- ¦ 0. OK ¦ co_pas_de_probleme ¦
395     //-- +--------------------------------------------+-------------------------+
396    
397     ty_RSLT ren_CR_recup ( ulong _no_CR_recup , // base 1
398    
399     char *_nom_symbo , // nom symbolique (Code_Aster)
400     char *_nom_champ );
401    
402     //----------------------------------------------------------------------------
403     //-- renvoie la valeur moyennée d'un champ résultat
404     //--
405     //-- +--------------------------------------------+-------------------------+
406     //-- ¦ condition ¦ résultat d'exécution ¦
407     //-- +--------------------------------------------+-------------------------+
408     //-- ¦ 1. prob.: _nom_symbo = NULL ¦ co_probleme_101 ¦
409     //-- ¦ 2. prob.: _nom_champ = NULL ¦ co_probleme_102 ¦
410     //-- ¦ 3. prob.: _CRm = NULL ¦ co_probleme_103 ¦
411     //-- ¦ 4. prob.: o_maillage_com::ren_element ¦ co_probleme_104 ¦
412     //-- ¦ -. prob.: o_element_com::ren_CRm ¦ voir o_element_com ¦
413     //-- +--------------------------------------------+-------------------------+
414    
415     ty_RSLT ren_CRm ( ulong _no_element , // base 1
416     char *_nom_symbo , // nom symbolique (Code_Aster)
417     char *_nom_champ ,
418    
419     vifl *_CRm );
420    
421     //----------------------------------------------------------------------------
422     //-- renvoie les nos d'éléments pour lesquels on retrouve la valeur moyenne
423     //-- maximale ou minimale d'un champ résultat (CR)
424     //--
425     //-- les valeurs moyennes du CR sont classées en ordre décroissant ou
426     //-- croissant (les nos d'éléments suivent le classement des valeurs moyennes
427     //-- du CR)
428     //--
429     //-- si _type_element = 0 alors tous les éléments sont considérés
430    
431     ty_RSLT ren_CRm_max ( ulong _nbr_elements , // nombre d'éléments désirés
432     ulong _type_element , // type d'élément concerné
433     ulong _no_CR_recup , // base 1
434    
435     ulong *_V_nos_elements , // pointeur vers la zone mémoire où il faut stocker les nos d'éléments
436     vifl *_V_CR_moy_max ); // pointeur vers la zone mémoire où il faut stocker les valeurs du champ resu moyenné
437    
438     ty_RSLT ren_CRm_max ( ulong _nbr_elements , // nombre d'éléments désirés
439     ulong _type_element , // type d'élément concerné
440     char *_nom_symbo , // nom symbolique (Code_Aster)
441     char *_nom_champ ,
442    
443     ulong *_V_nos_elements , // pointeur vers la zone mémoire où il faut stocker les nos d'éléments
444     vifl *_V_CR_moy_max ); // pointeur vers la zone mémoire où il faut stocker les valeurs du champ resu moyenné
445    
446     ty_RSLT ren_CRm_min ( ulong _nbr_elements , // nombre d'éléments désirés
447     ulong _type_element , // type d'élément concerné
448     ulong _no_CR_recup , // base 1
449    
450     ulong *_V_nos_elements , // pointeur vers la zone mémoire où il faut stocker les nos d'éléments
451     vifl *_V_CR_moy_min ); // pointeur vers la zone mémoire où il faut stocker les valeurs du champ resu moyenné
452    
453     ty_RSLT ren_CRm_min ( ulong _nbr_elements , // nombre d'éléments désirés
454     ulong _type_element , // type d'élément concerné
455     char *_nom_symbo , // nom symbolique (Code_Aster)
456     char *_nom_champ ,
457    
458     ulong *_V_nos_elements , // pointeur vers la zone mémoire où il faut stocker les nos d'éléments
459     vifl *_V_CR_moy_min ); // pointeur vers la zone mémoire où il faut stocker les valeurs du champ resu moyenné
460    
461     ty_RSLT ren_existence_CR_recup
462     ( char *_nom_symbo , // nom symbolique (Code_Aster)
463     char *_nom_champ );
464    
465     //----------------------------------------------------------------------------
466     //-- renvoie la valeur d'un item de champ résultat
467     //--
468     //-- +--------------------------------------------+-------------------------+
469     //-- ¦ condition ¦ résultat d'exécution ¦
470     //-- +--------------------------------------------+-------------------------+
471     //-- ¦ 0. OK ¦ co_pas_de_probleme ¦
472     //-- +--------------------------------------------+-------------------------+
473    
474     ty_RSLT ren_item_CR ( ulong _no_element , // base 1
475     char *_nom_symbo , // nom symbolique Code_Aster (ex.: SIEF_ELGA_DEPL)
476     char *_nom_champ , // nom du champ Code_Aster (ex.: SIXY)
477     ulong _no_item , // base 1
478    
479     vifl *_item );
480    
481     ty_RSLT ren_nbr_CR_recup ( ulong *_nbr_champs_resu_recup );
482    
483     ty_RSLT ren_no_CR_recup ( char *_nom_symbo , // nom symbolique (Code_Aster)
484     char *_nom_champ ,
485    
486     ulong *_no_CR_recup ); // base 1
487    
488     ty_RSLT ren_plage_CRm ( ulong _no_CR_recup , // base 1
489    
490     vifl *_CRm_min ,
491     vifl *_CRm_max ,
492     ulong *_no_element_CRm_min ,
493     ulong *_no_element_CRm_max );
494    
495     ty_RSLT ren_plage_CRm ( char *_nom_symbo , // nom symbolique (Code_Aster)
496     char *_nom_champ ,
497    
498     vifl *_CRm_min ,
499     vifl *_CRm_max ,
500     ulong *_no_element_CRm_min ,
501     ulong *_no_element_CRm_max );
502    
503     //============================================================================
504     //== écriture et récupération de données de l'étude dans des fichiers
505    
506     //----------------------------------------------------------------------------
507     //-- écriture des données du maillage dans un fichier de maillage
508     //--
509     //-- +--------------------------------------------+-------------------------+
510     //-- ¦ condition ¦ résultat d'exécution ¦
511     //-- +--------------------------------------------+-------------------------+
512     //-- ¦ alloc_mail_OK = co_non ¦ co_probleme_1 ¦
513     //-- ¦ problème à l'ouverture du fichier mail ¦ co_probleme_2 ¦
514     //-- +--------------------------------------------+-------------------------+
515    
516     ty_RSLT ecriture_maillage ( void );
517    
518     ty_RSLT ecriture_maillage ( char *_nom_fic_mail );
519    
520     //----------------------------------------------------------------------------
521     //-- récupération des données du maillage dans un fichier de maillage
522     //--
523     //-- +--------------------------------------------+-------------------------+
524     //-- ¦ condition ¦ résultat d'exécution ¦
525     //-- +--------------------------------------------+-------------------------+
526     //-- ¦ def_nom_fic_mail_OK = co_non ¦ co_probleme_1 ¦
527     //-- ¦ problème avec recup_config_mail() ¦ co_probleme_2 ¦
528     //-- ¦ problème avec def_prms_maillage() ¦ co_probleme_3 ¦
529     //-- ¦ problème avec recup_contenu_mail() ¦ co_probleme_4 ¦
530     //-- +--------------------------------------------+-------------------------+
531    
532     ty_RSLT recup_mail ( void );
533    
534     //----------------------------------------------------------------------------
535     //-- récupération des résultats (AEF) dans un fichier résultats
536     //--
537     //-- +--------------------------------------------+-------------------------+
538     //-- ¦ condition ¦ résultat d'exécution ¦
539     //-- +--------------------------------------------+-------------------------+
540     //-- ¦ 1. prob.: ouverture du fichier resu ¦ co_probleme_1 ¦
541     //-- ¦ 2. prob.: nom symbolique pas trouvé ¦ co_probleme_2 ¦
542     //-- ¦ 3. prob.: fichier resu non conforme ¦ co_probleme_3 ¦
543     //-- ¦ 4. prob.: fichier resu non conforme ¦ co_probleme_4 ¦
544     //-- ¦ 5. prob.: fichier resu non conforme ¦ co_probleme_5 ¦
545     //-- ¦ 6. prob.: amem() ¦ co_probleme_6 ¦
546     //-- ¦ 7. prob.: o_maillage::ren_element() ¦ co_probleme_7 ¦
547     //-- ¦ 8. prob.: o_element::def_resu() ¦ co_probleme_8 ¦
548     //-- ¦ 9. prob.: fichier resu non conforme ¦ co_probleme_9 ¦
549     //-- ¦ 0. OK ¦ co_pas_de_probleme ¦
550     //-- +--------------------------------------------+-------------------------+
551    
552     ty_RSLT recup_resu ( char *_nom_symbo ); // nom symbolique (Code_Aster)
553    
554     //============================================================================
555     //== méthodes d'interface avec le maillage
556    
557     //----------------------------------------------------------------------------
558     //-- définition des paramètres du maillage
559     //--
560     //-- +--------------------------------------------+-------------------------+
561     //-- ¦ condition ¦ résultat d'exécution ¦
562     //-- +--------------------------------------------+-------------------------+
563     //-- ¦ problème avec alloc_mail() ¦ co_probleme_1 ¦
564     //-- ¦ problème avec o_maillage_com::def_prms() ¦ co_probleme_2 ¦
565     //-- +--------------------------------------------+-------------------------+
566    
567     ty_RSLT def_prms_maillage ( ulong _nbr_elements ,
568     ulong _no_element_max ,
569     ulong _nbr_noeuds ,
570     ulong _no_noeud_max ,
571     ulong _nbr_gm ,
572     ulong _nbr_gn );
573    
574     //----------------------------------------------------------------------------
575     //-- renvoie un pointeur vers un élément
576     //--
577     //-- note: Il est possible que l'élément ne soit pas défini ou qu'il
578     //-- n'existe pas. Dans un tel cas, le type de l'élément est 0. Il est
579     //-- possible d'obtenir le type de l'élément en appelant la méthode
580     //-- o_element_com::ren_type.
581     //--
582     //-- +--------------------------------------------+-------------------------+
583     //-- ¦ condition ¦ résultat d'exécution ¦
584     //-- +--------------------------------------------+-------------------------+
585     //-- ¦ 1. prob.: _no_element = 0 ¦ co_probleme_1 ¦
586     //-- ¦ 2. prob.: _no_element > no_element_max ¦ co_probleme_2 ¦
587     //-- ¦ 3. prob.: _element = NULL ¦ co_probleme_3 ¦
588     //-- ¦ 4. prob.: o_maillage_com::velements = NULL ¦ co_probleme_4 ¦
589     //-- ¦ 0. OK ¦ co_pas_de_probleme ¦
590     //-- +--------------------------------------------+-------------------------+
591    
592     ty_RSLT ren_element ( ulong _no_element ,
593    
594     ptr_o_element_com *_element );
595    
596     //----------------------------------------------------------------------------
597    
598     ty_RSLT ren_elements_3D ( ptr_o_element_com
599     *_V_elements_3D );
600    
601     //----------------------------------------------------------------------------
602    
603     ty_RSLT ren_gm ( ulong _no_gm ,
604    
605     ptr_o_gm_com *_gm );
606    
607     //-- renvoie le nombre total d'éléments --------------------------------------
608    
609     ty_RSLT ren_nbr_elements ( ulong *_nbr_elements );
610    
611    
612    
613     ty_RSLT ren_nbr_elements_3D ( ulong *_nbr_elements_3D );
614    
615     //----------------------------------------------------------------------------
616     //-- renvoie le nombre d'éléments auxquels appartient un noeud
617    
618     ty_RSLT ren_nbr_elements_noeud
619     ( ulong _no_noeud ,
620    
621     ulong *_nbr_elements );
622    
623     //-- renvoie le nombre d'éléments d'un certain type --------------------------
624    
625     ty_RSLT ren_nbr_elements_type( ulong _type ,
626    
627     ulong *_nbr_elements );
628    
629     //----------------------------------------------------------------------------
630    
631     ty_RSLT ren_nbr_gm ( ulong *_nbr_gm );
632    
633     //----------------------------------------------------------------------------
634    
635     ty_RSLT ren_nbr_noeuds ( ulong *_nbr_noeuds );
636    
637     //----------------------------------------------------------------------------
638     //-- renvoie le nombre de voisins d'un élément (sphère et centre spatial)
639     //--
640     //-- note: les voisins sont du même type que l'élément central
641     //--
642     //-- +--------------------------------------------+-------------------------+
643     //-- | condition particulière | résultat d'exécution |
644     //-- +--------------------------------------------+-------------------------+
645     //-- +--------------------------------------------+-------------------------+
646    
647     ty_RSLT ren_nbr_voisins_sphere
648     ( ulong _no_element_centre ,
649     vifl *_rayon ,
650    
651     ulong *_nbr_voisins );
652    
653     //----------------------------------------------------------------------------
654    
655     ty_RSLT ren_no_element_max ( ulong *_no_element_max );
656    
657     //----------------------------------------------------------------------------
658    
659     ty_RSLT ren_no_noeud_max ( ulong *_no_noeud_max );
660    
661     //----------------------------------------------------------------------------
662     //-- renvoie les nos d'éléments auxquels appartient un noeud
663     //--
664     //-- il faut appeler ren_nbr_elements_noeud préalablement afin de
665     //-- dimensionner correctement _vnos_elements
666    
667     ty_RSLT ren_nos_elements_noeud
668     ( ulong _no_noeud ,
669    
670     ulong *_V_nos_elements );
671    
672     //----------------------------------------------------------------------------
673    
674     ty_RSLT ren_noeuds ( ptr_o_noeuds_com *_noeuds );
675    
676     //----------------------------------------------------------------------------
677     //-- renvoie les voisins d'un élément (sphère et centre spatial)
678     //--
679     //-- notes:
680     //--
681     //-- (1) les voisins sont du même type que l'élément central
682     //-- (2) Si on ne veut pas avoir la distance, poser: _V_distance = NULL
683     //--
684     //-- +--------------------------------------------+-------------------------+
685     //-- | condition particulière | résultat d'exécution |
686     //-- +--------------------------------------------+-------------------------+
687     //-- +--------------------------------------------+-------------------------+
688    
689     ty_RSLT ren_voisins_sphere ( ulong _no_element_centre ,
690     vifl *_rayon ,
691    
692     ulong *_V_nos_voisins ,
693     vifl *_V_distance );
694    
695     //----------------------------------------------------------------------------
696     //-- renvoie les voisins d'un élément (sphère et centre spatial)
697     //--
698     //-- notes:
699     //--
700     //-- (1) les voisins sont du même type que l'élément central
701     //-- (2) renvoie les numéros des éléments voisins ET la distance entre les
702     //-- centres spatiaux donc _V_distance != NULL
703     //--
704     //-- +--------------------------------------------+-------------------------+
705     //-- | condition particulière | résultat d'exécution |
706     //-- +--------------------------------------------+-------------------------+
707     //-- +--------------------------------------------+-------------------------+
708    
709     ty_RSLT ren_voisins_sphere_v2 ( ulong _no_element_centre ,
710     vifl *_rayon ,
711    
712     ulong *_V_nos_voisins ,
713     vifl *_V_distance );
714    
715     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
716     //=- méthodes d'interface avec les éléments
717    
718     //-- définition d'un élément -------------------------------------------------
719    
720     ty_RSLT def_prms_element ( ulong _no_element ,
721     ulong _type ,
722     ulong *_vnos_noeuds );
723    
724     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
725     //=- méthodes d'interface avec les noeuds
726    
727     //-- définition des coordonnées d'un noeud -----------------------------------
728    
729     ty_RSLT def_coord_noeud ( ulong _no_noeud ,
730     vifl *_x ,
731     vifl *_y ,
732     vifl *_z );
733    
734     //-- définition des coordonnées de tous les noeuds ---------------------------
735    
736     ty_RSLT def_coord_noeuds ( vifl *_vx ,
737     vifl *_vy ,
738     vifl *_vz );
739    
740     //----------------------------------------------------------------------------
741     //-- renvoie les numéros des noeuds les plus près d'un point de référence
742     //-- classés en ordre croissant de distance (euclidienne) ainsi que la
743     //-- distance pour chacun de ces noeuds
744     //--
745     //-- +--------------------------------------------+-------------------------+
746     //-- ¦ condition ¦ résultat d'exécution ¦
747     //-- +--------------------------------------------+-------------------------+
748     //-- ¦ _nbr_noeuds invalide ¦ co_probleme_1 ¦
749     //-- ¦ _x, _y ou _z = NULL ¦ co_probleme_2 ¦
750     //-- ¦ _V_nos_noeuds = NULL ¦ co_probleme_3 ¦
751     //-- ¦ _V_distance = NULL ¦ co_probleme_4 ¦
752     //-- ¦ o_noeuds_com::vx = NULL ¦ co_probleme_5 ¦
753     //-- +--------------------------------------------+-------------------------+
754    
755     ty_RSLT ren_nos_noeuds ( ulong _nbr_noeuds , // nombre de noeuds
756     vifl *_x , // coordonnées du point de référence
757     vifl *_y ,
758     vifl *_z ,
759    
760     ulong *_V_nos_noeuds , // pointeur vers la zone mémoire où il faut stocker les nos de noeuds
761     vifl *_V_distance ); // pointeur vers la zone mémoire où il faut stocker la distance pour chaque noeud dans _vnos_noeuds
762    
763    
764    
765    
766    
767    
768     //============================================================================
769     //== autres méthodes
770    
771     //----------------------------------------------------------------------------
772     //-- lancement du solveur
773     //--
774     //-- +--------------------------------------------+-------------------------+
775     //-- ¦ condition ¦ résultat d'exécution ¦
776     //-- +--------------------------------------------+-------------------------+
777     //-- ¦ def_solveur_OK = co_non ¦ co_probleme_1 ¦
778     //-- ¦ def_nom_fic_export_OK == co_non ¦ co_probleme_2 ¦
779     //-- ¦ problème lors de l'appel de system() ¦ co_probleme_3 ¦
780     //-- +--------------------------------------------+-------------------------+
781    
782     ty_RSLT lance_solveur ( void );
783    
784     ty_RSLT lance_solveur_v2 ( int _iteration );
785    
786    
787    
788    
789    
790    
791    
792     //-- détermination du voisinnage des éléments --------------------------------
793    
794     ty_RSLT trouve_voisins_sg ( void );
795    
796     ty_RSLT trouve_voisins_sg2 ( void );
797    
798     ty_RSLT trouve_voisins_spr ( void );
799    
800     ty_RSLT recup_frequences_v1 ( void ); // mot clé recherché : "NUMERO_ORDRE FREQ"
801    
802     ty_RSLT recup_masse ( void );
803    
804     //============================================================================
805     //== méthodes concernant l'historique d'activation des éléments
806    
807     ty_RSLT recup_hae ( void );
808    
809     ty_RSLT recup_hae_ok ( void );
810    
811     ty_RSLT ren_hae_nbr_iterations
812     ( ulong *_hae_nbr_iterations );
813    
814     ty_RSLT ren_hae_activation ( ulong _hae_no_element , // numéro de l'élément (base 1)
815     ulong _hae_no_iteration , // numéro de l'itération (base 1)
816    
817     lint *_hae_activation ); // valeur de l'activation
818    
819     ty_RSLT ren_hae_activation ( ulong _hae_no_element , // numéro de l'élément (base 1)
820    
821     lint *_hae_activation ); // valeur de l'activation
822    
823     };
824    
825     typedef o_etude_com *ptr_o_etude_com;
826    
827     //******************************************************************************
828     // initialisation de etude_com h
829    
830     ty_RSLT init_etude_com( void );
831    
832     //******************************************************************************
833     // finitialisation de etude_com h
834    
835     ty_RSLT finit_etude_com( void );
836    
837     #endif

Properties

Name Value
svn:executable