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 |
|
|
// mg_solution.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
#ifndef __MGSOLUTION_ |
24 |
|
|
#define __MGSOLUTION_ |
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 |
|
|
// necessaire pour definir le type FILE dans GCC |
47 |
|
|
#include <stdio.h> |
48 |
|
|
|
49 |
|
|
#include "mg_identificateur.h" |
50 |
francois |
375 |
#include "mg_definition.h" |
51 |
francois |
283 |
|
52 |
|
|
const unsigned int SOL_EXISTANTE=0; |
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol); |
57 |
|
|
|
58 |
|
|
|
59 |
|
|
class DLLPORTGEOMETRIE MG_SOLUTION : public MG_IDENTIFICATEUR |
60 |
|
|
{ |
61 |
|
|
public: |
62 |
francois |
375 |
|
63 |
|
|
MG_SOLUTION(class MG_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD); |
64 |
|
|
MG_SOLUTION(unsigned long num,MG_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD); |
65 |
francois |
283 |
virtual ~MG_SOLUTION(); |
66 |
|
|
|
67 |
|
|
double lire(int i,int j); |
68 |
|
|
void ecrire(int i,int j,double val); |
69 |
|
|
void active_solution(int num); |
70 |
|
|
void change_legende(int num,std::string val); |
71 |
|
|
std::string get_legende(int num); |
72 |
|
|
int get_nb_champ(void); |
73 |
|
|
MG_MAILLAGE* get_maillage(void); |
74 |
|
|
double get_legende_min(void); |
75 |
|
|
double get_legende_max(void); |
76 |
|
|
void efface(void); |
77 |
|
|
std::string get_nom(void); |
78 |
francois |
326 |
std::string get_nom_fichier(void); |
79 |
francois |
283 |
int get_type_solution(void); |
80 |
|
|
|
81 |
|
|
virtual void enregistrer(std::ostream& o); |
82 |
|
|
|
83 |
|
|
friend std::ostream& operator << (std::ostream& o,MG_SOLUTION& maillage); |
84 |
|
|
|
85 |
|
|
private: |
86 |
|
|
char *nom_fichier; |
87 |
|
|
int nb_champs; |
88 |
|
|
FILE* in; |
89 |
|
|
MG_MAILLAGE* mgmai; |
90 |
|
|
double solmin; |
91 |
|
|
double solmax; |
92 |
|
|
std::string* legende; |
93 |
|
|
std::string nomsolution; |
94 |
|
|
int typeentite; |
95 |
|
|
}; |
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
#endif |
100 |
|
|
|
101 |
|
|
|