42 template<
unsigned DIM>
54 "RefineablePVDEquations cannot be used with incompressible constitutive laws.",
55 OOMPH_CURRENT_FUNCTION,
56 OOMPH_EXCEPTION_LOCATION);
63 get_residuals_for_solid_ic(residuals);
68 const unsigned n_node = nnode();
71 const unsigned n_position_type = this->nnodal_position_type();
77 double lambda_sq = this->lambda_sq();
80 double time_factor=0.0;
83 time_factor=this->node_pt(0)->position_time_stepper_pt()->weight(2,0);
87 Shape psi(n_node,n_position_type);
88 DShape dpsidxi(n_node,n_position_type,DIM);
91 const unsigned n_intpt = integral_pt()->nweight();
97 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
100 for(
unsigned i=0;
i<DIM;++
i) {s[
i] = integral_pt()->knot(ipt,
i);}
103 double w = integral_pt()->weight(ipt);
106 double J = dshape_lagrangian_at_knot(ipt,psi,dpsidxi);
119 for(
unsigned l=0;l<n_node;l++)
122 for(
unsigned k=0;k<n_position_type;k++)
124 double psi_ = psi(l,k);
126 for(
unsigned i=0;
i<DIM;
i++)
129 interpolated_xi[
i] += lagrangian_position_gen(l,k,
i)*psi_;
134 if ((lambda_sq>0.0)&&(this->Unsteady))
136 accel[
i] += dnodal_position_gen_dt(2,l,k,
i)*psi_;
140 for(
unsigned j=0;j<DIM;j++)
142 interpolated_G(j,
i) +=
143 this->nodal_position_gen(l,k,
i)*dpsidxi(l,k,j);
151 this->get_isotropic_growth(ipt,s,interpolated_xi,gamma);
155 this->body_force(interpolated_xi,b);
160 double diag_entry=pow(gamma,2.0/
double(DIM));
162 for(
unsigned i=0;
i<DIM;
i++)
164 for(
unsigned j=0;j<DIM;j++)
166 if(
i==j) {g(
i,j) = diag_entry;}
173 double W = gamma*w*J;
179 for(
unsigned i=0;
i<DIM;
i++)
182 for(
unsigned j=
i;j<DIM;j++)
187 for(
unsigned k=0;k<DIM;k++)
189 G(
i,j) += interpolated_G(
i,k)*interpolated_G(j,k);
193 for(
unsigned j=0;j<
i;j++)
201 this->get_stress(g,G,sigma);
219 for (
unsigned ll=0;ll<n_node;ll++)
221 for (
unsigned kk=0;kk<n_position_type;kk++)
223 for (
unsigned ii=0;ii<DIM;ii++)
225 for (
unsigned aa=0;aa<DIM;aa++)
227 for (
unsigned bb=aa;bb<DIM;bb++)
229 d_G_dX(ll,kk,ii,aa,bb)=
230 interpolated_G(aa,ii)*dpsidxi(ll,kk,bb)+
231 interpolated_G(bb,ii)*dpsidxi(ll,kk,aa);
241 this->get_d_stress_dG_upper(g,G,sigma,d_stress_dG);
246 for(
unsigned i=0;
i<DIM;
i++)
248 for(
unsigned j=0;j<DIM;j++)
250 sigma(
i,j) += this->prestress(
i,j,interpolated_xi);
259 double hang_weight=1.0;
262 for(
unsigned l=0;l<n_node;l++)
266 Node* local_node_pt = node_pt(l);
288 for(
unsigned m=0;m<n_master;m++)
294 position_local_eqn_at_node =
295 local_position_hang_eqn(local_node_pt->
296 hanging_pt()->master_node_pt(m));
304 for(
unsigned k=0;k<n_position_type;k++)
307 for(
unsigned i=0;
i<DIM;
i++)
309 position_local_eqn_at_node(k,
i) = position_local_eqn(l,k,
i);
318 for(
unsigned k=0;k<n_position_type;k++)
321 const unsigned offset5=dpsidxi.
offset(l ,k);
324 for(
unsigned i=0;
i<DIM;
i++)
326 local_eqn = position_local_eqn_at_node(k,
i);
335 sum+=(lambda_sq*accel[
i]-b[
i])*psi(l,k);
338 for(
unsigned a=0;a<DIM;a++)
340 unsigned count=offset5;
341 for(
unsigned b=0;b<DIM;b++)
344 sum+=sigma(a,b)*interpolated_G(a,
i)*
349 residuals[local_eqn] += W*sum*hang_weight;
356 const unsigned offset1=d_G_dX.
offset( l, k,
i);
359 unsigned nn_master=1;
360 double hhang_weight=1.0;
363 for(
unsigned ll=0;ll<n_node;ll++)
366 Node* llocal_node_pt = node_pt(ll);
369 bool iis_hanging=llocal_node_pt->
is_hanging();
389 for(
unsigned mm=0;mm<nn_master;mm++)
395 position_local_unk_at_node =
396 local_position_hang_eqn(llocal_node_pt->
407 for(
unsigned kk=0;kk<n_position_type;kk++)
410 for(
unsigned ii=0;ii<DIM;ii++)
412 position_local_unk_at_node(kk,ii) =
413 position_local_eqn(ll,kk,ii);
423 for(
unsigned kk=0;kk<n_position_type;kk++)
426 for(
unsigned ii=0;ii<DIM;ii++)
429 int local_unknown = position_local_unk_at_node(kk,ii);
433 if(local_unknown >= 0)
437 const unsigned offset2=d_G_dX.
offset( ll, kk, ii);
438 const unsigned offset4=dpsidxi.
offset(ll, kk);
444 unsigned count1=offset1;
445 for(
unsigned a=0;a<DIM;a++)
450 for(
unsigned b=a;b<DIM;b++)
453 if (a==b) factor*=0.5;
456 unsigned offset3=d_stress_dG.
offset(a,b);
457 unsigned count2=offset2;
458 unsigned count3=offset3;
460 for(
unsigned aa=0;aa<DIM;aa++)
469 for(
unsigned bb=aa;bb<DIM;bb++)
485 jacobian(local_eqn,local_unknown)+=
486 sum*W*hang_weight*hhang_weight;
490 if((
i==ii) && (local_unknown >= local_eqn))
496 sum+=lambda_sq*time_factor*psi(ll,kk)*psi(l,k);
499 unsigned count4=offset4;
500 for(
unsigned a=0;a<DIM;a++)
507 unsigned count5=offset5;
508 for(
unsigned b=0;b<DIM;b++)
510 sum+=sigma(a,b)*factor*
518 sum*W*hang_weight*hhang_weight;
520 jacobian(local_eqn,local_unknown)+= sym_entry;
522 if(local_eqn!=local_unknown)
524 jacobian(local_unknown,local_eqn)+= sym_entry;
548 template<
unsigned DIM>
554 mass_diag.assign(this->ndof(),0.0);
557 unsigned n_node = this->nnode();
560 const unsigned n_position_type = this->nnodal_position_type();
563 Shape psi(n_node,n_position_type);
564 DShape dpsidxi(n_node,n_position_type,DIM);
567 unsigned n_intpt = this->integral_pt()->nweight();
573 for(
unsigned ipt=0; ipt<n_intpt; ipt++)
576 double w = this->integral_pt()->weight(ipt);
579 double J = this->dshape_lagrangian_at_knot(ipt,psi,dpsidxi);
585 double hang_weight=1.0;
588 for(
unsigned l=0; l<n_node; l++)
591 Node* local_node_pt = node_pt(l);
612 for(
unsigned m=0;m<n_master;m++)
617 position_local_eqn_at_node =
618 local_position_hang_eqn(local_node_pt->
619 hanging_pt()->master_node_pt(m));
627 for(
unsigned k=0;k<n_position_type;k++)
630 for(
unsigned i=0;
i<DIM;
i++)
632 position_local_eqn_at_node(k,
i) = position_local_eqn(l,k,
i);
641 for(
unsigned k=0;k<n_position_type;k++)
644 for(
unsigned i=0;
i<DIM;
i++)
647 local_eqn = position_local_eqn_at_node(k,
i);
653 mass_diag[local_eqn] += pow(psi(l,k)*hang_weight,2) *
W;
676 template<
unsigned DIM>
687 (!this->Incompressible))
690 "The constitutive law requires the use of the incompressible formulation by setting the element's member function set_incompressible()",
691 OOMPH_CURRENT_FUNCTION,
692 OOMPH_EXCEPTION_LOCATION);
700 get_residuals_for_solid_ic(residuals);
705 const unsigned n_node = nnode();
708 const unsigned n_position_type = this->nnodal_position_type();
711 const unsigned n_solid_pres = this->npres_solid();
714 const int solid_p_index = this->solid_p_nodal_index();
718 bool solid_pressure_dof_is_hanging[n_solid_pres];
721 if(solid_p_index >= 0)
724 for(
unsigned l=0;l<n_solid_pres;++l)
726 solid_pressure_dof_is_hanging[l] =
727 solid_pressure_node_pt(l)->is_hanging(solid_p_index);
734 for(
unsigned l=0;l<n_solid_pres;++l)
735 {solid_pressure_dof_is_hanging[l] =
false;}
739 int local_eqn=0, local_unknown=0;
742 double lambda_sq = this->lambda_sq();
746 double time_factor=0.0;
749 time_factor=this->node_pt(0)->position_time_stepper_pt()->weight(2,0);
754 Shape psi(n_node,n_position_type);
755 DShape dpsidxi(n_node,n_position_type,DIM);
758 Shape psisp(n_solid_pres);
761 const unsigned n_intpt = integral_pt()->nweight();
767 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
770 for(
unsigned i=0;
i<DIM;++
i) {s[
i] = integral_pt()->knot(ipt,
i);}
773 double w = integral_pt()->weight(ipt);
776 double J = dshape_lagrangian_at_knot(ipt,psi,dpsidxi);
779 this->solid_pshape_at_knot(ipt,psisp);
791 for(
unsigned l=0;l<n_node;l++)
794 for(
unsigned k=0;k<n_position_type;k++)
796 double psi_ = psi(l,k);
798 for(
unsigned i=0;
i<DIM;
i++)
801 interpolated_xi[
i] += lagrangian_position_gen(l,k,
i)*psi_;
806 if ((lambda_sq>0.0)&&(this->Unsteady))
808 accel[
i] += dnodal_position_gen_dt(2,l,k,
i)*psi_;
812 for(
unsigned j=0;j<DIM;j++)
814 interpolated_G(j,
i) += nodal_position_gen(l,k,
i)*dpsidxi(l,k,j);
822 this->get_isotropic_growth(ipt,s,interpolated_xi,gamma);
826 this->body_force(interpolated_xi,b);
831 double diag_entry=pow(gamma,2.0/
double(DIM));
833 for(
unsigned i=0;
i<DIM;
i++)
835 for(
unsigned j=0;j<DIM;j++)
837 if(
i==j) {g(
i,j) = diag_entry;}
844 double W = gamma*w*J;
847 double interpolated_solid_p=0.0;
848 for(
unsigned l=0;l<n_solid_pres;l++)
850 interpolated_solid_p += this->solid_p(l)*psisp[l];
858 for(
unsigned i=0;
i<DIM;
i++)
861 for(
unsigned j=
i;j<DIM;j++)
866 for(
unsigned k=0;k<DIM;k++)
868 G(
i,j) += interpolated_G(
i,k)*interpolated_G(j,k);
872 for(
unsigned j=0;j<
i;j++)
883 double inv_kappa=0.0;
897 if((flag==1) || (flag==3))
904 for (
unsigned ll=0;ll<n_node;ll++)
906 for (
unsigned kk=0;kk<n_position_type;kk++)
908 for (
unsigned ii=0;ii<DIM;ii++)
910 for (
unsigned aa=0;aa<DIM;aa++)
912 for (
unsigned bb=aa;bb<DIM;bb++)
914 d_G_dX(ll,kk,ii,aa,bb)=
915 interpolated_G(aa,ii)*dpsidxi(ll,kk,bb)+
916 interpolated_G(bb,ii)*dpsidxi(ll,kk,aa);
928 if(this->Incompressible)
930 this->get_stress(g,G,sigma_dev,Gup,detG);
933 for (
unsigned a=0;a<DIM;a++)
935 for (
unsigned b=0;b<DIM;b++)
937 sigma(a,b)=sigma_dev(a,b)-interpolated_solid_p*Gup(a,b);
942 if((flag==1) || (flag==3))
947 this->get_d_stress_dG_upper(g,G,sigma,detG,interpolated_solid_p,
948 d_stress_dG,d_detG_dG);
956 this->get_stress(g,G,sigma_dev,Gup,gen_dil,inv_kappa);
959 for (
unsigned a=0;a<DIM;a++)
961 for (
unsigned b=0;b<DIM;b++)
963 sigma(a,b)=sigma_dev(a,b)-interpolated_solid_p*Gup(a,b);
968 if((flag==1) || (flag==3))
973 this->get_d_stress_dG_upper(g,G,sigma,gen_dil,inv_kappa,
974 interpolated_solid_p,
975 d_stress_dG,d_gen_dil_dG);
980 for(
unsigned i=0;
i<DIM;
i++)
982 for(
unsigned j=0;j<DIM;j++)
984 sigma(
i,j) += this->prestress(
i,j,interpolated_xi);
991 double hang_weight=1.0;
994 for(
unsigned l=0;l<n_node;l++)
997 Node* local_node_pt = node_pt(l);
1019 for(
unsigned m=0;m<n_master;m++)
1025 position_local_eqn_at_node =
1026 local_position_hang_eqn(local_node_pt->
1027 hanging_pt()->master_node_pt(m));
1035 for(
unsigned k=0;k<n_position_type;k++)
1038 for(
unsigned i=0;
i<DIM;
i++)
1040 position_local_eqn_at_node(k,
i) = position_local_eqn(l,k,
i);
1050 for(
unsigned k=0;k<n_position_type;k++)
1054 const unsigned offset5=dpsidxi.
offset(l ,k);
1057 for(
unsigned i=0;
i<DIM;
i++)
1059 local_eqn = position_local_eqn_at_node(k,
i);
1068 sum+=(lambda_sq*accel[
i]-b[
i])*psi(l,k);
1071 for(
unsigned a=0;a<DIM;a++)
1073 unsigned count=offset5;
1074 for(
unsigned b=0;b<DIM;b++)
1077 sum+=sigma(a,b)*interpolated_G(a,
i)*
1082 residuals[local_eqn] += W*sum*hang_weight;
1094 unsigned nn_master=1;
1095 double hhang_weight=1.0;
1098 for(
unsigned ll=0;ll<n_node;ll++)
1101 Node* llocal_node_pt = node_pt(ll);
1104 bool iis_hanging=llocal_node_pt->
is_hanging();
1124 for(
unsigned mm=0;mm<nn_master;mm++)
1130 position_local_unk_at_node =
1131 local_position_hang_eqn(
1133 hanging_pt()->master_node_pt(mm));
1136 hhang_weight = llocal_node_pt->
hanging_pt()->
1142 for(
unsigned kk=0;kk<n_position_type;kk++)
1145 for(
unsigned ii=0;ii<DIM;ii++)
1147 position_local_unk_at_node(kk,ii) =
1148 position_local_eqn(ll,kk,ii);
1158 for(
unsigned kk=0;kk<n_position_type;kk++)
1161 int local_unknown = position_local_unk_at_node(kk,
i);
1164 if(local_unknown >= 0)
1166 mass_matrix(local_eqn,local_unknown) +=
1167 lambda_sq*psi(l,k)*psi(ll,kk)*hang_weight*
1178 if((flag==1) || (flag==3))
1181 const unsigned offset1=d_G_dX.
offset( l, k,
i);
1184 unsigned nn_master=1;
1185 double hhang_weight=1.0;
1188 for(
unsigned ll=0;ll<n_node;ll++)
1191 Node* llocal_node_pt = node_pt(ll);
1194 bool iis_hanging=llocal_node_pt->
is_hanging();
1214 for(
unsigned mm=0;mm<nn_master;mm++)
1220 position_local_unk_at_node =
1221 local_position_hang_eqn(
1223 hanging_pt()->master_node_pt(mm));
1226 hhang_weight = llocal_node_pt->
hanging_pt()->
1232 for(
unsigned kk=0;kk<n_position_type;kk++)
1235 for(
unsigned ii=0;ii<DIM;ii++)
1237 position_local_unk_at_node(kk,ii) =
1238 position_local_eqn(ll,kk,ii);
1248 for(
unsigned kk=0;kk<n_position_type;kk++)
1251 for(
unsigned ii=0;ii<DIM;ii++)
1254 int local_unknown = position_local_unk_at_node(kk,ii);
1257 if(local_unknown >= 0)
1263 const unsigned offset2=d_G_dX.
offset( ll, kk, ii);
1264 const unsigned offset4=dpsidxi.
offset(ll, kk);
1270 unsigned count1=offset1;
1271 for(
unsigned a=0;a<DIM;a++)
1276 for(
unsigned b=a;b<DIM;b++)
1279 if (a==b) factor*=0.5;
1282 unsigned offset3=d_stress_dG.
offset(a,b);
1283 unsigned count2=offset2;
1284 unsigned count3=offset3;
1286 for(
unsigned aa=0;aa<DIM;aa++)
1295 for(
unsigned bb=aa;bb<DIM;bb++)
1311 jacobian(local_eqn,local_unknown)+=
1312 sum*W*hang_weight*hhang_weight;
1316 if((
i==ii) && (local_unknown >= local_eqn))
1322 sum+=lambda_sq*time_factor*psi(ll,kk)*psi(l,k);
1325 unsigned count4=offset4;
1326 for(
unsigned a=0;a<DIM;a++)
1329 const double factor=
1333 unsigned count5=offset5;
1334 for(
unsigned b=0;b<DIM;b++)
1336 sum+=sigma(a,b)*factor*
1344 sum*W*hang_weight*hhang_weight;
1346 jacobian(local_eqn,local_unknown)+= sym_entry;
1348 if(local_eqn != local_unknown)
1350 jacobian(local_unknown,local_eqn)+= sym_entry;
1364 for(
unsigned l2=0;l2<n_solid_pres;l2++)
1366 unsigned n_master2=1;
1367 double hang_weight2=1.0;
1370 bool is_hanging2=solid_pressure_dof_is_hanging[l2];
1376 solid_pressure_node_pt(l2)->hanging_pt(solid_p_index);
1378 n_master2 = hang_info2_pt->
nmaster();
1386 for(
unsigned m2=0;m2<n_master2;m2++)
1400 local_unknown=this->solid_p_local_eqn(l2);
1405 if(local_unknown >= 0)
1408 for(
unsigned a=0;a<DIM;a++)
1410 for(
unsigned b=0;b<DIM;b++)
1412 jacobian(local_eqn,local_unknown) -=
1414 interpolated_G(a,
i)*dpsidxi(l,k,b)*W
1415 *hang_weight*hang_weight2;
1433 for(
unsigned l=0;l<n_solid_pres;l++)
1435 bool is_hanging=solid_pressure_dof_is_hanging[l];
1437 unsigned n_master=1;
1438 double hang_weight=1.0;
1447 solid_pressure_node_pt(l)->hanging_pt(solid_p_index);
1450 n_master = hang_info_pt->
nmaster();
1460 for(
unsigned m=0;m<n_master;m++)
1474 local_eqn=this->solid_p_local_eqn(l);
1484 if(this->Incompressible)
1486 residuals[local_eqn] +=
1487 (detG - gamma)*psisp[l]*W*hang_weight;
1490 if((flag==1) || (flag==3))
1493 unsigned nn_master=1;
1494 double hhang_weight=1.0;
1497 for(
unsigned ll=0;ll<n_node;ll++)
1500 Node* llocal_node_pt = node_pt(ll);
1503 bool iis_hanging=llocal_node_pt->
is_hanging();
1522 for(
unsigned mm=0;mm<nn_master;mm++)
1528 position_local_unk_at_node =
1529 local_position_hang_eqn(
1531 hanging_pt()->master_node_pt(mm));
1534 hhang_weight = llocal_node_pt->
hanging_pt()->
1540 for(
unsigned kk=0;kk<n_position_type;kk++)
1543 for(
unsigned ii=0;ii<DIM;ii++)
1545 position_local_unk_at_node(kk,ii) =
1546 position_local_eqn(ll,kk,ii);
1556 for(
unsigned kk=0;kk<n_position_type;kk++)
1559 for(
unsigned ii=0;ii<DIM;ii++)
1562 int local_unknown = position_local_unk_at_node(kk,ii);
1565 if(local_unknown >= 0)
1569 const unsigned offset=d_G_dX.
offset( ll, kk, ii);
1573 unsigned count=offset;
1574 for(
unsigned aa=0;aa<DIM;aa++)
1581 for(
unsigned bb=aa;bb<DIM;bb++)
1583 sum+=d_detG_dG(aa,bb)*
1588 jacobian(local_eqn,local_unknown)+=
1589 sum*W*hang_weight*hhang_weight;
1606 residuals[local_eqn] +=
1607 (inv_kappa*interpolated_solid_p + gen_dil)
1608 *psisp[l]*W*hang_weight;
1611 if((flag==1) || (flag==3))
1614 unsigned nn_master=1;
1615 double hhang_weight=1.0;
1618 for(
unsigned ll=0;ll<n_node;ll++)
1621 Node* llocal_node_pt = node_pt(ll);
1624 bool iis_hanging=llocal_node_pt->
is_hanging();
1644 for(
unsigned mm=0;mm<nn_master;mm++)
1650 position_local_unk_at_node =
1651 local_position_hang_eqn(llocal_node_pt->
1652 hanging_pt()->master_node_pt(mm));
1655 hhang_weight = llocal_node_pt->
hanging_pt()->
1661 for(
unsigned kk=0;kk<n_position_type;kk++)
1664 for(
unsigned ii=0;ii<DIM;ii++)
1666 position_local_unk_at_node(kk,ii) =
1667 position_local_eqn(ll,kk,ii);
1677 for(
unsigned kk=0;kk<n_position_type;kk++)
1680 for(
unsigned ii=0;ii<DIM;ii++)
1683 int local_unknown = position_local_unk_at_node(kk,ii);
1686 if(local_unknown >= 0)
1690 const unsigned offset=d_G_dX.
offset( ll, kk, ii);
1694 unsigned count=offset;
1695 for(
unsigned aa=0;aa<DIM;aa++)
1702 for(
unsigned bb=aa;bb<DIM;bb++)
1704 sum+=d_gen_dil_dG(aa,bb)*
1709 jacobian(local_eqn,local_unknown)+=sum*W*
1710 hang_weight*hhang_weight;
1723 for(
unsigned l2=0;l2<n_solid_pres;l2++)
1726 bool is_hanging2=solid_pressure_dof_is_hanging[l2];
1728 unsigned n_master2=1;
1729 double hang_weight2=1.0;
1738 solid_pressure_node_pt(l2)->hanging_pt(solid_p_index);
1740 n_master2 = hang_info2_pt->
nmaster();
1748 for(
unsigned m2=0;m2<n_master2;m2++)
1763 local_unknown=this->solid_p_local_eqn(l2);
1768 if(local_unknown >= 0)
1770 jacobian(local_eqn,local_unknown)
1771 += inv_kappa*psisp[l2]*psisp[l]*W*
1772 hang_weight*hang_weight2;
void fill_in_generic_residual_contribution_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
Add element's contribution to elemental residual vector and/or Jacobian matrix flag=1: compute both f...
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
double & raw_direct_access(const unsigned long &i)
Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
unsigned nmaster() const
Return the number of master nodes.
bool is_hanging() const
Test whether the node is geometrically hanging.
Class for Refineable PVD equations.
T & raw_direct_access(const unsigned long &i)
Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
T & raw_direct_access(const unsigned long &i)
Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.
unsigned offset(const unsigned long &i, const unsigned long &j) const
Caculate the offset in flat-packed C-style, column-major format, required for a given i...
void get_mass_matrix_diagonal(Vector< double > &mass_diag)
Compute the diagonal of the displacement mass matrix for LSC preconditioner.
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Class that contains data for hanging nodes.
unsigned offset(const unsigned long &i, const unsigned long &j) const
Caculate the offset in flat-packed C-style, column-major format, required for a given i...
ConstitutiveLaw * Constitutive_law_pt
Create constitutive law (for smoothing by nonlinear elasticity)
virtual bool requires_incompressibility_constraint()=0
Pure virtual function in which the user must declare if the constitutive equation requires an incompr...
unsigned offset(const unsigned long &i, const unsigned long &j, const unsigned long &k) const
Caculate the offset in flat-packed Cy-style, column-major format, required for a given i...
void fill_in_generic_contribution_to_residuals_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Call the residuals including hanging node cases.