single_layer_cubic_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_SINGLE_LAYER_CUBIC_SPINE_MESH_HEADER
31 #define OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_HEADER
32 
33 // oomph-lib includes
34 #include "../generic/spines.h"
36 
37 namespace oomph
38 {
39 
40 //======================================================================
41 /// Spine mesh class derived from standard cubic 3D mesh.
42 /// The mesh contains a layer of spinified fluid elements (of type ELEMENT;
43 /// e.g SpineElement<QCrouzeixRaviartElement<3>)
44 /// for 3D problems, in which the interface's vertical position can vary
45 ///
46 /// This mesh has been carefully designed so that the
47 /// numeration of the nodes on the boundaries 0 and 5 (bottom and top)
48 /// coincides with the numeration of the spines
49 //======================================================================
50 template <class ELEMENT>
51 class SingleLayerCubicSpineMesh : public SimpleCubicMesh<ELEMENT >,
52  public SpineMesh
53 {
54 
55 public:
56 
57  /// \short Constructor: Pass number of elements in x-direction, number of
58  /// elements in y-direction, number of elements in z-direction,
59  /// lengths in x- and y- directions, height of layer, and pointer
60  /// to timestepper (defaults to Steady timestepper)
61  SingleLayerCubicSpineMesh(const unsigned &nx,
62  const unsigned &ny,
63  const unsigned &nz,
64  const double &lx,
65  const double &ly,
66  const double &h,
67  TimeStepper* time_stepper_pt=
68  &Mesh::Default_TimeStepper);
69 
70  /// \short General node update function implements pure virtual function
71  /// defined in SpineMesh base class and performs specific node update
72  /// actions: along vertical spines
73  virtual void spine_node_update(SpineNode* spine_node_pt)
74  {
75  //Get fraction along the spine
76  double W = spine_node_pt->fraction();
77  //Get spine height
78  double H = spine_node_pt->h();
79  //Set the value of z
80  spine_node_pt->x(2) = this->Zmin + W*H;
81  }
82 
83 protected:
84 
85  /// \short Helper function to actually build the single-layer spine mesh
86  /// (called from various constructors)
87  virtual void build_single_layer_mesh(TimeStepper* time_stepper_pt);
88 
89 };
90 
91 }
92 
93 #endif
94 
95 
const unsigned & nx() const
Access function for number of elements in x directions.
Simple cubic 3D Brick mesh class.
const unsigned & nz() const
Access function for number of elements in y directions.
const unsigned & ny() const
Access function for number of elements in y directions.
virtual void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
double H
Non-dimensional wall thickness. As in Jensen & Heil (2003) paper.
SingleLayerCubicSpineMesh(const unsigned &nx, const unsigned &ny, const unsigned &nz, const double &lx, const double &ly, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, number of elements in z-direction, lengths in x- and y- directions, height of layer, and pointer to timestepper (defaults to Steady timestepper)
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the single-layer spine mesh (called from various constructors) ...
double Zmin
Minimum value of z coordinate.