Toggle navigation
Documentation
Big picture
The finite element method
The data structure
Not-so-quick guide
Optimisation
Order of action functions
Example codes and tutorials
List of example codes and tutorials
Meshing
Solvers
MPI parallel processing
Post-processing/visualisation
Other
Change log
Creating documentation
Coding conventions
Index
FAQ
Get it
Installation guide
Get code from subversion repository
Get code as tar file
Copyright
About
People
Contact/Get involved
Publications
Acknowledgements
Picture show
Go
src
generic
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
}
oomph::TwoDimensionalPMLHelper::sorter_left_boundary
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
pml_meshes.h
oomph::TwoDimensionalPMLHelper::sorter_bottom_boundary
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
oomph::Node
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Definition:
nodes.h:852
oomph
Definition:
advection_diffusion_elements.cc:33
oomph::TwoDimensionalPMLHelper::sorter_right_boundary
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
oomph::TwoDimensionalPMLHelper::sorter_top_boundary
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