~ubuntu-branches/ubuntu/lucid/igraph/lucid

« back to all changes in this revision

Viewing changes to src/DensityGrid_3d.h

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Malaterre
  • Date: 2009-11-16 18:12:42 UTC
  • Revision ID: james.westby@ubuntu.com-20091116181242-mzv9p5fz9uj57xd1
Tags: upstream-0.5.3
ImportĀ upstreamĀ versionĀ 0.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __DENSITY_GRID_H__
 
2
#define __DENSITY_GRID_H__
 
3
 
 
4
 
 
5
// Compile time adjustable parameters
 
6
 
 
7
 
 
8
#include <deque>
 
9
 
 
10
using namespace std;
 
11
 
 
12
#include "drl_layout_3d.h"
 
13
#include "drl_Node_3d.h"
 
14
#ifdef MUSE_MPI
 
15
  #include <mpi.h>
 
16
#endif
 
17
 
 
18
namespace drl3d {
 
19
 
 
20
class DensityGrid {
 
21
 
 
22
public:
 
23
  
 
24
          // Methods
 
25
          void Init();
 
26
          void Subtract(Node &n, bool first_add, bool fine_first_add, bool fineDensity);
 
27
          void Add(Node &n, bool fineDensity );
 
28
          float GetDensity(float Nx, float Ny, float Nz, bool fineDensity);
 
29
 
 
30
          // Contructor/Destructor
 
31
          DensityGrid() {};
 
32
          ~DensityGrid();
 
33
 
 
34
private:
 
35
 
 
36
          // Private Members
 
37
          void Subtract( Node &N );
 
38
          void Add( Node &N );
 
39
          void fineSubtract( Node &N );
 
40
          void fineAdd( Node &N );
 
41
 
 
42
          // new dynamic variables -- SBM
 
43
          float (*fall_off)[RADIUS*2+1][RADIUS*2+1];
 
44
          float (*Density)[GRID_SIZE][GRID_SIZE];
 
45
          deque<Node> (*Bins)[GRID_SIZE][GRID_SIZE];
 
46
 
 
47
          // old static variables
 
48
          //float fall_off[RADIUS*2+1][RADIUS*2+1];
 
49
          //float Density[GRID_SIZE][GRID_SIZE];
 
50
          //deque<Node *> Bins[GRID_SIZE][GRID_SIZE];
 
51
};
 
52
 
 
53
} // namespace drl3d
 
54
 
 
55
#endif // __DENSITY_GRID_H__
 
56