ESyS-Particle  2.3
Frac.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __FRAC_H
14 #define __FRAC_H
15 
16 #include "graph.h"
17 #include <map>
18 #include <set>
19 #include <iostream>
20 #include <string>
21 
22 using std::map;
23 using std::multimap;
24 using std::set;
25 using std::ostream;
26 using std::string;
27 
28 class Frac
29 {
30  private:
31  multimap<int,int> m_old_grain_map;
32  multimap<int,int> m_new_grain_to_particle_map;
33  map<int,int> m_new_grain_map;
34  map<int,set<int> > m_grain_to_grain_map;
35  map<int,int> m_tag_map;
36  map<int,double> m_old_grain_mass_map;
37  map<int,double> m_new_grain_mass_map;
38 
39  map<int,Vec3> get_move_vectors(const Graph&);
40  map<int,double> get_grain_mass(const Graph&);
41 
42  public:
43  Frac(const Graph&, const Graph&);
44 
45  void writeMassRatio(ostream&,double);
46  int writeAllMass(ostream&,double,int,bool with_tag=false);
47  void writeAsVtk(const string&,float,const Graph&,bool);
48  pair<double,double> getSplitAbrasion(Graph&, double,double);
49 };
50 #endif //__FRAC_H
Definition: Frac.h:28
pair< double, double > getSplitAbrasion(Graph &, double, double)
Definition: Frac.cpp:364
Graph class, partially based on Sedgewick, "Alg. in C++", progs. 17.1, 17.9 and 17.10.
Definition: graph.h:63
void writeMassRatio(ostream &, double)
Definition: Frac.cpp:83
int writeAllMass(ostream &, double, int, bool with_tag=false)
Definition: Frac.cpp:111
map< int, set< int > > m_grain_to_grain_map
Definition: Frac.h:34
map< int, double > m_old_grain_mass_map
Definition: Frac.h:36
map< int, double > m_new_grain_mass_map
Definition: Frac.h:37
Frac(const Graph &, const Graph &)
Definition: Frac.cpp:26
void writeAsVtk(const string &, float, const Graph &, bool)
Definition: Frac.cpp:158
map< int, int > m_new_grain_map
Definition: Frac.h:33
map< int, double > get_grain_mass(const Graph &)
Definition: Frac.cpp:340
multimap< int, int > m_new_grain_to_particle_map
Definition: Frac.h:32
map< int, Vec3 > get_move_vectors(const Graph &)
Definition: Frac.cpp:294
map< int, int > m_tag_map
Definition: Frac.h:35
multimap< int, int > m_old_grain_map
Definition: Frac.h:31