45 unsigned n_node =
nnode();
49 DShape dpsidzeta(n_node,2);
58 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
78 for(
unsigned l=0;l<n_node;l++)
80 interpolated_u +=
u(l)*psi(l);
82 for(
unsigned j=0;j<2;j++)
85 interpolated_du_dzeta[j] +=
u(l)*dpsidzeta(l,j);
94 double nonlinearterm=1.0;
137 for (
unsigned j=0; j<2; j++)
138 sqnorm += interpolated_du_dzeta[j]*interpolated_du_dzeta[j];
140 nonlinearterm=1.0/sqrt(1.0+sqnorm);
149 get_spine(interpolated_zeta, spine, dspine);
152 for (
unsigned alpha=0;alpha<2;alpha++)
157 spine,dudzeta_times_spine);
165 d_u_times_spine_dzeta);
168 vector_sum(d_u_times_spine_dzeta,dspine_base[alpha],dRdzeta[alpha]);
182 dRdzeta[1], v_tmp_2);
183 vector_sum(v_tmp_1,v_tmp_2,area_variation_numerator_0);
189 dRdzeta[0], v_tmp_2);
190 vector_sum(v_tmp_1,v_tmp_2,area_variation_numerator_1);
193 for (
unsigned j=0; j<3; j++)
195 r[j]=spine_base[j]+interpolated_u*spine[j];
206 for(
unsigned l=0;l<n_node;l++)
210 unsigned n_master=1;
double hang_weight=1.0;
224 for(
unsigned m=0;m<n_master;m++)
253 residuals[local_eqn] +=
get_kappa()*psi(l)*W*hang_weight;
256 for(
unsigned k=0;k<2;k++)
258 residuals[local_eqn] += nonlinearterm*
259 interpolated_du_dzeta[k]*dpsidzeta(l,k)*W*hang_weight;
279 residuals[local_eqn] +=
291 residuals[local_eqn] +=
297 residuals[local_eqn] += W*hang_weight*(
get_kappa())*
int local_hang_eqn(Node *const &node_pt, const unsigned &i)
Access function that returns the local equation number for the hanging node variables (values stored ...
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
unsigned nmaster() const
Return the number of master nodes.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute element residual vector taking hanging nodes into account.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void get_spine(const Vector< double > &x, Vector< double > &spine, Vector< Vector< double > > &dspine) const
Get spine vector field: Defaults to standard cartesian representation if no spine base fct pointers h...
static void allocate_vector_of_vectors(unsigned n_rows, unsigned n_cols, Vector< Vector< double > > &v)
Helper fct: Allocate storage for a vector of vectors of doubles to v(n_rows,n_cols) and initialise ea...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
void interpolated_zeta(const Vector< double > &s, Vector< double > &zeta) const
Calculate the interpolated value of zeta, the intrinsic coordinate of the element when viewed as a co...
static void scalar_times_vector(const double &lambda, const Vector< double > &v, Vector< double > &lambda_times_v)
Multiply a vector by a scalar.
static void cross_product(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &v_cross)
Cross-product: v_cross= v1 x v2.
static double scalar_product(const Vector< double > &v1, const Vector< double > &v2)
Scalar product between two vectors.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual double u(const unsigned &n) const
static void vector_sum(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &vs)
Vectorial sum of two vectors.
double interpolated_u(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
bool use_spines() const
Use spines or not? (Based on availability of function pointers to to spine and spine base vector fiel...
double get_kappa() const
Get curvature.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual int u_local_eqn(const unsigned &n)
Get the local equation number of the (one and only) unknown stored at local node n (returns -1 if val...
static double two_norm(const Vector< double > &v)
2-norm of a vector
virtual void get_spine_base(const Vector< double > &x, Vector< double > &spine_base, Vector< Vector< double > > &dspine_base) const
Get spine base vector field: Defaults to standard cartesian representation if no spine base fct point...
unsigned nnode() const
Return the number of nodes.