28 #include <oomph-lib-config.h>
39 template<
unsigned DIM>
45 unsigned n_node = this->nnode();
48 unsigned n_value = this->node_pt(0)->nvalue();
51 unsigned d2_dof = this->get_d2_dof();
54 Shape psi(n_node, n_value);
55 DShape dpsidx(n_node, n_value, DIM);
56 DShape d2psidx(n_node, n_value, d2_dof);
58 DShape dpsids(n_node, n_value, DIM);
59 DShape d2psids(n_node, n_value, d2_dof);
65 unsigned n_intpt = this->integral_pt()->nweight();
68 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
71 for (
unsigned i = 0;
i < DIM;
i++)
72 s[
i] = this->integral_pt()->knot(ipt,
i);
75 double w = this->integral_pt()->weight(ipt);
79 double J = this->d2shape_eulerian(
s, psi, dpsidx, d2psidx);
80 this->d2shape_local(
s, psi, dpsids, d2psids);
87 for (
unsigned i = 0;
i < DIM;
i++)
89 d2u_interpolated[
i] = 0.0;
94 for (
unsigned n = 0; n < n_node; n++)
96 for (
unsigned k = 0; k < n_value; k++)
98 for (
unsigned d = 0; d < DIM; d++)
100 d2u_interpolated[d] +=
101 this->node_pt(n)->value(k) * d2psidx(n, k, d);
108 this->interpolated_x(
s, interpolated_position);
112 get_source(ipt, interpolated_position, source);
115 for (
unsigned n1 = 0; n1 < n_node; n1++)
118 for (
unsigned k1 = 0; k1 < n_value; k1++)
121 int local_eqn_number = this->nodal_local_eqn(n1, k1);
125 if (local_eqn_number >= 0)
128 residuals[local_eqn_number] -= source * psi(n1, k1) *
W;
131 for (
unsigned d1 = 0; d1 < DIM; d1++)
134 for (
unsigned d2 = 0; d2 < DIM; d2++)
137 residuals[local_eqn_number] +=
138 d2u_interpolated[d1] * d2psidx(n1, k1, d2) *
W;
145 for (
unsigned n2 = 0; n2 < n_node; n2++)
148 for (
unsigned k2 = 0; k2 < n_value; k2++)
151 int local_dof_number = this->nodal_local_eqn(n2, k2);
154 if (local_dof_number >= 0)
157 for (
unsigned d2 = 0; d2 < DIM; d2++)
160 jacobian(local_eqn_number, local_dof_number) +=
161 d2psidx(n1, k1, d1) * d2psidx(n2, k2, d2) *
W;
virtual void fill_in_generic_residual_contribution_biharmonic(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned JFLAG)
Compute element residual Vector only (if JFLAG=and/or element Jacobian matrix.
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...