[25834] | 1 | Index: ../trunk-jpl/src/c/modules/Trianglex/Trianglex.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/modules/Trianglex/Trianglex.cpp (revision 25558)
|
---|
| 4 | +++ ../trunk-jpl/src/c/modules/Trianglex/Trianglex.cpp (revision 25559)
|
---|
| 5 | @@ -41,12 +41,12 @@
|
---|
| 6 |
|
---|
| 7 | /*Create initial triangulation to call triangulate(). First number of points:*/
|
---|
| 8 | in.numberofpoints=0;
|
---|
| 9 | - for (Object* & object : domain->objects){
|
---|
| 10 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 11 | + for (i=0;i<domain->Size();i++){
|
---|
| 12 | + contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i);
|
---|
| 13 | in.numberofpoints+=contour->nods-1;
|
---|
| 14 | }
|
---|
| 15 | - for (Object* & object : rifts->objects){
|
---|
| 16 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 17 | + for (i=0;i<rifts->Size();i++){
|
---|
| 18 | + contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i);
|
---|
| 19 | in.numberofpoints+=contour->nods;
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | @@ -57,8 +57,8 @@
|
---|
| 23 | in.pointlist = xNew<REAL>(in.numberofpoints*2);
|
---|
| 24 |
|
---|
| 25 | counter=0;
|
---|
| 26 | - for (Object* & object : domain->objects){
|
---|
| 27 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 28 | + for (i=0;i<domain->Size();i++){
|
---|
| 29 | + contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i);
|
---|
| 30 | for (j=0;j<contour->nods-1;j++){
|
---|
| 31 | in.pointlist[2*counter+0]=contour->x[j];
|
---|
| 32 | in.pointlist[2*counter+1]=contour->y[j];
|
---|
| 33 | @@ -65,8 +65,8 @@
|
---|
| 34 | counter++;
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | - for (Object* & object : rifts->objects){
|
---|
| 38 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 39 | + for (i=0;i<rifts->Size();i++){
|
---|
| 40 | + contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i);
|
---|
| 41 | for (j=0;j<contour->nods;j++){
|
---|
| 42 | in.pointlist[2*counter+0]=contour->x[j];
|
---|
| 43 | in.pointlist[2*counter+1]=contour->y[j];
|
---|
| 44 | @@ -84,12 +84,12 @@
|
---|
| 45 |
|
---|
| 46 | /*Build segments. First figure out number of segments: holes and closed outlines have as many segments as vertices: */
|
---|
| 47 | in.numberofsegments=0;
|
---|
| 48 | - for (Object* & object : domain->objects){
|
---|
| 49 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 50 | + for (i=0;i<domain->Size();i++){
|
---|
| 51 | + contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i);
|
---|
| 52 | in.numberofsegments+=contour->nods-1;
|
---|
| 53 | }
|
---|
| 54 | - for (Object* & object : rifts->objects){
|
---|
| 55 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 56 | + for(i=0;i<rifts->Size();i++){
|
---|
| 57 | + contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i);
|
---|
| 58 | /*for rifts, we have one less segment as we have vertices*/
|
---|
| 59 | in.numberofsegments+=contour->nods-1;
|
---|
| 60 | }
|
---|
| 61 | @@ -98,8 +98,8 @@
|
---|
| 62 | in.segmentmarkerlist = xNewZeroInit<int>(in.numberofsegments);
|
---|
| 63 | counter=0;
|
---|
| 64 | backcounter=0;
|
---|
| 65 | - for (Object* & object : domain->objects){
|
---|
| 66 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 67 | + for (i=0;i<domain->Size();i++){
|
---|
| 68 | + contour=(Contour<IssmPDouble>*)domain->GetObjectByOffset(i);
|
---|
| 69 | for (j=0;j<contour->nods-2;j++){
|
---|
| 70 | in.segmentlist[2*counter+0]=counter;
|
---|
| 71 | in.segmentlist[2*counter+1]=counter+1;
|
---|
| 72 | @@ -114,8 +114,8 @@
|
---|
| 73 | backcounter=counter;
|
---|
| 74 | }
|
---|
| 75 | counter2=counter;
|
---|
| 76 | - for (Object* & object : rifts->objects){
|
---|
| 77 | - contour=(Contour<IssmPDouble>*)object;
|
---|
| 78 | + for (i=0;i<rifts->Size();i++){
|
---|
| 79 | + contour=(Contour<IssmPDouble>*)rifts->GetObjectByOffset(i);
|
---|
| 80 | for (j=0;j<(contour->nods-1);j++){
|
---|
| 81 | in.segmentlist[2*counter2+0]=counter;
|
---|
| 82 | in.segmentlist[2*counter2+1]=counter+1;
|
---|