38 unsigned n_node =
nnode();
42 DShape dpsidzeta(n_node, 2);
51 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
71 for (
unsigned l = 0; l < n_node; l++)
75 for (
unsigned j = 0; j < 2; j++)
78 interpolated_du_dzeta[j] +=
u(l) * dpsidzeta(l, j);
87 double nonlinearterm = 1.0;
129 for (
unsigned j = 0; j < 2; j++)
130 sqnorm += interpolated_du_dzeta[j] * interpolated_du_dzeta[j];
132 nonlinearterm = 1.0 / sqrt(1.0 + sqnorm);
144 for (
unsigned alpha = 0; alpha < 2; alpha++)
149 interpolated_du_dzeta[alpha], spine, dudzeta_times_spine);
157 dudzeta_times_spine, u_times_dspinedzeta, d_u_times_spine_dzeta);
160 vector_sum(d_u_times_spine_dzeta, dspine_base[alpha], dRdzeta[alpha]);
174 -1 *
scalar_product(dRdzeta[0], dRdzeta[1]), dRdzeta[1], v_tmp_2);
175 vector_sum(v_tmp_1, v_tmp_2, area_variation_numerator_0);
181 -1 *
scalar_product(dRdzeta[0], dRdzeta[1]), dRdzeta[0], v_tmp_2);
182 vector_sum(v_tmp_1, v_tmp_2, area_variation_numerator_1);
185 for (
unsigned j = 0; j < 3; j++)
196 for (
unsigned l = 0; l < n_node; l++)
200 unsigned n_master = 1;
201 double hang_weight = 1.0;
215 for (
unsigned m = 0; m < n_master; m++)
243 residuals[local_eqn] +=
get_kappa() * psi(l) *
W * hang_weight;
246 for (
unsigned k = 0; k < 2; k++)
248 residuals[local_eqn] += nonlinearterm *
249 interpolated_du_dzeta[k] *
250 dpsidzeta(l, k) *
W * hang_weight;
269 residuals[local_eqn] +=
281 residuals[local_eqn] +=
287 residuals[local_eqn] +=
W * hang_weight * (
get_kappa()) *
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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-...
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...
unsigned nnode() const
Return the number of nodes.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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 ...
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.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
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 ...
Refineable version of 2D QYoungLaplaceElement elements.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute element residual vector taking hanging nodes into account.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
static double two_norm(const Vector< double > &v)
2-norm of a vector
static void scalar_times_vector(const double &lambda, const Vector< double > &v, Vector< double > &lambda_times_v)
Multiply a vector by a scalar.
static double scalar_product(const Vector< double > &v1, const Vector< double > &v2)
Scalar product between two vectors.
double interpolated_u(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
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...
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...
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...
virtual double u(const unsigned &n) const
Access function: Nodal function value at local node n Uses suitably interpolated value for hanging no...
double get_kappa() const
Get curvature.
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...
bool use_spines() const
Use spines or not? (Based on availability of function pointers to to spine and spine base vector fiel...
static void cross_product(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &v_cross)
Cross-product: v_cross= v1 x v2.
static void vector_sum(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &vs)
Vectorial sum of two vectors.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...