Changeset 387
- Timestamp:
- 09/11/08 06:28:59 (2 months ago)
- Location:
- trunk/matml/src/ternary
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/matml/src/ternary/book.c
r382 r387 31 31 +latex+$y$ as up and $z$ 32 32 -latex-y as up and z 33 as the direction out of the screen. 33 as the direction out of the screen. It also sets the 34 +latex+{\tt efunc}, $T$ and $P$ 35 +html+ <tt>efunc</tt>, <i>T</i> and <i>P</i> 36 fields of each point to -1 to indicate that free energies and derivatives are 37 not yet calculated. 34 38 35 39 int init_triangle_array It returns zero or an error code. … … 40 44 +latex+$(N+1)(N+2)/2$, where $N$ is the resolution. 41 45 -latex-(N+1)(N+2)/2, where N is the resolution. 46 47 int efunc Energy function index indicating which energy curve this point will 48 be on. 42 49 ++++++++++++++++++++++++++++++++++++++*/ 43 50 44 int init_triangle_array (int resolution, ternary_point *points )51 int init_triangle_array (int resolution, ternary_point *points, int efunc) 45 52 { 46 53 int i,j, index; … … 53 60 points[index].C2 = (double) i/resolution; 54 61 points[index].C3 = (double) j/resolution; 62 points[index].efunc = efunc; 63 points[index].T = points[index].P = -1; 55 64 } 56 65 /* Make sure these are exactly on the C2+C3=1 boundary */ -
trunk/matml/src/ternary/ternary.c
r386 r387 55 55 56 56 /* Initialize coordinates of both triangle array halves */ 57 if (i=init_triangle_array (loop_max, points ))57 if (i=init_triangle_array (loop_max, points, 0)) 58 58 { printf ("main: Error %d in init_triangle_array\n", i); exit (i); } 59 if (i=init_triangle_array (loop_max, points+numpoints/2 ))59 if (i=init_triangle_array (loop_max, points+numpoints/2, 1)) 60 60 { printf ("main: Error %d in init_triangle_array\n", i); exit (i); } 61 61 -
trunk/matml/src/ternary/ternary.h
r383 r387 21 21 +*/ 22 22 int efunc; /*+ Index indicating which energy surface (phase) this point 23 is on +*/ 23 is on; a negative value indicates that energy derivatives 24 are not yet calculated. +*/ 25 double T; /*+ Temperature at which the free energies and derivatives 26 are valid +*/ 27 double P; /*+ Pressure at which the free energies and derivatives are 28 valid, -1 if not valid +*/ 24 29 double G; /*+ Free energy +*/ 25 30 double G2; /*+ Free energy derivative … … 128 133 129 134 /* From book.c */ 130 int init_triangle_array (int resolution, ternary_point *points );135 int init_triangle_array (int resolution, ternary_point *points, int efunc); 131 136 int init_triangle_vertices (int resolution, int *vertex_array, int offset); 132 137 int scale_energy_array (int num_points, ternary_point *points,