Ignore:
Timestamp:
Nov 24, 2009, 3:34:49 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
1a3354
Parents:
7d1ad9
Message:

Fixes and naming of final Tecplot output file is now molecule name.

  • FIXES to builder.cpp:
    • case 'p' would not dissect the molecule into connected subgraphs
    • if done so, the BondGraph was not yet initialised
    • if done so, we need to check whether BondGraphFileName has been set
    • BondGraphFileName.empty() could not be used as a check, as was set to "" instead of "\n"
    • if (finally) done so, we have to remove the empty molecule that we parsed in
    • ... and then pick the newly added molecule for mol to point at
    • SaveConfig() did not set the merged molecule name correctly.
    • if empty config is given, the empty molecule now receives the ConfigFileName as name
  • FIXES to config.cpp
    • Load() did not set the name of the molecule
  • changes to tesselationhelper.cpp and tesselation.cpp
  • changes to PointCloud and molecule
    • new virtual function PointCloud::GetName() returns "unknown"
    • new function molecule::GetName() returns pointer to name of molecule
    • IsEmpty() and IsEnd() now return true by default
  • all .dat files in the "Tesselations" tests were changed accordingly (i.e. have now the name in the second line)
  • benzene was added as a new test for an absolutely flat molecule. So far, it fails horribly.
  • 13 of 17 tests run fine

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselationhelpers.cpp

    r7d1ad9 rcc9225  
    756756{
    757757  Vector helper;
    758   // include the current position of the virtual sphere in the temporary raster3d file
    759   Vector *center = cloud->GetCenter();
    760   // make the circumsphere's center absolute again
    761   helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node);
    762   helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node);
    763   helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node);
    764   helper.Scale(1./3.);
    765   helper.SubtractVector(center);
    766   // and add to file plus translucency object
    767   *rasterfile << "# current virtual sphere\n";
    768   *rasterfile << "8\n  25.0    0.6     -1.0 -1.0 -1.0     0.2        0 0 0 0\n";
    769   *rasterfile << "2\n  " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n";
    770   *rasterfile << "9\n  terminating special property\n";
    771   delete(center);
     758
     759  if (Tess->LastTriangle != NULL) {
     760    // include the current position of the virtual sphere in the temporary raster3d file
     761    Vector *center = cloud->GetCenter();
     762    // make the circumsphere's center absolute again
     763    helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node);
     764    helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node);
     765    helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node);
     766    helper.Scale(1./3.);
     767    helper.SubtractVector(center);
     768    // and add to file plus translucency object
     769    *rasterfile << "# current virtual sphere\n";
     770    *rasterfile << "8\n  25.0    0.6     -1.0 -1.0 -1.0     0.2        0 0 0 0\n";
     771    *rasterfile << "2\n  " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n";
     772    *rasterfile << "9\n  terminating special property\n";
     773    delete(center);
     774  }
    772775};
    773776
     
    829832    *tecplot << "TITLE = \"3D CONVEX SHELL\"" << endl;
    830833    *tecplot << "VARIABLES = \"X\" \"Y\" \"Z\" \"U\"" << endl;
    831     *tecplot << "ZONE T=\"" << N << "-";
    832     for (int i=0;i<3;i++)
    833       *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name;
     834    *tecplot << "ZONE T=\"";
     835    if (N < 0) {
     836      *tecplot << cloud->GetName();
     837    } else {
     838      *tecplot << N << "-";
     839      for (int i=0;i<3;i++)
     840        *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name;
     841    }
    834842    *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl;
    835843    int i=0;
Note: See TracChangeset for help on using the changeset viewer.