|
Medusa
1.1
Coordinate Free Mehless Method implementation
|
|
Go to the documentation of this file. 1 #ifndef MEDUSA_BITS_DOMAINS_GRAINDROPFILL_FWD_HPP_
2 #define MEDUSA_BITS_DOMAINS_GRAINDROPFILL_FWD_HPP_
21 template <
typename vec_t>
22 class DomainDiscretization;
36 template <
typename vec_t>
78 template <
typename func_t>
87 template <
typename func_t>
88 std::vector<vec_t>
fillBox(
const func_t& h)
const;
93 #endif // MEDUSA_BITS_DOMAINS_GRAINDROPFILL_FWD_HPP_
Root namespace for the whole library.
Implements general n-d node placing algorithm, as described in https://arxiv.org/abs/1906....
Scalar scalar_t
Type of the elements, alias of Scalar.
int max_points
Maximal number of points generated.
Class representing domain discretization along with an associated shape.
vec_t vector_t
Vector type.
vec_t bot
Bottom left corner of the box to fill.
GrainDropFill & initialSpacing(scalar_t dx)
Set initial discretization density by specifying number of dots along each dimension.
@ dim
Number of elements of this matrix.
GrainDropFill & excessFactor(scalar_t factor)
Set percentage of allowed generation over the top.
GrainDropFill & seed(int seed)
Set custom seed for the random number generator.
std::vector< vec_t > fillBox(const func_t &h) const
Actual fill algorithm which fills [bot, top] box with spacing h.
scalar_t excess_factor
Fill excess_factor*dx over the top of the domain.
int seed_
Seed for the random number generator.
@ dim
Dimensionality of the domain.
void operator()(DomainDiscretization< vec_t > &domain, const scalar_t &h, int type=0) const
Overload for constant function.
vec_t::scalar_t scalar_t
Scalar type;.
void operator()(DomainDiscretization< vec_t > &domain, const func_t &h, int type=0) const
Fills domain with a quality node distribution.
GrainDropFill & maxPoints(int max_points)
Maximal number of points generated.
vec_t top
Top right corner of the box to fill.
GrainDropFill(const vec_t &bot, const vec_t &top)
Prepare to fill domain within [bot, top] bounding box.
scalar_t dx
Initial discretization spacing.