horizontal_single_layer_spine_mesh.template.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: 1097 $
7 //LIC//
8 //LIC// $LastChangedDate: 2015-12-17 11:53:17 +0000 (Thu, 17 Dec 2015) $
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 #ifndef OOMPH_HORIZONTAL_SINGLE_LAYER_SPINE_MESH_HEADER
31 #define OOMPH_HORIZONTAL_SINGLE_LAYER_SPINE_MESH_HEADER
32 
33 // oomph-lib includes
34 #include "../generic/spines.h"
36 
37 // Created by Francisco
38 
39 namespace oomph
40 {
41 
42 //======================================================================
43 /// Horizontal Single-layer spine mesh class derived from standard 2D mesh.
44 /// The mesh contains a layer of spinified fluid elements (of type ELEMENT;
45 /// e.g SpineElement<QCrouzeixRaviartElement<2>)
46 /// and the information required to update their position. Additional
47 /// equations must be specified in order to determine how the spines move.
48 //======================================================================
49 template <class ELEMENT>
51  public SpineMesh
52 {
53 
54 public:
55 
56  /// \short Constructor: Pass number of elements in x-direction, number of
57  /// elements in y-direction, axial length, height of layer, and pointer
58  /// to timestepper (defaults to Steady timestepper)
59  HorizontalSingleLayerSpineMesh(const unsigned &nx,
60  const unsigned &ny,
61  const double &lx,
62  const double &h,
63  TimeStepper* time_stepper_pt=
64  &Mesh::Default_TimeStepper);
65 
66 
67  /// \short General node update function implements pure virtual function
68  /// defined in SpineMesh base class and performs specific node update
69  /// actions: along vertical spines
70  virtual void spine_node_update(SpineNode* spine_node_pt)
71  {
72  //Get fraction along the spine
73  double W = spine_node_pt->fraction();
74  //Get spine height
75  double H = spine_node_pt->h();
76  //Set the value of y
77  //spine_node_pt->x(0) = this->Xmin + W*H;
78  spine_node_pt->x(0) = W*H;
79  }
80 
81 
82 protected:
83 
84  /// \short Helper function to actually build the single-layer spine mesh
85  /// (called from various constructors)
86  virtual void build_horizontal_single_layer_mesh(TimeStepper* time_stepper_pt);
87 
88 };
89 
90 }
91 
92 #endif
virtual void build_horizontal_single_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the single-layer spine mesh (called from various constructors) ...
virtual void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
HorizontalSingleLayerSpineMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, axial length, height of layer, and pointer to timestepper (defaults to Steady timestepper)
const unsigned & nx() const
Return number of elements in x direction.
double H
Non-dimensional wall thickness. As in Jensen & Heil (2003) paper.
const unsigned & ny() const
Return number of elements in y direction.