#include <GeneralFill_fwd.hpp>
Implements general n
-d node placing algorithm, as described in https://arxiv.org/abs/1812.03160 If you specifically use this algorithm, we would appreciate if you cite the above publication.
The algorithm starts from existing nodes, usually the boundary discretization nodes. They are processed in a queue and for each node, new candidates are generated around it on a circle with radius defined by a supplied density function. Candidates are then checked and some are accepted and added to the queue. This is repeated until no more nodes can be generated or the maximal number of points has been reached.
Usage example:
Using background grid:
Definition at line 43 of file GeneralFill_fwd.hpp.
Public Member Functions | |
GeneralFill & | maxPoints (int max_points) |
Maximal number of points generated. More... | |
GeneralFill & | seed (int seed) |
Set custom seed for the random number generator. More... | |
GeneralFill & | proximityTolerance (scalar_t zeta) |
Set proximity tolerance. More... | |
GeneralFill & | numSamples (int n_samples) |
Controls the number of generated candidates from each point. More... | |
template<typename func_t > | |
void | operator() (DomainDiscretization< vec_t > &domain, const func_t &h, int type=0) const |
Fills given domain according to the nodal spacing function h . More... | |
template<typename func_t , typename search_structure_t > | |
void | operator() (DomainDiscretization< vec_t > &domain, const func_t &h, search_structure_t &search, int type=0) const |
Fills domain with a quality node distribution. More... | |
void | operator() (DomainDiscretization< vec_t > &domain, const scalar_t &h, int type=0) const |
Overload for constant function. More... | |
Public Types | |
enum | { dim = vec_t::dim } |
Store dimension of the domain. More... | |
typedef vec_t::scalar_t | scalar_t |
Scalar type;. More... | |
typedef vec_t | vector_t |
Vector type. More... | |
Private Attributes | |
int | max_points = 5000000 |
Maximal number of points generated. More... | |
int | seed_ |
Seed for the random number generator. More... | |
int | n_samples = 15 |
Number of samples. More... | |
scalar_t | zeta = 1 - 1e-10 |
Proximity tolerance. More... | |
anonymous enum |
Store dimension of the domain.
Enumerator | |
---|---|
dim | Dimensionality of the domain. |
Definition at line 48 of file GeneralFill_fwd.hpp.
|
inline |
Maximal number of points generated.
Definition at line 63 of file GeneralFill_fwd.hpp.
|
inline |
Controls the number of generated candidates from each point.
For 2-D it is the actual number of candidates, for 3-D it is the number of candidates on the great circle. Its value is ignored in 1-D.
Definition at line 74 of file GeneralFill_fwd.hpp.
void mm::GeneralFill< vec_t >::operator() | ( | DomainDiscretization< vec_t > & | domain, |
const func_t & | h, | ||
int | type = 0 |
||
) | const |
Fills given domain according to the nodal spacing function h
.
void mm::GeneralFill< vec_t >::operator() | ( | DomainDiscretization< vec_t > & | domain, |
const func_t & | h, | ||
search_structure_t & | search, | ||
int | type = 0 |
||
) | const |
Fills domain with a quality node distribution.
domain | Domain to fill with nodes. Can be partially filled. |
h | Nodal spacing function. |
search | Spatial search structure to be used, e.g. a KDTree or KDGrid. |
type | Type of the nodes. If 0 the engines default value is used. |
#include <medusa/bits/domains/GeneralFill.hpp>
must be included additionally to #include <medusa/Medusa_fwd.hpp>
.
|
inline |
Overload for constant function.
Definition at line 95 of file GeneralFill_fwd.hpp.
GeneralFill& mm::GeneralFill< vec_t >::proximityTolerance | ( | scalar_t | zeta | ) |
Set proximity tolerance.
A new candidate mush be at least zeta*h(p)
away. It should hold that 0 < zeta < 1
.
|
inline |
Set custom seed for the random number generator.
Definition at line 65 of file GeneralFill_fwd.hpp.
|
private |
Maximal number of points generated.
Definition at line 51 of file GeneralFill_fwd.hpp.
|
private |
Number of samples.
Definition at line 53 of file GeneralFill_fwd.hpp.
|
private |
Seed for the random number generator.
Definition at line 52 of file GeneralFill_fwd.hpp.
|
private |
Proximity tolerance.
Definition at line 54 of file GeneralFill_fwd.hpp.