13 typedef std::array<RowVectorNd, 2>
BBox;
19 virtual bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const = 0;
21 virtual int id(
const size_t element_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const
31 static std::shared_ptr<Selection>
build(
32 const json &j_selections,
33 const BBox &mesh_bbox,
34 const std::string &root_path =
"");
42 const json &j_selections,
43 const BBox &mesh_bbox,
44 const std::string &root_path =
"");
58 const json &selection,
59 const BBox &mesh_bbox);
61 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
73 const json &selection,
74 const BBox &mesh_bbox);
76 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override
81 int id(
const size_t element_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
95 const json &selection,
96 const BBox &mesh_bbox);
98 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
111 const json &selection,
112 const BBox &mesh_bbox);
114 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
129 const json &selection,
130 const BBox &mesh_bbox);
132 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
145 const json &selection,
146 const BBox &mesh_bbox);
148 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
163 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override {
return true; }
172 const std::vector<int> &ids);
174 virtual bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override {
return true; }
176 virtual int id(
const size_t element_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
190 const std::string &file_path,
191 const int id_offset = 0);
193 bool inside(
const size_t p_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
194 int id(
const size_t element_id,
const std::vector<int> &vs,
const RowVectorNd &p)
const override;
197 std::vector<std::pair<int, std::vector<int>>>
data_;
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
int id(const size_t element_id, const std::vector< int > &vs, const RowVectorNd &p) const override
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
int id(const size_t element_id, const std::vector< int > &vs, const RowVectorNd &p) const override
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
std::vector< std::pair< int, std::vector< int > > > data_
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
std::array< RowVectorNd, 2 > BBox
virtual bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const =0
virtual int id(const size_t element_id, const std::vector< int > &vs, const RowVectorNd &p) const
static std::shared_ptr< Selection > build(const json &j_selections, const BBox &mesh_bbox, const std::string &root_path="")
Build a selection objects from a JSON selection.
static std::vector< std::shared_ptr< utils::Selection > > build_selections(const json &j_selections, const BBox &mesh_bbox, const std::string &root_path="")
Build a vector of selection objects from a JSON selection(s).
virtual bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
virtual int id(const size_t element_id, const std::vector< int > &vs, const RowVectorNd &p) const override
bool inside(const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd