Hermes2D  3.0
multimesh_dg_neighbor_tree_node.cpp
1 // This file is part of Hermes2D.
2 //
3 // Hermes2D is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // Hermes2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Hermes2D. If not, see <http://www.gnu.org/licenses/>.
15 
16 #include "discrete_problem/dg/multimesh_dg_neighbor_tree_node.h"
17 #include "global.h"
18 
19 namespace Hermes
20 {
21  namespace Hermes2D
22  {
23  MultimeshDGNeighborTreeNode::MultimeshDGNeighborTreeNode(MultimeshDGNeighborTreeNode* parent, unsigned int transformation) : parent(parent), transformation(transformation)
24  {
25  left_son = right_son = nullptr;
26  }
27  MultimeshDGNeighborTreeNode::~MultimeshDGNeighborTreeNode()
28  {
29  if (left_son)
30  {
31  delete left_son;
32  left_son = nullptr;
33  }
34  if (right_son)
35  {
36  delete right_son;
37  right_son = nullptr;
38  }
39  }
40  void MultimeshDGNeighborTreeNode::set_left_son(MultimeshDGNeighborTreeNode* left_son)
41  {
42  this->left_son = left_son;
43  }
44  void MultimeshDGNeighborTreeNode::set_right_son(MultimeshDGNeighborTreeNode* right_son)
45  {
46  this->right_son = right_son;
47  }
48  void MultimeshDGNeighborTreeNode::set_transformation(unsigned int transformation)
49  {
50  this->transformation = transformation;
51  }
52  MultimeshDGNeighborTreeNode* MultimeshDGNeighborTreeNode::get_left_son()
53  {
54  return left_son;
55  }
56  MultimeshDGNeighborTreeNode* MultimeshDGNeighborTreeNode::get_right_son()
57  {
58  return right_son;
59  }
60  unsigned int MultimeshDGNeighborTreeNode::get_transformation()
61  {
62  return this->transformation;
63  }
64  }
65 }
Definition: adapt.h:24
Common definitions for Hermes2D.