aboutsummaryrefslogtreecommitdiff
path: root/src/AmrNode.hh
blob: 8cf4d7b01582911d5b3906c7b51b5a3d57863771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef __AMRNODE_HH_
#define __AMRNODE_HH_

//#include "config.h"
#include "Bounds.hh"
#include "IO.hh"

struct sPoint { double x,y,z; };
union pPoint {
  double array[3];
  sPoint cartesian;
};

struct AmrNode {
  pPoint location;
  struct AmrNode *parent,*child;
  int index;
  int gridID;
  int level;
  float *data;
  /*
   IObase::DataType datatype;
   union {
     void *vdata;
     float *fdata;
     double *ddata;
     int *idata;
     char *cdata;
     short *sdata;
  }; */
  // DATATYPE data; 
  // my local ref to data... 
  // The grid is going to need the smarts to assign this...
  // So data segment length is important.  
  // Or we need a struct with a copy operator
  void setIndex(int i){
    index=i;
    if(parent) parent->setIndex(i);
  }
};

#endif