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

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

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

revision 709 by johnpye, Wed Jun 28 16:28:57 2006 UTC revision 710 by johnpye, Thu Jun 29 08:53:37 2006 UTC
# Line 374  real64 relman_eval(struct rel_relation * Line 374  real64 relman_eval(struct rel_relation *
374    real64 res;    real64 res;
375    assert(calc_ok!=NULL && rel!=NULL);    assert(calc_ok!=NULL && rel!=NULL);
376    
377      /*
378        token relations
379      */
380    if( rel->type == e_rel_token ){    if( rel->type == e_rel_token ){
381      if(!RelationCalcResidualBinary(      if(!RelationCalcResidualBinary(
382              GetInstanceRelationOnly(IPTR(rel->instance))              GetInstanceRelationOnly(IPTR(rel->instance))
# Line 383  real64 relman_eval(struct rel_relation * Line 386  real64 relman_eval(struct rel_relation *
386        rel_set_residual(rel,res);        rel_set_residual(rel,res);
387        return res;        return res;
388      }      }
     /* else we don't care -- go on to the old handling which is reasonably correct, if slow. */  
389    }    }
390    
391    CONSOLE_DEBUG("EVALUATE REL = %p",rel);    if(rel->nodeinfo){
392        CONSOLE_DEBUG("ABOUT TO CALL EXTREL_EVALUATE_RESIDUAL");
393        CONSOLE_DEBUG("REL_RELATION = %p",rel);
394        *calc_ok = 1;
395        res = ExtRel_Evaluate_Residual(rel);
396        return res;
397      }
398    
399      /*
400        other types of relations (which include...). This latter approach is
401        apparently older and "reasonably correct, if slow".
402      */
403      CONSOLE_DEBUG("EVALUATE REL_RELATION = %p",rel);
404    if(safe){    if(safe){
405      *calc_ok = (int32)RelationCalcResidualSafe(rel_instance(rel),&res);      *calc_ok = (int32)RelationCalcResidualSafe(rel_instance(rel),&res);
406      safe_error_to_stderr( (enum safe_err *)calc_ok );      safe_error_to_stderr( (enum safe_err *)calc_ok );

Legend:
Removed from v.709  
changed lines
  Added in v.710

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