- Timestamp:
- 08/02/12 17:13:12 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage
- Property svn:mergeinfo changed
-
issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/VecPartition.cpp
r9320 r12878 56 56 57 57 if (range){ 58 node_rows= (int*)xmalloc(range*sizeof(int)); //this is the maximum number of rows one node can extract.58 node_rows=xNew<int>(range); //this is the maximum number of rows one node can extract. 59 59 60 60 count=0; … … 71 71 72 72 if (count){ 73 values= (double*)xmalloc(count*sizeof(double)); //holder for the values to be extracted from vectorA73 values=xNew<double>(count); //holder for the values to be extracted from vectorA 74 74 } 75 75 else{ 76 x free((void**)&node_rows); //count=0 means no values was condensed out for this node. null node_rows for use in VecGetValues.76 xDelete<int>(node_rows); //count=0 means no values was condensed out for this node. null node_rows for use in VecGetValues. 77 77 values=NULL; 78 78 } … … 110 110 VecAssemblyBegin(outvector); 111 111 VecAssemblyEnd(outvector); 112 113 112 } 114 113 115 114 /*Assign output pointers:*/ 116 115 *poutvector=outvector; 117 118 /*Free ressources:*/ 119 xfree((void**)&node_rows); 120 xfree((void**)&values); 121 116 xDelete<int>(node_rows); 117 xDelete<double>(values); 122 118 }
Note:
See TracChangeset
for help on using the changeset viewer.