You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
703 B
C
38 lines
703 B
C
#include <stdio.h>
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
#include "genlib.h"
|
|
#include "geostat.h"
|
|
|
|
/*readfile */
|
|
/* read in the file "filename" the vector values of a */
|
|
/* realization_mod variable */
|
|
/* filename: explicit */
|
|
/* realin: structure defining a realization */
|
|
|
|
void readfile_bin(string filename, struct realization_mod *realin)
|
|
{
|
|
FILE *fp;
|
|
int i;
|
|
double prout;
|
|
|
|
printf("readfile_bin\n");
|
|
|
|
/*read the permeability realization*/
|
|
|
|
|
|
fp = fopen(filename, "r");
|
|
|
|
for (i=0;i<(*realin).n;i++)
|
|
{
|
|
fread(&prout,sizeof(double),1,fp);
|
|
printf("Prout: %15.10f\n",prout);
|
|
}
|
|
|
|
fclose(fp);
|
|
return;
|
|
}
|