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 |
francois |
375 |
#include <vector.h> |
42 |
francois |
283 |
#else |
43 |
|
|
#include <map> |
44 |
|
|
#include <set> |
45 |
francois |
375 |
#include <vector> |
46 |
francois |
283 |
#endif |
47 |
|
|
|
48 |
|
|
#include "mg_identificateur.h" |
49 |
francois |
375 |
#include "mg_definition.h" |
50 |
francois |
283 |
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol); |
54 |
|
|
|
55 |
|
|
|
56 |
|
|
class DLLPORTGEOMETRIE FEM_SOLUTION : public MG_IDENTIFICATEUR |
57 |
|
|
{ |
58 |
|
|
public: |
59 |
francois |
375 |
FEM_SOLUTION(class FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD,int type_solution=MAGIC::TYPE_SOLUTION::SCALAIRE); |
60 |
|
|
FEM_SOLUTION(unsigned long num,FEM_MAILLAGE *mai,int nb,char* chemin,int code,std::string nomsol,int entite=MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD,int type_solution=MAGIC::TYPE_SOLUTION::SCALAIRE); |
61 |
francois |
283 |
virtual ~FEM_SOLUTION(); |
62 |
francois |
375 |
double lire(int i,int j,int coord=0,int num_no=0); |
63 |
|
|
void ecrire(double val,int i,int j,int coord=0,int num_no=0); |
64 |
francois |
757 |
void change_nb_gauss(int i,int num); |
65 |
|
|
int get_nb_gauss(int i); |
66 |
francois |
283 |
void active_solution(int num); |
67 |
|
|
void change_legende(int num,std::string val); |
68 |
|
|
std::string get_legende(int num); |
69 |
|
|
int get_nb_champ(void); |
70 |
|
|
FEM_MAILLAGE* get_maillage(void); |
71 |
francois |
375 |
double get_legende_min(int num=0); |
72 |
|
|
double get_legende_max(int num=0); |
73 |
francois |
283 |
void efface(void); |
74 |
|
|
std::string get_nom(void); |
75 |
francois |
326 |
std::string get_nom_fichier(void); |
76 |
|
|
|
77 |
francois |
763 |
virtual void enregistrer(std::ostream& o,double version); |
78 |
francois |
910 |
virtual void get_fichier_dependant(std::vector<std::string> &liste_fichier); |
79 |
francois |
283 |
|
80 |
francois |
910 |
|
81 |
francois |
283 |
friend std::ostream& operator << (std::ostream& o,FEM_SOLUTION& maillage); |
82 |
francois |
635 |
int get_entite_solution(void); |
83 |
francois |
375 |
int get_dim_solution(void); |
84 |
francois |
762 |
|
85 |
|
|
double get_moyenne_volumique_champs(class MG_VOLUME* vol,int numchamps,int coord=0); // pour les solutions aux point de gauss |
86 |
|
|
double get_moyenne_surfacique_champs(class MG_FACE* face,int numchamps,int coord=0); |
87 |
|
|
double get_moyenne_lineique_champs(class MG_ARETE* are,int numchamps,int coord); |
88 |
|
|
double get_moyenne_volumique_elementaire_champs(int numchamps,class FEM_ELEMENT3* ele,int num,int coord=0); // pour les solutions aux point de gauss |
89 |
|
|
double get_moyenne_surfacique_elementaire_champs(int numchamps,class FEM_ELEMENT2* ele,int num,int coord); |
90 |
|
|
double get_moyenne_lineique_elementaire_champs(int numchamps,class FEM_ELEMENT1* ele,int num,int coord); |
91 |
francois |
283 |
private: |
92 |
francois |
375 |
void inisolution(char* chemin,int code); |
93 |
francois |
283 |
char *nom_fichier; |
94 |
|
|
int nb_champs; |
95 |
|
|
FILE* in; |
96 |
|
|
FEM_MAILLAGE* femmai; |
97 |
francois |
375 |
double solmin[MAX_TYPE_SOLUTION]; |
98 |
|
|
double solmax[MAX_TYPE_SOLUTION]; |
99 |
francois |
283 |
std::string* legende; |
100 |
|
|
std::string nomsolution; |
101 |
|
|
int typeentite; |
102 |
francois |
375 |
std::vector<unsigned long> hash; |
103 |
|
|
int dim_solution; |
104 |
francois |
859 |
bool change_gauss; |
105 |
francois |
283 |
}; |
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
#endif |
110 |
|
|
|
111 |
|
|
|