ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/mg_solution.h
Revision: 635
Committed: Fri Jan 16 22:48:47 2015 UTC (10 years, 3 months ago) by francois
Content type: text/plain
File size: 3178 byte(s)
Log Message:
Generalisation de la projection d'une solution sur un maillage avec gestion d'erreur

File Contents

# User Rev Content
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 francois 377 #include <vector.h>
42 francois 283 #else
43     #include <map>
44     #include <set>
45 francois 377 #include <vector>
46 francois 283 #endif
47    
48     // necessaire pour definir le type FILE dans GCC
49     #include <stdio.h>
50    
51     #include "mg_identificateur.h"
52 francois 375 #include "mg_definition.h"
53 francois 283
54     const unsigned int SOL_EXISTANTE=0;
55    
56    
57    
58     DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol);
59    
60    
61     class DLLPORTGEOMETRIE MG_SOLUTION : public MG_IDENTIFICATEUR
62     {
63     public:
64 francois 375
65 francois 377 MG_SOLUTION(class MG_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);
66     MG_SOLUTION(unsigned long num,MG_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);
67 francois 283 virtual ~MG_SOLUTION();
68    
69 francois 377 double lire(int i,int j,int coord=0,int num_no=0);
70     void ecrire(double val,int i,int j,int coord=0,int num_no=0);
71 francois 283 void active_solution(int num);
72     void change_legende(int num,std::string val);
73     std::string get_legende(int num);
74     int get_nb_champ(void);
75     MG_MAILLAGE* get_maillage(void);
76 francois 377 double get_legende_min(int num=0);
77     double get_legende_max(int num=0);
78 francois 283 void efface(void);
79     std::string get_nom(void);
80 francois 326 std::string get_nom_fichier(void);
81 francois 635 int get_entite_solution(void);
82 francois 377 int get_dim_solution(void);
83    
84 francois 283 virtual void enregistrer(std::ostream& o);
85    
86     friend std::ostream& operator << (std::ostream& o,MG_SOLUTION& maillage);
87    
88     private:
89 francois 377 void inisolution(char* chemin,int code);
90 francois 283 char *nom_fichier;
91     int nb_champs;
92     FILE* in;
93     MG_MAILLAGE* mgmai;
94 francois 377 double solmin[MAX_TYPE_SOLUTION];
95     double solmax[MAX_TYPE_SOLUTION];
96 francois 283 std::string* legende;
97     std::string nomsolution;
98     int typeentite;
99 francois 377 int dim_solution;
100     std::vector<unsigned long> hash;
101 francois 283 };
102    
103    
104    
105     #endif
106    
107