/[ascend]/trunk/base/generic/solver/logblock.c
ViewVC logotype

Diff of /trunk/base/generic/solver/logblock.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1694 by jpye, Mon Jun 11 08:05:50 2007 UTC revision 1695 by jpye, Wed Dec 26 08:23:08 2007 UTC
# Line 33  Line 33 
33    
34  #include "solver.h"  #include "solver.h"
35    
36  #define SLBPDEBUG 0 /* slv_log_block_partition debugging */  /* #define SLBPDEBUG *//* slv_log_block_partition debugging */
37    
38  /*  /*
39   * returns 0 if ok, OTHERWISE if madness detected.   * returns 0 if ok, OTHERWISE if madness detected.
40   */   */
41  int slv_log_block_partition(slv_system_t sys)  int slv_log_block_partition(slv_system_t sys)
42  {  {
43  #if SLBPDEBUG  #ifdef SLBPDEBUG
44    FILE *fp;    FILE *fp;
45  #endif  #endif
46    struct logrel_relation **lrp;    struct logrel_relation **lrp;
# Line 90  int slv_log_block_partition(slv_system_t Line 90  int slv_log_block_partition(slv_system_t
90    mtx_set_order(mtx,order);    mtx_set_order(mtx,order);
91    
92    if (slv_make_log_incidence_mtx(sys,mtx,&dvf,&lrf)) {    if (slv_make_log_incidence_mtx(sys,mtx,&dvf,&lrf)) {
93      ERROR_REPORTER_HERE(ASC_PROG_ERR,"failure in creating incidence matrix.");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"Failure in creating incidence matrix.");
94      mtx_destroy(mtx);      mtx_destroy(mtx);
95      return 1;      return 1;
96    }    }
# Line 110  int slv_log_block_partition(slv_system_t Line 110  int slv_log_block_partition(slv_system_t
110    }    }
111    if (ncol == nrow) {    if (ncol == nrow) {
112      if (ncol == rank) {      if (ncol == rank) {
113        ERROR_REPORTER_HERE(ASC_PROG_NOTE,"System of logical relations does not need Logic Inference.\n");        ERROR_REPORTER_HERE(ASC_PROG_NOTE,"System of logical relations does not require inference.\n");
114      }      }
115      if (ncol != rank) {      if (ncol != rank) {
116        ERROR_REPORTER_HERE(ASC_PROG_WARNING,"but ncol!=rank. Rank deficient?");        ERROR_REPORTER_HERE(ASC_PROG_WARNING,"but ncol!=rank. Rank deficient?");
# Line 138  int slv_log_block_partition(slv_system_t Line 138  int slv_log_block_partition(slv_system_t
138    d->reorder.basis_selection = 0;   /* none yet */    d->reorder.basis_selection = 0;   /* none yet */
139    d->reorder.block_reordering = 0;  /* none */    d->reorder.block_reordering = 0;  /* none */
140    
141  #if SLBPDEBUG  #ifdef SLBPDEBUG
142    fp = fopen("/tmp/sbp1.plot","w+");    fp = fopen("/tmp/sbp1.plot","w+");
143    if (fp !=NULL) {    if (fp !=NULL) {
144      mtx_write_region_plot(fp,mtx,mtx_ENTIRE_MATRIX);      mtx_write_region_plot(fp,mtx,mtx_ENTIRE_MATRIX);
# Line 199  int slv_log_block_partition(slv_system_t Line 199  int slv_log_block_partition(slv_system_t
199      }      }
200    }    }
201    
202  #if SLBPDEBUG  #ifdef SLBPDEBUG
203    fp = fopen("/tmp/sbp2.plot","w+");    fp = fopen("/tmp/sbp2.plot","w+");
204    if(fp !=NULL){    if(fp !=NULL){
205      mtx_write_region_plot(fp,mtx,mtx_ENTIRE_MATRIX);      mtx_write_region_plot(fp,mtx,mtx_ENTIRE_MATRIX);

Legend:
Removed from v.1694  
changed lines
  Added in v.1695

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22