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
poisson
refineable_spectral_poisson_elements.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 file for refineable QSpectralPoissonElement elements
31
32
#ifndef OOMPH_REFINEABLE_SPECTRAL_POISSON_ELEMENTS_HEADER
33
#define OOMPH_REFINEABLE_SPECTRAL_POISSON_ELEMENTS_HEADER
34
35
// Config header generated by autoconfig
36
#ifdef HAVE_CONFIG_H
37
#include <oomph-lib-config.h>
38
#endif
39
40
41
// oomph-lib headers
42
#include "
refineable_poisson_elements.h
"
43
#include "../generic/refineable_line_spectral_element.h"
44
#include "../generic/refineable_quad_spectral_element.h"
45
#include "../generic/refineable_brick_spectral_element.h"
46
47
namespace
oomph
48
{
49
50
51
//======================================================================
52
/// Refineable version of 2D QSpectralPoissonElement elements
53
///
54
///
55
//======================================================================
56
template
<
unsigned
DIM,
unsigned
NNODE_1D>
57
class
RefineableQSpectralPoissonElement
:
58
public
QSpectralPoissonElement
<DIM,NNODE_1D>,
59
public
virtual
RefineablePoissonEquations
<DIM>,
60
public
virtual
RefineableQSpectralElement
<DIM>
61
{
62
public
:
63
64
/// \short Constructor: Pass refinement level to refineable quad element
65
/// (default 0 = root)
66
RefineableQSpectralPoissonElement
() :
67
RefineableElement
(),
68
RefineablePoissonEquations
<DIM>(),
69
RefineableQElement
<DIM>(),
70
QSpectralPoissonElement
<DIM,NNODE_1D>()
71
{}
72
73
74
/// Broken copy constructor
75
RefineableQSpectralPoissonElement
(
76
const
RefineableQSpectralPoissonElement<DIM,NNODE_1D>
& dummy)
77
{
78
BrokenCopy::broken_copy
(
"RefineableQuadPoissonElement"
);
79
}
80
81
/// Broken assignment operator
82
//Commented out broken assignment operator because this can lead to a conflict warning
83
//when used in the virtual inheritence hierarchy. Essentially the compiler doesn't
84
//realise that two separate implementations of the broken function are the same and so,
85
//quite rightly, it shouts.
86
/*void operator=(const RefineableQSpectralPoissonElement<DIM,NNODE_1D>&)
87
{
88
BrokenCopy::broken_assign("RefineableQuadPoissonElement");
89
}*/
90
91
/// Number of continuously interpolated values: 1
92
unsigned
ncont_interpolated_values
()
const
{
return
1;}
93
94
/// \short Number of vertex nodes in the element
95
unsigned
nvertex_node
()
const
96
{
return
QSpectralPoissonElement<DIM,NNODE_1D>::nvertex_node
();}
97
98
/// \short Pointer to the j-th vertex node in the element
99
Node
*
vertex_node_pt
(
const
unsigned
& j)
const
100
{
return
QSpectralPoissonElement<DIM,NNODE_1D>::vertex_node_pt
(j);}
101
102
void
assign_all_generic_local_eqn_numbers
(
const
bool
&store_local_dof_pt)
103
{
104
RefineableElement::
105
assign_all_generic_local_eqn_numbers
(store_local_dof_pt);
106
}
107
108
/// \short Function to describe the local dofs of the element. The ostream
109
/// specifies the output stream to which the description
110
/// is written; the string stores the currently
111
/// assembled output that is ultimately written to the
112
/// output stream by Data::describe_dofs(...); it is typically
113
/// built up incrementally as we descend through the
114
/// call hierarchy of this function when called from
115
/// Problem::describe_dofs(...)
116
void
describe_local_dofs
(std::ostream& out,
117
const
std::string
& current_string)
const
118
{
119
RefineableElement::describe_local_dofs
(out,current_string);
120
}
121
122
/// \short Order of recovery shape functions for Z2 error estimation:
123
/// Same order as shape functions.
124
unsigned
nrecovery_order
()
125
{
126
if
(NNODE_1D < 4) {
return
(NNODE_1D-1);}
127
else
{
return
3;}
128
}
129
130
/// \short Perform additional hanging node procedures for variables
131
/// that are not interpolated by all nodes. Empty.
132
void
further_setup_hanging_nodes
(){}
133
134
};
135
136
137
//=======================================================================
138
/// Face geometry for the RefineableQuadPoissonElement elements: The spatial
139
/// dimension of the face elements is one lower than that of the
140
/// bulk element but they have the same number of points
141
/// along their 1D edges.
142
//=======================================================================
143
template
<
unsigned
DIM,
unsigned
NNODE_1D>
144
class
FaceGeometry
<
RefineableQSpectralPoissonElement
<DIM,NNODE_1D> >:
145
public
virtual
QSpectralElement
<DIM-1,NNODE_1D>
146
{
147
148
public
:
149
150
/// \short Constructor: Call the constructor for the
151
/// appropriate lower-dimensional QElement
152
FaceGeometry
() :
QSpectralElement
<DIM-1,NNODE_1D>() {}
153
154
};
155
156
}
157
158
159
#endif
160
oomph::BrokenCopy::broken_copy
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Definition:
oomph_utilities.cc:107
oomph::FiniteElement::assign_all_generic_local_eqn_numbers
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Overloaded version of the calculation of the local equation numbers. If the boolean argument is true ...
Definition:
elements.h:2099
oomph::RefineableQSpectralPoissonElement::vertex_node_pt
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition:
refineable_spectral_poisson_elements.h:99
oomph::FaceGeometry
Definition:
elements.h:4752
oomph::FiniteElement::describe_local_dofs
virtual void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element[s]. The ostream specifies the output stream to whi...
Definition:
elements.cc:1682
oomph::RefineableQSpectralPoissonElement::nvertex_node
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition:
refineable_spectral_poisson_elements.h:95
oomph::QSpectralPoissonElement
Definition:
spectral_poisson_elements.h:54
oomph::RefineablePoissonEquations
Definition:
refineable_poisson_elements.h: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::RefineableQSpectralPoissonElement::ncont_interpolated_values
unsigned ncont_interpolated_values() const
Broken assignment operator.
Definition:
refineable_spectral_poisson_elements.h:92
oomph::RefineableQSpectralElement
Definition:
Qspectral_elements.h:1240
oomph::RefineableQSpectralPoissonElement::RefineableQSpectralPoissonElement
RefineableQSpectralPoissonElement(const RefineableQSpectralPoissonElement< DIM, NNODE_1D > &dummy)
Broken copy constructor.
Definition:
refineable_spectral_poisson_elements.h:75
oomph
Definition:
advection_diffusion_elements.cc:33
oomph::QSpectralElement
Definition:
Qspectral_elements.h:355
oomph::FiniteElement::nvertex_node
virtual unsigned nvertex_node() const
Definition:
elements.h:2374
refineable_poisson_elements.h
oomph::FaceGeometry< RefineableQSpectralPoissonElement< DIM, NNODE_1D > >::FaceGeometry
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
Definition:
refineable_spectral_poisson_elements.h:152
oomph::RefineableElement
Definition:
refineable_elements.h:101
oomph::Global_string_for_annotation::string
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
Definition:
oomph_definitions.cc:278
oomph::FiniteElement::vertex_node_pt
virtual Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements...
Definition:
elements.h:2383
oomph::RefineableQSpectralPoissonElement::describe_local_dofs
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
Definition:
refineable_spectral_poisson_elements.h:116
oomph::RefineableQSpectralPoissonElement
Definition:
refineable_spectral_poisson_elements.h:57
oomph::RefineableQSpectralPoissonElement::further_setup_hanging_nodes
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
Definition:
refineable_spectral_poisson_elements.h:132
oomph::RefineableQSpectralPoissonElement::RefineableQSpectralPoissonElement
RefineableQSpectralPoissonElement()
Constructor: Pass refinement level to refineable quad element (default 0 = root)
Definition:
refineable_spectral_poisson_elements.h:66
oomph::RefineableQElement
Definition:
Qelements.h:2127
oomph::RefineableQSpectralPoissonElement::nrecovery_order
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
Definition:
refineable_spectral_poisson_elements.h:124
oomph::RefineableQSpectralPoissonElement::assign_all_generic_local_eqn_numbers
void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Overloaded version of the calculation of the local equation numbers. If the boolean argument is true ...
Definition:
refineable_spectral_poisson_elements.h:102