forked from jhamman/DHSVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InitSedMap.c
executable file
·34 lines (30 loc) · 1002 Bytes
/
InitSedMap.c
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
/*
* SUMMARY: InitSedMap() - Initialize sediment grid
* USAGE: Part of DHSVM
*
* AUTHOR: Nathalie Voisin
* ORG: University of Washington, Department of Civil Engineering
* E-MAIL: [email protected]
* ORIG-DATE: Oct-11 2006
* DESCRIPTION: Initialize sediment grid when sediment options is on
* DESCRIP-END.
* FUNCTIONS: InitSedMap()
* COMMENTS:
*/
#include <stdio.h>
#include <stdlib.h>
#include "data.h"
#include "DHSVMerror.h"
/*****************************************************************************
InitSedMap()
*****************************************************************************/
void InitSedMap(MAPSIZE *Map, SEDPIX *** SedMap )
{
int y; /* Counters */
if (!(*SedMap = (SEDPIX **) calloc(Map->NY, sizeof(SEDPIX *))))
ReportError("InitSedMap", 1);
for (y = 0; y < Map->NY; y++) {
if (!((*SedMap)[y] = (SEDPIX *) calloc(Map->NX, sizeof(SEDPIX))))
ReportError("InitSedMap", 1);
}
}