Hermes2D  2.0
element_to_refine.cpp
1 #include "global.h"
2 #include "element_to_refine.h"
3 
4 namespace Hermes
5 {
6  namespace Hermes2D
7  {
9  {
10  };
11 
12  ElementToRefine::ElementToRefine(int id, int comp) : id(id), comp(comp), split(H2D_REFINEMENT_H)
13  {
14  };
15 
16  ElementToRefine::ElementToRefine(const ElementToRefine &orig) : id(orig.id), comp(orig.comp), split(orig.split)
17  {
18  copy_orders(p, orig.p);
19  copy_orders(q, orig.q);
20  };
21 
22  int ElementToRefine::get_num_sons() const
23  {
24  return get_refin_sons(split);
25  };
26 
27  void ElementToRefine::copy_orders(int* dest, const int* src)
28  {
29  memcpy(dest, src, sizeof(int) * H2D_MAX_ELEMENT_SONS);
30  }
31 
33  {
34  id = orig.id;
35  comp = orig.comp;
36  split = orig.split;
37  copy_orders(p, orig.p);
38  copy_orders(q, orig.q);
39  return *this;
40  }
41  }
42 }