bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
mesh_predicates.h
Go to the documentation of this file.
1#ifndef MESH_PREDICATES_H
2#define MESH_PREDICATES_H
3
5
6namespace bitrl
7{
8namespace utils
9{
10namespace geom
11{
12
13struct Active : public IsActive
14{
15};
16
17struct OnProc
18{
19
21
22 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
23 {
24 return itr->pid() == pid_;
25 }
26
28};
29
31{
32
34
35 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
36 {
37 return itr->get_pid() == pid_ && itr->is_active();
38 }
39
41};
42
44{
45
47
48 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
49 {
50 return itr->is_vertex();
51 }
52};
53
54struct VertexNode : public IsVertex
55{
56};
57
59{
60 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
61 {
62
63 return (itr != nullptr && itr->is_vertex());
64 }
65};
66
68{
69 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
70 {
71
72 return (itr->is_vertex() && itr->is_active());
73 }
74};
75
77{
78 template <typename ITERATOR> bool operator()(const ITERATOR *itr) const
79 {
80
81 return (itr->is_vertex() && itr->is_active() && itr->on_boundary());
82 }
83};
84
85} // namespace geom
86} // namespace utils
87} // namespace bitrl
88#endif // MESH_PREDICATES_H
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14
std::size_t uint_t
uint_t
Definition bitrl_types.h:43
Definition predicates.h:21
Definition mesh_predicates.h:31
ActiveOnProc(uint_t pid=0)
Definition mesh_predicates.h:33
uint_t pid_
Definition mesh_predicates.h:40
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:35
Definition mesh_predicates.h:14
Definition mesh_predicates.h:44
IsVertex()
Definition mesh_predicates.h:46
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:48
Definition mesh_predicates.h:18
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:22
OnProc(uint_t pid=0)
Definition mesh_predicates.h:20
uint_t pid_
Definition mesh_predicates.h:27
Definition mesh_predicates.h:77
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:78
Definition mesh_predicates.h:68
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:69
Definition mesh_predicates.h:55
Definition mesh_predicates.h:59
bool operator()(const ITERATOR *itr) const
Definition mesh_predicates.h:60