Ignore:
Timestamp:
Aug 3, 2009, 2:48:42 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
d8fce3, e78824
Parents:
4e4940
Message:

Huge refactoring of Tesselation routines, but not finished yet.

  • new file tesselation.cpp with all of classes tesselation, Boundary..Set and CandidatesForTesselationOB
  • new file tesselationhelper.cpp with all auxiliary functions.
  • boundary.cpp just contains super functions, combininb molecule and Tesselation pointers
  • new pointer molecule::TesselStruct
  • PointMap, LineMap, TriangleMap DistanceMap have been moved from molecules.hpp to tesselation.hpp
  • new abstract class PointCloud and TesselPoint
  • atom inherits TesselPoint
  • molecule inherits PointCloud (i.e. a set of TesselPoints) and implements all virtual functions for the chained list
  • TriangleFilesWritten is thrown out, intermediate steps are written in find_nonconvex_border and not in find_next_triangle()
  • LinkedCell class uses TesselPoint as its nodes, i.e. as long as any class inherits TesselPoint, it may make use of LinkedCell as well and a PointCloud is used to initialize
  • class atom and bond definitions have been moved to own header files

NOTE: This is not bugfree yet. Tesselation of heptan produces way too many triangles, but runs without faults or leaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/config.cpp

    r4e4940 r834ff3  
    276276
    277277/** Readin of Thermostat related values from parameter file.
    278  * \param *source parameter file
    279  */
    280 void config::InitThermostats(ifstream *source)
     278 * \param *fb file buffer containing the config file
     279 */
     280void config::InitThermostats(class ConfigFileBuffer *fb)
    281281{
    282282  char *thermo = MallocString(12, "IonsInitRead: thermo");
     
    284284
    285285  // read desired Thermostat from file along with needed additional parameters
    286   if (ParseForParameter(verbose,source,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) {
     286  if (ParseForParameter(verbose,fb,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) {
    287287    if (strcmp(thermo, ThermostatNames[0]) == 0) { // None
    288288      if (ThermostatImplemented[0] == 1) {
     
    295295      if (ThermostatImplemented[1] == 1) {
    296296        Thermostat = Woodcock;
    297         ParseForParameter(verbose,source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency
     297        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency
    298298      } else {
    299299        cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
     
    303303      if (ThermostatImplemented[2] == 1) {
    304304        Thermostat = Gaussian;
    305         ParseForParameter(verbose,source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate
     305        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate
    306306      } else {
    307307        cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
     
    311311      if (ThermostatImplemented[3] == 1) {
    312312        Thermostat = Langevin;
    313         ParseForParameter(verbose,source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma
    314         if (ParseForParameter(verbose,source,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) {
     313        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma
     314        if (ParseForParameter(verbose,fb,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) {
    315315          cout << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << alpha << "." << endl;
    316316        } else {
     
    324324      if (ThermostatImplemented[4] == 1) {
    325325        Thermostat = Berendsen;
    326         ParseForParameter(verbose,source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T
     326        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T
    327327      } else {
    328328        cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
     
    332332      if (ThermostatImplemented[5] == 1) {
    333333        Thermostat = NoseHoover;
    334         ParseForParameter(verbose,source,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass
     334        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass
    335335        alpha = 0.;
    336336      } else {
     
    704704    return;
    705705  }
     706  file->close();
     707  delete(file);
    706708  RetrieveConfigPathAndName(filename);
    707709
     
    722724  double value[3];
    723725 
    724   InitThermostats(file);
     726  InitThermostats(FileBuffer);
    725727 
    726728  /* Namen einlesen */
Note: See TracChangeset for help on using the changeset viewer.