Browse Source

Use the current point number as the single digit index for Cider 2D ascii save files. This conforms to the normal usage with other types of ascii rawfile. The numd parser table entry for ic.file now has the correct IF_STRING type.

pre-master-46
Brian Taylor 5 years ago
committed by Holger Vogt
parent
commit
36313d59f3
  1. 7
      src/ciderlib/twod/twoprint.c
  2. 2
      src/spicelib/devices/numd/numd.c

7
src/ciderlib/twod/twoprint.c

@ -35,6 +35,7 @@ TWOprnSolution(FILE *file, TWOdevice *pDevice, OUTPcard *output, BOOLEAN asciiSa
double *xScale = pDevice->xScale; double *xScale = pDevice->xScale;
double *yScale = pDevice->yScale; double *yScale = pDevice->yScale;
int ii; int ii;
int point_number = 0;
if (output->OUTPnumVars == -1) { if (output->OUTPnumVars == -1) {
/* First pass. Need to count number of variables in output. */ /* First pass. Need to count number of variables in output. */
@ -320,7 +321,8 @@ TWOprnSolution(FILE *file, TWOdevice *pDevice, OUTPcard *output, BOOLEAN asciiSa
if (asciiSave) { if (asciiSave) {
for (ii = 0; ii < numVars; ii++) { for (ii = 0; ii < numVars; ii++) {
if (ii == 0) { if (ii == 0) {
fprintf(file, "%d %d", yIndex, xIndex);
fprintf(file, "%d", point_number);
point_number++;
} }
fprintf(file, "\t%e\n", data[ii]); fprintf(file, "\t%e\n", data[ii]);
} }
@ -336,7 +338,8 @@ TWOprnSolution(FILE *file, TWOdevice *pDevice, OUTPcard *output, BOOLEAN asciiSa
if (asciiSave) { if (asciiSave) {
for (ii = 0; ii < numVars; ii++) { for (ii = 0; ii < numVars; ii++) {
if (ii == 0) { if (ii == 0) {
fprintf(file, "%d %d", yIndex, xIndex);
fprintf(file, "%d", point_number);
point_number++;
} }
fprintf(file, "\t%e\n", data[ii]); fprintf(file, "\t%e\n", data[ii]);
} }

2
src/spicelib/devices/numd/numd.c

@ -10,7 +10,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
IFparm NUMDpTable[] = { /* parameters */ IFparm NUMDpTable[] = { /* parameters */
IP("off", NUMD_OFF, IF_FLAG, "Initially off"), IP("off", NUMD_OFF, IF_FLAG, "Initially off"),
IP("ic.file", NUMD_IC_FILE, IF_REAL, "Initial conditions file"),
IP("ic.file", NUMD_IC_FILE, IF_STRING, "Initial conditions file"),
IOP("area", NUMD_AREA, IF_REAL, "Area factor"), IOP("area", NUMD_AREA, IF_REAL, "Area factor"),
IP("save", NUMD_PRINT, IF_INTEGER, "Save Solutions"), IP("save", NUMD_PRINT, IF_INTEGER, "Save Solutions"),
IPR("print", NUMD_PRINT, IF_INTEGER, "Print Solutions"), IPR("print", NUMD_PRINT, IF_INTEGER, "Print Solutions"),

Loading…
Cancel
Save