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.
simulacion-permeabilidad/fftma_module/gen/lib_src/generate.c

28 lines
695 B
C

#include "geostat.h"
#include <math.h>
#include <stdlib.h>
#include <time.h>
/* GENERATION OF A GAUSSIAN WHITE NOISE VECTOR */
/*input: */
/* seed: seed */
/* n: number of components in the vector */
/*output: */
/* realization: structure defining the realization*/
void generate(long* seed, int n, struct realization_mod* realization) {
int i;
long idum2 = 123456789, iy = 0;
int iset = 0;
/*negative seed*/
if (*seed > 0.0)
*seed = -(*seed);
/*realization definition*/
(*realization).n = n;
(*realization).code = 0;
}