Ignore:
Timestamp:
Oct 18, 2009, 2:51:38 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
77894f
Parents:
b0ee98
git-author:
Frederik Heber <heber@…> (10/18/09 14:15:37)
git-committer:
Frederik Heber <heber@…> (10/18/09 14:51:38)
Message:

Huge refactoring: molecule::ListOfBondsPerAtom and molecule::NumberOfBondsPerAtom removed, atom::ListOfBonds introduced. Unit Test for ListOfBonds manipulation introduced.

  • changes to builder.cpp: removed CreateListOfBondsPerAtom() calls, as the creation of the global arrays is not necessary anymore
  • changes to LinkedCell: LinkedCell::CheckBounds(int[NDIM]) does not admonish out of bonds as this is not desired for the local offset which may become out of bounds.
  • changes to lists.hpp templates: BUGFIX: unlink() now sets ->next and ->previous to NULL, cleanup() uses removedwithoutcheck()
  • new templates for molecule.hpp: SumPerAtom() allows for summation of the return value of atom:...() member fiunctions. This is needed e.g. for atom::CorrectBondDegree()

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/linkedcell.cpp

    rb0ee98 r872b51  
    203203
    204204/** Checks whether LinkedCell::n[] plus relative offset is each within [0,N[]].
     205 * Note that for this check we don't admonish if out of bounds.
    205206 * \param relative[NDIM] relative offset to current cell
    206207 * \return if all in intervals - true, else -false
     
    211212  for(int i=0;i<NDIM;i++)
    212213    status = status && ((n[i]+relative[i] >=0) && (n[i]+relative[i] < N[i]));
    213   if (!status)
    214   cerr << "ERROR: indices are out of bounds!" << endl;
    215214  return status;
    216215};
Note: See TracChangeset for help on using the changeset viewer.