ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/poly_occ/src/polycristal.cpp
(Generate patch)

Comparing poly_occ/src/polycristal.cpp (file contents):
Revision 983 by francois, Wed Oct 24 17:41:40 2018 UTC vs.
Revision 1007 by francois, Mon Mar 25 16:36:48 2019 UTC

# Line 4 | Line 4
4   #include "poly_point.h"
5  
6   #include <stdio.h>
7 #include <iostream>
7   #include <random>
8   #include <vector>
9  
10 < Polycristal::Polycristal(char* fichier):nomfichier("resultat.brep")
10 > Polycristal::Polycristal(char* fichier,double dgval):POLY_AFFICHE(),nomfichier("resultat.brep"),dg(dgval)
11   {
12      FILE *input = fopen(fichier, "rt");
13      char chaine[500];
# Line 16 | Line 15 | Polycristal::Polycristal(char* fichier):
15      int nb_point, nTetra;
16      sscanf(chaine,"%d %d", &nb_point, &nTetra);
17  
19    std::vector<Poly_Point*> list_points;
18      
19      for (int i=0; i<nb_point; i++)
20      {
# Line 29 | Line 27 | Polycristal::Polycristal(char* fichier):
27      }
28      fclose(input);
29  
30 <    Poly_Voro* voro = new Poly_Voro(list_points);
31 <    voro->fusion_noeuds();
34 <    Poly_Build_OCC build_occ(voro,nomfichier);
30 >  
31 >  
32   }
33  
34  
35 < Polycristal::Polycristal(std::vector<double> &listepoint,std::string nom):nomfichier(nom)
35 > Polycristal::Polycristal(std::vector<double> &listepoint,std::string nom,double dgval):POLY_AFFICHE(),nomfichier(nom),dg(dgval)
36   {
40    std::vector<Poly_Point*> list_points;
37      int nb_point=listepoint.size()/3.;
38      for (int i=0; i<nb_point; i++)
39      {
# Line 46 | Line 42 | Polycristal::Polycristal(std::vector<dou
42      }
43      
44  
49    Poly_Voro* voro = new Poly_Voro(list_points);
50    voro->fusion_noeuds();
51    Poly_Build_OCC build_occ(voro,nomfichier);
45   }
46  
47 < Polycristal::Polycristal(int nbParticules):nomfichier("resultat.brep")
47 > Polycristal::Polycristal(int nbParticules,double dgval):POLY_AFFICHE(),nomfichier("resultat.brep"),dg(dgval)
48   {
49 <  std::vector<Poly_Point*> list_points = random_particules(nbParticules);
50 <  Poly_Voro* voro = new Poly_Voro(list_points);
51 <  voro->fusion_noeuds();
52 <  Poly_Build_OCC build_occ(voro,nomfichier);
49 >  list_points = random_particules(nbParticules);
50 >
51 > }
52 >
53 >
54 > void Polycristal::construit(bool avecstep)
55 > {
56 >  Poly_Voro voro(list_points,dg);
57 >  if (affichageactif) voro.active_affichage(affiche2);
58 >  voro.construit();
59 >  voro.fusion_noeuds();
60 >  Poly_Build_OCC build_occ(&voro,nomfichier);
61 > if (affichageactif)  build_occ.active_affichage(affiche2);
62 > build_occ.construit(avecstep);
63   }
64  
65 +
66 +
67 + Polycristal::Polycristal(Polycristal& mdd)
68 + {
69 + }
70 +
71 +
72   Polycristal::~Polycristal()
73   {
74   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines