| 1 | /*
 | 
|---|
| 2 |  * Project: MoleCuilder
 | 
|---|
| 3 |  * Description: creates and alters molecular systems
 | 
|---|
| 4 |  * Copyright (C)  2010 University of Bonn. All rights reserved.
 | 
|---|
| 5 |  * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | /**
 | 
|---|
| 9 |  * \file filling.dox
 | 
|---|
| 10 |  *
 | 
|---|
| 11 |  * Created on: Jan 16, 2012
 | 
|---|
| 12 |  *    Author: heber
 | 
|---|
| 13 |  */
 | 
|---|
| 14 | 
 | 
|---|
| 15 | /** \page filling Filling a domain
 | 
|---|
| 16 |  *
 | 
|---|
| 17 |  * The idea behind filling a domain is to cluster it with a set of nodes,
 | 
|---|
| 18 |  * i.e. a position in space in such a way that e.g. around node is sufficient
 | 
|---|
| 19 |  * space to fill in the desired molecule. The logic of generating the nodes
 | 
|---|
| 20 |  * is responsible to create them in such a way as to allow for dense (or
 | 
|---|
| 21 |  * whatever specific) filling is desired. However, we must not make it too
 | 
|---|
| 22 |  * complicated. The generation logic for these nodes should concentrate on
 | 
|---|
| 23 |  * filling the specific domain (sphere, ellipsoid, cuboid, pyramid, ...)
 | 
|---|
| 24 |  * in the best possible way.
 | 
|---|
| 25 |  * Whether each node can be filled is then to ve decided by a predicate.
 | 
|---|
| 26 |  *
 | 
|---|
| 27 |  * The filling routine uses then both to traverse the given nodes and
 | 
|---|
| 28 |  * evaluate the predicate at each.
 | 
|---|
| 29 |  *
 | 
|---|
| 30 |  * Hence, the filling of a domain is abstracted into the following parts:
 | 
|---|
| 31 |  *
 | 
|---|
| 32 |  *  -# node generation
 | 
|---|
| 33 |  *  -# predicates
 | 
|---|
| 34 |  *  -# filling routine
 | 
|---|
| 35 |  *
 | 
|---|
| 36 |  * \section filling-node-generation Node generation
 | 
|---|
| 37 |  *
 | 
|---|
| 38 |  * The node generation is basically just a point or mesh generator that fills
 | 
|---|
| 39 |  * a specified region (best would be based on the class Shape) with a mesh in
 | 
|---|
| 40 |  * such a way as to fulfill certain criteria:
 | 
|---|
| 41 |  *
 | 
|---|
| 42 |  *    -# equidistant
 | 
|---|
| 43 |  *    -# containing certain primitive volumes (e.g. for fitting polymers)
 | 
|---|
| 44 |  *    -# ...
 | 
|---|
| 45 |  *
 | 
|---|
| 46 |  * \section filling-predicate Predicates
 | 
|---|
| 47 |  *
 | 
|---|
| 48 |  * The Predicate pattern has already been used with Descriptors and Shapes.
 | 
|---|
| 49 |  * These are simply function objects that return a boolean value. I.e. they
 | 
|---|
| 50 |  * decide whether the current node in the mesh is vacant and can be filled or
 | 
|---|
| 51 |  * not. As with the predicate() function in the class Descriptor, these should
 | 
|---|
| 52 |  * be composable via logic operators such as , &&, not, ...
 | 
|---|
| 53 |  *
 | 
|---|
| 54 |  * Note that each predicate receives on construction all the required
 | 
|---|
| 55 |  * information, e.g. LinkedCell_View or Tesselation references or objects, ...
 | 
|---|
| 56 |  *
 | 
|---|
| 57 |  * \section filling-filling-routine Filling routine
 | 
|---|
| 58 |  *
 | 
|---|
| 59 |  * The filling routine is then simply a function that goes through the given
 | 
|---|
| 60 |  * number of nodes (completely unaware of the geometry) and evaluates for each
 | 
|---|
| 61 |  * point the given predicates (which might be a composition of other predicates).
 | 
|---|
| 62 |  *
 | 
|---|
| 63 |  * It rejects all nodes that evaluate to false, the list of valid points is
 | 
|---|
| 64 |  * then traversed again and at each node a molecule is created.
 | 
|---|
| 65 |  *
 | 
|---|
| 66 |  *
 | 
|---|
| 67 |  *
 | 
|---|
| 68 |  * \date 2012-01-16
 | 
|---|
| 69 |  */
 | 
|---|