Medusa
1.1
Coordinate Free Mehless Method implementation
GeneralFill_fwd.hpp
Go to the documentation of this file.
1
#ifndef MEDUSA_BITS_DOMAINS_GENERALFILL_FWD_HPP_
2
#define MEDUSA_BITS_DOMAINS_GENERALFILL_FWD_HPP_
3
11
#include <
medusa/Config.hpp
>
12
18
namespace
mm
{
19
20
template
<
typename
vec_t>
21
class
DomainDiscretization;
22
42
template
<
typename
vec_t>
43
class
GeneralFill
{
44
public
:
45
typedef
typename
vec_t::scalar_t
scalar_t
;
46
typedef
vec_t
vector_t
;
47
enum
{
dim
=
vec_t::dim
};
49
50
private
:
51
int
max_points
= 5000000;
52
int
seed_
;
53
int
n_samples
= 15;
54
scalar_t
zeta
= 1 - 1e-10;
55
56
public
:
57
GeneralFill
();
58
63
GeneralFill
&
maxPoints
(
int
max_points
) { this->max_points =
max_points
;
return
*
this
; }
65
GeneralFill
&
seed
(
int
seed
) {
seed_
=
seed
;
return
*
this
; }
68
GeneralFill
&
proximityTolerance
(
scalar_t
zeta
);
74
GeneralFill
&
numSamples
(
int
n_samples
) { this->n_samples =
n_samples
;
return
*
this
; }
75
77
template
<
typename
func_t>
78
void
operator()
(
DomainDiscretization<vec_t>
& domain,
const
func_t& h,
int
type = 0)
const
;
79
90
template
<
typename
func_t,
typename
search_structure_t>
91
void
operator()
(
DomainDiscretization<vec_t>
& domain,
const
func_t& h,
92
search_structure_t& search,
int
type = 0)
const
;
93
95
void
operator()
(
DomainDiscretization<vec_t>
& domain,
const
scalar_t
& h,
int
type = 0)
const
{
96
this->
operator()
(domain, [=] (
const
vector_t
&) {
return
h; }, type);
97
}
98
};
99
100
}
// namespace mm
101
102
#endif // MEDUSA_BITS_DOMAINS_GENERALFILL_FWD_HPP_
mm
Root namespace for the whole library.
Definition:
Gaussian.hpp:14
mm::GeneralFill::zeta
scalar_t zeta
Proximity tolerance.
Definition:
GeneralFill_fwd.hpp:54
mm::GeneralFill::scalar_t
vec_t::scalar_t scalar_t
Scalar type;.
Definition:
GeneralFill_fwd.hpp:45
scalar_t
Scalar scalar_t
Type of the elements, alias of Scalar.
Definition:
MatrixBaseAddons.hpp:16
mm::DomainDiscretization
Class representing domain discretization along with an associated shape.
Definition:
DomainDiscretization_fwd.hpp:46
dim
@ dim
Number of elements of this matrix.
Definition:
MatrixBaseAddons.hpp:14
mm::GeneralFill::dim
@ dim
Dimensionality of the domain.
Definition:
GeneralFill_fwd.hpp:48
mm::GeneralFill
Implements general n-d node placing algorithm, as described in https://arxiv.org/abs/1812....
Definition:
GeneralFill_fwd.hpp:43
mm::GeneralFill::proximityTolerance
GeneralFill & proximityTolerance(scalar_t zeta)
Set proximity tolerance.
mm::GeneralFill::maxPoints
GeneralFill & maxPoints(int max_points)
Maximal number of points generated.
Definition:
GeneralFill_fwd.hpp:63
mm::GeneralFill::max_points
int max_points
Maximal number of points generated.
Definition:
GeneralFill_fwd.hpp:51
mm::GeneralFill::vector_t
vec_t vector_t
Vector type.
Definition:
GeneralFill_fwd.hpp:46
mm::GeneralFill::seed_
int seed_
Seed for the random number generator.
Definition:
GeneralFill_fwd.hpp:52
Config.hpp
mm::GeneralFill::seed
GeneralFill & seed(int seed)
Set custom seed for the random number generator.
Definition:
GeneralFill_fwd.hpp:65
mm::GeneralFill::operator()
void operator()(DomainDiscretization< vec_t > &domain, const scalar_t &h, int type=0) const
Overload for constant function.
Definition:
GeneralFill_fwd.hpp:95
mm::GeneralFill::n_samples
int n_samples
Number of samples.
Definition:
GeneralFill_fwd.hpp:53
mm::GeneralFill::numSamples
GeneralFill & numSamples(int n_samples)
Controls the number of generated candidates from each point.
Definition:
GeneralFill_fwd.hpp:74
mm::GeneralFill::operator()
void operator()(DomainDiscretization< vec_t > &domain, const func_t &h, int type=0) const
Fills given domain according to the nodal spacing function h.
include
medusa
bits
domains
GeneralFill_fwd.hpp
Generated on Thu Jun 9 2022 09:42:25 for Medusa by
1.8.17