ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/microstructure/src/mstruct_generateur.h
Revision: 1190
Committed: Wed May 21 19:10:51 2025 UTC (3 months, 1 week ago) by ghazal
Content type: text/plain
File size: 5103 byte(s)
Log Message:
Ajout de la méthode GCM dans la génération de microstructure.

File Contents

# Content
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// mstruct_generateur.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:57 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #ifndef _MSTRUCT_GENERATEUR_
23 #define _MSTRUCT_GENERATEUR_
24 class MG_GESTIONNAIRE;
25 class MG_CG_MODELE;
26 #include "mstruct_ves.h"
27 #include "tpl_grille.h"
28 #include "mg_cg_groupe_forme.h"
29 #include "mg_cg_forme_volume.h"
30 #include "mg_cg_forme_volume_boite.h"
31
32
33 typedef void fonction_affiche(char *);
34 class MSTRUCT_GENERATEUR
35 {
36 public:
37
38 MSTRUCT_GENERATEUR(MG_GESTIONNAIRE* mg_gestionnaire,char* nom_mgcg_modele);
39 MSTRUCT_GENERATEUR(MSTRUCT_GENERATEUR &mcpy);
40 ~MSTRUCT_GENERATEUR(void);
41 virtual MG_GESTIONNAIRE* get_mg_gestionnaire(void);
42 virtual MG_CG_MODELE* get_mgcg_modele(void);
43 virtual void change_mgcg_modele(MG_CG_MODELE* mgcg_modele);
44 virtual int construire(MSTRUCT_VES* ves)=0;
45 virtual int get_type(void)=0;
46 void change_boite3d_ves(BOITE_3D boite3d_ves);
47 void change_boite3d_distribution(BOITE_3D boite3d_distribution);
48 void change_intersection_bords_ves(bool intersection_bords_ves);
49 void change_angle_min(double angle_min);
50 void change_longueur_min(double longueur_min);
51 void change_aire_min(double aire_min);
52 void change_volume_min(double volume_min);
53 void change_distance_inter_volume_min(double distance_min);
54 void change_nb_pas_grille(int nb_pas_grille);
55 void change_nb_pas_echantillonage(int nb_pas_echantillonnage);
56 void change_precision(double precision);
57 double get_fraction_volumique_groupe_forme(std::string nom);
58 void active_affichage(fonction_affiche *fonc);
59 void affiche(char *message);
60 protected:
61
62 int position_relative_inclusion_ves(MG_VOLUME* inclusion,bool &plan_x0yz,bool &plan_x1yz,bool &plan_xy0z,bool &plan_xy1z,bool &plan_xyz0,bool &plan_xyz1);
63 bool angle_entre_face_acceptable(MG_ARETE* mgarete);
64 bool longueur_acceptable(MG_ARETE* mgarete);
65 bool aire_acceptable(MG_FACE* mgface);
66 bool volume_acceptable(MG_VOLUME* mgvolume);
67 bool volume_intersection_ves_acceptable(MG_VOLUME* mgvolume);
68 bool distance_acceptable_bord_ves(MG_VOLUME* mgvolume);
69 bool configuration_acceptable(MG_CG_FORME_VOLUME* forme_volume_inclusion,MG_CG_FORME* forme_matrice=NULL);
70 bool positionnement_acceptable(MG_VOLUME* inclusion);
71 bool insertion_inclusion(MG_CG_FORME* forme_inclusion,
72 double fraction_volumique_cible,
73 double eps_fra_vol,
74 double &fraction_volumique_actuelle,
75 std::vector<MG_CG_FORME*> &vector_inclusion_genere,
76 int &position_relative,
77 std::vector<double> *vector_epaisseur_couche=NULL,
78 bool porosite=false);
79
80 bool insertion_inclusion(MG_CG_FORME* forme_inclusion,
81 double &fraction_volumique_actuelle,
82 std::vector<MG_CG_FORME*> &vector_inclusion_genere,
83 int &position_relative);
84
85
86
87 void echec_insertion_inclusion(std::vector<MG_CG_FORME*> &vector_forme,std::vector<MG_CG_OPERATEUR*> &vector_operateur);
88 int faces_correspondantes(MG_VOLUME* volume1, MG_VOLUME* volume2,double decallage,int nb_pas=32,double precision=1.0e-06);
89 bool lien_topologique_entre(MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo1,MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo2);
90 int configurer_volume_mince(MG_CG_FORME* forme,double epaisseur);
91 int configurer_volume_mince(MG_VOLUME* volume,double epaisseur);
92 void cree_vector_groupe_forme(std::string nom,std::vector<MG_CG_GROUPE_FORME*> &vector_groupe_forme,std::vector<double> *vector_epaisseur_couches=NULL);
93
94 MG_GESTIONNAIRE* m_mg_gestionnaire;
95 MG_CG_MODELE* m_mgcg_modele;
96 BOITE_3D m_boite3d_ves;
97 BOITE_3D m_boite3d_distribution;
98 bool m_intersection_bords_ves;
99 double m_angle_min;
100 double m_longueur_min;
101 double m_aire_min;
102 double m_volume_min;
103 double m_distance_min;
104 int m_nb_pas_grille;
105 int m_nb_pas_echantillonnage;
106 double m_precision;
107 bool m_grille_init;
108 void initialiser_grille(void);
109 TPL_GRILLE<MG_VOLUME*> m_grille_volume_inclusion;
110 std::vector<MG_CG_GROUPE_FORME*> m_vector_mgcg_groupe_forme_inclusion;
111 MG_CG_FORME* m_matrice;
112 MG_CG_FORME* m_cube_initial;
113 double m_nb_pas_x;
114 double m_nb_pas_y;
115 double m_nb_pas_z;
116
117 int affichageactif;
118 fonction_affiche *fonc_affiche;
119 };
120
121
122 #endif