Changes in / [b13ea4:6670a97]
- Location:
- src
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Helpers/MemDebug.cpp
rb13ea4 r6670a97 153 153 // build the entry in front of the space 154 154 Memory::entry_t *entry = (Memory::entry_t*) res; 155 memset(res,0,entrySpace);156 155 entry->info.nbytes = nbytes; 157 156 entry->info.isUsed = true; -
src/UIElements/CommandLineUI/CommandLineWindow.cpp
rb13ea4 r6670a97 73 73 CommandLineWindow::~CommandLineWindow() 74 74 { 75 //// go through all possible actions76 //for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRegistry::getInstance().getBeginIter() != ActionRegistry::getInstance().getEndIter(); ActionRunner = ActionRegistry::getInstance().getBeginIter()) {77 //ActionRegistry::getInstance().unregisterAction(ActionRunner->second);78 //delete(ActionRunner->second);79 //}75 // go through all possible actions 76 for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRegistry::getInstance().getBeginIter() != ActionRegistry::getInstance().getEndIter(); ActionRunner = ActionRegistry::getInstance().getBeginIter()) { 77 ActionRegistry::getInstance().unregisterAction(ActionRunner->second); 78 delete(ActionRunner->second); 79 } 80 80 81 81 delete statusIndicator; -
src/analysis_bonds.cpp
rb13ea4 r6670a97 181 181 // check angle 182 182 if (CheckHydrogenBridgeBondAngle(Walker, OtherAtom, Runner)) { 183 DoLog(1) && (Log() << Verbose(1) << Walker-> getName() << ", " << OtherAtom->getName() << " and " << Runner->getName()<< " has a hydrogen bridge bond with distance " << sqrt(distance) << " and angle " << CalculateAngle(&OtherAtom->x, &Walker->x, &Runner->x)*(180./M_PI) << "." << endl);183 DoLog(1) && (Log() << Verbose(1) << Walker->Name << ", " << OtherAtom->Name << " and " << Runner->Name << " has a hydrogen bridge bond with distance " << sqrt(distance) << " and angle " << CalculateAngle(&OtherAtom->x, &Walker->x, &Runner->x)*(180./M_PI) << "." << endl); 184 184 count++; 185 185 break; -
src/atom.cpp
rb13ea4 r6670a97 40 40 41 41 atom *atom::clone(){ 42 atom *res = new atom( this);42 atom *res = new atom(); 43 43 res->previous=0; 44 44 res->next=0; -
src/atom_bondedparticle.cpp
rb13ea4 r6670a97 44 44 void BondedParticle::OutputBondOfAtom() const 45 45 { 46 DoLog(4) && (Log() << Verbose(4) << "Atom " << getName()<< "/" << nr << " with " << ListOfBonds.size() << " bonds: " << endl);46 DoLog(4) && (Log() << Verbose(4) << "Atom " << Name << "/" << nr << " with " << ListOfBonds.size() << " bonds: " << endl); 47 47 int TotalDegree = 0; 48 48 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) { -
src/atom_graphnode.cpp
rb13ea4 r6670a97 27 27 void GraphNode::OutputGraphInfo() const 28 28 { 29 DoLog(2) && (Log() << Verbose(2) << "Atom " << getName()<< " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are ");29 DoLog(2) && (Log() << Verbose(2) << "Atom " << Name << " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are "); 30 30 OutputComponentNumber(); 31 31 DoLog(3) && (Log() << Verbose(3) << " with Lowpoint " << LowpointNr << " and Graph Nr. " << GraphNr << "." << endl); -
src/atom_particleinfo.cpp
rb13ea4 r6670a97 11 11 /** Constructor of ParticleInfo. 12 12 */ 13 ParticleInfo::ParticleInfo() : nr(-1), name("Unknown") { 14 }; 13 ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {}; 15 14 16 15 ParticleInfo::ParticleInfo(ParticleInfo *pointer) : 17 16 nr(pointer->nr), 18 name(pointer->name) 19 {} 17 Name(pointer->Name) 18 { 19 if (Name == NULL) 20 Name = " "; 21 } 20 22 21 23 … … 23 25 */ 24 26 ParticleInfo::~ParticleInfo() 25 {}; 26 27 const string& ParticleInfo::getName() const{ 28 return name; 29 } 30 31 void ParticleInfo::setName(const string& _name){ 32 name = _name; 33 } 27 { 28 Free(&Name); 29 }; 34 30 35 31 ostream & operator << (ostream &ost, const ParticleInfo &a) 36 32 { 37 ost << "[" << a.getName() << "|" << &a << "]"; 33 if (a.Name == NULL) 34 ost << "[NULL]"; 35 else 36 ost << "[" << a.Name << "|" << &a << "]"; 38 37 return ost; 39 38 }; … … 41 40 ostream & ParticleInfo::operator << (ostream &ost) const 42 41 { 43 ost << "[" << name << "|" << this << "]"; 42 if (Name == NULL) 43 ost << "[NULL]"; 44 else 45 ost << "[" << Name << "|" << this << "]"; 44 46 return ost; 45 47 }; -
src/atom_particleinfo.hpp
rb13ea4 r6670a97 28 28 public: 29 29 int nr; // index to easierly identify 30 char *Name; // some name to reference to on output 30 31 31 32 ParticleInfo(); … … 33 34 ~ParticleInfo(); 34 35 35 const std::string& getName() const;36 void setName(const std::string&);37 38 36 ostream & operator << (ostream &ost) const; 39 37 40 38 private: 41 std::string name; // some name to reference to on output42 39 }; 43 40 -
src/bond.cpp
rb13ea4 r6670a97 53 53 ostream & operator << (ostream &ost, const bond &b) 54 54 { 55 ost << "[" << b.leftatom-> getName() << " <" << b.BondDegree << "(H" << b.HydrogenBond << ")>" << b.rightatom->getName()<< "]";55 ost << "[" << b.leftatom->Name << " <" << b.BondDegree << "(H" << b.HydrogenBond << ")>" << b.rightatom->Name << "]"; 56 56 return ost; 57 57 }; -
src/builder.cpp
rb13ea4 r6670a97 53 53 54 54 #include <cstring> 55 #include <cstdlib>56 55 57 56 #include "analysis_bonds.hpp" … … 2490 2489 ActionRegistry::purgeInstance(); 2491 2490 ActionHistory::purgeInstance(); 2492 Memory::getState();2493 2491 } 2494 2492 … … 2517 2515 // need to init the history before any action is created 2518 2516 ActionHistory::init(); 2519 2520 // from this moment on, we need to be sure to deeinitialize in the correct order2521 // this is handled by the cleanup function2522 atexit(cleanUp);2523 2517 2524 2518 // Parse command line options and if present create respective UI … … 2572 2566 } 2573 2567 2568 cleanUp(); 2569 Memory::getState(); 2574 2570 return (0); 2575 2571 } -
src/config.cpp
rb13ea4 r6670a97 1680 1680 Walker = Walker->next; 1681 1681 *output << Walker->nr << "\t"; 1682 *output << Walker-> getName()<< "\t";1682 *output << Walker->Name << "\t"; 1683 1683 *output << mol->name << "\t"; 1684 1684 *output << 0 << "\t"; … … 1756 1756 Walker = Walker->next; 1757 1757 *output << AtomNo+1 << "\t"; 1758 *output << Walker-> getName()<< "\t";1758 *output << Walker->Name << "\t"; 1759 1759 *output << (*MolWalker)->name << "\t"; 1760 1760 *output << MolCounter+1 << "\t"; -
src/helpers.cpp
rb13ea4 r6670a97 209 209 */ 210 210 void performCriticalExit() { 211 //map<void*, size_t> pointers = MemoryUsageObserver::getInstance()->getPointersToAllocatedMemory();212 //for (map<void*, size_t>::iterator runner = pointers.begin(); runner != pointers.end(); runner++) {213 //Free(((void**) &runner->first));214 //}211 map<void*, size_t> pointers = MemoryUsageObserver::getInstance()->getPointersToAllocatedMemory(); 212 for (map<void*, size_t>::iterator runner = pointers.begin(); runner != pointers.end(); runner++) { 213 Free(((void**) &runner->first)); 214 } 215 215 216 216 exit(255); -
src/molecule.cpp
rb13ea4 r6670a97 135 135 if (pointer->type->Z != 1) 136 136 NoNonHydrogen++; 137 if (pointer->getName() == "Unknown"){138 stringstream sstr;139 sstr << pointer->type->symbol << pointer->nr+1;140 pointer->setName(sstr.str());137 if (pointer->Name == NULL) { 138 Free(&pointer->Name); 139 pointer->Name = Malloc<char>(6, "molecule::AddAtom: *pointer->Name"); 140 sprintf(pointer->Name, "%2s%02d", pointer->type->symbol, pointer->nr+1); 141 141 } 142 142 } … … 157 157 if (pointer != NULL) { 158 158 atom *walker = pointer->clone(); 159 stringstream sstr; 160 sstr << pointer->getName(); 161 walker->setName(sstr.str()); 159 walker->Name = Malloc<char>(strlen(pointer->Name) + 1, "atom::atom: *Name"); 160 strcpy (walker->Name, pointer->Name); 162 161 walker->nr = last_atom++; // increase number within molecule 163 162 add(walker, end); … … 253 252 BondRescale = TopOrigin->type->HBondDistance[TopBond->BondDegree-1]; 254 253 if (BondRescale == -1) { 255 DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond distance in replacing bond (" << TopOrigin-> getName() << "<->" << TopReplacement->getName()<< ") of degree " << TopBond->BondDegree << "!" << endl);254 DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond distance in replacing bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") of degree " << TopBond->BondDegree << "!" << endl); 256 255 return false; 257 256 BondRescale = bondlength; … … 276 275 InBondvector *= BondRescale; // rescale the distance vector to Hydrogen bond length 277 276 FirstOtherAtom->x = TopOrigin->x; // set coordination to origin ... 278 FirstOtherAtom->x += InBondvector; // ... and add distance vector to replacement atom277 FirstOtherAtom->x = InBondvector; // ... and add distance vector to replacement atom 279 278 AllWentWell = AllWentWell && AddAtom(FirstOtherAtom); 280 279 // Log() << Verbose(4) << "Added " << *FirstOtherAtom << " at: "; … … 296 295 SecondOtherAtom = (*Runner)->GetOtherAtom(TopOrigin); 297 296 } else { 298 DoeLog(2) && (eLog()<< Verbose(2) << "Detected more than four bonds for atom " << TopOrigin-> getName());297 DoeLog(2) && (eLog()<< Verbose(2) << "Detected more than four bonds for atom " << TopOrigin->Name); 299 298 } 300 299 } … … 340 339 bondangle = TopOrigin->type->HBondAngle[1]; 341 340 if (bondangle == -1) { 342 DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond angle in replacing bond (" << TopOrigin-> getName() << "<->" << TopReplacement->getName()<< ") of degree " << TopBond->BondDegree << "!" << endl);341 DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond angle in replacing bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") of degree " << TopBond->BondDegree << "!" << endl); 343 342 return false; 344 343 bondangle = 0; … … 617 616 add(Binder, last); 618 617 } else { 619 DoeLog(1) && (eLog()<< Verbose(1) << "Could not add bond between " << atom1-> getName() << " and " << atom2->getName()<< " as one or both are not present in the molecule." << endl);618 DoeLog(1) && (eLog()<< Verbose(1) << "Could not add bond between " << atom1->Name << " and " << atom2->Name << " as one or both are not present in the molecule." << endl); 620 619 } 621 620 return Binder; … … 696 695 AtomCount--; 697 696 } else 698 DoeLog(1) && (eLog()<< Verbose(1) << "Atom " << pointer-> getName()<< " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl);697 DoeLog(1) && (eLog()<< Verbose(1) << "Atom " << pointer->Name << " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl); 699 698 if (ElementsInMolecule[pointer->type->Z] == 0) // was last atom of this element? 700 699 ElementCount--; … … 714 713 ElementsInMolecule[pointer->type->Z]--; // decrease number of atom of this element 715 714 else 716 DoeLog(1) && (eLog()<< Verbose(1) << "Atom " << pointer-> getName()<< " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl);715 DoeLog(1) && (eLog()<< Verbose(1) << "Atom " << pointer->Name << " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl); 717 716 if (ElementsInMolecule[pointer->type->Z] == 0) // was last atom of this element? 718 717 ElementCount--; … … 916 915 if (Walker->type->Z != 1) // count non-hydrogen atoms whilst at it 917 916 NoNonHydrogen++; 918 stringstream sstr;919 sstr << Walker->type->symbol << Walker->nr+1;920 Walker->setName(sstr.str());921 DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << Walker->nr << " " << Walker-> getName()<< "." << endl);917 Free(&Walker->Name); 918 Walker->Name = Malloc<char>(6, "molecule::CountAtoms: *walker->Name"); 919 sprintf(Walker->Name, "%2s%02d", Walker->type->symbol, Walker->nr+1); 920 DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << Walker->nr << " " << Walker->Name << "." << endl); 922 921 i++; 923 922 } -
src/molecule_fragmentation.cpp
rb13ea4 r6670a97 722 722 // free memory for bond part 723 723 DoLog(1) && (Log() << Verbose(1) << "Freeing bond memory" << endl); 724 Free(&FragmentList); // remove bond molecule from memory724 delete(FragmentList); // remove bond molecule from memory 725 725 Free(&SortIndex); 726 726 } else { … … 907 907 } 908 908 } else { 909 DoeLog(1) && (eLog()<< Verbose(1) << "Son " << Runner-> getName() << " has father " << FatherOfRunner->getName()<< " but its entry in SonList is " << SonList[FatherOfRunner->nr] << "!" << endl);909 DoeLog(1) && (eLog()<< Verbose(1) << "Son " << Runner->Name << " has father " << FatherOfRunner->Name << " but its entry in SonList is " << SonList[FatherOfRunner->nr] << "!" << endl); 910 910 } 911 911 if ((LonelyFlag) && (Leaf->AtomCount > 1)) { -
src/molecule_geometry.cpp
rb13ea4 r6670a97 282 282 if ((fabs(tmp)) > BondDistance) { 283 283 flag = false; 284 DoLog(0) && (Log() << Verbose(0) << "Hit: atom " << Walker-> getName()<< " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl);284 DoLog(0) && (Log() << Verbose(0) << "Hit: atom " << Walker->Name << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl); 285 285 if (tmp > 0) 286 286 Translationvector[j] -= 1.; -
src/molecule_graph.cpp
rb13ea4 r6670a97 317 317 Walker->GraphNr = DFS.CurrentGraphNr; 318 318 Walker->LowpointNr = DFS.CurrentGraphNr; 319 DoLog(1) && (Log() << Verbose(1) << "Setting Walker[" << Walker-> getName()<< "]'s number to " << Walker->GraphNr << " with Lowpoint " << Walker->LowpointNr << "." << endl);319 DoLog(1) && (Log() << Verbose(1) << "Setting Walker[" << Walker->Name << "]'s number to " << Walker->GraphNr << " with Lowpoint " << Walker->LowpointNr << "." << endl); 320 320 DFS.AtomStack->Push(Walker); 321 321 DFS.CurrentGraphNr++; … … 348 348 Binder->MarkUsed(black); 349 349 OtherAtom = Binder->GetOtherAtom(Walker); 350 DoLog(2) && (Log() << Verbose(2) << "(4) OtherAtom is " << OtherAtom-> getName()<< "." << endl);350 DoLog(2) && (Log() << Verbose(2) << "(4) OtherAtom is " << OtherAtom->Name << "." << endl); 351 351 if (OtherAtom->GraphNr != -1) { 352 352 // (4a) ... if "other" atom has been visited (GraphNr != 0), set lowpoint to minimum of both, go to (3) … … 354 354 DFS.BackEdgeStack->Push(Binder); 355 355 Walker->LowpointNr = (Walker->LowpointNr < OtherAtom->GraphNr) ? Walker->LowpointNr : OtherAtom->GraphNr; 356 DoLog(3) && (Log() << Verbose(3) << "(4a) Visited: Setting Lowpoint of Walker[" << Walker-> getName()<< "] to " << Walker->LowpointNr << "." << endl);356 DoLog(3) && (Log() << Verbose(3) << "(4a) Visited: Setting Lowpoint of Walker[" << Walker->Name << "] to " << Walker->LowpointNr << "." << endl); 357 357 } else { 358 358 // (4b) ... otherwise set OtherAtom as Ancestor of Walker and Walker as OtherAtom, go to (2) … … 360 360 OtherAtom->Ancestor = Walker; 361 361 Walker = OtherAtom; 362 DoLog(3) && (Log() << Verbose(3) << "(4b) Not Visited: OtherAtom[" << OtherAtom-> getName() << "]'s Ancestor is now " << OtherAtom->Ancestor->getName() << ", Walker is OtherAtom " << OtherAtom->getName()<< "." << endl);362 DoLog(3) && (Log() << Verbose(3) << "(4b) Not Visited: OtherAtom[" << OtherAtom->Name << "]'s Ancestor is now " << OtherAtom->Ancestor->Name << ", Walker is OtherAtom " << OtherAtom->Name << "." << endl); 363 363 break; 364 364 } … … 382 382 383 383 // (5) if Ancestor of Walker is ... 384 DoLog(1) && (Log() << Verbose(1) << "(5) Number of Walker[" << Walker-> getName() << "]'s Ancestor[" << Walker->Ancestor->getName()<< "] is " << Walker->Ancestor->GraphNr << "." << endl);384 DoLog(1) && (Log() << Verbose(1) << "(5) Number of Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "] is " << Walker->Ancestor->GraphNr << "." << endl); 385 385 386 386 if (Walker->Ancestor->GraphNr != DFS.Root->GraphNr) { … … 389 389 // (6a) set Ancestor's Lowpoint number to minimum of of its Ancestor and itself, go to Step(8) 390 390 Walker->Ancestor->LowpointNr = (Walker->Ancestor->LowpointNr < Walker->LowpointNr) ? Walker->Ancestor->LowpointNr : Walker->LowpointNr; 391 DoLog(2) && (Log() << Verbose(2) << "(6) Setting Walker[" << Walker-> getName() << "]'s Ancestor[" << Walker->Ancestor->getName()<< "]'s Lowpoint to " << Walker->Ancestor->LowpointNr << "." << endl);391 DoLog(2) && (Log() << Verbose(2) << "(6) Setting Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s Lowpoint to " << Walker->Ancestor->LowpointNr << "." << endl); 392 392 } else { 393 393 // (7) (Ancestor of Walker is a separating vertex, remove all from stack till Walker (including), these and Ancestor form a component 394 394 Walker->Ancestor->SeparationVertex = true; 395 DoLog(2) && (Log() << Verbose(2) << "(7) Walker[" << Walker-> getName() << "]'s Ancestor[" << Walker->Ancestor->getName()<< "]'s is a separating vertex, creating component." << endl);395 DoLog(2) && (Log() << Verbose(2) << "(7) Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s is a separating vertex, creating component." << endl); 396 396 mol->SetNextComponentNumber(Walker->Ancestor, DFS.ComponentNumber); 397 DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker-> getName()<< "]'s Ancestor's Compont is " << DFS.ComponentNumber << "." << endl);397 DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Ancestor's Compont is " << DFS.ComponentNumber << "." << endl); 398 398 mol->SetNextComponentNumber(Walker, DFS.ComponentNumber); 399 DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker-> getName()<< "]'s Compont is " << DFS.ComponentNumber << "." << endl);399 DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl); 400 400 do { 401 401 OtherAtom = DFS.AtomStack->PopLast(); 402 402 LeafWalker->Leaf->AddCopyAtom(OtherAtom); 403 403 mol->SetNextComponentNumber(OtherAtom, DFS.ComponentNumber); 404 DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom-> getName()<< "]'s Compont is " << DFS.ComponentNumber << "." << endl);404 DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl); 405 405 } while (OtherAtom != Walker); 406 406 DFS.ComponentNumber++; 407 407 } 408 408 // (8) Walker becomes its Ancestor, go to (3) 409 DoLog(2) && (Log() << Verbose(2) << "(8) Walker[" << Walker-> getName() << "] is now its Ancestor " << Walker->Ancestor->getName()<< ", backstepping. " << endl);409 DoLog(2) && (Log() << Verbose(2) << "(8) Walker[" << Walker->Name << "] is now its Ancestor " << Walker->Ancestor->Name << ", backstepping. " << endl); 410 410 Walker = Walker->Ancestor; 411 411 DFS.BackStepping = true; … … 431 431 //DFS.AtomStack->Output(out); 432 432 mol->SetNextComponentNumber(DFS.Root, DFS.ComponentNumber); 433 DoLog(3) && (Log() << Verbose(3) << "(9) Root[" << DFS.Root-> getName()<< "]'s Component is " << DFS.ComponentNumber << "." << endl);433 DoLog(3) && (Log() << Verbose(3) << "(9) Root[" << DFS.Root->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl); 434 434 mol->SetNextComponentNumber(Walker, DFS.ComponentNumber); 435 DoLog(3) && (Log() << Verbose(3) << "(9) Walker[" << Walker-> getName()<< "]'s Component is " << DFS.ComponentNumber << "." << endl);435 DoLog(3) && (Log() << Verbose(3) << "(9) Walker[" << Walker->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl); 436 436 do { 437 437 OtherAtom = DFS.AtomStack->PopLast(); 438 438 LeafWalker->Leaf->AddCopyAtom(OtherAtom); 439 439 mol->SetNextComponentNumber(OtherAtom, DFS.ComponentNumber); 440 DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom-> getName()<< "]'s Compont is " << DFS.ComponentNumber << "." << endl);440 DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl); 441 441 } while (OtherAtom != Walker); 442 442 DFS.ComponentNumber++; … … 445 445 Walker = DFS.Root; 446 446 Binder = mol->FindNextUnused(Walker); 447 DoLog(1) && (Log() << Verbose(1) << "(10) Walker is Root[" << DFS.Root-> getName()<< "], next Unused Bond is " << Binder << "." << endl);447 DoLog(1) && (Log() << Verbose(1) << "(10) Walker is Root[" << DFS.Root->Name << "], next Unused Bond is " << Binder << "." << endl); 448 448 if (Binder != NULL) { // Root is separation vertex 449 449 DoLog(1) && (Log() << Verbose(1) << "(11) Root is a separation vertex." << endl); … … 692 692 if (OtherAtom->type->Z != 1) { 693 693 #endif 694 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom-> getName()<< " for bond " << *(*Runner) << "." << endl);694 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl); 695 695 if (BFS.ColorList[OtherAtom->nr] == white) { 696 696 BFS.TouchedStack->Push(OtherAtom); … … 698 698 BFS.PredecessorList[OtherAtom->nr] = Walker; // Walker is the predecessor 699 699 BFS.ShortestPathList[OtherAtom->nr] = BFS.ShortestPathList[Walker->nr] + 1; 700 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom-> getName() << " lightgray, its predecessor is " << Walker->getName()<< " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl);700 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " lightgray, its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl); 701 701 //if (BFS.ShortestPathList[OtherAtom->nr] < MinimumRingSize[Walker->GetTrueFather()->nr]) { // Check for maximum distance 702 702 DoLog(3) && (Log() << Verbose(3) << "Putting OtherAtom into queue." << endl); … … 719 719 } 720 720 BFS.ColorList[Walker->nr] = black; 721 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker-> getName()<< " black." << endl);721 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl); 722 722 if (OtherAtom == BFS.Root) { // if we have found the root, check whether this cycle wasn't already found beforehand 723 723 // step through predecessor list … … 770 770 Walker = BFS.Root; 771 771 while (Walker != BackEdge->rightatom) { 772 DoLog(0) && (Log() << Verbose(0) << Walker-> getName()<< " <-> ");772 DoLog(0) && (Log() << Verbose(0) << Walker->Name << " <-> "); 773 773 Walker = BFS.PredecessorList[Walker->nr]; 774 774 Walker->GetTrueFather()->IsCyclic = true; 775 775 RingSize++; 776 776 } 777 DoLog(0) && (Log() << Verbose(0) << Walker-> getName()<< " with a length of " << RingSize << "." << endl << endl);777 DoLog(0) && (Log() << Verbose(0) << Walker->Name << " with a length of " << RingSize << "." << endl << endl); 778 778 // walk through all and set MinimumRingSize 779 779 Walker = BFS.Root; … … 1233 1233 BFS.PredecessorList[OtherAtom->nr] = Walker; // Walker is the predecessor 1234 1234 BFS.ShortestPathList[OtherAtom->nr] = BFS.ShortestPathList[Walker->nr] + 1; 1235 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom-> getName() << " " << ((BFS.ColorList[OtherAtom->nr] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->getName()<< " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl);1235 DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " " << ((BFS.ColorList[OtherAtom->nr] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl); 1236 1236 if ((((BFS.ShortestPathList[OtherAtom->nr] < BFS.BondOrder) && (Binder != Bond)))) { // Check for maximum distance 1237 1237 DoLog(3) && (Log() << Verbose(3)); 1238 1238 if (AddedAtomList[OtherAtom->nr] == NULL) { // add if it's not been so far 1239 1239 AddedAtomList[OtherAtom->nr] = Mol->AddCopyAtom(OtherAtom); 1240 DoLog(0) && (Log() << Verbose(0) << "Added OtherAtom " << OtherAtom-> getName());1240 DoLog(0) && (Log() << Verbose(0) << "Added OtherAtom " << OtherAtom->Name); 1241 1241 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->nr], AddedAtomList[OtherAtom->nr], Binder); 1242 1242 DoLog(0) && (Log() << Verbose(0) << " and bond " << *(AddedBondList[Binder->nr]) << ", "); 1243 1243 } else { // this code should actually never come into play (all white atoms are not yet present in BondMolecule, that's why they are white in the first place) 1244 DoLog(0) && (Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom-> getName());1244 DoLog(0) && (Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom->Name); 1245 1245 if (AddedBondList[Binder->nr] == NULL) { 1246 1246 AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->nr], AddedAtomList[OtherAtom->nr], Binder); … … 1322 1322 // followed by n+1 till top of stack. 1323 1323 Walker = BFS.BFSStack->PopFirst(); // pop oldest added 1324 DoLog(1) && (Log() << Verbose(1) << "Current Walker is: " << Walker-> getName()<< ", and has " << Walker->ListOfBonds.size() << " bonds." << endl);1324 DoLog(1) && (Log() << Verbose(1) << "Current Walker is: " << Walker->Name << ", and has " << Walker->ListOfBonds.size() << " bonds." << endl); 1325 1325 for (BondList::const_iterator Runner = Walker->ListOfBonds.begin(); Runner != Walker->ListOfBonds.end(); (++Runner)) { 1326 1326 if ((*Runner) != NULL) { // don't look at bond equal NULL 1327 1327 Binder = (*Runner); 1328 1328 OtherAtom = (*Runner)->GetOtherAtom(Walker); 1329 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom-> getName()<< " for bond " << *(*Runner) << "." << endl);1329 DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl); 1330 1330 if (BFS.ColorList[OtherAtom->nr] == white) { 1331 1331 BreadthFirstSearchAdd_UnvisitedNode(Mol, BFS, Walker, OtherAtom, Binder, Bond, AddedAtomList, AddedBondList, IsAngstroem); … … 1336 1336 } 1337 1337 BFS.ColorList[Walker->nr] = black; 1338 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker-> getName()<< " black." << endl);1338 DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl); 1339 1339 } 1340 1340 BreadthFirstSearchAdd_Free(BFS); … … 1403 1403 OtherAtom = (*Runner)->GetOtherAtom(Walker); 1404 1404 if (ParentList[OtherAtom->nr] != NULL) { // if otheratom is also a father of an atom on this molecule, create the bond 1405 DoLog(4) && (Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[Walker->nr]-> getName() << " and " << ParentList[OtherAtom->nr]->getName()<< "." << endl);1405 DoLog(4) && (Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[Walker->nr]->Name << " and " << ParentList[OtherAtom->nr]->Name << "." << endl); 1406 1406 mol->AddBond(ParentList[Walker->nr], ParentList[OtherAtom->nr], (*Runner)->BondDegree); 1407 1407 } -
src/moleculelist.cpp
rb13ea4 r6670a97 677 677 while (Walker->next != (*ListRunner)->end) { 678 678 Walker = Walker->next; 679 DoLog(0) && (Log() << Verbose(0) << Walker-> getName()<< " ");679 DoLog(0) && (Log() << Verbose(0) << Walker->Name << " "); 680 680 } 681 681 DoLog(0) && (Log() << Verbose(0) << endl); -
src/parser.cpp
rb13ea4 r6670a97 32 32 if (input == NULL) { 33 33 if (!test) 34 DoLog(0) && (Log() << Verbose(0) << endl << " FilePresent:Unable to open " << filename << ", is the directory correct?" << endl);34 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << filename << ", is the directory correct?" << endl); 35 35 return false; 36 36 } … … 160 160 //Log() << Verbose(1) << "Opening " << name << " ... " << input << endl; 161 161 if (input == NULL) { 162 DoeLog(1) && (eLog()<< Verbose(1) << endl << " MatrixContainer::ParseMatrix:Unable to open " << name << ", is the directory correct?" << endl);162 DoeLog(1) && (eLog()<< Verbose(1) << endl << "Unable to open " << name << ", is the directory correct?" << endl); 163 163 //performCriticalExit(); 164 164 return false; … … 269 269 input.open(file.str().c_str(), ios::in); 270 270 if (input == NULL) { 271 DoLog(0) && (Log() << Verbose(0) << endl << " MatrixContainer::ParseFragmentMatrix:Unable to open " << file.str() << ", is the directory correct?" << endl);271 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl); 272 272 return false; 273 273 } … … 477 477 output.open(line.str().c_str(), ios::out); 478 478 if (output == NULL) { 479 DoeLog(0) && (eLog()<< Verbose(0) << " MatrixContainer::WriteTotalFragments:Unable to open output energy file " << line.str() << "!" << endl);479 DoeLog(0) && (eLog()<< Verbose(0) << "Unable to open output energy file " << line.str() << "!" << endl); 480 480 performCriticalExit(); 481 481 return false; … … 507 507 output.open(line.str().c_str(), ios::out); 508 508 if (output == NULL) { 509 DoeLog(0) && (eLog()<< Verbose(0) << " MatrixContainer::WriteLastMatrix:Unable to open output matrix file " << line.str() << "!" << endl);509 DoeLog(0) && (eLog()<< Verbose(0) << "Unable to open output matrix file " << line.str() << "!" << endl); 510 510 performCriticalExit(); 511 511 return false; … … 621 621 //Log() << Verbose(0) << "Opening " << line.str() << " ... " << input << endl; 622 622 if (input == NULL) { 623 DoLog(0) && (Log() << Verbose(0) << endl << " ForceMatrix::ParseIndices:Unable to open " << line.str() << ", is the directory correct?" << endl);623 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl); 624 624 return false; 625 625 } … … 700 700 input.open(file.str().c_str(), ios::in); 701 701 if (input == NULL) { 702 DoLog(0) && (Log() << Verbose(0) << endl << " ForceMatrix::ParseFragmentMatrix:Unable to open " << file.str() << ", is the directory correct?" << endl);702 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl); 703 703 return false; 704 704 } … … 759 759 //Log() << Verbose(0) << "Opening " << line.str() << " ... " << input << endl; 760 760 if (input == NULL) { 761 DoLog(0) && (Log() << Verbose(0) << endl << " HessianMatrix::ParseIndices:Unable to open " << line.str() << ", is the directory correct?" << endl);761 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl); 762 762 return false; 763 763 } … … 930 930 input.open(file.str().c_str(), ios::in); 931 931 if (input == NULL) { 932 DoLog(0) && (Log() << Verbose(0) << endl << " HessianMatrix::ParseFragmentMatrix:Unable to open " << file.str() << ", is the directory correct?" << endl);932 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl); 933 933 return false; 934 934 } … … 1014 1014 input.open(file.str().c_str(), ios::in); 1015 1015 if (input == NULL) { 1016 DoLog(0) && (Log() << Verbose(0) << endl << " KeySetsContainer::ParseKeySets:Unable to open " << file.str() << ", is the directory correct?" << endl);1016 DoLog(0) && (Log() << Verbose(0) << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl); 1017 1017 return false; 1018 1018 } -
src/tesselation.cpp
rb13ea4 r6670a97 83 83 ostream & operator <<(ostream &ost, const BoundaryPointSet &a) 84 84 { 85 ost << "[" << a.Nr << "|" << a.node-> getName()<< " at " << *a.node->node << "]";85 ost << "[" << a.Nr << "|" << a.node->Name << " at " << *a.node->node << "]"; 86 86 return ost; 87 87 } … … 321 321 ostream & operator <<(ostream &ost, const BoundaryLineSet &a) 322 322 { 323 ost << "[" << a.Nr << "|" << a.endpoints[0]->node-> getName() << " at " << *a.endpoints[0]->node->node << "," << a.endpoints[1]->node->getName()<< " at " << *a.endpoints[1]->node->node << "]";323 ost << "[" << a.Nr << "|" << a.endpoints[0]->node->Name << " at " << *a.endpoints[0]->node->node << "," << a.endpoints[1]->node->Name << " at " << *a.endpoints[1]->node->node << "]"; 324 324 return ost; 325 325 } … … 688 688 ostream &operator <<(ostream &ost, const BoundaryTriangleSet &a) 689 689 { 690 ost << "[" << a.Nr << "|" << a.endpoints[0]->node-> getName() << "," << a.endpoints[1]->node->getName() << "," << a.endpoints[2]->node->getName()<< "]";690 ost << "[" << a.Nr << "|" << a.endpoints[0]->node->Name << "," << a.endpoints[1]->node->Name << "," << a.endpoints[2]->node->Name << "]"; 691 691 // ost << "[" << a.Nr << "|" << a.endpoints[0]->node->Name << " at " << *a.endpoints[0]->node->node << "," 692 692 // << a.endpoints[1]->node->Name << " at " << *a.endpoints[1]->node->node << "," << a.endpoints[2]->node->Name << " at " << *a.endpoints[2]->node->node << "]"; … … 948 948 ost << "[" << a.Nr << "|"; 949 949 for (PointSet::const_iterator Runner = a.endpoints.begin(); Runner != a.endpoints.end();) { 950 ost << (*Runner)->node-> getName();950 ost << (*Runner)->node->Name; 951 951 Runner++; 952 952 if (Runner != a.endpoints.end()) … … 967 967 node = NULL; 968 968 nr = -1; 969 Name = NULL; 969 970 } 970 971 ; … … 982 983 ostream & operator <<(ostream &ost, const TesselPoint &a) 983 984 { 984 ost << "[" << a.getName() << "|" << *a.node << "]";985 ost << "[" << (a.Name) << "|" << a.Name << " at " << *a.node << "]"; 985 986 return ost; 986 987 } … … 1134 1135 ostream & operator <<(ostream &ost, const CandidateForTesselation &a) 1135 1136 { 1136 ost << "[" << a.BaseLine->Nr << "|" << a.BaseLine->endpoints[0]->node-> getName() << "," << a.BaseLine->endpoints[1]->node->getName()<< "] with ";1137 ost << "[" << a.BaseLine->Nr << "|" << a.BaseLine->endpoints[0]->node->Name << "," << a.BaseLine->endpoints[1]->node->Name << "] with "; 1137 1138 if (a.pointlist.empty()) 1138 1139 ost << "no candidate."; … … 1347 1348 if (fabs(distance) < 1e-4) // we need to have a small epsilon around 0 which is still ok 1348 1349 continue; 1349 DoLog(2) && (Log() << Verbose(2) << "Projection of " << checker->second->node-> getName()<< " yields distance of " << distance << "." << endl);1350 DoLog(2) && (Log() << Verbose(2) << "Projection of " << checker->second->node->Name << " yields distance of " << distance << "." << endl); 1350 1351 tmp = distance / fabs(distance); 1351 1352 // 4b. Any have different sign to than before? (i.e. would lie outside convex hull with this starting triangle) 1352 1353 if ((sign != 0) && (tmp != sign)) { 1353 1354 // 4c. If so, break 4. loop and continue with next candidate in 1. loop 1354 DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node-> getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leaves " << checker->second->node->getName()<< " outside the convex hull." << endl);1355 DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node->Name << "," << baseline->second.first->second->node->Name << "," << baseline->second.second->second->node->Name << " leaves " << checker->second->node->Name << " outside the convex hull." << endl); 1355 1356 break; 1356 1357 } else { // note the sign for later 1357 DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node-> getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leave " << checker->second->node->getName()<< " inside the convex hull." << endl);1358 DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node->Name << "," << baseline->second.first->second->node->Name << "," << baseline->second.second->second->node->Name << " leave " << checker->second->node->Name << " inside the convex hull." << endl); 1358 1359 sign = tmp; 1359 1360 } … … 4291 4292 DoLog(2) && (Log() << Verbose(2) << "INFO: MiddleNode is " << **MiddleNode << "." << endl); 4292 4293 DoLog(2) && (Log() << Verbose(2) << "INFO: EndNode is " << **EndNode << "." << endl); 4293 DoLog(1) && (Log() << Verbose(1) << "INFO: Attempting to create triangle " << (*StartNode)-> getName() << ", " << (*MiddleNode)->getName() << " and " << (*EndNode)->getName()<< "." << endl);4294 DoLog(1) && (Log() << Verbose(1) << "INFO: Attempting to create triangle " << (*StartNode)->Name << ", " << (*MiddleNode)->Name << " and " << (*EndNode)->Name << "." << endl); 4294 4295 TriangleCandidates[0] = *StartNode; 4295 4296 TriangleCandidates[1] = *MiddleNode; … … 4713 4714 return; 4714 4715 } 4715 DoLog(0) && (Log() << Verbose(0) << "Nearest point on boundary is " << NearestPoint-> getName()<< "." << endl);4716 DoLog(0) && (Log() << Verbose(0) << "Nearest point on boundary is " << NearestPoint->Name << "." << endl); 4716 4717 4717 4718 // go through its lines and find the best one to split … … 4798 4799 ofstream *tempstream = NULL; 4799 4800 string NameofTempFile; 4800 string NumberName;4801 char NumberName[255]; 4801 4802 4802 4803 if (LastTriangle != NULL) { 4803 stringstream sstr; 4804 sstr << "-"<< TrianglesOnBoundary.size() << "-" << LastTriangle->endpoints[0]->node->getName() << "_" << LastTriangle->endpoints[1]->node->getName() << "_" << LastTriangle->endpoints[2]->node->getName(); 4805 NumberName = sstr.str(); 4804 sprintf(NumberName, "-%04d-%s_%s_%s", (int) TrianglesOnBoundary.size(), LastTriangle->endpoints[0]->node->Name, LastTriangle->endpoints[1]->node->Name, LastTriangle->endpoints[2]->node->Name); 4806 4805 if (DoTecplotOutput) { 4807 4806 string NameofTempFile(filename); -
src/tesselationhelpers.cpp
rb13ea4 r6670a97 829 829 if (TesselStruct->LastTriangle != NULL) { 830 830 for (int i=0;i<3;i++) 831 *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node-> getName();831 *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name; 832 832 } else { 833 833 *tecplot << "none"; … … 852 852 DoLog(1) && (Log() << Verbose(1) << "The following triangles were created:" << endl); 853 853 for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) { 854 DoLog(1) && (Log() << Verbose(1) << " " << runner->second->endpoints[0]->node-> getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName()<< endl);854 DoLog(1) && (Log() << Verbose(1) << " " << runner->second->endpoints[0]->node->Name << "<->" << runner->second->endpoints[1]->node->Name << "<->" << runner->second->endpoints[2]->node->Name << endl); 855 855 *tecplot << LookupList[runner->second->endpoints[0]->node->nr] << " " << LookupList[runner->second->endpoints[1]->node->nr] << " " << LookupList[runner->second->endpoints[2]->node->nr] << endl; 856 856 } -
src/unittests/LinkedCellUnitTest.cpp
rb13ea4 r6670a97 196 196 // check internal vectors, returns false, because this atom is not in LC-list! 197 197 Walker = World::getInstance().createAtom(); 198 Walker->setName("test"); 198 Walker->Name = Malloc<char>(6, "LinkedCellTest::SetIndexToNodeTest - Walker"); 199 strcpy(Walker->Name, "test"); 199 200 Walker->x= Vector(1,1,1); 200 201 CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToNode(Walker) ); … … 203 204 // check out of bounds vectors 204 205 Walker = World::getInstance().createAtom(); 205 Walker->setName("test"); 206 Walker->Name = Malloc<char>(6, "LinkedCellTest::SetIndexToNodeTest - Walker"); 207 strcpy(Walker->Name, "test"); 206 208 Walker->x = Vector(0,-1,0); 207 209 CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToNode(Walker) ); -
src/unittests/tesselation_boundarytriangleunittest.cpp
rb13ea4 r6670a97 37 37 tesselpoints[0] = new TesselPoint; 38 38 tesselpoints[0]->node = new Vector(0., 0., 0.); 39 tesselpoints[0]->setName("1"); 39 tesselpoints[0]->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 40 strcpy(tesselpoints[0]->Name, "1"); 40 41 tesselpoints[0]->nr = 1; 41 42 points[0] = new BoundaryPointSet(tesselpoints[0]); 42 43 tesselpoints[1] = new TesselPoint; 43 44 tesselpoints[1]->node = new Vector(0., 1., 0.); 44 tesselpoints[1]->setName("2"); 45 tesselpoints[1]->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 46 strcpy(tesselpoints[1]->Name, "2"); 45 47 tesselpoints[1]->nr = 2; 46 48 points[1] = new BoundaryPointSet(tesselpoints[1]); 47 49 tesselpoints[2] = new TesselPoint; 48 tesselpoints[2]->node = new Vector(1., 0., 0.); 49 tesselpoints[2]->setName("3"); 50 tesselpoints[2]->nr = 3; 50 tesselpoints[2] ->node = new Vector(1., 0., 0.); 51 tesselpoints[2] ->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 52 strcpy(tesselpoints[2] ->Name, "3"); 53 tesselpoints[2] ->nr = 3; 51 54 points[2] = new BoundaryPointSet(tesselpoints[2] ); 52 55 -
src/unittests/tesselation_insideoutsideunittest.cpp
rb13ea4 r6670a97 38 38 Walker = new TesselPoint; 39 39 Walker->node = new Vector(0., 0., 0.); 40 Walker->setName("1"); 40 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 41 strcpy(Walker->Name, "1"); 41 42 Walker->nr = 1; 42 43 Corners.push_back(Walker); 43 44 Walker = new TesselPoint; 44 45 Walker->node = new Vector(0., 1., 0.); 45 Walker->setName("2"); 46 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 47 strcpy(Walker->Name, "2"); 46 48 Walker->nr = 2; 47 49 Corners.push_back(Walker); 48 50 Walker = new TesselPoint; 49 51 Walker->node = new Vector(1., 0., 0.); 50 Walker->setName("3"); 52 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 53 strcpy(Walker->Name, "3"); 51 54 Walker->nr = 3; 52 55 Corners.push_back(Walker); 53 56 Walker = new TesselPoint; 54 57 Walker->node = new Vector(1., 1., 0.); 55 Walker->setName("4"); 58 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 59 strcpy(Walker->Name, "4"); 56 60 Walker->nr = 4; 57 61 Corners.push_back(Walker); 58 62 Walker = new TesselPoint; 59 63 Walker->node = new Vector(0., 0., 1.); 60 Walker->setName("5"); 64 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 65 strcpy(Walker->Name, "5"); 61 66 Walker->nr = 5; 62 67 Corners.push_back(Walker); 63 68 Walker = new TesselPoint; 64 69 Walker->node = new Vector(0., 1., 1.); 65 Walker->setName("6"); 70 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 71 strcpy(Walker->Name, "6"); 66 72 Walker->nr = 6; 67 73 Corners.push_back(Walker); 68 74 Walker = new TesselPoint; 69 75 Walker->node = new Vector(1., 0., 1.); 70 Walker->setName("7"); 76 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 77 strcpy(Walker->Name, "7"); 71 78 Walker->nr = 7; 72 79 Corners.push_back(Walker); 73 80 Walker = new TesselPoint; 74 81 Walker->node = new Vector(1., 1., 1.); 75 Walker->setName("8"); 82 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 83 strcpy(Walker->Name, "8"); 76 84 Walker->nr = 8; 77 85 Corners.push_back(Walker); -
src/unittests/tesselationunittest.cpp
rb13ea4 r6670a97 37 37 Walker = new TesselPoint; 38 38 Walker->node = new Vector(1., 0., -1.); 39 Walker->setName("1"); 39 Walker->Name = Malloc<char>(3, "TesselationTest::setUp"); 40 strcpy(Walker->Name, "1"); 40 41 Walker->nr = 1; 41 42 Corners.push_back(Walker); 42 43 Walker = new TesselPoint; 43 44 Walker->node = new Vector(-1., 1., -1.); 44 Walker->setName("2"); 45 Walker->Name = Malloc<char>(3, "TesselationTest::setUp"); 46 strcpy(Walker->Name, "2"); 45 47 Walker->nr = 2; 46 48 Corners.push_back(Walker); 47 49 Walker = new TesselPoint; 48 50 Walker->node = new Vector(-1., -1., -1.); 49 Walker->setName("3"); 51 Walker->Name = Malloc<char>(3, "TesselationTest::setUp"); 52 strcpy(Walker->Name, "3"); 50 53 Walker->nr = 3; 51 54 Corners.push_back(Walker); 52 55 Walker = new TesselPoint; 53 56 Walker->node = new Vector(-1., 0., 1.); 54 Walker->setName("4"); 57 Walker->Name = Malloc<char>(3, "TesselationTest::setUp"); 58 strcpy(Walker->Name, "4"); 55 59 Walker->nr = 4; 56 60 Corners.push_back(Walker);
Note:
See TracChangeset
for help on using the changeset viewer.