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