Changeset 5527


Ignore:
Timestamp:
Jul 18, 2008, 11:33:51 AM (11 years ago)
Author:
ole
Message:

Checked in debug information for urs_ext.c

Location:
anuga_core/source/anuga/shallow_water
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_data_manager.py

    r5485 r5527  
    62896289        assert allclose(yvelocity,va)
    62906290
    6291     def test_urs2stsI(self):
     6291    def test_urs2sts0(self):
    62926292        """
    62936293        Test single source
     
    88918891if __name__ == "__main__":
    88928892
    8893     suite = unittest.makeSuite(Test_Data_Manager,'test')
     8893    suite = unittest.makeSuite(Test_Data_Manager,'test_urs2sts0')
    88948894    #suite = unittest.makeSuite(Test_Data_Manager,'test_export_gridII')
    88958895#    suite = unittest.makeSuite(Test_Data_Manager,'test_screen_catcher')
  • anuga_core/source/anuga/shallow_water/urs_ext.c

    r5516 r5527  
    6262    int time;
    6363    int num_ts;
     64   
     65    printf("Checkpoint 1 for urs2sts_ext.c\n");
    6466
    6567    // Convert Python arguments to C
     
    104106    }
    105107
     108    printf("Checkpoint 2 for urs2sts_ext.c\n");   
    106109    for (i = 0; i < numSrc; i++)
    107110    {
     111        printf("Checkpoint 2.1 for urs2sts_ext.c\n");       
    108112        muxFileNameArray[i] = (char*)malloc((MAX_FILE_NAME_LENGTH + 1)*sizeof(char));
    109113       
     
    114118        }
    115119
     120        printf("Checkpoint 2.2 for urs2sts_ext.c\n");           
    116121        fname = PyList_GetItem(filenames, i);
     122        printf("Checkpoint 2.3 for urs2sts_ext.c\n");
     123                               
    117124        if (!PyString_Check(fname))
    118125        {
    119126            PyErr_SetString(PyExc_ValueError, "filename not a string");
    120         }
    121 
     127            return NULL;
     128        }
     129
     130        printf("Checkpoint 2.4 for urs2sts_ext.c\n");                   
    122131        muxFileNameArray[i] = PyString_AsString(fname);
    123132    }
    124133
     134    printf("Checkpoint 3 for urs2sts_ext.c\n");       
    125135    if (file_params->nd != 1 || file_params->descr->type_num != PyArray_DOUBLE)
    126136    {
     
    130140    }
    131141
     142    printf("Checkpoint 4 for urs2sts_ext.c\n");       
    132143    // Create array for weights which are passed to read_mux2
    133144    weights = (float*) malloc((int)numSrc*sizeof(float));
     
    137148    }
    138149   
     150    printf("Checkpoint 5 for urs2sts_ext.c\n");           
    139151    // Read in mux2 data from file
    140152    cdata = _read_mux2((int)numSrc, muxFileNameArray, weights, (double*)file_params->data, (int)verbose);
    141153
     154    printf("Checkpoint 6 for urs2sts_ext.c\n");               
    142155    // Allocate space for return vector
    143156    nsta0 = (int)*(double*)(file_params->data + 0*file_params->strides[0]);
     
    145158    nt = (int)*(double*)(file_params->data + 2*file_params->strides[0]);
    146159
     160    printf("Checkpoint 7 for urs2sts_ext.c\n");                   
    147161    // Find min and max start times of all gauges
    148162    start_tstep = nt + 1;
     
    160174    }
    161175
     176    printf("Checkpoint 8 for urs2sts_ext.c\n");                       
    162177    if ((start_tstep > nt) | (finish_tstep < 0))
    163178    {
     
    182197    }
    183198
     199    printf("Checkpoint 9 for urs2sts_ext.c\n");                           
    184200    // Each gauge begins and ends recording at different times. When a gauge is
    185201    // not recording but at least one other gauge is. Pad the non-recording gauge
     
    211227    }
    212228
     229    printf("Checkpoint 10 for urs2sts_ext.c\n");                               
    213230    free(weights);
    214231   
     
    225242    free(cdata);
    226243
     244    printf("Checkpoint 11 for urs2sts_ext.c\n");                                   
    227245    return  PyArray_Return(pydata);
    228246}
Note: See TracChangeset for help on using the changeset viewer.