Changeset 504 for trunk/matml/src

Show
Ignore:
Timestamp:
11/30/2009 03:53:36 PM (2 years ago)
Author:
powell
Message:

Bug fix: eliminate old boundaries from view when they aren't needed.

Location:
trunk/matml/src/ternary
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/src/ternary/Ternary.c

    r501 r504  
    2020double T_iso=298., P=1., T_min=273., T_max=373.; 
    2121int P1_res=20, P2_res=20, T_steps=50, numpoints=462, refine=2, *verts=NULL; 
     22int max_boundaries=0; 
    2223gboolean spinodal_toggle [2]; 
    2324 
     
    151152          exit (i); } 
    152153 
    153       if (spinodal_toggle [0]) 
    154         if (i=GeomviewDisplayPhaseBoundary 
    155             (isotherm_geomview_pipe, "Spinodal 1", "spin", "-face +edge", 
    156              numpoints, vpoints, spinodals)) 
    157           { printf ("recalculate_and_display: Error %d in Geomview Display\n", i); 
    158             exit (i); } 
    159       if (spinodal_toggle [1]) 
    160         if (i=GeomviewDisplayPhaseBoundary 
    161             (isotherm_geomview_pipe, "Spinodal 2", "spin", "-face +edge", 
    162              numpoints, vpoints, spinodals)) 
    163           { printf ("recalculate_and_display: Error %d in Geomview Display\n", i); 
    164             exit (i); } 
    165  
    166       for (i=0; i<numbounds; i++) 
     154      if (i=GeomviewDisplayPhaseBoundary 
     155          (isotherm_geomview_pipe, "Spinodal 1", "spin1", "-face +edge", 
     156           numpoints, vpoints, spinodal_toggle[0] ? spinodals : NULL)) 
     157        { printf ("recalculate_and_display: Error %d in Geomview Display\n", i); 
     158          exit (i); } 
     159      if (i=GeomviewDisplayPhaseBoundary 
     160          (isotherm_geomview_pipe, "Spinodal 2", "spin2", "-face +edge", 
     161           numpoints, vpoints, spinodal_toggle[1] ? spinodals : NULL)) 
     162        { printf ("recalculate_and_display: Error %d in Geomview Display\n", i); 
     163          exit (i); } 
     164 
     165      max_boundaries = (numbounds>max_boundaries) ? numbounds : max_boundaries; 
     166      for (i=0; i<max_boundaries; i++) 
    167167        { 
    168168          char name [20], label [10]; 
     
    172172          snprintf (label, 8, "bd%d", i); 
    173173          if (ret=GeomviewDisplayPhaseBoundary 
    174               (isotherm_geomview_pipe, name, label, "-face +edge", numpoints, vpoints, allbounds+i)) 
     174              (isotherm_geomview_pipe, name, label, "-face +edge",  
     175               numpoints, vpoints, (i<numbounds) ? allbounds+i : NULL)) 
    175176            { printf ("recalculate_and_display: " 
    176177                      "Error %d in Geomview Display\n", ret); exit (ret); } 
  • trunk/matml/src/ternary/ternary.tex.in

    r500 r504  
    126126  appropriate in some cases, with some of them empty. 
    127127 
    128 \item The {\tt Ternary} GUI does not destroy phase boundaries which are 
    129   eliminated by changes to the system, nor does it remove a spinodal which the 
    130   user asks to remove. 
    131  
    132128\item The {\tt Ternary} GUI is incomplete: it is missing the polynomial and 
    133129  Gaussian free energy terms, and cannot add or remove phases.