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
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>
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)
69  RefineableQElement<DIM>(),
70  QSpectralPoissonElement<DIM,NNODE_1D>()
71  {}
72 
73 
74  /// Broken copy constructor
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
97 
98  /// \short Pointer to the j-th vertex node in the element
99  Node* vertex_node_pt(const unsigned& j) const
101 
102  void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
103  {
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.
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>
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 
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
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
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
virtual void describe_local_dofs(std::ostream &out, const std::string &current_string) const
Function to describe the local dofs of the element[s]. The ostream specifies the output stream to whi...
Definition: elements.cc:1682
unsigned nvertex_node() const
Number of vertex nodes in the element.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Definition: nodes.h:852
unsigned ncont_interpolated_values() const
Broken assignment operator.
RefineableQSpectralPoissonElement(const RefineableQSpectralPoissonElement< DIM, NNODE_1D > &dummy)
Broken copy constructor.
virtual unsigned nvertex_node() const
Definition: elements.h:2374
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn&#39;t been defined.
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
void describe_local_dofs(std::ostream &out, const std::string &current_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
RefineableQSpectralPoissonElement()
Constructor: Pass refinement level to refineable quad element (default 0 = root)
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
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 ...