5 #ifndef MESHGENERATOR_HPP 6 #define MESHGENERATOR_HPP 1 9 #define _USE_MATH_DEFINES 13 #include "../tessellation/geometry.hpp" 15 #include <boost/random/mersenne_twister.hpp> 16 #include <boost/random/uniform_real_distribution.hpp> 43 double xmax,
double ymax,
double xmin,
double ymin,
double xc = 0,
double yc = 0);
59 double xc=0,
double yc=0,
double xmax=1,
double ymax=1,
double xmin=-1,
75 double xc=0,
double yc=0,
double xmax=1,
double ymax=1,
double xmin=-1,
double ymin=-1);
86 Vector2D const& center,
double angle_start = 0,
double angle_end = 2 * M_PI);
97 std::vector<Vector2D>
Line(
int PointNum,
double xmin,
double xmax,
double ymin,
double ymax);
114 double xc,
double yc,
double xmax,
double ymax,
double xmin,
double ymin,
115 double alpha,
double angle_start = 0,
double angle_end = 2 * M_PI);
129 std::vector<Vector2D>
RandPointsR(
int PointNum,
double xl=-0.5,
double xr=0.5,
130 double yd=-0.5,
double yu=0.5,
double minR=0,
double xc=0,
152 std::vector<Vector2D>
RandSquare(
int PointNum,
double xl = -0.5,
double xr = 0.5,
153 double yd = -0.5,
double yu = 0.5);
166 std::vector<Vector2D>
RandSquare(
int PointNum,boost::random::mt19937 &eng,
167 double xl=-0.5,
double xr=0.5,
double yd=-0.5,
double yu=0.5);
181 std::vector<Vector2D>
RandPointsRa(
int PointNum,
double Rmin,
double Rmax,
double alpha,
193 std::vector<Vector2D>
RandPointsRmax(
int PointNum,
double Rmin,
double Rmax,
194 double xc=0,
double yc=0);
196 #endif //MESHGENERATOR_HPP std::vector< Vector2D > Line(int PointNum, double xmin, double xmax, double ymin, double ymax)
Creates a line of evenly spaced points y=slope*x+b.
std::vector< Vector2D > CirclePointsRmax_2(int PointNum, double Rmin, double Rmax, double xc=0, double yc=0, double xmax=1, double ymax=1, double xmin=-1, double ymin=1)
Generates a round grid with 1/r^2 point density confined to a rectangle given by xmin,xmax,ymin and ymax.
std::vector< Vector2D > circle_circumference(size_t point_number, double radius, Vector2D const ¢er, double angle_start=0, double angle_end=2 *M_PI)
Creates a circle of evenly spaced points.
std::vector< Vector2D > CirclePointsRmax_1(int PointNum, double Rmin, double Rmax, double xc=0, double yc=0, double xmax=1, double ymax=1, double xmin=-1, double ymin=-1)
Generates a round grid with 1/r point density confined to a rectangle given by xmin,xmax,ymin and ymax.
std::vector< Vector2D > RandPointsR(int PointNum, double xl=-0.5, double xr=0.5, double yd=-0.5, double yu=0.5, double minR=0, double xc=0, double yc=0)
Generates a rectangular grid with random 1/r point density.
std::vector< Vector2D > CirclePointsRmax_a(int PointNum, double Rmin, double Rmax, double xc, double yc, double xmax, double ymax, double xmin, double ymin, double alpha, double angle_start=0, double angle_end=2 *M_PI)
Generates a round grid with r^alpha point density confined to a rectangle given by xmin...
std::vector< Vector2D > RandPointsRa(int PointNum, double Rmin, double Rmax, double alpha, Vector2D const &lowerleft, Vector2D const &upperright, Vector2D const ¢er=Vector2D(0, 0))
Generates a random round grid with r^(1-a) point density.
std::vector< Vector2D > cartesian_mesh(int nx, int ny, Vector2D const &lower_left, Vector2D const &upper_right)
Generates a cartesian mesh.
std::vector< Vector2D > RandSquare(int PointNum, Vector2D const &lowerleft, Vector2D const &upperright)
Generates a random rectangular grid with uniform point density and a constant seed.
std::vector< Vector2D > RandPointsRmax(int PointNum, double Rmin, double Rmax, double xc=0, double yc=0)
Generates a random round grid with 1/r point density.
std::vector< Vector2D > CirclePointsRmax(int PointNum, double Rmin, double Rmax, double xmax, double ymax, double xmin, double ymin, double xc=0, double yc=0)
Generates a round grid with constant point density.