1 |
francois |
283 |
//------------------------------------------------------------ |
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_solution.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
#ifndef __FEMSOLUTION_ |
24 |
|
|
#define __FEMSOLUTION_ |
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 |
|
|
|
38 |
|
|
#ifdef BORLANDCPP |
39 |
|
|
#include <map.h> |
40 |
|
|
#include <set.h> |
41 |
|
|
#else |
42 |
|
|
#include <map> |
43 |
|
|
#include <set> |
44 |
|
|
#endif |
45 |
|
|
|
46 |
|
|
#include "mg_identificateur.h" |
47 |
|
|
|
48 |
|
|
#define ENTITE_NOEUD 1 |
49 |
|
|
#define ENTITE_SEGMENT 2 |
50 |
|
|
#define ENTITE_TRIANGLE 3 |
51 |
|
|
#define ENTITE_TETRA 4 |
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol); |
56 |
|
|
|
57 |
|
|
|
58 |
|
|
class DLLPORTGEOMETRIE FEM_SOLUTION : public MG_IDENTIFICATEUR |
59 |
|
|
{ |
60 |
|
|
public: |
61 |
|
|
FEM_SOLUTION(class FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=ENTITE_NOEUD); |
62 |
|
|
FEM_SOLUTION(unsigned long num,FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=ENTITE_NOEUD); |
63 |
|
|
virtual ~FEM_SOLUTION(); |
64 |
|
|
|
65 |
|
|
double lire(int i,int j); |
66 |
|
|
void ecrire(int i,int j,double val); |
67 |
|
|
void active_solution(int num); |
68 |
|
|
void change_legende(int num,std::string val); |
69 |
|
|
std::string get_legende(int num); |
70 |
|
|
int get_nb_champ(void); |
71 |
|
|
FEM_MAILLAGE* get_maillage(void); |
72 |
|
|
double get_legende_min(void); |
73 |
|
|
double get_legende_max(void); |
74 |
|
|
void efface(void); |
75 |
|
|
std::string get_nom(void); |
76 |
|
|
|
77 |
|
|
virtual void enregistrer(std::ostream& o); |
78 |
|
|
|
79 |
|
|
friend std::ostream& operator << (std::ostream& o,FEM_SOLUTION& maillage); |
80 |
|
|
int get_type_solution(void); |
81 |
|
|
|
82 |
|
|
private: |
83 |
|
|
char *nom_fichier; |
84 |
|
|
int nb_champs; |
85 |
|
|
FILE* in; |
86 |
|
|
FEM_MAILLAGE* femmai; |
87 |
|
|
double solmin; |
88 |
|
|
double solmax; |
89 |
|
|
std::string* legende; |
90 |
|
|
std::string nomsolution; |
91 |
|
|
int typeentite; |
92 |
|
|
}; |
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
#endif |
97 |
|
|
|
98 |
|
|
|