49 std::srand(std::time(0));
56 std::srand(std::time(0));
60 static_assert(Spline::parDim() == 1 && Spline::geoDim() == 1,
61 "Interval creator requires parDim=1 and geoDim=1");
65 T xmin = std::min(x0, x1);
66 T xmax = std::max(x0, x1);
68 obj.transform([xmin, xmax](
const std::array<T, 1> X) {
69 return std::array<T, 1>{
70 static_cast<T
>(xmax * X[0] + xmin * (X[0] - T(1)))};
79 os << CreatorCore<T>::name() <<
"\n"
81 <<
"; x1min = " <<
x1min_ <<
", x1max = " <<
x1max_ <<
")";
98 std::srand(std::time(0));
103 const T &x1max,
const T &y0min,
const T &y0max,
104 const T &y1min,
const T &y1max)
107 std::srand(std::time(0));
111 static_assert(Spline::parDim() == 2 && Spline::geoDim() == 2,
112 "Rectangle creator requires parDim=2 and geoDim=2");
116 T xmin = std::min(x0, x1);
117 T xmax = std::max(x0, x1);
121 T ymin = std::min(y0, y1);
122 T ymax = std::max(y0, y1);
124 obj.transform([xmin, xmax, ymin, ymax](
const std::array<T, 2> X) {
125 return std::array<T, 2>{
126 static_cast<T
>(xmax * X[0] + xmin * (X[0] - T(1))),
127 static_cast<T
>(ymax * X[1] + ymin * (X[1] - T(1)))
137 os << CreatorCore<T>::name() <<
"\n"
141 <<
"; y1min = " <<
y1min_ <<
", y1max = " <<
y1max_ <<
")";
159 std::srand(std::time(0));
164 const T &x1max,
const T &y0min,
const T &y0max,
165 const T &y1min,
const T &y1max,
const T &z0min,
166 const T &z0max,
const T &z1min,
const T &z1max)
170 std::srand(std::time(0));
174 static_assert(Spline::parDim() == 3 && Spline::geoDim() == 3,
175 "Cuboid creator requires parDim=3 and geoDim=3");
179 T xmin = std::min(x0, x1);
180 T xmax = std::max(x0, x1);
184 T ymin = std::min(y0, y1);
185 T ymax = std::max(y0, y1);
189 T zmin = std::min(z0, z1);
190 T zmax = std::max(z0, z1);
192 obj.transform([xmin, xmax, ymin, ymax, zmin, zmax](
const std::array<T, 3> X) {
193 return std::array<T, 3>{
194 static_cast<T
>(xmax * X[0] + xmin * (X[0] - T(1))),
195 static_cast<T
>(ymax * X[1] + ymin * (X[1] - T(1))),
196 static_cast<T
>(zmax * X[2] + zmin * (X[2] - T(1)))
206 os << CreatorCore<T>::name() <<
"\n"
212 <<
"; z1min = " <<
z1min_ <<
", z1max = " <<
z1max_ <<
")";
216 T
x0min_,
x0max_,
x1min_,
x1max_,
y0min_,
y0max_,
y1min_,
y1max_,
z0min_,
z0max_,
z1min_,
z1max_;
Abstract creator class.
Definition creator.hpp:27
virtual void pretty_print(std::ostream &os=Log(log::info)) const noexcept=0
Returns a string representation of the CreatorCore object.
Cuboid creator class.
Definition creator.hpp:152
T z0min_
Definition creator.hpp:216
T z1min_
Definition creator.hpp:216
T y0max_
Definition creator.hpp:216
T z0max_
Definition creator.hpp:216
CuboidCreator()
Default constructor.
Definition creator.hpp:155
T y0min_
Definition creator.hpp:216
T z1max_
Definition creator.hpp:216
virtual void pretty_print(std::ostream &os=Log(log::info)) const noexcept override
Returns a string representation of the RectangleCreator object.
Definition creator.hpp:205
T y1min_
Definition creator.hpp:216
T x1max_
Definition creator.hpp:216
T x1min_
Definition creator.hpp:216
T x0max_
Definition creator.hpp:216
T y1max_
Definition creator.hpp:216
auto & next(Spline &obj) const
Definition creator.hpp:173
CuboidCreator(const T &x0min, const T &x0max, const T &x1min, const T &x1max, const T &y0min, const T &y0max, const T &y1min, const T &y1max, const T &z0min, const T &z0max, const T &z1min, const T &z1max)
Bounds constructor.
Definition creator.hpp:163
T x0min_
Definition creator.hpp:216
Interval creator class.
Definition creator.hpp:45
T x1max_
Definition creator.hpp:85
IntervalCreator()
Default constructor.
Definition creator.hpp:48
virtual void pretty_print(std::ostream &os=Log(log::info)) const noexcept override
Returns a string representation of the IntervalCreator object.
Definition creator.hpp:78
T x0min_
Definition creator.hpp:85
auto & next(Spline &obj) const
Definition creator.hpp:59
T x1min_
Definition creator.hpp:85
IntervalCreator(const T &x0min, const T &x0max, const T &x1min, const T &x1max)
Bounds constructor.
Definition creator.hpp:53
T x0max_
Definition creator.hpp:85
Rectangle creator class.
Definition creator.hpp:92
T y0min_
Definition creator.hpp:145
T y0max_
Definition creator.hpp:145
virtual void pretty_print(std::ostream &os=Log(log::info)) const noexcept override
Returns a string representation of the RectangleCreator object.
Definition creator.hpp:136
T x1min_
Definition creator.hpp:145
RectangleCreator(const T &x0min, const T &x0max, const T &x1min, const T &x1max, const T &y0min, const T &y0max, const T &y1min, const T &y1max)
Bounds constructor.
Definition creator.hpp:102
T y1min_
Definition creator.hpp:145
T x0min_
Definition creator.hpp:145
auto & next(Spline &obj) const
Definition creator.hpp:110
T x1max_
Definition creator.hpp:145
RectangleCreator()
Default constructor.
Definition creator.hpp:95
T y1max_
Definition creator.hpp:145
T x0max_
Definition creator.hpp:145
Full qualified name descriptor.
Definition fqn.hpp:26
Concept to identify template parameters that are derived from iganet::Spline_.
Definition bspline.hpp:3259
Full qualified name utility functions.
Definition boundary.hpp:22
struct iganet::@0 Log
Logger.
std::ostream & operator<<(std::ostream &os, const Boundary< Spline > &obj)
Print (as string) a Boundary object.
Definition boundary.hpp:1963