/[ascend]/trunk/models/johnpye/fprops/derivs.c
ViewVC logotype

Diff of /trunk/models/johnpye/fprops/derivs.c

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

revision 2265 by jpye, Thu Aug 5 12:04:22 2010 UTC revision 2266 by jpye, Thu Aug 5 13:53:01 2010 UTC
# Line 30  etc., for saturation and non-saturation Line 30  etc., for saturation and non-saturation
30    
31  #include <stdio.h>  #include <stdio.h>
32  #include <stdlib.h>  #include <stdlib.h>
 #include <assert.h>  
33  #include <math.h>  #include <math.h>
34    
35    //#define FPE_DEBUG
36    #ifdef FPE_DEBUG
37    # include <assert.h>
38    #else
39    # define assert(ARGS...)
40    #endif
41    
42    
43  #define SQ(X) ((X)*(X))  #define SQ(X) ((X)*(X))
44    
45  /*------------------------------------------------------------------------------  /*------------------------------------------------------------------------------
# Line 138  double fprops_non_dZdv_T(FPROPS_CHAR x, Line 145  double fprops_non_dZdv_T(FPROPS_CHAR x,
145              fprintf(stderr,"%s (%s:%d): Invalid variable '%c'\n", __func__,__FILE__,__LINE__,x);              fprintf(stderr,"%s (%s:%d): Invalid variable '%c'\n", __func__,__FILE__,__LINE__,x);
146              exit(1);              exit(1);
147      }      }
148    #if 1
149      if(__isnan(res)){      if(__isnan(res)){
150          fprintf(stderr,"calculating '%c'\n",x);          fprintf(stderr,"calculating '%c'\n",x);
151      }      }
152    #endif
153      assert(!__isnan(res));      assert(!__isnan(res));
154      //fprintf(stderr,"(∂%c/∂v)T = %f\n",x,res);      //fprintf(stderr,"(∂%c/∂v)T = %f\n",x,res);
155      return res;      return res;
# Line 162  double fprops_non_dZdT_v(FPROPS_CHAR x, Line 171  double fprops_non_dZdT_v(FPROPS_CHAR x,
171              fprintf(stderr,"%s (%s:%d): Invalid variable '%c'\n", __func__,__FILE__,__LINE__,x);              fprintf(stderr,"%s (%s:%d): Invalid variable '%c'\n", __func__,__FILE__,__LINE__,x);
172              exit(1);              exit(1);
173      }      }
174    #if 0
175      if(__isnan(res)){      if(__isnan(res)){
176          fprintf(stderr,"calculating '%c'\n",x);          fprintf(stderr,"calculating '%c'\n",x);
177      }      }
178    #endif
179      assert(!__isnan(res));      assert(!__isnan(res));
180      //fprintf(stderr,"(∂%c/∂T)v = %f\n",x,res);      //fprintf(stderr,"(∂%c/∂T)v = %f\n",x,res);
181      return res;      return res;

Legend:
Removed from v.2265  
changed lines
  Added in v.2266

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