pml_meshes.cc
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 // Non-inline functions for pml meshes and associated (generic) elements
31 
32 #include "pml_meshes.h"
33 
34 namespace oomph
35 {
36 
37 //===================================================================
38 /// \short Namespace with functions that allow the construction of
39 /// PML layers on axis aligned boundaries
40 //===================================================================
41 namespace TwoDimensionalPMLHelper
42 {
43  /// helper function for sorting the right boundary nodes
44  bool sorter_right_boundary(Node* nod_i_pt, Node* nod_j_pt)
45  {
46  return (nod_i_pt -> x(1) < nod_j_pt -> x(1));
47  }
48 
49  /// helper function for sorting the top boundary nodes
50  bool sorter_top_boundary(Node* nod_i_pt, Node* nod_j_pt)
51  {
52  return (nod_i_pt -> x(0) < nod_j_pt -> x(0));
53  }
54 
55  /// helper function for sorting the left boundary nodes
56  bool sorter_left_boundary(Node* nod_i_pt, Node* nod_j_pt)
57  {
58  return (nod_i_pt -> x(1) > nod_j_pt -> x(1));
59  }
60 
61  /// helper function for sorting the bottom boundary nodes
62  bool sorter_bottom_boundary(Node* nod_i_pt, Node* nod_j_pt)
63  {
64  return ( nod_i_pt -> x(0) > nod_j_pt -> x(0));
65  }
66 }
67 //////////////////////////////////////////////////////////////////////
68 //////////////////////////////////////////////////////////////////////
69 //////////////////////////////////////////////////////////////////////
70 
71 
72 }
bool sorter_left_boundary(Node *nod_i_pt, Node *nod_j_pt)
helper function for sorting the left boundary nodes
Definition: pml_meshes.cc:56
bool sorter_bottom_boundary(Node *nod_i_pt, Node *nod_j_pt)
helper function for sorting the bottom boundary nodes
Definition: pml_meshes.cc:62
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Definition: nodes.h:852
bool sorter_right_boundary(Node *nod_i_pt, Node *nod_j_pt)
helper function for sorting the right boundary nodes
Definition: pml_meshes.cc:44
bool sorter_top_boundary(Node *nod_i_pt, Node *nod_j_pt)
helper function for sorting the top boundary nodes
Definition: pml_meshes.cc:50