Changeset 081f5e9 in git for Singular


Ignore:
Timestamp:
Nov 29, 2021, 7:40:35 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
90a388e1fb12d58cc5fbfdc8d3b8aadef7614f29
Parents:
1fb20e9245aa094bd5f9aceb554d08c4af44d72f
Message:
fix: tropical.lib: test results of external programs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tropical.lib

    r1fb20e r081f5e9  
    11////////////////////////////////////////////////////////////////////////////////
    2 version="version tropical.lib 4.2.1.1 Jul_2021 ";
     2version="version tropical.lib 4.2.1.2 Nov_2021 ";
    33category="Tropical Geometry";
    44info="
     
    589589        // from LIFTRING are present,
    590590        // and where also the variables of CUTDOWNRING live
    591         list RL=ring_list(LIFTRING);
    592         list RL2=ring_list(CUTDOWNRING);
    593         RL[2]=RL2[2];
    594         RL[3]=list(list("dp",1:nvars(CUTDOWNRING)));
     591        list RL=ring_list(LIFTRING);
     592        list RL2=ring_list(CUTDOWNRING);
     593        RL[2]=RL2[2];
     594        RL[3]=list(list("dp",1:nvars(CUTDOWNRING)));
    595595        ring REPLACEMENTRING = ring(RL);
    596596        list repl=imap(CUTDOWNRING,repl); // get the replacement rules
     
    41274127        variablen=0;
    41284128        j2=0;
    4129         VARIABLEN=list();
     4129        VARIABLEN=list();
    41304130        for(j1=1;j1<=nvars(basering)-1;j1++)
    41314131        {
     
    41414141            variablen=variablen+var(j1); // read the set of remaining variables
    41424142                                         // (needed to make quotring later)
    4143             VARIABLEN=VARIABLEN+list(RL[2][j1]);
     4143            VARIABLEN=VARIABLEN+list(RL[2][j1]);
    41444144          }
    41454145        }
    41464146        // return pideal, the initial and the list ergl which tells us
    41474147        // which variables we replaced by which form
    4148         RL=ring_list(BASERING);
    4149         RL[2]=VARIABLEN+list("t");
     4148        RL=ring_list(BASERING);
     4149        RL[2]=VARIABLEN+list("t");
    41504150        RL[3]=list(list("dp",1:size(VARIABLEN)),list("lp",1:1));
    41514151        ring BASERINGLESS1 = ring(RL);
     
    46234623        if (charstr(basering)!="0")
    46244624        {
    4625           system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis");
    4626           system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
     4625          if (system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis"))
     4626          { ERROR("error in gfan_tropicalbasis");
     4627          if (system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
     4628          { ERROR("error in gfan_tropicalintersection");
    46274629        }
    46284630        else
     
    46304632//          system("sh","gfan_tropicalstartingcone < /tmp/gfaninput > /tmp/gfantropstcone");
    46314633//          system("sh","gfan_tropicaltraverse < /tmp/gfantropstcone > /tmp/gfanoutput");
    4632           system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis");
    4633           system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
     4634          if (system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis"))
     4635          { ERROR("error in gfan_tropicalbasis");
     4636          if (system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
     4637          { ERROR("error in gfan_tropicalintersection");
    46344638        }
    46354639        string trop=read("/tmp/gfanoutput");
     
    46664670      else
    46674671      {
    4668         system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput");
     4672        if(system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput"))
     4673        { ERROR("error in gfan_tropicallifting"); }
    46694674        // read the result from gfan and store it to a string,
    46704675        // which in a later version
     
    47564761    if (anzahlvariablen+numberdeletedvariables<nvars(basering))
    47574762    {
    4758       list l2; 
     4763      list l2;
    47594764      for (int zz = 1; zz <= (nvars(basering)-anzahlvariablen-numberdeletedvariables); zz++)
    47604765      {
     
    49544959      variablen=variablen+var(j);
    49554960    }
    4956     list l3; 
     4961    list l3;
    49574962    for (int zz = string(nvars(BASERING)-anzahlvariablen+1); zz <= string(nvars(BASERING)-anzahlvariablen+neuvar); zz++)
    49584963    {
     
    56935698            if (charstr(basering)!="0")
    56945699            {
    5695               system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis");
    5696               system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
     5700              if(system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis"))
     5701              { ERROR("error in gfan_tropicalbasis"); }
     5702              if(system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
     5703              { ERROR("error in gfan_tropicalintersection"); }
    56975704            }
    56985705            else
     
    57005707//      system("sh","gfan_tropicalstartingcone < /tmp/gfaninput > /tmp/gfantropstcone");
    57015708//      system("sh","gfan_tropicaltraverse < /tmp/gfantropstcone > /tmp/gfanoutput");
    5702               system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis");
    5703               system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
     5709              if(system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis"))
     5710              { ERROR("error in gfan_tropicalbasis"); }
     5711              if(system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
     5712              { ERROR("error in gfan_tropicalintersection"); }
    57045713            }
    57055714            string trop=read("/tmp/gfanoutput");
     
    57365745          else
    57375746          {
    5738             system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput");
     5747            if(system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput"))
     5748            { ERROR("error in gfan_tropicallifting"); }
    57395749            // read the result from gfan and store it to a string,
    57405750            // which in a later version
Note: See TracChangeset for help on using the changeset viewer.