1 |
francois |
1158 |
//####//------------------------------------------------------------ |
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 |
|
|
//####// fem_solution.h |
15 |
|
|
//####// |
16 |
|
|
//####//------------------------------------------------------------ |
17 |
|
|
//####//------------------------------------------------------------ |
18 |
|
|
//####// COPYRIGHT 2000-2024 |
19 |
|
|
//####// jeu 13 jun 2024 11:58:55 EDT |
20 |
|
|
//####//------------------------------------------------------------ |
21 |
|
|
//####//------------------------------------------------------------ |
22 |
francois |
283 |
#ifndef __FEMSOLUTION_ |
23 |
|
|
#define __FEMSOLUTION_ |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
#include <map> |
29 |
|
|
#include <set> |
30 |
francois |
375 |
#include <vector> |
31 |
francois |
283 |
|
32 |
francois |
1158 |
|
33 |
francois |
283 |
#include "mg_identificateur.h" |
34 |
francois |
375 |
#include "mg_definition.h" |
35 |
francois |
283 |
|
36 |
|
|
|
37 |
francois |
1158 |
std::ostream& operator << (std::ostream& o,class MG_SOLUTION& sol); |
38 |
francois |
283 |
|
39 |
|
|
|
40 |
francois |
1158 |
class FEM_SOLUTION : public MG_IDENTIFICATEUR |
41 |
francois |
283 |
{ |
42 |
|
|
public: |
43 |
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); |
44 |
|
|
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); |
45 |
francois |
283 |
virtual ~FEM_SOLUTION(); |
46 |
francois |
375 |
double lire(int i,int j,int coord=0,int num_no=0); |
47 |
|
|
void ecrire(double val,int i,int j,int coord=0,int num_no=0); |
48 |
francois |
757 |
void change_nb_gauss(int i,int num); |
49 |
|
|
int get_nb_gauss(int i); |
50 |
francois |
283 |
void active_solution(int num); |
51 |
|
|
void change_legende(int num,std::string val); |
52 |
|
|
std::string get_legende(int num); |
53 |
|
|
int get_nb_champ(void); |
54 |
|
|
FEM_MAILLAGE* get_maillage(void); |
55 |
francois |
375 |
double get_legende_min(int num=0); |
56 |
|
|
double get_legende_max(int num=0); |
57 |
francois |
283 |
void efface(void); |
58 |
|
|
std::string get_nom(void); |
59 |
francois |
326 |
std::string get_nom_fichier(void); |
60 |
|
|
|
61 |
francois |
763 |
virtual void enregistrer(std::ostream& o,double version); |
62 |
francois |
910 |
virtual void get_fichier_dependant(std::vector<std::string> &liste_fichier); |
63 |
francois |
283 |
|
64 |
francois |
910 |
|
65 |
francois |
283 |
friend std::ostream& operator << (std::ostream& o,FEM_SOLUTION& maillage); |
66 |
francois |
635 |
int get_entite_solution(void); |
67 |
francois |
375 |
int get_dim_solution(void); |
68 |
francois |
762 |
|
69 |
couturad |
919 |
double get_moyenne_volumique_champs(class MG_VOLUME* vol,int numchamps,int coord=0); |
70 |
|
|
double get_moyenne_volumique_champs(class BOITE_3D &boite_analyse,class MG_VOLUME* vol,int numchamps,int coord=0);// pour les solutions aux point de gauss |
71 |
francois |
762 |
double get_moyenne_surfacique_champs(class MG_FACE* face,int numchamps,int coord=0); |
72 |
|
|
double get_moyenne_lineique_champs(class MG_ARETE* are,int numchamps,int coord); |
73 |
couturad |
919 |
double get_moyenne_volumique_elementaire_champs(int numchamps,class FEM_ELEMENT3* ele,int num,int coord=0);// pour les solutions aux point de gauss |
74 |
|
|
double get_moyenne_volumique_elementaire_champs(int numchamps,class FEM_ELEMENT3* ele,int num,double& volume,int coord=0); |
75 |
francois |
762 |
double get_moyenne_surfacique_elementaire_champs(int numchamps,class FEM_ELEMENT2* ele,int num,int coord); |
76 |
|
|
double get_moyenne_lineique_elementaire_champs(int numchamps,class FEM_ELEMENT1* ele,int num,int coord); |
77 |
couturad |
919 |
double get_volume_element(class FEM_ELEMENT3* ele,int num); |
78 |
francois |
283 |
private: |
79 |
francois |
375 |
void inisolution(char* chemin,int code); |
80 |
francois |
283 |
char *nom_fichier; |
81 |
|
|
int nb_champs; |
82 |
|
|
FILE* in; |
83 |
|
|
FEM_MAILLAGE* femmai; |
84 |
francois |
375 |
double solmin[MAX_TYPE_SOLUTION]; |
85 |
|
|
double solmax[MAX_TYPE_SOLUTION]; |
86 |
francois |
283 |
std::string* legende; |
87 |
|
|
std::string nomsolution; |
88 |
|
|
int typeentite; |
89 |
francois |
375 |
std::vector<unsigned long> hash; |
90 |
|
|
int dim_solution; |
91 |
francois |
859 |
bool change_gauss; |
92 |
francois |
283 |
}; |
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
#endif |
97 |
|
|
|
98 |
|
|
|