28 #include <oomph-lib-config.h>
47 FiniteElement*
const& bulk_el_pt,
const int& face_index,
const unsigned& b)
77 unsigned n_node = this->nnode();
80 Shape psi(n_node, Nface_nodal_dof);
81 DShape dpsids(n_node, Nface_nodal_dof, 1);
84 this->dshape_local(
s, psi, dpsids);
90 const unsigned slope_index = this->bulk_position_type(1);
91 for (
unsigned l = 0; l < n_node; l++)
93 for (
unsigned d = 0; d < 2; d++)
95 interpolated_dxds_t[d] +=
96 this->node_pt(l)->x_gen(0, d) * dpsids(l, 0, 0) +
97 this->node_pt(l)->x_gen(slope_index, d) * dpsids(l, 1, 0);
111 double dtds_t = sqrt(interpolated_dxds_t[0] * interpolated_dxds_t[0] +
112 interpolated_dxds_t[1] * interpolated_dxds_t[1]);
129 unsigned n_node = this->nnode();
132 Shape psi(n_node, Nface_nodal_dof);
135 DShape dpsi(n_node, Nface_nodal_dof, 1);
138 unsigned n_intpt = this->integral_pt()->nweight();
145 -this->normal_sign();
148 if ((this->face_index() == 2) || (this->face_index() == -2))
154 const unsigned slope_index = this->bulk_position_type(1);
157 const unsigned outer_slope_index = 3 - slope_index;
161 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
164 double w = this->integral_pt()->weight(ipt);
167 s[0] = this->integral_pt()->knot(ipt, 0);
170 this->dshape_local(
s, psi, dpsi);
175 for (
unsigned n = 0; n < n_node; n++)
177 for (
unsigned d = 0; d < 2; d++)
179 for (
unsigned k = 0; k < Nface_nodal_dof; k++)
181 dxds_t[d] += dpsi(n, k, 0) * node_pt(n)->x_gen(slope_index * k, d);
182 dxds_n[d] += psi(n, k) * node_pt(n)->x_gen(
183 outer_slope_index + slope_index * k, d);
189 double ds_ndn = -edge_sign *
190 sqrt(dxds_t[0] * dxds_t[0] + dxds_t[1] * dxds_t[1]) /
191 (-dxds_n[0] * dxds_t[1] + dxds_t[0] * dxds_n[1]);
194 double ds_tdn = edge_sign *
195 (dxds_t[1] * dxds_n[1] + dxds_t[0] * dxds_n[0]) /
196 (sqrt(dxds_t[0] * dxds_t[0] + dxds_t[1] * dxds_t[1]) *
197 (-dxds_n[0] * dxds_t[1] + dxds_t[0] * dxds_n[1]));
200 double interpolated_m = 0.0;
202 for (
unsigned n = 0; n < n_node; n++)
204 this->node_pt(n)->get_coordinates_on_boundary(Boundary, m);
205 for (
unsigned k = 0; k < Nface_nodal_dof; k++)
207 interpolated_m += psi(n, k) * m[k];
213 get_flux0(interpolated_m, flux0);
215 get_flux1(interpolated_m, flux1);
218 double J = J_eulerian(
s);
227 for (
unsigned n = 0; n < n_node; n++)
230 for (
unsigned k = 0; k < Nface_nodal_dof; k++)
235 unsigned bulk_p_type = slope_index * k;
238 int local_eqn = this->nodal_local_eqn(n, bulk_p_type);
244 residual[local_eqn] += flux1 * psi(n, k) *
W;
253 residual[local_eqn] -= flux0 * dpsi(n, k, 0) * ds_tdn *
W;
259 bulk_p_type = outer_slope_index + slope_index * k;
262 local_eqn = this->nodal_local_eqn(n, bulk_p_type);
268 residual[local_eqn] -= flux0 * psi(n, k) * ds_ndn *
W;
unsigned Nface_nodal_dof
the number of nodal degrees of freedom for the face element basis functions
double J_eulerian(const Vector< double > &s) const
Calculate the Jacobian of the mapping between local and global coordinates at the position s for face...
FluxFctPt Flux1_fct_pt
Function pointer to the prescribed flux.
unsigned Boundary
Boundary ID.
FluxFctPt Flux0_fct_pt
Function pointer to the prescribed flux.
BiharmonicFluxElement()
Broken empty constructor.
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
A general Finite Element class.
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...