Changeset 416 for trunk/matml
- Timestamp:
- 02/22/2009 11:04:45 AM (3 years ago)
- Location:
- trunk/matml/src/ternary
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/matml/src/ternary/book.c
r387 r416 47 47 int efunc Energy function index indicating which energy curve this point will 48 48 be on. 49 50 double A2 First corner C2 value. 51 52 double A3 First corner C3 value. 53 54 double B2 Second corner C2 value. 55 56 double B3 Second corner C3 value. 57 58 double C2 Third corner C2 value. 59 60 double C3 Third corner C3 value. 49 61 ++++++++++++++++++++++++++++++++++++++*/ 50 62 51 int init_triangle_array (int resolution, ternary_point *points, int efunc) 63 int init_triangle_array 64 (int resolution, ternary_point *points, int efunc, 65 double A2, double A3, double B2, double B3, double C2, double C3) 52 66 { 53 67 int i,j, index; … … 58 72 { 59 73 index = ROWSTART (i) + j; 60 points[index].C2 = (double) i/resolution; 61 points[index].C3 = (double) j/resolution; 74 points[index].C2 = A2 + (B2-A2) * ((double) i/resolution) + 75 (C2-A2) * ((double) j/resolution); 76 points[index].C3 = A3 + (B3-A3) * ((double) i/resolution) + 77 (C3-A3) * ((double) j/resolution); 62 78 points[index].efunc = efunc; 63 79 points[index].T = points[index].P = -1; … … 65 81 /* Make sure these are exactly on the C2+C3=1 boundary */ 66 82 index = ROWSTART (i) + j; 67 points[index].C2 = (double) i/resolution; 68 points[index].C3 = 1. - points[index].C2; 83 points[index].C2 = A2 + (B2-A2) * ((double) i/resolution) + 84 (C2-A2) * (1.-((double) i/resolution)); 85 points[index].C3 = A3 + (B3-A3) * ((double) i/resolution) + 86 (C3-A3) * (1.-((double) i/resolution)); 69 87 } 70 88 index = (resolution+1)*(resolution+2)/2-1; 71 points[index].C2 = 1.;72 points[index].C3 = 0.;89 points[index].C2 = B2; 90 points[index].C3 = B3; 73 91 74 92 return 0; -
trunk/matml/src/ternary/ternary.h
r415 r416 165 165 166 166 /* From book.c */ 167 int init_triangle_array (int resolution, ternary_point *points, int efunc); 167 int init_triangle_array 168 (int resolution, ternary_point *points, int efunc, 169 double A2, double A3, double B2, double B3, double C2, double C3); 168 170 int init_triangle_vertices (int resolution, int *vertex_array, int offset); 169 171 int scale_energy_array (int num_points, ternary_point *points,