65 const unsigned&
nhalf,
88 Spine_centre_fraction_pt(&Default_spine_centre_fraction),
89 Default_spine_centre_fraction(0.5)
100 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
103 MeshChecker::assert_geometric_element<SpineFiniteElement, ELEMENT>(2);
135 oomph_info <<
"\n\n=================================================== "
140 oomph_info <<
"Upper and lower walls are not symmetric at zeta=0"
142 oomph_info <<
"Your initial mesh will look very odd." << std::endl;
146 oomph_info <<
"===================================================\n\n "
155 for (
unsigned i = 0;
i <
n_x;
i++)
216 for (
unsigned i = 0;
i <
nx1;
i++)
222 for (
unsigned j = 0;
j <
nh;
j++)
231 for (
unsigned i0 = 0;
i0 <
np;
i0++)
233 for (
unsigned i1 = 0;
i1 <
np;
i1++)
242 nod_pt->node_update_fct_id() = 0;
261 nod_pt->spine_pt()->height() =
H;
315 for (
unsigned i = 0;
i <
nx2;
i++)
321 for (
unsigned j = 0;
j <
nh;
j++)
330 for (
unsigned i0 = 0;
i0 <
np;
i0++)
332 for (
unsigned i1 = 0;
i1 <
np;
i1++)
341 nod_pt->node_update_fct_id() = 1;
366 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
394 for (
unsigned i = 0;
i <
nhalf;
i++)
397 for (
unsigned j = 0;
j <
nh;
j++)
406 for (
unsigned i0 = 0;
i0 <
np;
i0++)
408 for (
unsigned i1 = 0;
i1 <
np;
i1++)
417 nod_pt->node_update_fct_id() = 2;
460 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
488 for (
unsigned i = 0;
i <
nhalf;
i++)
491 for (
unsigned j = 0;
j <
nh;
j++)
500 for (
unsigned i0 = 0;
i0 <
np;
i0++)
502 for (
unsigned i1 = 0;
i1 <
np;
i1++)
511 nod_pt->node_update_fct_id() = 3;
554 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
586 for (
unsigned i = 0;
i <
nx2;
i++)
592 for (
unsigned j = 0;
j <
nh;
j++)
601 for (
unsigned i0 = 0;
i0 <
np;
i0++)
603 for (
unsigned i1 = 0;
i1 <
np;
i1++)
612 nod_pt->node_update_fct_id() = 4;
637 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
670 for (
unsigned i = 0;
i <
nx1;
i++)
676 for (
unsigned j = 0;
j <
nh;
j++)
685 for (
unsigned i0 = 0;
i0 <
np;
i0++)
687 for (
unsigned i1 = 0;
i1 <
np;
i1++)
696 nod_pt->node_update_fct_id() = 5;
712 nod_pt->spine_pt()->height() =
H;
738 typedef std::set<Node*>::iterator
IT;
775 for (
unsigned i = 0;
i <
nnod;
i++)
787 for (
unsigned e = 0;
e < 2 *
nhalf;
e++)
791 for (
unsigned i = 0;
i <
np;
i++)
796 if ((
e < 1) || (
i > 0))
811 typedef std::set<Node*>::iterator
IT;
822 for (
unsigned e = 0;
e <
nelem;
e++)
850 nod_pt->spine_mesh_pt() =
this;
852 nod_pt->node_update_fct_id() = 6;
880 for (
unsigned long i = 0;
i < 2 *
nhalf;
i++)
883 for (
unsigned l1 = 1;
l1 <
np;
l1++)
894 nod_pt->spine_mesh_pt() =
this;
896 nod_pt->node_update_fct_id() = 6;
904 for (
unsigned long j = 0;
j <
Nx3;
j++)
908 for (
unsigned l2 = 1;
l2 <
np;
l2++)
922 nod_pt->spine_mesh_pt() =
this;
924 nod_pt->node_update_fct_id() = 6;
928 if ((
j ==
Nx3 - 1) && (
l2 ==
np - 1))
964 for (
unsigned long i = 0;
i < 2 *
nhalf;
i++)
967 for (
unsigned l1 = 1;
l1 <
np;
l1++)
978 nod_pt->spine_mesh_pt() =
this;
980 nod_pt->node_update_fct_id() = 6;
983 if ((
j ==
Nx3 - 1) && (
l2 ==
np - 1))
1000 this->setup_boundary_element_info();
1202 Lower_wall_pt->locate_zeta(
1206 Upper_wall_pt->locate_zeta(
1239 for (
unsigned i = 0;
i < Nx1;
i++)
1251 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1259 nod_pt->set_coordinates_on_boundary(0,
zeta);
1282 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1294 oomph_info <<
"LOWER HORIZONTAL TRANSITION " << std::endl;
1300 for (
unsigned i = 0;
i < Nx2;
i++)
1312 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1320 nod_pt->set_coordinates_on_boundary(0,
zeta);
1344 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1356 oomph_info <<
"LOWER VERTICAL TRANSITION " << std::endl;
1357 for (
unsigned i = 0;
i < Nhalf;
i++)
1366 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1415 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1427 oomph_info <<
"UPPER VERTICAL TRANSITION" << std::endl;
1428 for (
unsigned i = 0;
i < Nhalf;
i++)
1437 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1487 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1499 oomph_info <<
"UPPER HORIZONTAL TRANSITION " << std::endl;
1505 for (
unsigned i = 0;
i < Nx2;
i++)
1517 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1525 el_pt->node_pt(
i1)->set_coordinates_on_boundary(2,
zeta);
1549 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1561 oomph_info <<
"UPPER THIN FILM" << std::endl;
1567 for (
unsigned i = 0;
i < Nx1;
i++)
1579 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1587 nod_pt->set_coordinates_on_boundary(2,
zeta);
1608 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1653 for (
unsigned long j = 0;
j < Nx3;
j++)
1659 for (
unsigned l2 = 0;
l2 <
np;
l2++)
1677 nod_pt->set_coordinates_on_boundary(0,
zeta);
1686 ->set_coordinates_on_boundary(2,
zeta);
1721 fs_mesh_pt->flush_element_and_node_storage();
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.
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:
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.