~ubuntu-branches/ubuntu/trusty/scotch/trusty

« back to all changes in this revision

Viewing changes to src/scotch/gout_o.c

  • Committer: Bazaar Package Importer
  • Author(s): "Adam C. Powell, IV", Christophe Trophime, Adam C. Powell, IV
  • Date: 2010-12-29 13:07:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101229130719-jwalolw5d6av6wqx
Tags: 5.1.11.dfsg-1
[Christophe Trophime]
* New upstream release
* Forward-ported patches to version 5.1.10b.
* Install scotch headers properly.
* Fix chrpath commands in debian/rules.
* Fix (pt)scotch library install paths.
* Fix lintian errors and warnings.

[Adam C. Powell, IV]
* Forward-ported patches to version 5.1.11.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
/**                # Version 5.0  : from : 25 may 2007     **/
54
54
/**                                 to     18 jun 2007     **/
55
55
/**                # Version 5.1  : from : 25 oct 2007     **/
56
 
/**                                 to     01 mar 2008     **/
 
56
/**                                 to     15 aug 2010     **/
57
57
/**                                                        **/
58
58
/************************************************************/
59
59
 
462
462
  for (vertnum = 0; vertnum < grafptr->vertnbr; vertnum ++) {
463
463
    colnum = (mapptr->labltab[vertnum] == ~0) ? vertnum : mapptr->labltab[vertnum];
464
464
 
465
 
    fprintf (stream, "%ld\n", (long) colnum);     /* Set column value */
 
465
    fprintf (stream, SCOTCH_NUMSTRING "\n",       /* Set column value */
 
466
             (SCOTCH_Num) colnum);
466
467
    memset (nonztab, 0, (colnum + 2) * sizeof (SCOTCH_Num));
467
468
    for (edgeptr = grafptr->edgetab + grafptr->verttab[colnum];
468
469
         edgeptr < grafptr->edgetab + grafptr->vendtab[colnum]; edgeptr ++) {
474
475
      if (nonztab[nonzfrst] != 0) {               /* A non-zero has been found */
475
476
        for (nonzlast = nonzfrst; nonztab[nonzlast] != 0; nonzlast ++) ;
476
477
        if ((nonzlast - nonzfrst) > 1)            /* Draw row block coefficient */
477
 
          fprintf (stream, "%ld %ld b\n", (long) nonzfrst, (long) (nonzlast - nonzfrst));
 
478
          fprintf (stream, SCOTCH_NUMSTRING " " SCOTCH_NUMSTRING " b\n",
 
479
                   (SCOTCH_Num) nonzfrst,
 
480
                   (SCOTCH_Num) (nonzlast - nonzfrst));
478
481
        else
479
 
          fprintf (stream, "%ld c\n", (long) nonzfrst);
 
482
          fprintf (stream, SCOTCH_NUMSTRING " c\n",
 
483
                   (SCOTCH_Num) nonzfrst);
480
484
        nonzfrst = nonzlast - 1;
481
485
      }
482
486
    }
830
834
 
831
835
  fprintf (stream, "(nodes\n");                   /* Write node list */
832
836
  for (vertnum = 0; vertnum < (grafptr->vertnbr - 1); vertnum ++)
833
 
    fprintf (stream, "%ld%c",
834
 
             (long) (vertnum + grafptr->baseval),
 
837
    fprintf (stream, SCOTCH_NUMSTRING "%c",
 
838
             (SCOTCH_Num) (vertnum + grafptr->baseval),
835
839
             ((vertnum & 7) == 7) ? '\n' : '\t');
836
 
  fprintf (stream, "%ld)\n",
837
 
           (long) (vertnum + grafptr->baseval));
 
840
  fprintf (stream, SCOTCH_NUMSTRING ")\n",
 
841
           (SCOTCH_Num) (vertnum + grafptr->baseval));
838
842
 
839
843
  edgetax = grafptr->edgetab - grafptr->baseval;
840
844
  for (vertnum = 0, edgeidx = grafptr->baseval; vertnum < grafptr->vertnbr; vertnum ++) {
849
853
      if (vertend <= vertnum)                     /* True even if baseval=1 and as vertnum unbased */
850
854
        continue;
851
855
 
852
 
      fprintf (stream, "(edge %ld\t%ld\t%ld)\n",
853
 
               (long) (edgeidx ++),
854
 
               (long) (vertnum + grafptr->baseval),
855
 
               (long) vertend);
 
856
      fprintf (stream, "(edge " SCOTCH_NUMSTRING "\t" SCOTCH_NUMSTRING "\t" SCOTCH_NUMSTRING ")\n",
 
857
               (SCOTCH_Num) (edgeidx ++),
 
858
               (SCOTCH_Num) (vertnum + grafptr->baseval),
 
859
               (SCOTCH_Num) vertend);
856
860
    }
857
861
  }
858
862
 
861
865
  for (vertnum = 0; vertnum < grafptr->vertnbr; vertnum ++) {
862
866
    if (vertnum == (grafptr->vertnbr - 1))
863
867
      c = ')';
864
 
    fprintf (stream, "(node %ld\t\"(%lf,%lf,%lf)\")%c",
865
 
             (long) (vertnum + grafptr->baseval),
 
868
    fprintf (stream, "(node " SCOTCH_NUMSTRING "\t\"(%lf,%lf,%lf)\")%c",
 
869
             (SCOTCH_Num) (vertnum + grafptr->baseval),
866
870
             (double) geomptr->verttab[vertnum].x,
867
871
             (double) geomptr->verttab[vertnum].y,
868
872
             (double) geomptr->verttab[vertnum].z,
877
881
      if (vertnum == (grafptr->vertnbr - 1))
878
882
        c = ')';
879
883
      outColorColor (mapptr->labltab[vertnum], color);
880
 
      fprintf (stream, "(node %ld \"(%d,%d,%d,255)\")%c",
881
 
               (long) (vertnum + grafptr->baseval),
 
884
      fprintf (stream, "(node " SCOTCH_NUMSTRING " \"(%d,%d,%d,255)\")%c",
 
885
               (SCOTCH_Num) (vertnum + grafptr->baseval),
882
886
               (int) (color[0] * 255.0),
883
887
               (int) (color[1] * 255.0),
884
888
               (int) (color[2] * 255.0),
920
924
          distmin = distval;
921
925
      }
922
926
      distmin = sqrt (distmin) * (0.5 * O_TULMESHDISKRATIO);
923
 
      fprintf (stream, "(node %ld \"(%lf,%lf,%lf)\")%c",
924
 
               (long) (vertnum + grafptr->baseval),
 
927
      fprintf (stream, "(node " SCOTCH_NUMSTRING " \"(%lf,%lf,%lf)\")%c",
 
928
               (SCOTCH_Num) (vertnum + grafptr->baseval),
925
929
               distmin, distmin, distmin, c);
926
930
    }
927
931
    fprintf (stream, "\n");