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