ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/fem_maillage.h
Revision: 304
Committed: Mon Jan 9 23:42:24 2012 UTC (13 years, 7 months ago) by gervaislavoie
Content type: text/plain
File size: 5578 byte(s)
Log Message:
Erreur si l'axe X est normal a un element de plaque reglee.
Possibilite de desactiver la deforme par l'utilisateur avec l'option "nodeforme".

File Contents

# Content
1 //------------------------------------------------------------
2 //------------------------------------------------------------
3 // MAGiC
4 // Jean Christophe Cuilli�re et Vincent FRANCOIS
5 // D�partement de G�nie M�canique - UQTR
6 //------------------------------------------------------------
7 // Le projet MAGIC est un projet de recherche du d�partement
8 // de g�nie m�canique de l'Universit� du Qu�bec �
9 // Trois Rivi�res
10 // Les librairies ne peuvent �tre utilis�es sans l'accord
11 // des auteurs (contact : francois@uqtr.ca)
12 //------------------------------------------------------------
13 //------------------------------------------------------------
14 //
15 // fem_maillage.h
16 //
17 //------------------------------------------------------------
18 //------------------------------------------------------------
19 // COPYRIGHT 2000
20 // Version du 02/03/2006 � 11H22
21 //------------------------------------------------------------
22 //------------------------------------------------------------
23 #ifndef __FEMMAILLAGE_
24 #define __FEMMAILLAGE_
25
26
27 #ifdef WINDOWS_VERSION
28 #ifdef BUILT_DLL_GEOMETRIE
29 #define DLLPORTGEOMETRIE __declspec(dllexport)
30 #else
31 #define DLLPORTGEOMETRIE __declspec(dllimport)
32 #endif
33 #else
34 #define DLLPORTGEOMETRIE
35 #endif
36
37 #ifdef BORLANDCPP
38 #include <map.h>
39 #include <set.h>
40 #else
41 #include <map>
42 #include <set>
43 #endif
44
45
46 #include "mg_identificateur.h"
47 #include "fem_noeud.h"
48 #include "fem_segment2.h"
49 #include "fem_triangle3.h"
50 #include "fem_tetra4.h"
51 #include "fem_segment3.h"
52 #include "fem_triangle6.h"
53 #include "fem_tetra10.h"
54 #include "geom.h"
55
56
57
58
59 typedef std::set<MG_IDENTIFICATEUR*,inf<MG_IDENTIFICATEUR*> > LISTE_ENTITE;
60 typedef std::map<unsigned long,FEM_NOEUD*,std::less<unsigned long> > LISTE_FEM_NOEUD;
61 typedef std::map<unsigned long,FEM_SEGMENT*,std::less<unsigned long> > LISTE_FEM_SEGMENT;
62 typedef std::map<unsigned long,FEM_TRIANGLE*,std::less<unsigned long> > LISTE_FEM_TRIANGLE;
63 typedef std::map<unsigned long,FEM_TETRA*,std::less<unsigned long> > LISTE_FEM_TETRA;
64
65 DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class FEM_MAILLAGE& maillage);
66
67
68 class DLLPORTGEOMETRIE FEM_MAILLAGE : public MG_IDENTIFICATEUR
69 {
70 public:
71 FEM_MAILLAGE(class MG_GEOMETRIE* geo,class MG_MAILLAGE* mai,int deg);
72 FEM_MAILLAGE(unsigned long num,MG_GEOMETRIE* geo,MG_MAILLAGE* mai,int deg);
73 virtual ~FEM_MAILLAGE();
74 MG_GEOMETRIE* get_mg_geometrie(void);
75 MG_MAILLAGE* get_mg_maillage(void);
76 void change_gestionnaire(class MG_GESTIONNAIRE* mggest);
77 int get_degre(void);
78
79
80 FEM_NOEUD* ajouter_fem_noeud(MG_NOEUD* mgnoeud,unsigned long num=0);
81 int ajouter_fem_noeud(FEM_NOEUD *femnoeud);
82 FEM_NOEUD* get_fem_noeudid(unsigned long num);
83 FEM_NOEUD* get_fem_noeud(unsigned int num);
84 FEM_NOEUD* get_premier_noeud(LISTE_FEM_NOEUD::iterator & it);
85 FEM_NOEUD* get_suivant_noeud(LISTE_FEM_NOEUD::iterator & it);
86 unsigned int get_nb_fem_noeud(void);
87 int supprimer_fem_noeudid(unsigned long num);
88 int supprimer_fem_noeud(unsigned int num);
89 void supprimer_tout_fem_noeud(void);
90
91
92
93 int ajouter_fem_segment(FEM_SEGMENT *femsegment);
94 FEM_SEGMENT* get_fem_segmentid(unsigned long num);
95 FEM_SEGMENT* get_fem_segment(unsigned int num);
96 FEM_SEGMENT* get_premier_segment(LISTE_FEM_SEGMENT::iterator & it);
97 FEM_SEGMENT* get_suivant_segment(LISTE_FEM_SEGMENT::iterator & it);
98 unsigned int get_nb_fem_segment(void);
99 int supprimer_fem_segmentid(unsigned long num);
100 int supprimer_fem_segment(unsigned int num);
101 void supprimer_tout_fem_segment(void);
102
103
104
105 int ajouter_fem_triangle(FEM_TRIANGLE *femtriangle);
106 FEM_TRIANGLE* get_fem_triangleid(unsigned long num);
107 FEM_TRIANGLE* get_fem_triangle(unsigned int num);
108 FEM_TRIANGLE* get_premier_triangle(LISTE_FEM_TRIANGLE::iterator & it) ;
109 FEM_TRIANGLE* get_suivant_triangle(LISTE_FEM_TRIANGLE::iterator & it) ;
110 unsigned int get_nb_fem_triangle(void);
111 int supprimer_fem_triangleid(unsigned long num);
112 int supprimer_fem_triangle(unsigned int num);
113 void supprimer_tout_fem_triangle(void);
114
115 int ajouter_fem_tetra(FEM_TETRA *femtetra);
116 FEM_TETRA* get_fem_tetraid(unsigned long num);
117 FEM_TETRA* get_fem_tetra(unsigned int num);
118 FEM_TETRA* get_premier_tetra(LISTE_FEM_TETRA::iterator & it);
119 FEM_TETRA* get_suivant_tetra(LISTE_FEM_TETRA::iterator & it);
120 unsigned int get_nb_fem_tetra(void);
121 int supprimer_fem_tetraid(unsigned long num);
122 int supprimer_fem_tetra(unsigned int num);
123 void supprimer_tout_fem_tetra(void);
124
125
126 void construire(int num=0);
127 void exporter_cosmos(std::string& nomfic);
128 void optimise_numerotation(void);
129 void echange_numerotation(void);
130 bool contient ( MG_IDENTIFICATEUR * id );
131
132 void calcul_deforme(class FEM_SOLUTION* solx,int numx,class FEM_SOLUTION* soly,int numy,class FEM_SOLUTION* solz,int numz);
133 int existe_deforme(void);
134 void active_deforme(void);
135 void desactive_deforme(void);
136 double calcul_coef(void);
137
138 virtual void enregistrer(std::ostream& o);
139 FEM_MAILLAGE* dupliquer(MG_GESTIONNAIRE* gest);
140
141 friend std::ostream& operator << (std::ostream& o,FEM_MAILLAGE& maillage);
142 private:
143 void construire_lineraire(void);
144 void construire_quadratique(void);
145 LISTE_ENTITE lst_entite;
146 LISTE_FEM_NOEUD lst_fem_noeud;
147 LISTE_FEM_SEGMENT lst_fem_segment;
148 LISTE_FEM_TRIANGLE lst_fem_triangle;
149 LISTE_FEM_TETRA lst_fem_tetra;
150 MG_GEOMETRIE* mg_geometrie;
151 MG_GESTIONNAIRE *gest;
152 MG_MAILLAGE* maillage;
153 int degre;
154 int deforme;
155 };
156
157
158
159 #endif
160
161