Medusa  1.1
Coordinate Free Mehless Method implementation
BasicRelax.cpp
Go to the documentation of this file.
2 
8 namespace mm {
9 
11  nodes_ = nodes; return *this;
12 }
13 
15  initial_heat = in; return *this;
16 }
17 
19  final_heat = in; return *this;
20 }
21 
23  projection_type = in; return *this;
24 }
25 
27  assert_msg(0.0 <= in && in < 2.0, "Weird projection threshold, it is equal to %.6f, "
28  "but expected in range [0, 1].", in);
29  boundary_projection_threshold = in; return *this;
30 }
31 
32 
34  num_neighbours = neighbours; return *this;
35 }
36 
38  num_iterations = iterations; return *this;
39 }
40 
42  potential_order = order; return *this;
43 }
44 
46  rebuild_tree_after = iterations; return *this;
47 }
48 
49 } // namespace mm
mm::BasicRelax::nodes_
Range< int > nodes_
List of nodes to process.
Definition: BasicRelax_fwd.hpp:73
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
mm::BasicRelax::projection_type
ProjectionType projection_type
On boundary projection method.
Definition: BasicRelax_fwd.hpp:74
mm::BasicRelax::initialHeat
BasicRelax & initialHeat(double in)
Sets initial heat.
Definition: BasicRelax.cpp:14
mm::BasicRelax::boundaryProjectionThreshold
BasicRelax & boundaryProjectionThreshold(double in)
Sets threshold for adding nodes on boundary, i.e. if node and are distances to closest boundary nod...
Definition: BasicRelax.cpp:26
mm::BasicRelax::finalHeat
BasicRelax & finalHeat(double in)
Sets final heat.
Definition: BasicRelax.cpp:18
mm::BasicRelax::rebuildTreeAfter
BasicRelax & rebuildTreeAfter(int iterations)
Sets rebuild tree frequency.
Definition: BasicRelax.cpp:45
assert_msg
#define assert_msg(cond,...)
Assert with better error reporting.
Definition: assert.hpp:75
mm::BasicRelax::potentialOrder
BasicRelax & potentialOrder(int order)
Sets order of repulsing potential.
Definition: BasicRelax.cpp:41
mm::BasicRelax::onlyNodes
BasicRelax & onlyNodes(Range< int > nodes)
Move only given nodes.
Definition: BasicRelax.cpp:10
mm::BasicRelax::boundary_projection_threshold
double boundary_projection_threshold
Threshold for projecting nodes on boundary.
Definition: BasicRelax_fwd.hpp:75
mm::BasicRelax::ProjectionType
ProjectionType
Indicating type of projection used when a relax node goes out of the domain.
Definition: BasicRelax_fwd.hpp:46
mm::BasicRelax::num_neighbours
int num_neighbours
Number of nodes to consider when calculating the potential.
Definition: BasicRelax_fwd.hpp:67
mm::BasicRelax::iterations
BasicRelax & iterations(int iterations)
Sets number of iterations.
Definition: BasicRelax.cpp:37
mm::BasicRelax::final_heat
double final_heat
Heat at the end of the relax, usually around 0.
Definition: BasicRelax_fwd.hpp:70
mm::BasicRelax::initial_heat
double initial_heat
Initial heat, usually between 0 and 5.
Definition: BasicRelax_fwd.hpp:69
mm::BasicRelax::num_iterations
int num_iterations
Number of iterations performed.
Definition: BasicRelax_fwd.hpp:68
mm::BasicRelax::projectionType
BasicRelax & projectionType(ProjectionType in)
Determines how to handle nodes that escape during relaxation.
Definition: BasicRelax.cpp:22
mm::BasicRelax::rebuild_tree_after
int rebuild_tree_after
How often engine rebuild search tree, 1 is perfect but slow.
Definition: BasicRelax_fwd.hpp:72
mm::BasicRelax::potential_order
int potential_order
Order of repulsing potential.
Definition: BasicRelax_fwd.hpp:71
mm::BasicRelax::numNeighbours
BasicRelax & numNeighbours(int neighbours)
Sets num neighbours.
Definition: BasicRelax.cpp:33
BasicRelax.hpp
mm::Range< int >
mm::BasicRelax
Redistributes nodes towards more uniform distribution by minimizing potential between nodes.
Definition: BasicRelax_fwd.hpp:43