OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
vector_dist_ofb.hpp
1 /*
2  * vector_dist_ofb.hpp
3  *
4  * Created on: Jan 13, 2016
5  * Author: i-bird
6  */
7 
8 #ifndef SRC_VECTOR_VECTOR_DIST_OFB_HPP_
9 #define SRC_VECTOR_VECTOR_DIST_OFB_HPP_
10 
17 {
26  static size_t out(size_t pp_id, size_t p_id)
27  {
28  return -1;
29  }
30 };
31 
34 {
43  static size_t out(size_t pp_id, size_t p_id)
44  {
45  std::cerr << "Warning: " << __FILE__ << ":" << __LINE__ << " out of bound particle detected " << std::endl;
46 
47  return -1;
48  }
49 };
50 
52 struct Nothing
53 {
62  static size_t out(size_t pp_id, size_t p_id)
63  {
64  return -1;
65  }
66 };
67 
69 struct Error
70 {
79  static size_t out(size_t pp_id, size_t p_id)
80  {
81  std::cerr << "Error: " << __FILE__ << ":" << __LINE__ << " out of bound particle detected " << std::endl;
82 
83  exit(-1);
84 
85  return -1;
86  }
87 };
88 
89 #endif /* SRC_VECTOR_VECTOR_DIST_OFB_HPP_ */
Out-of-bound policy do nothing.
Out-of-bound policy kill the particle but print a warning.
static size_t out(size_t pp_id, size_t p_id)
It decide what to do when the particle is out.
static size_t out(size_t pp_id, size_t p_id)
It decide what to do when the particle is out.
Out-of-bound policy kill the program.
Out of bound policy it detect out of bound particles and decide what to do.
static size_t out(size_t pp_id, size_t p_id)
It decide what to do when the particle is out.
static size_t out(size_t pp_id, size_t p_id)
It decide what to do when the particle is out.