Ignore:
Timestamp:
Oct 18, 2008, 2:03:57 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
ae21a39, d87482
Parents:
f5d7e1
Message:

VolumeOfConvexEnvelope() has new parameter with tecplot ofstream and the file is stored there and not in Tesselation::Tesselation().

+ BUGFIX: As we shift the molecule to the center of gravity for the "projection onto axis planes" method to work, we forgot about shifting it back before storing nodes and triangles in the tecplot file. Now, we store the data to file in VolumeOfConvexEnvelope(), where the molecule has been shifted back already.
+ VolumeOfConvexEnvelope() now gets an additional parameter with the tecplot ofstream, so that the name of the tecplot file may be chosen on the command line (with checks whether the argument was given or not)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    rf5d7e1 r59f86c  
    569569    case 'e':
    570570        cout << Verbose(0) << "Evaluating volume of the convex envelope.";
    571         VolumeOfConvexEnvelope((ofstream *)&cout, configuration, NULL, mol);
     571        VolumeOfConvexEnvelope((ofstream *)&cout, NULL, configuration, NULL, mol);
    572572        break;
    573573    case 'f':
     
    11681168            case 'o':
    11691169              ExitFlag = 1;
    1170               SaveFlag = true;
    1171               cout << Verbose(0) << "Evaluating volume of the convex envelope.";
    1172               VolumeOfConvexEnvelope((ofstream *)&cout, &configuration, NULL, mol);
     1170              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
     1171                ExitFlag = 255;
     1172                cerr << "Not enough or invalid arguments given for convex envelope: -o <tecplot output file>" << endl;
     1173              } else {
     1174                cout << Verbose(0) << "Evaluating volume of the convex envelope.";
     1175                cout << Verbose(1) << "Storing tecplot data in " << argv[argptr] << "." << endl;
     1176                ofstream *output = new ofstream(argv[argptr], ios::trunc);
     1177                VolumeOfConvexEnvelope((ofstream *)&cout, output, &configuration, NULL, mol);
     1178                output->close();
     1179                delete(output);
     1180                argptr+=1;
     1181              }
    11731182              break;
    11741183            case 'U':
Note: See TracChangeset for help on using the changeset viewer.