Qelement_face_coordinate_translation_schemes.h
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 //Header containing functions that map face coordinates on
31 //Qelements to bulk coordinates in those elements
32 
33 //Include guards
34 #ifndef OOMPH_QELEMENT_FACE_COORDINATE_TRANSLATION_HEADER
35 #define OOMPH_QELEMENT_FACE_COORDINATE_TRANSLATION_HEADER
36 
37 // Config header generated by autoconfig
38 #ifdef HAVE_CONFIG_H
39  #include <oomph-lib-config.h>
40 #endif
41 
42 #ifdef OOMPH_HAS_MPI
43 #include "mpi.h"
44 #endif
45 
46 //oomph-lib headers
47 #include "Vector.h"
48 #include "matrices.h"
49 
50 namespace oomph
51 {
52 //=============================================================
53 ///Namespace for helper functions that return the local
54 ///coordinates in the bulk elements
55 //==============================================================
56 namespace QElement1FaceToBulkCoordinates
57 {
58  ///The translation scheme for the face s0 = -1.0
59  void face0(const Vector<double> &s, Vector<double> &s_bulk);
60 
61  ///The translation scheme for the face s0 = 1.0
62  void face1(const Vector<double> &s, Vector<double> &s_bulk);
63 }
64 
65 
66 //=============================================================
67 /// Namespace for helper functions that calculate derivatives
68 /// of the local coordinates in the bulk elements wrt the
69 /// local coordinates in the face element.
70 //=============================================================
71 namespace QElement1BulkCoordinateDerivatives
72 {
73  ///Function for both faces -- the bulk coordinate is fixed on both
74  void faces0(const Vector<double> &s,
75  DenseMatrix<double> &dsbulk_dsface,
76  unsigned &interior_direction);
77 }
78 
79 
80 
81 
82 //===================================================================
83 /// Namespace for the functions that translate local face coordinates
84 /// to the coordinates in the bulk element
85 //==================================================================
86 namespace QElement2FaceToBulkCoordinates
87 {
88  ///The translation scheme for the west face (s0 = -1.0)
89  void face0(const Vector<double> &s, Vector<double> &s_bulk);
90 
91  ///The translation scheme for the south face (s1 = -1.0)
92  void face1(const Vector<double> &s, Vector<double> &s_bulk);
93 
94  ///The translation scheme for the east face (s0 = 1.0)
95  void face2(const Vector<double> &s, Vector<double> &s_bulk);
96 
97  ///The translation scheme for the north face (s1 = 1.0)
98  void face3(const Vector<double> &s, Vector<double> &s_bulk);
99 }
100 
101 
102 //=============================================================
103 /// Namespace for helper functions that calculate derivatives
104 /// of the local coordinates in the bulk elements wrt the
105 /// local coordinates in the face element.
106 //=============================================================
107 namespace QElement2BulkCoordinateDerivatives
108 {
109  ///Function for the east and west faces, along which s0 is fixed
110  void faces0(const Vector<double> &s,
111  DenseMatrix<double> &dsbulk_dsface,
112  unsigned &interior_direction);
113 
114  ///Function for the north and south faces, along which s1 is fixed
115  void faces1(const Vector<double> &s,
116  DenseMatrix<double> &dsbulk_dsface,
117  unsigned &interior_direction);
118 }
119 
120 
121 //===================================================================
122 /// Namespace for the functions that translate local face coordinates
123 /// to the coordinates in the bulk element
124 //==================================================================
125 namespace QElement3FaceToBulkCoordinates
126 {
127  ///The translation scheme for the left face (s0 = -1.0)
128  void face0(const Vector<double> &s, Vector<double> &s_bulk);
129 
130  ///The translation scheme for the down face (s1 = -1.0)
131  void face1(const Vector<double> &s, Vector<double> &s_bulk);
132 
133  ///The translation scheme for the back face (s2 = -1.0)
134  void face2(const Vector<double> &s, Vector<double> &s_bulk);
135 
136  ///The translation scheme for the right face (s0 = 1.0)
137  void face3(const Vector<double> &s, Vector<double> &s_bulk);
138 
139  ///The translation scheme for the up face (s1 = 1.0)
140  void face4(const Vector<double> &s, Vector<double> &s_bulk);
141 
142  ///The translation scheme for the front face (s2 = 1.0)
143  void face5(const Vector<double> &s, Vector<double> &s_bulk);
144 }
145 
146 
147 //=============================================================
148 /// Namespace for helper functions that calculate derivatives
149 /// of the local coordinates in the bulk elements wrt the
150 /// local coordinates in the face element.
151 //=============================================================
152 namespace QElement3BulkCoordinateDerivatives
153 {
154  ///Function for the back and front faces, along which s0 is fixed
155  void faces0(const Vector<double> &s,
156  DenseMatrix<double> &dsbulk_dsface,
157  unsigned &interior_direction);
158 
159  ///Function for the up and down faces, along which s1 is fixed
160  void faces1(const Vector<double> &s,
161  DenseMatrix<double> &dsbulk_dsface,
162  unsigned &interior_direction);
163 
164  ///Function for the left and right faces, along which s2 is fixed
165  void faces2(const Vector<double> &s,
166  DenseMatrix<double> &dsbulk_dsface,
167  unsigned &interior_direction);
168 }
169 
170 }
171 
172 #endif
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
void face4(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the up face (s1 = 1.0)
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the north and south faces, along which s1 is fixed.
static char t char * s
Definition: cfortran.h:572
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
void faces2(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the left and right faces, along which s2 is fixed.
void face5(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the front face (s2 = 1.0)
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)