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
Installation
Installation guide
Copyright
About
People
Contact/Get involved
Publications
Acknowledgements
Picture show
Go
src
meshes
cylinder_with_flag_domain.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-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
#ifndef OOMPH_CYLINDER_WITH_FLAG_DOMAIN_HEADER
27
#define OOMPH_CYLINDER_WITH_FLAG_DOMAIN_HEADER
28
29
30
// Generic includes
31
#include "../generic/geom_objects.h"
32
#include "../generic/macro_element.h"
33
#include "../generic/domain.h"
34
35
36
namespace
oomph
37
{
38
//===========================================================
39
/// Domain for cylinder with flag as in Turek benchmark.
40
//===========================================================
41
class
CylinderWithFlagDomain
:
public
Domain
42
{
43
public
:
44
/// Constructor. Pass the pointers to the GeomObjects that parametrise
45
/// the cylinder, the three edges of the flag, the length and height of the
46
/// domain, the length and height of the flag, the coordinates of the
47
/// centre of the cylinder and its radius.
48
CylinderWithFlagDomain
(
Circle
*
cylinder_pt
,
49
GeomObject
*
top_flag_pt
,
50
GeomObject
*
bottom_flag_pt
,
51
GeomObject
*
tip_flag_pt
,
52
const
double
&
length
,
53
const
double
&
height
,
54
const
double
&
flag_length
,
55
const
double
&
flag_height
,
56
const
double
&
centre_x
,
57
const
double
&
centre_y
,
58
const
double
&
a
);
59
60
61
/// Destructor: Emtpy because clean up happens in base class
62
/// as a service to the user!
63
~CylinderWithFlagDomain
() {}
64
65
66
/// Parametrisation of macro element boundaries: f(s) is the position
67
/// vector to macro-element m's boundary in the specified direction
68
/// [N/S/E/W] at the specfied discrete time level (time=0: present; time>0:
69
/// previous)
70
void
macro_element_boundary
(
const
unsigned
&
time
,
71
const
unsigned
&
m
,
72
const
unsigned
&
direction
,
73
const
Vector<double>
&
s
,
74
Vector<double>
&
f
);
75
76
/// Access fct to GeomObject (of type Circle)
77
/// that represents the cylinder
78
Circle
*
cylinder_pt
()
79
{
80
return
Cylinder_pt
;
81
}
82
83
/// Access fct to GeomObjects for top, bottom and tip
84
GeomObject
*&
bottom_flag_pt
()
85
{
86
return
Bottom_flag_pt
;
87
}
88
GeomObject
*&
top_flag_pt
()
89
{
90
return
Top_flag_pt
;
91
}
92
GeomObject
*&
tip_flag_pt
()
93
{
94
return
Tip_flag_pt
;
95
}
96
97
private
:
98
/// Helper function to interpolate linearly between the
99
/// "right" and "left" points; \f$ s \in [-1,1] \f$
100
void
linear_interpolate
(
const
Vector<double>
&
left
,
101
const
Vector<double>
&
right
,
102
const
double
&
s
,
103
Vector<double>
&
f
)
104
{
105
for
(
unsigned
i
= 0;
i
< 2;
i
++)
106
{
107
f
[
i
] =
left
[
i
] + (
right
[
i
] -
left
[
i
]) * 0.5 * (
s
+ 1.0);
108
}
109
}
110
111
// Helper points
112
Vector<double>
p1
;
113
Vector<double>
p2
;
114
Vector<double>
p3
;
115
Vector<double>
p4
;
116
Vector<double>
p5
;
117
Vector<double>
p6
;
118
Vector<double>
p7
;
119
Vector<double>
p8
;
120
Vector<double>
p9
;
121
Vector<double>
p10
;
122
Vector<double>
p11
;
123
Vector<double>
p12
;
124
Vector<double>
p13
;
125
Vector<double>
p14
;
126
Vector<double>
p15
;
127
Vector<double>
p16
;
128
Vector<double>
p17
;
129
Vector<double>
p18
;
130
Vector<double>
p19
;
131
Vector<double>
p20
;
132
Vector<double>
p21
;
133
Vector<double>
p22
;
134
Vector<double>
p23
;
135
Vector<double>
p24
;
136
Vector<double>
p25
;
137
Vector<double>
p26
;
138
Vector<double>
p27
;
139
Vector<double>
p28
;
140
Vector<double>
p29
;
141
Vector<double>
p30
;
142
Vector<double>
p31
;
143
Vector<double>
p32
;
144
Vector<double>
p33
;
145
Vector<double>
p34
;
146
Vector<double>
p35
;
147
Vector<double>
p36
;
148
Vector<double>
p37
;
149
Vector<double>
p38
;
150
Vector<double>
p39
;
151
Vector<double>
p40
;
152
Vector<double>
p41
;
153
Vector<double>
p42
;
154
Vector<double>
p43
;
155
Vector<double>
p44
;
156
Vector<double>
p45
;
157
Vector<double>
p46
;
158
Vector<double>
p47
;
159
Vector<double>
p48
;
160
Vector<double>
p49
;
161
Vector<double>
p50
;
162
163
164
/// Pointer to geometric object that represents the central cylinder
165
Circle
*
Cylinder_pt
;
166
167
/// Pointer to geometric object that represents the top of the flag
168
GeomObject
*
Top_flag_pt
;
169
170
/// Pointer to geometric object that represents the bottom of the flag
171
GeomObject
*
Bottom_flag_pt
;
172
173
/// Pointer to geometric object that represents the tip of the flag
174
GeomObject
*
Tip_flag_pt
;
175
176
// Length of the flag
177
double
Lx
;
178
179
// Thickness of the flag
180
double
Ly
;
181
182
// Centre of the cylinder : x coordinate
183
double
Centre_x
;
184
185
// Centre of the cylinder : y coordinate
186
double
Centre_y
;
187
188
// Radius of the cylinder
189
double
A
;
190
191
192
};
// end of domain
193
194
}
// namespace oomph
195
196
#endif
oomph::CylinderWithFlagDomain
Domain for cylinder with flag as in Turek benchmark.
Definition
cylinder_with_flag_domain.h:42
oomph::CylinderWithFlagDomain::p18
Vector< double > p18
Definition
cylinder_with_flag_domain.h:129
oomph::CylinderWithFlagDomain::p4
Vector< double > p4
Definition
cylinder_with_flag_domain.h:115
oomph::CylinderWithFlagDomain::p19
Vector< double > p19
Definition
cylinder_with_flag_domain.h:130
oomph::CylinderWithFlagDomain::p50
Vector< double > p50
Definition
cylinder_with_flag_domain.h:161
oomph::CylinderWithFlagDomain::p39
Vector< double > p39
Definition
cylinder_with_flag_domain.h:150
oomph::CylinderWithFlagDomain::p24
Vector< double > p24
Definition
cylinder_with_flag_domain.h:135
oomph::CylinderWithFlagDomain::p8
Vector< double > p8
Definition
cylinder_with_flag_domain.h:119
oomph::CylinderWithFlagDomain::p1
Vector< double > p1
Definition
cylinder_with_flag_domain.h:112
oomph::CylinderWithFlagDomain::Tip_flag_pt
GeomObject * Tip_flag_pt
Pointer to geometric object that represents the tip of the flag.
Definition
cylinder_with_flag_domain.h:174
oomph::CylinderWithFlagDomain::p33
Vector< double > p33
Definition
cylinder_with_flag_domain.h:144
oomph::CylinderWithFlagDomain::p47
Vector< double > p47
Definition
cylinder_with_flag_domain.h:158
oomph::CylinderWithFlagDomain::p17
Vector< double > p17
Definition
cylinder_with_flag_domain.h:128
oomph::CylinderWithFlagDomain::p15
Vector< double > p15
Definition
cylinder_with_flag_domain.h:126
oomph::CylinderWithFlagDomain::macro_element_boundary
void macro_element_boundary(const unsigned &time, const unsigned &m, const unsigned &direction, const Vector< double > &s, Vector< double > &f)
Parametrisation of macro element boundaries: f(s) is the position vector to macro-element m's boundar...
Definition
cylinder_with_flag_domain.cc:227
oomph::CylinderWithFlagDomain::p44
Vector< double > p44
Definition
cylinder_with_flag_domain.h:155
oomph::CylinderWithFlagDomain::p34
Vector< double > p34
Definition
cylinder_with_flag_domain.h:145
oomph::CylinderWithFlagDomain::p42
Vector< double > p42
Definition
cylinder_with_flag_domain.h:153
oomph::CylinderWithFlagDomain::p43
Vector< double > p43
Definition
cylinder_with_flag_domain.h:154
oomph::CylinderWithFlagDomain::p27
Vector< double > p27
Definition
cylinder_with_flag_domain.h:138
oomph::CylinderWithFlagDomain::p2
Vector< double > p2
Definition
cylinder_with_flag_domain.h:113
oomph::CylinderWithFlagDomain::p28
Vector< double > p28
Definition
cylinder_with_flag_domain.h:139
oomph::CylinderWithFlagDomain::cylinder_pt
Circle * cylinder_pt()
Access fct to GeomObject (of type Circle) that represents the cylinder.
Definition
cylinder_with_flag_domain.h:78
oomph::CylinderWithFlagDomain::tip_flag_pt
GeomObject *& tip_flag_pt()
Definition
cylinder_with_flag_domain.h:92
oomph::CylinderWithFlagDomain::p20
Vector< double > p20
Definition
cylinder_with_flag_domain.h:131
oomph::CylinderWithFlagDomain::p46
Vector< double > p46
Definition
cylinder_with_flag_domain.h:157
oomph::CylinderWithFlagDomain::p29
Vector< double > p29
Definition
cylinder_with_flag_domain.h:140
oomph::CylinderWithFlagDomain::p32
Vector< double > p32
Definition
cylinder_with_flag_domain.h:143
oomph::CylinderWithFlagDomain::p3
Vector< double > p3
Definition
cylinder_with_flag_domain.h:114
oomph::CylinderWithFlagDomain::p16
Vector< double > p16
Definition
cylinder_with_flag_domain.h:127
oomph::CylinderWithFlagDomain::p45
Vector< double > p45
Definition
cylinder_with_flag_domain.h:156
oomph::CylinderWithFlagDomain::p22
Vector< double > p22
Definition
cylinder_with_flag_domain.h:133
oomph::CylinderWithFlagDomain::~CylinderWithFlagDomain
~CylinderWithFlagDomain()
Destructor: Emtpy because clean up happens in base class as a service to the user!
Definition
cylinder_with_flag_domain.h:63
oomph::CylinderWithFlagDomain::Ly
double Ly
Definition
cylinder_with_flag_domain.h:180
oomph::CylinderWithFlagDomain::p31
Vector< double > p31
Definition
cylinder_with_flag_domain.h:142
oomph::CylinderWithFlagDomain::bottom_flag_pt
GeomObject *& bottom_flag_pt()
Access fct to GeomObjects for top, bottom and tip.
Definition
cylinder_with_flag_domain.h:84
oomph::CylinderWithFlagDomain::p36
Vector< double > p36
Definition
cylinder_with_flag_domain.h:147
oomph::CylinderWithFlagDomain::p26
Vector< double > p26
Definition
cylinder_with_flag_domain.h:137
oomph::CylinderWithFlagDomain::p6
Vector< double > p6
Definition
cylinder_with_flag_domain.h:117
oomph::CylinderWithFlagDomain::p12
Vector< double > p12
Definition
cylinder_with_flag_domain.h:123
oomph::CylinderWithFlagDomain::p9
Vector< double > p9
Definition
cylinder_with_flag_domain.h:120
oomph::CylinderWithFlagDomain::Top_flag_pt
GeomObject * Top_flag_pt
Pointer to geometric object that represents the top of the flag.
Definition
cylinder_with_flag_domain.h:168
oomph::CylinderWithFlagDomain::Centre_x
double Centre_x
Definition
cylinder_with_flag_domain.h:183
oomph::CylinderWithFlagDomain::p38
Vector< double > p38
Definition
cylinder_with_flag_domain.h:149
oomph::CylinderWithFlagDomain::p40
Vector< double > p40
Definition
cylinder_with_flag_domain.h:151
oomph::CylinderWithFlagDomain::linear_interpolate
void linear_interpolate(const Vector< double > &left, const Vector< double > &right, const double &s, Vector< double > &f)
Helper function to interpolate linearly between the "right" and "left" points; .
Definition
cylinder_with_flag_domain.h:100
oomph::CylinderWithFlagDomain::p37
Vector< double > p37
Definition
cylinder_with_flag_domain.h:148
oomph::CylinderWithFlagDomain::p49
Vector< double > p49
Definition
cylinder_with_flag_domain.h:160
oomph::CylinderWithFlagDomain::Lx
double Lx
Definition
cylinder_with_flag_domain.h:177
oomph::CylinderWithFlagDomain::p25
Vector< double > p25
Definition
cylinder_with_flag_domain.h:136
oomph::CylinderWithFlagDomain::p14
Vector< double > p14
Definition
cylinder_with_flag_domain.h:125
oomph::CylinderWithFlagDomain::top_flag_pt
GeomObject *& top_flag_pt()
Definition
cylinder_with_flag_domain.h:88
oomph::CylinderWithFlagDomain::p23
Vector< double > p23
Definition
cylinder_with_flag_domain.h:134
oomph::CylinderWithFlagDomain::p41
Vector< double > p41
Definition
cylinder_with_flag_domain.h:152
oomph::CylinderWithFlagDomain::p5
Vector< double > p5
Definition
cylinder_with_flag_domain.h:116
oomph::CylinderWithFlagDomain::p48
Vector< double > p48
Definition
cylinder_with_flag_domain.h:159
oomph::CylinderWithFlagDomain::p7
Vector< double > p7
Definition
cylinder_with_flag_domain.h:118
oomph::CylinderWithFlagDomain::Bottom_flag_pt
GeomObject * Bottom_flag_pt
Pointer to geometric object that represents the bottom of the flag.
Definition
cylinder_with_flag_domain.h:171
oomph::CylinderWithFlagDomain::Centre_y
double Centre_y
Definition
cylinder_with_flag_domain.h:186
oomph::CylinderWithFlagDomain::p11
Vector< double > p11
Definition
cylinder_with_flag_domain.h:122
oomph::CylinderWithFlagDomain::p30
Vector< double > p30
Definition
cylinder_with_flag_domain.h:141
oomph::CylinderWithFlagDomain::p13
Vector< double > p13
Definition
cylinder_with_flag_domain.h:124
oomph::CylinderWithFlagDomain::p10
Vector< double > p10
Definition
cylinder_with_flag_domain.h:121
oomph::CylinderWithFlagDomain::Cylinder_pt
Circle * Cylinder_pt
Pointer to geometric object that represents the central cylinder.
Definition
cylinder_with_flag_domain.h:165
oomph::CylinderWithFlagDomain::p21
Vector< double > p21
Definition
cylinder_with_flag_domain.h:132
oomph::CylinderWithFlagDomain::p35
Vector< double > p35
Definition
cylinder_with_flag_domain.h:146
oomph::CylinderWithFlagDomain::A
double A
Definition
cylinder_with_flag_domain.h:189
oomph::RefineableTriangleMesh
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
Definition
triangle_mesh.template.h:2249
oomph
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition
annular_domain.h:35