swh:1:snp:bbee81fcdc4b36c131a8db323aa6b1ea43209e9a
Tip revision: 63c8e8a453ea587001e2438a8ce51cf0e1e1675c authored by Charles J. Geyer on 23 March 2009, 00:00:00 UTC
version 0.7-7
version 0.7-7
Tip revision: 63c8e8a
astorig.c
#include "aster.h"
#include "raster.h"
void aster_default_origin(int *nindin, int *nnodein, int *fam, double *result)
{
int nind = nindin[0];
int nnode = nnodein[0];
int i, j, k;
if (nind <= 0)
die("'nind' must be positive integer\n");
if (nnode <= 0)
die("'nnode' must be positive integer\n");
/* fam values are 1-origin indexing */
for (j = 0, k = 0; j < nnode; ++j) {
double foo = aster_family_origin(fam[j]);
for (i = 0; i < nind; ++i, ++k)
result[k] = foo;
}
}