MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
mg_solution.h
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// mg_solution.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:53 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #ifndef __MGSOLUTION_
23 #define __MGSOLUTION_
24 
25 
26 
27 
28 
29 
30 #include <map>
31 #include <set>
32 #include <vector>
33 
34 
35 #include <stdio.h>
36 
37 #include "mg_identificateur.h"
38 #include "mg_definition.h"
39 
40 const unsigned int SOL_EXISTANTE=0;
41 
42 
43 std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol);
44 
45 
47 {
48 public:
49 
50  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);
51  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);
52  virtual ~MG_SOLUTION();
53 
54  double lire(int i,int j,int coord=0,int num_no=0);
55  void ecrire(double val,int i,int j,int coord=0,int num_no=0);
56  void active_solution(int num);
57  void change_legende(int num,std::string val);
58  std::string get_legende(int num);
59  int get_nb_champ(void);
61  double get_legende_min(int num=0);
62  double get_legende_max(int num=0);
63  void efface(void);
64  std::string get_nom(void);
65  std::string get_nom_fichier(void);
66  int get_entite_solution(void);
67  int get_dim_solution(void);
68 
69  virtual void enregistrer(std::ostream& o,double version);
70  virtual void get_fichier_dependant(std::vector<std::string> &liste_fichier);
71 
72 
73  friend std::ostream& operator << (std::ostream& o,MG_SOLUTION& maillage);
74 
75 private:
76  void inisolution(char* chemin,int code);
77  char *nom_fichier;
78  int nb_champs;
79  FILE* in;
83  std::string* legende;
84  std::string nomsolution;
87  std::vector<unsigned long> hash;
88 };
89 
90 
91 
92 #endif
93 
94 
MG_SOLUTION::lire
double lire(int i, int j, int coord=0, int num_no=0)
Definition: mg_solution.cpp:296
MG_SOLUTION::legende
std::string * legende
Definition: mg_solution.h:83
MG_SOLUTION::mgmai
MG_MAILLAGE * mgmai
Definition: mg_solution.h:80
operator<<
std::ostream & operator<<(std::ostream &o, class MG_SOLUTION &sol)
Definition: mg_solution.cpp:490
MG_SOLUTION::solmax
double solmax[MAX_TYPE_SOLUTION]
Definition: mg_solution.h:82
MG_SOLUTION::get_legende
std::string get_legende(int num)
Definition: mg_solution.cpp:333
MG_SOLUTION::efface
void efface(void)
Definition: mg_solution.cpp:287
MG_SOLUTION::get_nb_champ
int get_nb_champ(void)
Definition: mg_solution.cpp:338
MG_SOLUTION::nomsolution
std::string nomsolution
Definition: mg_solution.h:84
MG_SOLUTION::operator<<
friend std::ostream & operator<<(std::ostream &o, MG_SOLUTION &maillage)
Definition: mg_solution.cpp:490
MG_SOLUTION
Definition: mg_solution.h:46
MG_SOLUTION::MG_SOLUTION
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)
Definition: mg_solution.cpp:42
MG_SOLUTION::enregistrer
virtual void enregistrer(std::ostream &o, double version)
Definition: mg_solution.cpp:464
MG_SOLUTION::get_maillage
MG_MAILLAGE * get_maillage(void)
Definition: mg_solution.cpp:343
MG_SOLUTION::typeentite
int typeentite
Definition: mg_solution.h:85
MG_SOLUTION::ecrire
void ecrire(double val, int i, int j, int coord=0, int num_no=0)
Definition: mg_solution.cpp:309
MG_SOLUTION::inisolution
void inisolution(char *chemin, int code)
Definition: mg_solution.cpp:60
MG_SOLUTION::get_legende_min
double get_legende_min(int num=0)
Definition: mg_solution.cpp:348
SOL_EXISTANTE
const unsigned int SOL_EXISTANTE
Definition: mg_solution.h:40
MG_SOLUTION::get_nom_fichier
std::string get_nom_fichier(void)
Definition: mg_solution.cpp:460
MG_SOLUTION::get_legende_max
double get_legende_max(int num=0)
Definition: mg_solution.cpp:353
MG_SOLUTION::get_entite_solution
int get_entite_solution(void)
Definition: mg_solution.cpp:483
MG_SOLUTION::get_dim_solution
int get_dim_solution(void)
Definition: mg_solution.cpp:323
MG_SOLUTION::get_fichier_dependant
virtual void get_fichier_dependant(std::vector< std::string > &liste_fichier)
Definition: mg_solution.cpp:478
MAX_TYPE_SOLUTION
const int MAX_TYPE_SOLUTION
Definition: mg_definition.h:42
MG_SOLUTION::hash
std::vector< unsigned long > hash
Definition: mg_solution.h:87
MG_SOLUTION::~MG_SOLUTION
virtual ~MG_SOLUTION()
Definition: mg_solution.cpp:52
MG_SOLUTION::active_solution
void active_solution(int num)
Definition: mg_solution.cpp:358
MG_SOLUTION::get_nom
std::string get_nom(void)
Definition: mg_solution.cpp:456
MG_SOLUTION::dim_solution
int dim_solution
Definition: mg_solution.h:86
MG_SOLUTION::change_legende
void change_legende(int num, std::string val)
Definition: mg_solution.cpp:328
mg_definition.h
MG_MAILLAGE
Definition: mg_maillage.h:62
MG_SOLUTION::in
FILE * in
Definition: mg_solution.h:79
MG_SOLUTION::nb_champs
int nb_champs
Definition: mg_solution.h:78
MAGIC::TYPE_SOLUTION::SCALAIRE
@ SCALAIRE
Definition: mg_definition.h:93
mg_identificateur.h
MG_IDENTIFICATEUR
Definition: mg_identificateur.h:34
MG_SOLUTION::solmin
double solmin[MAX_TYPE_SOLUTION]
Definition: mg_solution.h:81
MG_SOLUTION::nom_fichier
char * nom_fichier
Definition: mg_solution.h:77
MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD
@ ENTITE_NOEUD
Definition: mg_definition.h:86