278 unsigned long n_lower = this->Nx * Ny1;
279 unsigned long n_upper = this->Nx * Ny2;
281 Lower_layer_element_pt.reserve(
n_lower);
284 Lower_layer_element_pt.push_back(this->finite_element_pt(
e));
287 Upper_layer_element_pt.reserve(
n_upper);
290 Upper_layer_element_pt.push_back(this->finite_element_pt(
e));
294 Interface_lower_boundary_element_pt.resize(this->Nx);
295 Interface_upper_boundary_element_pt.resize(this->Nx);
299 for (
unsigned e = 0;
e < this->Nx;
e++)
301 Interface_lower_boundary_element_pt[
e] =
304 Interface_upper_boundary_element_pt[
e] =
326 if (boundary_coordinate_exists(3))
332 this->Boundary_coordinate_exists[4] =
true;
333 this->Boundary_coordinate_exists[5] =
true;
337 nod_pt->remove_from_boundary(3);
344 this->add_boundary_node(4,
nod_pt);
346 if (this->Boundary_coordinate_exists[4])
354 this->add_boundary_node(5,
nod_pt);
356 if (this->Boundary_coordinate_exists[5])
364 this->Boundary_node_pt[3].clear();
375 if (this->boundary_coordinate_exists(2))
379 this->Boundary_coordinate_exists[3] =
true;
383 nod_pt->remove_from_boundary(2);
385 this->add_boundary_node(3,
nod_pt);
386 if (this->Boundary_coordinate_exists[3])
393 this->Boundary_node_pt[2].clear();
411 if (this->boundary_coordinate_exists(1))
415 this->Boundary_coordinate_exists[2] =
true;
424 this->add_boundary_node(2,
nod_pt);
426 if (this->Boundary_coordinate_exists[2])
439 this->remove_boundary_node(1, *
it);
447 unsigned n_p =
dynamic_cast<ELEMENT*
>(finite_element_pt(0))->
nnode_1d();
453 this->Boundary_coordinate_exists[6];
456 for (
unsigned e = 0;
e < this->Nx;
e++)
469 this->convert_to_boundary_node(
nod_pt);
470 this->add_boundary_node(6,
nod_pt);
479 Spine_pt.reserve((
n_p - 1) * this->Nx);
483 Spine_pt.reserve((
n_p - 1) * this->Nx + 1);
504 nod_pt->spine_mesh_pt() =
this;
506 nod_pt->node_update_fct_id() = 0;
510 for (
unsigned long i = 0;
i < Ny1;
i++)
520 nod_pt->fraction() = (
nod_pt->x(1) - this->Ymin) / (H1);
522 nod_pt->spine_mesh_pt() =
this;
524 nod_pt->node_update_fct_id() = 0;
529 for (
unsigned long i = 0;
i < Ny2;
i++)
540 nod_pt->fraction() = (
nod_pt->x(1) - (this->Ymin + H1)) / (H2);
542 nod_pt->spine_mesh_pt() =
this;
544 nod_pt->node_update_fct_id() = 1;
553 for (
unsigned long j = 0;
j < this->Nx;
j++)
560 if ((this->Xperiodic) && (
j == this->Nx - 1))
n_pmax =
n_p - 1;
576 nod_pt->spine_mesh_pt() =
this;
578 nod_pt->node_update_fct_id() = 0;
582 for (
unsigned long i = 0;
i < Ny1;
i++)
589 element_node_pt(
i * this->Nx +
j,
l1 *
n_p +
l2);
595 nod_pt->spine_mesh_pt() =
this;
597 nod_pt->node_update_fct_id() = 0;
602 for (
unsigned long i = 0;
i < Ny2;
i++)
609 element_node_pt((Ny1 +
i) * this->Nx +
j,
l1 *
n_p +
l2);
614 nod_pt->fraction() = (
nod_pt->x(1) - (this->Ymin + H1)) / H2;
616 nod_pt->spine_mesh_pt() =
this;
618 nod_pt->node_update_fct_id() = 1;
638 nod_pt->fraction() = element_node_pt(0, 0)->fraction();
640 nod_pt->spine_mesh_pt() = element_node_pt(0, 0)->spine_mesh_pt();
642 nod_pt->node_update_fct_id() =
643 element_node_pt(0, 0)->node_update_fct_id();
646 for (
unsigned i = 0;
i < (Ny1 + Ny2);
i++)
659 element_node_pt(
i * this->Nx,
l1 *
n_p)->fraction();
661 nod_pt->node_update_fct_id() =
662 element_node_pt(
i * this->Nx,
l1 *
n_p)->node_update_fct_id();
665 element_node_pt(
i * this->Nx,
l1 *
n_p)->spine_mesh_pt();
695 this->setup_boundary_element_info();