Changeset 12440
- Timestamp:
- 06/18/12 08:48:43 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/shared
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
r12437 r12440 171 171 int noerr=1; 172 172 int i,j,k,ipt,jpt,irow,icol,ipiv,ncol; 173 int (*pivrc)[2],*pindx;173 int *pivrc1,*pivrc2,*pindx; 174 174 double pivot,det,dtemp; 175 175 … … 217 217 } 218 218 219 pivrc [i][0]=irow;220 pivrc [i][1]=icol;219 pivrc1[i]=irow; 220 pivrc2[i]=icol; 221 221 222 222 ipiv=icol; … … 308 308 j=(nrow-1)-i; 309 309 310 if (pivrc [j][0] != pivrc[j][1]) {311 irow=pivrc [j][0];312 icol=pivrc [j][1];310 if (pivrc1[j] != pivrc2[j]) { 311 irow=pivrc1[j]; 312 icol=pivrc2[j]; 313 313 314 314 // _printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n", … … 330 330 xfree((void**)&pivrc); 331 331 xDelete<int>(pindx); 332 333 332 return noerr; 334 333 }/*}}}*/ -
issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
r12437 r12440 61 61 62 62 /*ok, grab the option string: */ 63 outstring= (char*)xmalloc((strlen(strings[found])+1)*sizeof(char));63 outstring=xNew<char>(strlen(strings[found])+1); 64 64 strcpy(outstring,strings[found]); 65 65 -
issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
r12086 r12440 3 3 */ 4 4 #include "./trimesh.h" 5 5 #include "../Alloc/xNewDelete.h" 6 6 #include "../Alloc/alloc.h" 7 7 … … 52 52 53 53 /*Go through all nodes of the rift segments, and start splitting the mesh: */ 54 flags= (int*)xcalloc(nods,sizeof(int)); //to make sure we don't split the same nodes twice!54 flags=xNewInit<int>(nods,0); //to make sure we don't split the same nodes twice! 55 55 for (i=0;i<nriftsegs;i++){ 56 56 for (j=0;j<2;j++){ -
issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
r12436 r12440 129 129 130 130 /*Allocate segmentflags: */ 131 riftsegments_uncompressed= (int*)xcalloc(nsegs*5,sizeof(int));131 riftsegments_uncompressed=xNewInit<int>(nsegs*5,0); 132 132 133 133 /*Find the segments that belong to a rift: they are the ones that see two elements. The other ones belong to a boundary
Note:
See TracChangeset
for help on using the changeset viewer.