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.
33 lines
785 B
C
33 lines
785 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"
|
|
|
|
/*writefile */
|
|
/* write in the file "filename" the vector values of a */
|
|
/* realization_mod variable */
|
|
/* filename: explicit */
|
|
/* realin: structure defining a realization */
|
|
|
|
void writefile(string filename, struct realization_mod *realin)
|
|
{
|
|
FILE *fp;
|
|
int i;
|
|
/* string filename;*/
|
|
/*struct realization_mod *realin;*/
|
|
|
|
|
|
/*save the permeability realization*/
|
|
fp = fopen(filename, "w");
|
|
/* printf("writefile.c : (*realin).vector[0] %f\n",(*realin).vector[0]); */
|
|
/* (*realin).vector[0]=1.1; */
|
|
for (i=0;i<(*realin).n;i++)
|
|
fprintf(fp,"%15.10f\n",(*realin).vector[i]);
|
|
fclose(fp);
|
|
return;
|
|
}
|