30 #ifndef OOMPH_BRETHERTON_SPINE_MESH_HEADER    31 #define OOMPH_BRETHERTON_SPINE_MESH_HEADER    49 template <
class ELEMENT, 
class INTERFACE_ELEMENT>
    74                      const unsigned &nhalf,
    78                      const double& zeta_start, 
    79                      const double& zeta_transition_start,
    80                      const double& zeta_transition_end,
    81                      const double& zeta_end,
   118                         const double &zeta_lo_transition_end,
   119                         const double &zeta_up_transition_start,
   120                         const double &zeta_up_transition_end);
   126    unsigned n_spine = this->
nspine();
   127    for (
unsigned i=0;
i<n_spine;
i++)
   171      std::ostringstream error_message;
   172      error_message << 
"Incorrect spine update id " << 
id << std::endl;
   175                          OOMPH_CURRENT_FUNCTION,
   176                          OOMPH_EXCEPTION_LOCATION);
   202    double w = spine_node_pt->
fraction();
   204    double h = spine_node_pt->
h();
   215    spine_node_pt->
x(0) = r_wall_lo[0];
   216    spine_node_pt->
x(1) = r_wall_lo[1] + w*h;
   225    double w = spine_node_pt->
fraction();
   227    double h = spine_node_pt->
h();
   243     position(s_transition_lo,r_transition_lo);
   245     position(s_transition_up,r_transition_up);
   249    spine_centre[0] = 0.5*(r_transition_lo[0] + r_transition_up[0]);
   251    spine_centre[1] = r_transition_lo[1] + 
   256    N[0] = spine_centre[0] - r_wall_lo[0];
   257    N[1] = spine_centre[1] - r_wall_lo[1];
   258    double inv_length=1.0/sqrt(N[0]*N[0]+N[1]*N[1]);
   260    spine_node_pt->
x(0) = r_wall_lo[0] + w*h*N[0]*inv_length;
   261    spine_node_pt->
x(1) = r_wall_lo[1] + w*h*N[1]*inv_length;
   271    double w = spine_node_pt->
fraction();
   273    double h = spine_node_pt->
h();
   290    S0[0] = r_lo[0] + vertical_fraction*(r_up[0]-r_lo[0]);
   291    S0[1] = r_lo[1] + vertical_fraction*(r_up[1]-r_lo[1]);
   300     position(s_transition_lo,r_transition_lo);
   302     position(s_transition_up,r_transition_up);
   306    spine_centre[0] = 0.5*(r_transition_lo[0] + r_transition_up[0]);
   308    spine_centre[1] = r_transition_lo[1] + 
   313    N[0] = spine_centre[0] - S0[0];
   314    N[1] = spine_centre[1] - S0[1];
   316    double inv_length=1.0/sqrt(N[0]*N[0]+N[1]*N[1]);
   318    spine_node_pt->
x(0) = S0[0] + w*h*N[0]*inv_length;
   319    spine_node_pt->
x(1) = S0[1] + w*h*N[1]*inv_length;
   328    double w = spine_node_pt->
fraction();
   330    double h = spine_node_pt->
h();
   347    S0[0] = r_lo[0] + vertical_fraction*(r_up[0]-r_lo[0]);
   348    S0[1] = r_lo[1] + vertical_fraction*(r_up[1]-r_lo[1]);
   357     position(s_transition_lo,r_transition_lo);
   359     position(s_transition_up,r_transition_up);
   363    spine_centre[0] = 0.5*(r_transition_lo[0] + r_transition_up[0]);
   365    spine_centre[1] = r_transition_lo[1] + 
   370    N[0] = spine_centre[0] - S0[0];
   371    N[1] = spine_centre[1] - S0[1];
   373    double inv_length=1.0/sqrt(N[0]*N[0]+N[1]*N[1]);
   375    spine_node_pt->
x(0) = S0[0] + w*h*N[0]*inv_length;
   376    spine_node_pt->
x(1) = S0[1] + w*h*N[1]*inv_length;
   386    double w = spine_node_pt->
fraction();
   388    double h = spine_node_pt->
h();
   404     position(s_transition_lo,r_transition_lo);
   406     position(s_transition_up,r_transition_up);
   410    spine_centre[0] = 0.5*(r_transition_lo[0] + r_transition_up[0]);
   412    spine_centre[1] = r_transition_lo[1] + 
   417    N[0]= spine_centre[0] - r_wall_up[0];
   418    N[1]= spine_centre[1] - r_wall_up[1];
   419    double inv_length=1.0/sqrt(N[0]*N[0]+N[1]*N[1]);
   422    spine_node_pt->
x(0) = r_wall_up[0] + w*h*N[0]*inv_length;
   423    spine_node_pt->
x(1) = r_wall_up[1] + w*h*N[1]*inv_length;
   433    double w = spine_node_pt->
fraction();
   435    double h = spine_node_pt->
h();
   446    spine_node_pt->
x(0) = r_wall_up[0];
   447    spine_node_pt->
x(1) = r_wall_up[1] - w*h;
   457    double w = spine_node_pt->
fraction();
   470    spine_node_pt->
x(0) = r_lo[0] + w*(r_up[0]-r_lo[0]);
   471    spine_node_pt->
x(1) = r_lo[1] + w*(r_up[1]-r_lo[1]);
 unsigned Nhalf
Number of elements in vertical transition region (there are twice as many elements across the channel...
double Zeta_end
Wall coordinate of end of liquid filled region (inflow) 
ELEMENT * Control_element_pt
Pointer to control element (just under the symmetry line near the bubble tip; the bubble tip is locat...
BrethertonSpineMesh(const unsigned &nx1, const unsigned &nx2, const unsigned &nx3, const unsigned &nh, const unsigned &nhalf, const double &h, GeomObject *lower_wall_pt, GeomObject *upper_wall_pt, const double &zeta_start, const double &zeta_transition_start, const double &zeta_transition_end, const double &zeta_end, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor. Arguments: 
void spine_node_update_film_lower(SpineNode *spine_node_pt)
Update function for the deposited film region in the lower part of the domain: Vertical spines...
double Zeta_transition_end
Wall coordinate of end of transition region. 
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
double * Spine_centre_fraction_pt
Pointer to vertical fraction of the spine centre. 
double Default_spine_centre_fraction
Default spine fraction. 
FiniteElement *& bulk_element_pt(const unsigned long &i)
Access functions for pointers to elements in bulk. 
void spine_node_update_vertical_transition_lower(SpineNode *spine_node_pt)
Update function for the vertical transitition region in the lower part of the domain: Spine points to...
double & fraction()
Set reference to fraction along spine. 
ELEMENT * control_element_pt()
Pointer to control element (just under the symmetry line near the bubble tip, so the bubble tip is lo...
double & geom_parameter(const unsigned &i)
Return i-th geometric parameter that is involved in the node update operations for this Spine...
A general Finite Element class. 
void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh) 
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta). 
void reposition_spines(const double &zeta_lo_transition_start, const double &zeta_lo_transition_end, const double &zeta_up_transition_start, const double &zeta_up_transition_end)
Reposition the spines in response to changes in geometry. 
void pin(const unsigned &i)
Pin the i-th stored variable. 
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh. 
unsigned Nx3
Number of elements along wall in channel region. 
void spine_node_update_vertical_transition_upper(SpineNode *spine_node_pt)
Update function for the vertical transitition region in the upper part of the domain: Spine points to...
unsigned Nx1
Number of elements along wall in deposited film region. 
double H
Thickness of deposited film. 
void spine_node_update_horizontal_transition_lower(SpineNode *spine_node_pt)
Update function for the horizontal transitition region in the lower part of the domain: Spine points ...
double Zeta_transition_start
Wall coordinate of start of the transition region. 
unsigned long nbulk() const
Number of elements in bulk. 
double & x(const unsigned &i)
Return the i-th nodal coordinate. 
double spine_centre_fraction() const
Read the value of the spine centre's vertical fraction. 
unsigned Nh
Number of elements across the deposited film. 
unsigned nfree_surface_spines()
unsigned Nx2
Number of elements along wall in horizontal transition region. 
void spine_node_update_channel(SpineNode *spine_node_pt)
Update function for the nodes in the channel region ahead of the finger tip: Nodes are evenly distrib...
double Zeta_start
Start coordinate on wall. 
void spine_node_update_horizontal_transition_upper(SpineNode *spine_node_pt)
Update function for the horizontal transitition region in the upper part of the domain: Spine points ...
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions). 
unsigned long nspine() const
Return the number of spines in the mesh. 
void set_spine_centre_fraction_pt(double *const &fraction_pt)
Set the pointer to the spine centre's vertial fraction. 
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overloa...
unsigned long ninterface_element() const
Number of elements on interface. 
double & h()
Access function to spine height. 
GeomObject *& geom_object_pt(const unsigned &i)
Return i-th geometric object that is involved in the node update operations for this Spine...
Vector< FiniteElement * > Interface_element_pt
Vector of pointers to interface elements. 
FiniteElement *& interface_element_pt(const unsigned long &i)
Access functions for pointers to interface elements. 
GeomObject * Upper_wall_pt
Pointer to geometric object that represents the upper wall. 
Data *& spine_height_pt()
Access function to Data object that stores the spine height. 
Spine *& spine_pt()
Access function to spine. 
Vector< FiniteElement * > Bulk_element_pt
Vector of pointers to element in the fluid layer. 
double find_distance_to_free_surface(GeomObject *const &fs_geom_object_pt, Vector< double > &initial_zeta, const Vector< double > &spine_base, const Vector< double > &spine_end)
Recalculate the spine lengths after repositioning. 
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
GeomObject * Lower_wall_pt
Pointer to geometric object that represents the lower wall. 
void initial_element_reorder()
Initial reordering elements of the elements – before the channel mesh is added. Vertical stacks of e...
void spine_node_update_film_upper(SpineNode *spine_node_pt)
Update function for the deposited film region in the upper part of the domain: Vertical spines...