63 const unsigned&
nhalf,
86 Spine_centre_fraction_pt(&Default_spine_centre_fraction),
87 Default_spine_centre_fraction(0.5)
98 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
101 MeshChecker::assert_geometric_element<SpineFiniteElement, ELEMENT>(2);
133 oomph_info <<
"\n\n=================================================== "
138 oomph_info <<
"Upper and lower walls are not symmetric at zeta=0"
140 oomph_info <<
"Your initial mesh will look very odd." << std::endl;
144 oomph_info <<
"===================================================\n\n "
154 for (
unsigned i = 0;
i <
n_x;
i++)
215 for (
unsigned i = 0;
i <
nx1;
i++)
221 for (
unsigned j = 0;
j <
nh;
j++)
230 for (
unsigned i0 = 0;
i0 <
np;
i0++)
232 for (
unsigned i1 = 0;
i1 <
np;
i1++)
241 nod_pt->node_update_fct_id() = 0;
260 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]);
489 for (
unsigned i = 0;
i <
nhalf;
i++)
492 for (
unsigned j = 0;
j <
nh;
j++)
501 for (
unsigned i0 = 0;
i0 <
np;
i0++)
503 for (
unsigned i1 = 0;
i1 <
np;
i1++)
512 nod_pt->node_update_fct_id() = 3;
555 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
588 for (
unsigned i = 0;
i <
nx2;
i++)
594 for (
unsigned j = 0;
j <
nh;
j++)
603 for (
unsigned i0 = 0;
i0 <
np;
i0++)
605 for (
unsigned i1 = 0;
i1 <
np;
i1++)
614 nod_pt->node_update_fct_id() = 4;
639 double length =
sqrt(N[0] * N[0] + N[1] * N[1]);
673 for (
unsigned i = 0;
i <
nx1;
i++)
679 for (
unsigned j = 0;
j <
nh;
j++)
688 for (
unsigned i0 = 0;
i0 <
np;
i0++)
690 for (
unsigned i1 = 0;
i1 <
np;
i1++)
699 nod_pt->node_update_fct_id() = 5;
715 nod_pt->spine_pt()->height() =
H;
741 typedef std::set<Node*>::iterator
IT;
780 for (
unsigned i = 0;
i <
nnod;
i++)
792 for (
unsigned e = 0;
e < 2 *
nhalf;
e++)
796 for (
unsigned i = 0;
i <
np;
i++)
801 if ((
e < 1) || (
i > 0))
816 typedef std::set<Node*>::iterator
IT;
827 for (
unsigned e = 0;
e <
nelem;
e++)
856 nod_pt->spine_mesh_pt() =
this;
858 nod_pt->node_update_fct_id() = 6;
886 for (
unsigned long i = 0;
i < 2 *
nhalf;
i++)
889 for (
unsigned l1 = 1;
l1 <
np;
l1++)
900 nod_pt->spine_mesh_pt() =
this;
902 nod_pt->node_update_fct_id() = 6;
911 for (
unsigned long j = 0;
j <
Nx3;
j++)
915 for (
unsigned l2 = 1;
l2 <
np;
l2++)
929 nod_pt->spine_mesh_pt() =
this;
931 nod_pt->node_update_fct_id() = 6;
935 if ((
j ==
Nx3 - 1) && (
l2 ==
np - 1))
972 for (
unsigned long i = 0;
i < 2 *
nhalf;
i++)
975 for (
unsigned l1 = 1;
l1 <
np;
l1++)
986 nod_pt->spine_mesh_pt() =
this;
988 nod_pt->node_update_fct_id() = 6;
991 if ((
j ==
Nx3 - 1) && (
l2 ==
np - 1))
1008 this->setup_boundary_element_info();
1213 Lower_wall_pt->locate_zeta(
1217 Upper_wall_pt->locate_zeta(
1251 for (
unsigned i = 0;
i < Nx1;
i++)
1263 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1271 nod_pt->set_coordinates_on_boundary(0,
zeta);
1294 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1307 oomph_info <<
"LOWER HORIZONTAL TRANSITION " << std::endl;
1313 for (
unsigned i = 0;
i < Nx2;
i++)
1325 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1333 nod_pt->set_coordinates_on_boundary(0,
zeta);
1357 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1369 oomph_info <<
"LOWER VERTICAL TRANSITION " << std::endl;
1370 for (
unsigned i = 0;
i < Nhalf;
i++)
1379 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1428 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1441 oomph_info <<
"UPPER VERTICAL TRANSITION" << std::endl;
1442 for (
unsigned i = 0;
i < Nhalf;
i++)
1451 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1502 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1515 oomph_info <<
"UPPER HORIZONTAL TRANSITION " << std::endl;
1521 for (
unsigned i = 0;
i < Nx2;
i++)
1533 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1541 el_pt->node_pt(
i1)->set_coordinates_on_boundary(2,
zeta);
1566 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1579 oomph_info <<
"UPPER THIN FILM" << std::endl;
1585 for (
unsigned i = 0;
i < Nx1;
i++)
1597 for (
unsigned i1 = 0;
i1 < (
np - 1);
i1++)
1605 nod_pt->set_coordinates_on_boundary(2,
zeta);
1626 nod_pt->spine_pt()->height() = find_distance_to_free_surface(
1673 for (
unsigned long j = 0;
j < Nx3;
j++)
1679 for (
unsigned l2 = 0;
l2 <
np;
l2++)
1697 nod_pt->set_coordinates_on_boundary(0,
zeta);
1706 ->set_coordinates_on_boundary(2,
zeta);
1742 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.