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_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_ELEMENT1 2 |
50 |
#define ENTITE_ELEMENT2 3 |
51 |
#define ENTITE_ELEMENT3 4 |
52 |
#define ENTITE_ELEMENT1_NOEUD 5 |
53 |
#define ENTITE_ELEMENT2_NOEUD 6 |
54 |
#define ENTITE_ELEMENT3_NOEUD 7 |
55 |
|
56 |
|
57 |
|
58 |
DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol); |
59 |
|
60 |
|
61 |
class DLLPORTGEOMETRIE FEM_SOLUTION : public MG_IDENTIFICATEUR |
62 |
{ |
63 |
public: |
64 |
FEM_SOLUTION(class FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=ENTITE_NOEUD); |
65 |
FEM_SOLUTION(unsigned long num,FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=ENTITE_NOEUD); |
66 |
virtual ~FEM_SOLUTION(); |
67 |
|
68 |
double lire(int i,int j); |
69 |
void ecrire(int i,int j,double val); |
70 |
void active_solution(int num); |
71 |
void change_legende(int num,std::string val); |
72 |
std::string get_legende(int num); |
73 |
int get_nb_champ(void); |
74 |
FEM_MAILLAGE* get_maillage(void); |
75 |
double get_legende_min(void); |
76 |
double get_legende_max(void); |
77 |
void efface(void); |
78 |
std::string get_nom(void); |
79 |
std::string get_nom_fichier(void); |
80 |
|
81 |
virtual void enregistrer(std::ostream& o); |
82 |
|
83 |
friend std::ostream& operator << (std::ostream& o,FEM_SOLUTION& maillage); |
84 |
int get_type_solution(void); |
85 |
|
86 |
private: |
87 |
char *nom_fichier; |
88 |
int nb_champs; |
89 |
FILE* in; |
90 |
FEM_MAILLAGE* femmai; |
91 |
double solmin; |
92 |
double solmax; |
93 |
std::string* legende; |
94 |
std::string nomsolution; |
95 |
int typeentite; |
96 |
}; |
97 |
|
98 |
|
99 |
|
100 |
#endif |
101 |
|
102 |
|