postT.cpp~ 925 Bytes
Newer Older
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
#include <fstream>
#include  <iostream>
using namespace std;

long GetSizeVec(char* name){
  std::ifstream infile (name,ios_base::binary);
  long dim;
  infile.read((char *) &dim, sizeof(long int));
  return dim;
}
void LoadVec(char* name,double *pD)   
{
  std::ifstream infile (name,ios_base::binary);
  long int dim;
  infile.read((char *) &dim, sizeof(long int));
  double dtemp;
  for(long int i=0; i<dim; i++)
  {
   infile.read((char *) &dtemp, sizeof(double));
    *(pD++)=dtemp ;
  }
}


int main(){
  char filename[256];
  int N=100;
  double * pMaxTraj[14];
  double * pMinTraj[14];
  long size[14];
  for (int j=0;j<15;j++){
    sprtinf(filename,"../SAVE/u2d%i__rep_0",j);
    size[j]=GetSizeVec(filename);
    pMaxTraj[j]=(double *)malloc(size[j]*sizeof(double));
    pMinTraj[j]=(double *)malloc(size[j]*sizeof(double));
    
  }
  size[j]=GetSizeVec("../SAVE/u2d0__rep_0");
  for(int ii=0;ii<100;ii++){
  }

}