32 #include <oomph-lib-config.h> 44 template<
unsigned DIM>
53 unsigned n_node = this->nnode();
56 unsigned n_value = this->node_pt(0)->nvalue();
59 unsigned d2_dof = this->get_d2_dof();
62 Shape psi(n_node,n_value);
63 DShape dpsidx(n_node,n_value,DIM);
64 DShape d2psidx(n_node,n_value, d2_dof);
66 DShape dpsids(n_node,n_value,DIM);
67 DShape d2psids(n_node,n_value, d2_dof);
73 unsigned n_intpt = this->integral_pt()->nweight();
76 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
80 for (
unsigned i = 0;
i < DIM;
i++) s[
i] = this->integral_pt()->knot(ipt,
i);
83 double w = this->integral_pt()->weight(ipt);
87 double J = this->d2shape_eulerian(s,psi,dpsidx,d2psidx);
88 this->d2shape_local(s,psi,dpsids,d2psids);
95 for (
unsigned i = 0;
i < DIM;
i++)
97 d2u_interpolated[
i] = 0.0;
102 for (
unsigned n = 0; n < n_node; n++)
104 for (
unsigned k = 0; k < n_value; k++)
106 for (
unsigned d = 0; d < DIM; d++)
108 d2u_interpolated[d] += this->node_pt(n)->value(k)*d2psidx(n,k,d);
115 this->interpolated_x(s,interpolated_position);
119 get_source(ipt, interpolated_position, source);
122 for (
unsigned n1 = 0; n1 < n_node; n1++)
126 for (
unsigned k1=0; k1 < n_value; k1++)
130 int local_eqn_number = this->nodal_local_eqn(n1,k1);
133 if (local_eqn_number >= 0)
137 residuals[local_eqn_number] -= source*psi(n1,k1)*
W;
140 for (
unsigned d1 = 0; d1 < DIM; d1++)
144 for (
unsigned d2 = 0; d2 < DIM; d2++)
148 residuals[local_eqn_number] +=
149 d2u_interpolated[d1]*d2psidx(n1,k1,d2)*
W;
158 for (
unsigned n2 = 0; n2 < n_node; n2++)
162 for (
unsigned k2=0; k2 < n_value; k2++)
166 int local_dof_number = this->nodal_local_eqn(n2,k2);
169 if (local_dof_number >= 0)
173 for (
unsigned d2 = 0; d2 < DIM; d2++)
177 jacobian(local_eqn_number,local_dof_number) +=
178 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.