Changeset 4059 in Sophya


Ignore:
Timestamp:
Apr 16, 2012, 7:25:59 PM (12 years ago)
Author:
ansari
Message:

Correction probleme limites de trace ds ucckprot.h et MAJ Makefile, cmv+reza 16/04/2012

Location:
trunk/SophyaPI/PI
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Makefile

    r3879 r4059  
    484484  pidrawer.h pigratt.h piaxes.h pieldrw.h pidrwtools.h pimenux.h \
    485485  pimenugen.h pioptmenux.h pioptmenugen.h piapplx.h piapplgen.h \
    486   pimenubarx.h pimenubargen.h piconsenum.h piaxestools.h
     486  pimenubarx.h pimenubargen.h piconsenum.h piaxestools.h ucckprot.h
    487487        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  piscdrawwdg.cc
    488488 
  • trunk/SophyaPI/PI/piaxes.cc

    r3562 r4059  
    533533//  Calcul du min et du max du display a partir des valeurs min et max a plotter
    534534{
     535  //DBG  cout << "**DBG*PIAxes::ReSizeMinMax(" << vmin << "," << vmax << "," << garde << ")" << endl;
    535536 if(garde<0. || garde>=1.) garde = 0.025;
    536537 // cout<<"ReSizeMinMax[log="<<axelog<<",garde="<<garde<<"] vmin="<<vmin<<" vmax="<<vmax<<endl;
     
    557558 }
    558559
    559  // cout<<"           vmin="<<vmin<<" vmax="<<vmax<<endl;
     560 //DBG cout<<"           vmin="<<vmin<<" vmax="<<vmax<<endl;
    560561}
    561562
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r3480 r4059  
    1313#include "piaxestools.h"
    1414
    15 #define PETIT_DBLE 1.e-100
    16 #define PREC_DBLE  1.e-16
    17 
     15#include "ucckprot.h"
    1816
    1917//++
     
    180178                       int axrl, int ayud, bool tmp)
    181179{
    182 //  if (xmax <= xmin || ymax <= ymin) {
    183 //    cerr << "PIScDrawWdg::SetLimits() Error - xmax <= xmin or ymax <= ymin !" << endl;
    184 //    return;
    185 //    }
    186   double xym;
    187   xym = fabs(xmax+xmin); xym = (xym > PETIT_DBLE) ? xym : PETIT_DBLE;
    188   if ((xmax-xmin)/xym < PREC_DBLE) { xmin = xmin - PREC_DBLE/2.*xym;  xmax = xmin + PREC_DBLE*xym; }
    189   xym = fabs(ymax+ymin); xym = (xym > PETIT_DBLE) ? xym : PETIT_DBLE;
    190   if ((ymax-ymin)/xym < PREC_DBLE) { ymin = ymin - PREC_DBLE/2.*xym;  ymax = ymin + PREC_DBLE*xym; }
     180  UC_CheckMinMaxDiff(xmin,xmax);
     181  UC_CheckMinMaxDiff(ymin,ymax);
    191182
    192183  SetDefaultDrawerLimits(xmin, xmax, ymin, ymax, axrl, ayud);
  • trunk/SophyaPI/PI/piversion.h

    r3736 r4059  
    22#define PIVERSION_H_SEEN
    33
    4 #define PI_VERSIONNUMBER  4.20
     4#define PI_VERSIONNUMBER  4.25
    55
    66#endif
  • trunk/SophyaPI/PI/smakefile

    r3879 r4059  
    484484  pidrawer.h pigratt.h piaxes.h pieldrw.h pidrwtools.h pimenux.h \
    485485  pimenugen.h pioptmenux.h pioptmenugen.h piapplx.h piapplgen.h \
    486   pimenubarx.h pimenubargen.h piconsenum.h piaxestools.h
     486  pimenubarx.h pimenubargen.h piconsenum.h piaxestools.h ucckprot.h
    487487        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  piscdrawwdg.cc
    488488 
  • trunk/SophyaPI/PI/ucckprot.h

    r4052 r4059  
    1313#endif
    1414
    15 //define PETIT_DBLE 1.e-39
    16 //define PREC_DBLE  1.e-5
    17 //define PROT_DBLE  1.e-19
    1815#define PETIT_DBLE 1.e-85
    1916// qque probleme sur le trace - J'augmente les marges - Reza 14/5/2002
     
    2118#define PREC_DBLE  1.e-14
    2219#define MINRAP_DBLE  1.e-12
    23 #define PROT_DBLE_MIN  1.e-100
    24 #define PROT_DBLE_MAX  1.e+100
     20// Avril 2012 (cmv+reza) : on passe les limites de protection double de 1e+/-100 a 1e+/-250
     21#define PROT_DBLE_MIN  1.e-250
     22#define PROT_DBLE_MAX  1.e+250
    2523
    2624inline double UC_LimitProtectDouble(double x)
     
    4240  bool rc = false;
    4341  double xym,xym2;
     42  if (xmax<xmin) xmax=xmin;
    4443  xym = fabs(xmax);
    4544  xym2 = fabs(xmin);
     
    4746  if (xym < PETIT_DBLE) xym = PETIT_DBLE;
    4847  if ((xmax-xmin) < MINRAP_DBLE*xym) {
    49     xmin -= MINRAP_DBLE*xym*0.5;  xmax = xmin+MINRAP_DBLE*xym;
    50     //cerr<<" DBG-CheckMinMaxDiff: xmin,max="<<xmin<<","<<xmax<<" xym="<<xym<<" diff="<<xmax-xmin<<endl;
     48    //    printf("UC_CheckMinMaxDiff_Debug: xmin=%.15e xmax=%.15e diff=%.15e \n",xmin,xmax,xmax-xmin);
     49    xmin -= MINRAP_DBLE*xym*0.5;  xmax += MINRAP_DBLE*xym*0.5;; // xmax = xmin+MINRAP_DBLE*xym;
     50    //    printf(" ...Changed to --> xmin=%.15e xmax=%.15e diff=%.15e \n",xmin,xmax,xmax-xmin);
    5151    rc = true;
    5252  }
Note: See TracChangeset for help on using the changeset viewer.