- Timestamp:
- Jun 9, 2006, 1:41:09 PM (18 years ago)
- Location:
- trunk/gui/vizservers/nanovis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/vizservers/nanovis/nanovis.cpp
r467 r469 1307 1307 break; 1308 1308 } 1309 else if (sscanf(start, "object %d class array type %s rank 0 times %d data follows", &dummy, type, &npts) == 3) { 1310 if (npts != nx*ny*nz) { 1311 std::cerr << "inconsistent data: expected " << nx*ny*nz << " points but found " << npts << " points" << std::endl; 1312 return; 1313 } 1314 break; 1315 } 1309 1316 } 1310 1317 } while (!fin.eof()); … … 1511 1518 break; 1512 1519 } 1520 else if (sscanf(start, "object %d class array type %s rank 0 times %d data follows", &dummy, type, &npts) == 3) { 1521 if (npts != nx*ny*nz) { 1522 char mesg[256]; 1523 sprintf(mesg,"inconsistent data: expected %d points but found %d points", nx*ny*nz, npts); 1524 return result.error(mesg); 1525 } 1526 break; 1527 } 1513 1528 } 1514 1529 } while (!fin.eof()); … … 1524 1539 double dval; 1525 1540 int nread = 0; 1526 for (int ix=0; ix < nx; ix++) { 1527 for (int iy=0; iy < ny; iy++) { 1528 for (int iz=0; iz < nz; iz++) { 1529 if (fin.eof() || nread > npts) { 1530 break; 1531 } 1532 fin.getline(line,sizeof(line)-1); 1533 if (sscanf(line, "%lg", &dval) == 1) { 1534 int nindex = iz*nx*ny + iy*nx + ix; 1535 field.define(nindex, dval); 1536 nread++; 1541 int ix = 0; 1542 int iy = 0; 1543 int iz = 0; 1544 while (!fin.eof() && nread < npts) { 1545 fin.getline(line,sizeof(line)-1); 1546 if (sscanf(line, "%lg", &dval) == 1) { 1547 int nindex = iz*nx*ny + iy*nx + ix; 1548 field.define(nindex, dval); 1549 nread++; 1550 if (++iz >= nz) { 1551 iz = 0; 1552 if (++iy >= ny) { 1553 iy = 0; 1554 ++ix; 1537 1555 } 1538 1556 } … … 3112 3130 int main(int argc, char** argv) 3113 3131 { 3132 sleep(30); 3114 3133 #ifdef XINETD 3115 3134 init_service(); -
trunk/gui/vizservers/nanovis/start_server
r410 r469 4 4 export DISPLAY 5 5 6 ../nanoscale/server -l 4000 -b 4001 -s 172.18.3.255 -c ./nanovis6 ../nanoscale/server -l 3000 -b 3001 -s 172.18.3.255 -c ./nanovis 7 7
Note: See TracChangeset
for help on using the changeset viewer.