Changeset 9386
- Timestamp:
- 08/23/11 11:23:32 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r9374 r9386 31 31 double *pressureload = NULL; 32 32 double *elements_type = NULL; 33 double *thickness = NULL;34 double *bed = NULL;35 33 double *nodeoniceshelf = NULL; 36 34 double *riftinfo = NULL; … … 65 63 /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the nodes 66 64 * referenced by a certain load must belong to the cluster node): */ 65 iomodel->FetchData(3,PressureloadEnum,ThicknessEnum,BedEnum); 67 66 iomodel->FetchData(&pressureload,&numberofpressureloads,NULL,PressureloadEnum); 68 67 iomodel->FetchData(&elements_type,NULL,NULL,ElementsTypeEnum); 69 iomodel->FetchData(&thickness,NULL,NULL,ThicknessEnum);70 iomodel->FetchData(&bed,NULL,NULL,BedEnum);71 68 72 69 /*Initialize counter: */ … … 125 122 126 123 /*Free data: */ 124 iomodel->DeleteData(3,PressureloadEnum,ThicknessEnum,BedEnum); 125 xfree((void**)&elements_type); 127 126 xfree((void**)&pressureload); 128 xfree((void**)&elements_type);129 xfree((void**)&thickness);130 xfree((void**)&bed);131 127 132 128 /*create penalties for nodes on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy */ -
issm/trunk/src/c/objects/IoModel.cpp
r9381 r9386 71 71 delete this->constants; 72 72 73 for(int i=0;i<MaximumNumberOfEnums;i++) xfree((void**)&this->data[i]); 73 /*Some checks in debugging mode*/ 74 #ifdef _ISSM_DEBUG_ 75 for(int i=0;i<MaximumNumberOfEnums;i++){ 76 if(this->data[i]){ 77 _printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i)); 78 } 79 } 80 #endif 81 74 82 xfree((void**)&this->data); 75 83 … … 489 497 490 498 dataenum=va_arg(ap, int); 499 500 /*Some checks in debugging mode*/ 501 /*{{{*/ 502 #ifdef _ISSM_DEBUG_ 491 503 _assert_(dataenum<MaximumNumberOfEnums); 492 _assert_(!this->data[dataenum]); 504 if(this->data[dataenum]){ 505 _error_("Info: trying to fetch %s but previous pointer has not been freed (DeleteData has not been called)",EnumToStringx(dataenum)); 506 } 507 #endif 508 /*}}}*/ 493 509 494 510 this->FetchData(&matrix,&M,&N,dataenum); -
issm/trunk/src/c/objects/Loads/Icefront.cpp
r9362 r9386 64 64 segment_width=6; 65 65 } 66 _assert_(iomodel->f(PressureloadEnum)); 66 67 element=(int)(*(iomodel->f(PressureloadEnum)+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill) 67 68
Note:
See TracChangeset
for help on using the changeset viewer.