31 #ifndef COMPLEX_SHAPE_H 32 #define COMPLEX_SHAPE_H 36 #include "geometric_shape.h" 50 template <
typename... ConstructorArgs>
51 LevelSetShape *defineLevelSetShape(
SPHBody *sph_body,
const std::string &shape_name, ConstructorArgs &&...args)
53 size_t index = getShapeIndexByName(shape_name);
55 sph_body, *shapes_and_ops_[index].first, std::forward<ConstructorArgs>(args)...);
56 shapes_and_ops_[index].first = level_set_shape;
57 return level_set_shape;
72 template <
typename... Args>
76 template <
typename... Args>
79 Transformd(0.5 * (shape.bounding_box_.second + shape.bounding_box_.first)),
80 0.5 * (shape.bounding_box_.second - shape.bounding_box_.first),
std::forward<Args>(args)...){};
82 Vecd HalfSize() {
return halfsize_; }
83 bool checkInBounds(
int axis,
const Vecd &point);
84 bool checkUpperBound(
int axis,
const Vecd &point);
85 bool checkLowerBound(
int axis,
const Vecd &point);
86 bool checkNearUpperBound(
int axis,
const Vecd &point, Real threshold);
87 bool checkNearLowerBound(
int axis,
const Vecd &point, Real threshold);
88 Vecd getUpperPeriodic(
int axis,
const Vecd &point);
89 Vecd getLowerPeriodic(
int axis,
const Vecd &point);
93 #endif // COMPLEX_SHAPE_H AlignedBoxShape(const Shape &shape, Args &&...args)
Definition: complex_shape.h:77
Definition: geometric_shape.h:38
Base class for all volumetric geometries Note that checkContain and findClosest point are basic funct...
Definition: base_geometry.h:64
Definition: complex_shape.h:44
Used to describe a bounding box in which the plane vertical to axis direction is aligned to a planar ...
Definition: complex_shape.h:68
A shape using level set to define geometry.
Definition: level_set_shape.h:46
Shape is the base class for all geometries.
a collections of shapes with binary operations This class so that it has ownership of all shapes by u...
Definition: base_geometry.h:101
SPHBody is a base body with basic data and functions. Its derived class can be a real fluid body...
Definition: base_body.h:61
AlignedBoxShape(const Transformd &transformd, Args &&...args)
Definition: complex_shape.h:73
Definition: solid_body_supplementary.cpp:9