39 template<
unsigned DIM>
47 template<
unsigned DIM>
51 template<
unsigned DIM>
55 template<
unsigned DIM>
59 template<
unsigned DIM>
69 template<
unsigned DIM>
74 const unsigned& which_one)
77 unsigned n_dof = ndof();
79 if ((which_one == 0) || (which_one == 1))
80 press_mass_diag.assign(n_dof, 0.0);
81 if ((which_one == 0) || (which_one == 2))
82 veloc_mass_diag.assign(n_dof, 0.0);
85 unsigned n_node = nnode();
88 unsigned n_dim = this->dim();
95 for (
unsigned i = 0;
i < n_dim;
i++)
97 u_nodal_index[
i] = this->u_index_nst(
i);
104 unsigned n_pres = npres_nst();
110 unsigned n_intpt = integral_pt()->nweight();
116 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
119 double w = integral_pt()->weight(ipt);
122 double J = J_eulerian_at_knot(ipt);
125 for (
unsigned i = 0;
i < n_dim;
i++)
127 s[
i] = integral_pt()->knot(ipt,
i);
135 if ((which_one == 0) || (which_one == 2))
138 shape_at_knot(ipt, psi);
141 for (
unsigned l = 0; l < n_node; l++)
144 for (
unsigned i = 0;
i < n_dim;
i++)
146 local_eqn = nodal_local_eqn(l, u_nodal_index[
i]);
152 veloc_mass_diag[local_eqn] += pow(psi[l], 2) *
W;
159 if ((which_one == 0) || (which_one == 1))
162 pshape_nst(
s, psi_p);
165 for (
unsigned l = 0; l < n_pres; l++)
168 local_eqn = p_local_eqn(l);
174 press_mass_diag[local_eqn] += pow(psi_p[l], 2) *
W;
185 template<
unsigned DIM>
198 unsigned n_node = this->nnode();
203 unsigned n_intpt = this->integral_pt()->nweight();
206 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
209 for (
unsigned i = 0;
i < DIM;
i++)
211 s[
i] = this->integral_pt()->knot(ipt,
i);
215 double w = this->integral_pt()->weight(ipt);
218 double J = this->J_eulerian(
s);
223 for (
unsigned i = 0;
i < DIM;
i++)
226 u = this->interpolated_u_nst(
s,
i);
238 template<
unsigned DIM>
242 norm.resize(DIM + 1, 0.0);
248 unsigned n_intpt = integral_pt()->nweight();
251 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
254 for (
unsigned i = 0;
i < DIM;
i++)
257 s[
i] = integral_pt()->knot(ipt,
i);
261 double w = integral_pt()->weight(ipt);
264 double J = J_eulerian(
s);
270 for (
unsigned i = 0;
i < DIM;
i++)
273 norm[
i] += std::pow(interpolated_u_nst(
s,
i), 2) *
W;
277 norm[DIM] += std::pow(interpolated_p_nst(
s), 2) *
W;
288 template<
unsigned DIM>
290 std::ostream& outfile,
306 unsigned n_intpt = integral_pt()->nweight();
308 outfile <<
"ZONE" << std::endl;
314 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
317 for (
unsigned i = 0;
i < DIM;
i++)
319 s[
i] = integral_pt()->knot(ipt,
i);
323 double w = integral_pt()->weight(ipt);
326 double J = J_eulerian(
s);
332 interpolated_x(
s, x);
335 (*exact_soln_pt)(time, x, exact_soln);
338 for (
unsigned i = 0;
i < DIM;
i++)
340 norm += exact_soln[
i] * exact_soln[
i] *
W;
341 error += (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
342 (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
W;
346 for (
unsigned i = 0;
i < DIM;
i++)
348 outfile << x[
i] <<
" ";
352 for (
unsigned i = 0;
i < DIM;
i++)
354 outfile << exact_soln[
i] - interpolated_u_nst(
s,
i) <<
" ";
357 outfile << std::endl;
367 template<
unsigned DIM>
369 std::ostream& outfile,
384 unsigned n_intpt = integral_pt()->nweight();
387 outfile <<
"ZONE" << std::endl;
393 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
396 for (
unsigned i = 0;
i < DIM;
i++)
398 s[
i] = integral_pt()->knot(ipt,
i);
402 double w = integral_pt()->weight(ipt);
405 double J = J_eulerian(
s);
411 interpolated_x(
s, x);
414 (*exact_soln_pt)(x, exact_soln);
417 for (
unsigned i = 0;
i < DIM;
i++)
419 norm += exact_soln[
i] * exact_soln[
i] *
W;
420 error += (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
421 (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
W;
425 for (
unsigned i = 0;
i < DIM;
i++)
427 outfile << x[
i] <<
" ";
431 for (
unsigned i = 0;
i < DIM;
i++)
433 outfile << exact_soln[
i] - interpolated_u_nst(
s,
i) <<
" ";
435 outfile << std::endl;
445 template<
unsigned DIM>
462 unsigned n_intpt = integral_pt()->nweight();
468 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
471 for (
unsigned i = 0;
i < DIM;
i++)
473 s[
i] = integral_pt()->knot(ipt,
i);
477 double w = integral_pt()->weight(ipt);
480 double J = J_eulerian(
s);
486 interpolated_x(
s, x);
489 (*exact_soln_pt)(time, x, exact_soln);
492 for (
unsigned i = 0;
i < DIM;
i++)
494 norm += exact_soln[
i] * exact_soln[
i] *
W;
495 error += (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
496 (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
W;
507 template<
unsigned DIM>
526 unsigned n_intpt = integral_pt()->nweight();
532 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
535 for (
unsigned i = 0;
i < DIM;
i++)
537 s[
i] = integral_pt()->knot(ipt,
i);
541 double w = integral_pt()->weight(ipt);
544 double J = J_eulerian(
s);
550 interpolated_x(
s, x);
553 (*exact_soln_pt)(x, exact_soln);
556 for (
unsigned i = 0;
i < DIM;
i++)
558 norm += exact_soln[
i] * exact_soln[
i] *
W;
559 error += (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
560 (exact_soln[
i] - interpolated_u_nst(
s,
i)) *
W;
572 template<
unsigned DIM>
574 std::ostream& outfile,
575 const unsigned& nplot,
585 outfile << tecplot_zone_string(nplot);
591 unsigned num_plot_points = nplot_points(nplot);
592 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
595 get_s_plot(iplot, nplot,
s);
598 interpolated_x(
s, x);
601 (*exact_soln_pt)(x, exact_soln);
604 for (
unsigned i = 0;
i < DIM;
i++)
606 outfile << x[
i] <<
" ";
610 for (
unsigned i = 0;
i < exact_soln.size();
i++)
612 outfile << exact_soln[
i] <<
" ";
615 outfile << std::endl;
619 write_tecplot_zone_footer(outfile, nplot);
628 template<
unsigned DIM>
630 std::ostream& outfile,
631 const unsigned& nplot,
642 outfile << tecplot_zone_string(nplot);
648 unsigned num_plot_points = nplot_points(nplot);
649 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
652 get_s_plot(iplot, nplot,
s);
655 interpolated_x(
s, x);
658 (*exact_soln_pt)(time, x, exact_soln);
661 for (
unsigned i = 0;
i < DIM;
i++)
663 outfile << x[
i] <<
" ";
667 for (
unsigned i = 0;
i < exact_soln.size();
i++)
669 outfile << exact_soln[
i] <<
" ";
672 outfile << std::endl;
676 write_tecplot_zone_footer(outfile, nplot);
686 template<
unsigned DIM>
688 const unsigned& nplot,
692 unsigned n_node = nnode();
703 outfile << tecplot_zone_string(nplot);
706 unsigned num_plot_points = nplot_points(nplot);
707 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
710 get_s_plot(iplot, nplot,
s);
716 for (
unsigned i = 0;
i < DIM;
i++)
718 interpolated_x[
i] = 0.0;
719 interpolated_u[
i] = 0.0;
721 unsigned u_nodal_index = u_index_nst(
i);
723 for (
unsigned l = 0; l < n_node; l++)
725 interpolated_u[
i] += nodal_value(
t, l, u_nodal_index) * psi[l];
726 interpolated_x[
i] += nodal_position(
t, l,
i) * psi[l];
731 for (
unsigned i = 0;
i < DIM;
i++)
733 outfile << interpolated_x[
i] <<
" ";
737 for (
unsigned i = 0;
i < DIM;
i++)
739 outfile << interpolated_u[
i] <<
" ";
742 outfile << std::endl;
746 write_tecplot_zone_footer(outfile, nplot);
755 template<
unsigned DIM>
757 const unsigned& nplot)
763 outfile << tecplot_zone_string(nplot);
766 unsigned num_plot_points = nplot_points(nplot);
767 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
770 get_s_plot(iplot, nplot,
s);
773 for (
unsigned i = 0;
i < DIM;
i++)
775 outfile << interpolated_x(
s,
i) <<
" ";
779 for (
unsigned i = 0;
i < DIM;
i++)
781 outfile << interpolated_u_nst(
s,
i) <<
" ";
785 outfile << interpolated_p_nst(
s) <<
" ";
787 outfile << std::endl;
789 outfile << std::endl;
792 write_tecplot_zone_footer(outfile, nplot);
802 template<
unsigned DIM>
809 fprintf(file_pt,
"%s", tecplot_zone_string(nplot).c_str());
812 unsigned num_plot_points = nplot_points(nplot);
813 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
816 get_s_plot(iplot, nplot,
s);
819 for (
unsigned i = 0;
i < DIM;
i++)
821 fprintf(file_pt,
"%g ", interpolated_x(
s,
i));
825 for (
unsigned i = 0;
i < DIM;
i++)
827 fprintf(file_pt,
"%g ", interpolated_u_nst(
s,
i));
831 fprintf(file_pt,
"%g \n", interpolated_p_nst(
s));
833 fprintf(file_pt,
"\n");
836 write_tecplot_zone_footer(file_pt, nplot);
846 template<
unsigned DIM>
848 const unsigned& nplot)
860 outfile << tecplot_zone_string(nplot);
863 unsigned n_node = nnode();
867 DShape dpsifdx(n_node, DIM);
870 unsigned num_plot_points = nplot_points(nplot);
871 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
874 get_s_plot(iplot, nplot,
s);
877 dshape_eulerian(
s, psif, dpsifdx);
886 for (
unsigned i = 0;
i < DIM;
i++)
891 for (
unsigned j = 0; j < DIM; j++)
893 interpolated_dudx(
i, j) = 0.0;
901 for (
unsigned i = 0;
i < DIM;
i++)
904 unsigned u_nodal_index = u_index_nst(
i);
906 for (
unsigned l = 0; l < n_node; l++)
908 dudt[
i] += du_dt_nst(l, u_nodal_index) * psif[l];
909 mesh_veloc[
i] += dnodal_position_dt(l,
i) * psif[l];
912 for (
unsigned j = 0; j < DIM; j++)
914 interpolated_dudx(
i, j) +=
915 nodal_value(l, u_nodal_index) * dpsifdx(l, j);
922 for (
unsigned i = 0;
i < DIM;
i++)
924 dudt_ALE[
i] = dudt[
i];
925 for (
unsigned k = 0; k < DIM; k++)
927 dudt_ALE[
i] -= mesh_veloc[k] * interpolated_dudx(
i, k);
933 for (
unsigned i = 0;
i < DIM;
i++)
935 outfile << interpolated_x(
s,
i) <<
" ";
939 for (
unsigned i = 0;
i < DIM;
i++)
941 outfile << interpolated_u_nst(
s,
i) <<
" ";
945 outfile << interpolated_p_nst(
s) <<
" ";
948 for (
unsigned i = 0;
i < DIM;
i++)
950 outfile << dudt_ALE[
i] <<
" ";
960 outfile << dissipation(
s) <<
" ";
963 outfile << std::endl;
967 write_tecplot_zone_footer(outfile, nplot);
977 template<
unsigned DIM>
979 const unsigned& nplot)
997 "Can't output vorticity in 1D - in fact, what do you mean\n";
998 error_message +=
"by the 1D Navier-Stokes equations?\n";
1001 error_message, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1005 outfile << tecplot_zone_string(nplot);
1008 unsigned num_plot_points = nplot_points(nplot);
1009 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
1012 get_s_plot(iplot, nplot,
s);
1015 for (
unsigned i = 0;
i < DIM;
i++)
1017 outfile << interpolated_x(
s,
i) <<
" ";
1021 get_vorticity(
s, vorticity);
1025 outfile << vorticity[0];
1029 outfile << vorticity[0] <<
" " << vorticity[1] <<
" " << vorticity[2]
1033 outfile << std::endl;
1035 outfile << std::endl;
1038 write_tecplot_zone_footer(outfile, nplot);
1045 template<
unsigned DIM>
1052 unsigned n_intpt = integral_pt()->nweight();
1058 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1061 for (
unsigned i = 0;
i < DIM;
i++)
1063 s[
i] = integral_pt()->knot(ipt,
i);
1067 double w = integral_pt()->weight(ipt);
1070 double J = J_eulerian(
s);
1074 strain_rate(
s, strainrate);
1077 double local_diss = 0.0;
1078 for (
unsigned i = 0;
i < DIM;
i++)
1080 for (
unsigned j = 0; j < DIM; j++)
1082 local_diss += 2.0 * strainrate(
i, j) * strainrate(
i, j);
1086 diss += local_diss * w * J;
1097 template<
unsigned DIM>
1104 strain_rate(
s, strainrate);
1107 double press = interpolated_p_nst(
s);
1110 for (
unsigned i = 0;
i < DIM;
i++)
1112 traction[
i] = -press *
N[
i];
1113 for (
unsigned j = 0; j < DIM; j++)
1115 traction[
i] += 2.0 * strainrate(
i, j) *
N[j];
1126 template<
unsigned DIM>
1137 strain_rate(
s, strainrate);
1140 double press = interpolated_p_nst(
s);
1143 for (
unsigned i = 0;
i < DIM;
i++)
1146 traction_p[
i] = -press *
N[
i];
1147 for (
unsigned j = 0; j < DIM; j++)
1150 traction_visc[
i] += 2.0 * strainrate(
i, j) *
N[j];
1153 traction_visc_n[
i] = traction_visc[
i] *
N[
i];
1154 traction_visc_t[
i] = traction_visc[
i] - traction_visc_n[
i];
1161 template<
unsigned DIM>
1166 strain_rate(
s, strainrate);
1169 double local_diss = 0.0;
1170 for (
unsigned i = 0;
i < DIM;
i++)
1172 for (
unsigned j = 0; j < DIM; j++)
1174 local_diss += 2.0 * strainrate(
i, j) * strainrate(
i, j);
1184 template<
unsigned DIM>
1189 if ((strainrate.
ncol() != DIM) || (strainrate.
nrow() != DIM))
1191 std::ostringstream error_message;
1192 error_message <<
"The strain rate has incorrect dimensions "
1193 << strainrate.
ncol() <<
" x " << strainrate.
nrow()
1194 <<
" Not " << DIM << std::endl;
1197 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1205 unsigned n_node = nnode();
1209 DShape dpsidx(n_node, DIM);
1212 dshape_eulerian(
s, psi, dpsidx);
1215 for (
unsigned i = 0;
i < DIM;
i++)
1217 for (
unsigned j = 0; j < DIM; j++)
1224 for (
unsigned i = 0;
i < DIM;
i++)
1227 unsigned u_nodal_index = u_index_nst(
i);
1229 for (
unsigned j = 0; j < DIM; j++)
1232 for (
unsigned l = 0; l < n_node; l++)
1234 dudx(
i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1240 for (
unsigned i = 0;
i < DIM;
i++)
1243 for (
unsigned j = 0; j < DIM; j++)
1245 strainrate(
i, j) = 0.5 * (dudx(
i, j) + dudx(j,
i));
1260 if (vorticity.size() != 1)
1262 std::ostringstream error_message;
1263 error_message <<
"Computation of vorticity in 2D requires a 1D vector\n"
1264 <<
"which contains the only non-zero component of the\n"
1265 <<
"vorticity vector. You've passed a vector of size "
1266 << vorticity.size() << std::endl;
1269 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1280 unsigned n_node = nnode();
1284 DShape dpsidx(n_node, DIM);
1287 dshape_eulerian(
s, psi, dpsidx);
1290 for (
unsigned i = 0;
i < DIM;
i++)
1292 for (
unsigned j = 0; j < DIM; j++)
1299 for (
unsigned i = 0;
i < DIM;
i++)
1302 unsigned u_nodal_index = u_index_nst(
i);
1304 for (
unsigned j = 0; j < DIM; j++)
1307 for (
unsigned l = 0; l < n_node; l++)
1309 dudx(
i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1315 vorticity[0] = dudx(1, 0) - dudx(0, 1);
1326 double& vorticity)
const
1332 get_vorticity(
s, vort);
1335 vorticity = vort[0];
1347 if (vorticity.size() != 3)
1349 std::ostringstream error_message;
1350 error_message <<
"Computation of vorticity in 3D requires a 3D vector\n"
1351 <<
"which contains the only non-zero component of the\n"
1352 <<
"vorticity vector. You've passed a vector of size "
1353 << vorticity.size() << std::endl;
1356 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1367 unsigned n_node = nnode();
1371 DShape dpsidx(n_node, DIM);
1374 dshape_eulerian(
s, psi, dpsidx);
1377 for (
unsigned i = 0;
i < DIM;
i++)
1379 for (
unsigned j = 0; j < DIM; j++)
1386 for (
unsigned i = 0;
i < DIM;
i++)
1389 unsigned u_nodal_index = u_index_nst(
i);
1391 for (
unsigned j = 0; j < DIM; j++)
1394 for (
unsigned l = 0; l < n_node; l++)
1396 dudx(
i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1401 vorticity[0] = dudx(2, 1) - dudx(1, 2);
1402 vorticity[1] = dudx(0, 2) - dudx(2, 0);
1403 vorticity[2] = dudx(1, 0) - dudx(0, 1);
1415 template<
unsigned DIM>
1419 double kin_en = 0.0;
1422 unsigned n_intpt = integral_pt()->nweight();
1428 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1431 for (
unsigned i = 0;
i < DIM;
i++)
1433 s[
i] = integral_pt()->knot(ipt,
i);
1437 double w = integral_pt()->weight(ipt);
1440 double J = J_eulerian(
s);
1443 double veloc_squared = 0.0;
1444 for (
unsigned i = 0;
i < DIM;
i++)
1446 veloc_squared += interpolated_u_nst(
s,
i) * interpolated_u_nst(
s,
i);
1449 kin_en += 0.5 * veloc_squared * w * J;
1459 template<
unsigned DIM>
1463 double d_kin_en_dt = 0.0;
1466 const unsigned n_intpt = integral_pt()->nweight();
1472 const unsigned n_node = this->nnode();
1476 DShape dpsidx(n_node, DIM);
1479 unsigned u_index[DIM];
1480 for (
unsigned i = 0;
i < DIM;
i++)
1482 u_index[
i] = this->u_index_nst(
i);
1486 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1489 double J = dshape_eulerian_at_knot(ipt, psi, dpsidx);
1492 double w = integral_pt()->weight(ipt);
1495 Vector<double> interpolated_u(DIM, 0.0), interpolated_dudt(DIM, 0.0);
1498 for (
unsigned l = 0; l < n_node; l++)
1501 for (
unsigned i = 0;
i < DIM;
i++)
1503 interpolated_u[
i] += nodal_value(l, u_index[
i]) * psi(l);
1504 interpolated_dudt[
i] += du_dt_nst(l, u_index[
i]) * psi(l);
1509 if (!ALE_is_disabled)
1515 for (
unsigned l = 0; l < n_node; l++)
1517 for (
unsigned i = 0;
i < DIM;
i++)
1519 mesh_velocity[
i] += this->dnodal_position_dt(l,
i) * psi(l);
1521 for (
unsigned j = 0; j < DIM; j++)
1523 interpolated_dudx(
i, j) +=
1524 this->nodal_value(l, u_index[
i]) * dpsidx(l, j);
1530 for (
unsigned i = 0;
i < DIM;
i++)
1532 for (
unsigned k = 0; k < DIM; k++)
1534 interpolated_dudt[
i] -= mesh_velocity[k] * interpolated_dudx(
i, k);
1542 for (
unsigned i = 0;
i < DIM;
i++)
1544 sum += interpolated_u[
i] * interpolated_dudt[
i];
1547 d_kin_en_dt += sum * w * J;
1557 template<
unsigned DIM>
1561 double press_int = 0;
1564 unsigned n_intpt = integral_pt()->nweight();
1570 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1573 for (
unsigned i = 0;
i < DIM;
i++)
1575 s[
i] = integral_pt()->knot(ipt,
i);
1579 double w = integral_pt()->weight(ipt);
1582 double J = J_eulerian(
s);
1588 double press = interpolated_p_nst(
s);
1591 press_int += press *
W;
1603 template<
unsigned DIM>
1609 if (ndof() == 0)
return;
1612 unsigned n_node = nnode();
1615 unsigned n_pres = npres_nst();
1618 unsigned u_nodal_index[DIM];
1619 for (
unsigned i = 0;
i < DIM;
i++)
1621 u_nodal_index[
i] = u_index_nst(
i);
1626 DShape dpsidx(n_node, DIM);
1629 Shape psip(n_pres), testp(n_pres);
1630 DShape dpsip(n_pres, DIM);
1631 DShape dtestp(n_pres, DIM);
1634 unsigned n_intpt = integral_pt()->nweight();
1641 double scaled_re = re() * density_ratio();
1644 int local_eqn = 0, local_unknown = 0;
1647 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1650 for (
unsigned i = 0;
i < DIM;
i++)
s[
i] = integral_pt()->knot(ipt,
i);
1653 double w = integral_pt()->weight(ipt);
1657 double J = this->dshape_eulerian_at_knot(ipt, psif, dpsidx);
1660 this->dpshape_and_dptest_eulerian_nst(
s, psip, dpsip, testp, dtestp);
1672 for (
unsigned l = 0; l < n_pres; l++)
1674 for (
unsigned i = 0;
i < DIM;
i++)
1676 interpolated_dpdx[
i] += p_nst(l) * dpsip(l,
i);
1683 for (
unsigned l = 0; l < n_node; l++)
1686 for (
unsigned i = 0;
i < DIM;
i++)
1689 double u_value = raw_nodal_value(l, u_nodal_index[
i]);
1690 interpolated_u[
i] += u_value * psif[l];
1691 interpolated_x[
i] += raw_nodal_position(l,
i) * psif[l];
1696 double source = 0.0;
1697 if (Press_adv_diff_source_fct_pt != 0)
1699 source = Press_adv_diff_source_fct_pt(interpolated_x);
1703 for (
unsigned l = 0; l < n_pres; l++)
1705 local_eqn = p_local_eqn(l);
1710 residuals[local_eqn] -= source * testp[l] *
W;
1711 for (
unsigned k = 0; k < DIM; k++)
1713 residuals[local_eqn] +=
1714 interpolated_dpdx[k] *
1715 (scaled_re * interpolated_u[k] * testp[l] + dtestp(l, k)) *
W;
1722 for (
unsigned l2 = 0; l2 < n_pres; l2++)
1724 local_unknown = p_local_eqn(l2);
1727 if (local_unknown >= 0)
1729 if ((
int(eqn_number(local_eqn)) != Pinned_fp_pressure_eqn) &&
1730 (
int(eqn_number(local_unknown)) != Pinned_fp_pressure_eqn))
1732 for (
unsigned k = 0; k < DIM; k++)
1734 jacobian(local_eqn, local_unknown) +=
1736 (scaled_re * interpolated_u[k] * testp[l] +
1743 if ((
int(eqn_number(local_eqn)) == Pinned_fp_pressure_eqn) &&
1744 (int(eqn_number(local_unknown)) ==
1745 Pinned_fp_pressure_eqn))
1747 jacobian(local_eqn, local_unknown) = 1.0;
1758 unsigned nrobin = Pressure_advection_diffusion_robin_element_pt.size();
1759 for (
unsigned e = 0;
e < nrobin;
e++)
1761 Pressure_advection_diffusion_robin_element_pt[
e]
1762 ->fill_in_generic_residual_contribution_fp_press_adv_diff_robin_bc(
1763 residuals, jacobian, flag);
1773 template<
unsigned DIM>
1781 if (ndof() == 0)
return;
1784 unsigned n_node = nnode();
1787 double time = node_pt(0)->time_stepper_pt()->time_pt()->time();
1790 unsigned n_pres = npres_nst();
1793 unsigned u_nodal_index[DIM];
1794 for (
unsigned i = 0;
i < DIM;
i++)
1796 u_nodal_index[
i] = u_index_nst(
i);
1800 Shape psif(n_node), testf(n_node);
1801 DShape dpsifdx(n_node, DIM), dtestfdx(n_node, DIM);
1804 Shape psip(n_pres), testp(n_pres);
1807 unsigned n_intpt = integral_pt()->nweight();
1814 double scaled_re = re() * density_ratio();
1815 double scaled_re_st = re_st() * density_ratio();
1816 double scaled_re_inv_fr = re_invfr() * density_ratio();
1817 double visc_ratio = viscosity_ratio();
1821 int local_eqn = 0, local_unknown = 0;
1824 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1827 for (
unsigned i = 0;
i < DIM;
i++)
s[
i] = integral_pt()->knot(ipt,
i);
1829 double w = integral_pt()->weight(ipt);
1832 double J = dshape_and_dtest_eulerian_at_knot_nst(
1833 ipt, psif, dpsifdx, testf, dtestfdx);
1836 pshape_nst(
s, psip, testp);
1843 double interpolated_p = 0.0;
1851 for (
unsigned l = 0; l < n_pres; l++)
1852 interpolated_p += p_nst(l) * psip[l];
1857 for (
unsigned l = 0; l < n_node; l++)
1860 for (
unsigned i = 0;
i < DIM;
i++)
1863 double u_value = raw_nodal_value(l, u_nodal_index[
i]);
1864 interpolated_u[
i] += u_value * psif[l];
1865 interpolated_x[
i] += raw_nodal_position(l,
i) * psif[l];
1866 dudt[
i] += du_dt_nst(l,
i) * psif[l];
1869 for (
unsigned j = 0; j < DIM; j++)
1871 interpolated_dudx(
i, j) += u_value * dpsifdx(l, j);
1876 if (!ALE_is_disabled)
1879 for (
unsigned l = 0; l < n_node; l++)
1882 for (
unsigned i = 0;
i < DIM;
i++)
1884 mesh_velocity[
i] += this->raw_dnodal_position_dt(l,
i) * psif[l];
1891 get_body_force_nst(time, ipt,
s, interpolated_x, body_force);
1894 double source = get_source_nst(time, ipt, interpolated_x);
1901 for (
unsigned l = 0; l < n_node; l++)
1904 for (
unsigned i = 0;
i < DIM;
i++)
1907 local_eqn = nodal_local_eqn(l, u_nodal_index[
i]);
1911 residuals[local_eqn] += body_force[
i] * testf[l] *
W;
1914 residuals[local_eqn] += scaled_re_inv_fr * testf[l] * G[
i] *
W;
1917 residuals[local_eqn] += interpolated_p * dtestfdx(l,
i) *
W;
1923 for (
unsigned k = 0; k < DIM; k++)
1925 residuals[local_eqn] -=
1927 (interpolated_dudx(
i, k) + Gamma[
i] * interpolated_dudx(k,
i)) *
1933 residuals[local_eqn] -= scaled_re_st * dudt[
i] * testf[l] *
W;
1937 for (
unsigned k = 0; k < DIM; k++)
1939 double tmp = scaled_re * interpolated_u[k];
1940 if (!ALE_is_disabled) tmp -= scaled_re_st * mesh_velocity[k];
1941 residuals[local_eqn] -=
1942 tmp * interpolated_dudx(
i, k) * testf[l] *
W;
1949 for (
unsigned l2 = 0; l2 < n_node; l2++)
1952 for (
unsigned i2 = 0; i2 < DIM; i2++)
1955 local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
1956 if (local_unknown >= 0)
1959 jacobian(local_eqn, local_unknown) -=
1960 visc_ratio * Gamma[
i] * dpsifdx(l2,
i) * dtestfdx(l, i2) *
1967 for (
unsigned k = 0; k < DIM; k++)
1969 jacobian(local_eqn, local_unknown) -=
1970 visc_ratio * dpsifdx(l2, k) * dtestfdx(l, k) *
W;
1975 jacobian(local_eqn, local_unknown) -=
1976 scaled_re * psif[l2] * interpolated_dudx(
i, i2) *
1988 mass_matrix(local_eqn, local_unknown) +=
1989 scaled_re_st * psif[l2] * testf[l] *
W;
1993 jacobian(local_eqn, local_unknown) -=
1995 node_pt(l2)->time_stepper_pt()->weight(1, 0) *
1996 psif[l2] * testf[l] *
W;
1999 for (
unsigned k = 0; k < DIM; k++)
2001 double tmp = scaled_re * interpolated_u[k];
2002 if (!ALE_is_disabled)
2003 tmp -= scaled_re_st * mesh_velocity[k];
2004 jacobian(local_eqn, local_unknown) -=
2005 tmp * dpsifdx(l2, k) * testf[l] *
W;
2014 for (
unsigned l2 = 0; l2 < n_pres; l2++)
2017 local_unknown = p_local_eqn(l2);
2018 if (local_unknown >= 0)
2020 jacobian(local_eqn, local_unknown) +=
2021 psip[l2] * dtestfdx(l,
i) *
W;
2036 for (
unsigned l = 0; l < n_pres; l++)
2038 local_eqn = p_local_eqn(l);
2044 double aux = -source;
2047 for (
unsigned k = 0; k < DIM; k++)
2050 aux += interpolated_dudx(k, k);
2053 residuals[local_eqn] += aux * testp[l] *
W;
2059 for (
unsigned l2 = 0; l2 < n_node; l2++)
2062 for (
unsigned i2 = 0; i2 < DIM; i2++)
2065 local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
2066 if (local_unknown >= 0)
2068 jacobian(local_eqn, local_unknown) +=
2069 dpsifdx(l2, i2) * testp[l] *
W;
2086 template<
unsigned DIM>
2088 double*
const& parameter_pt,
2095 OOMPH_CURRENT_FUNCTION,
2096 OOMPH_EXCEPTION_LOCATION);
2103 template<
unsigned DIM>
2111 OOMPH_CURRENT_FUNCTION,
2112 OOMPH_EXCEPTION_LOCATION);
2122 template<
unsigned DIM>
2133 const unsigned n_node = nnode();
2136 double time = node_pt(0)->time_stepper_pt()->time_pt()->time();
2139 const unsigned n_pres = npres_nst();
2142 unsigned u_nodal_index[DIM];
2143 for (
unsigned i = 0;
i < DIM;
i++)
2145 u_nodal_index[
i] = u_index_nst(
i);
2149 Shape psif(n_node), testf(n_node);
2150 DShape dpsifdx(n_node, DIM), dtestfdx(n_node, DIM);
2153 Shape psip(n_pres), testp(n_pres);
2171 const unsigned n_intpt = integral_pt()->nweight();
2178 double scaled_re = re() * density_ratio();
2179 double scaled_re_st = re_st() * density_ratio();
2180 double scaled_re_inv_fr = re_invfr() * density_ratio();
2181 double visc_ratio = viscosity_ratio();
2190 bool element_has_node_with_aux_node_update_fct =
false;
2191 for (
unsigned q = 0; q < n_node; q++)
2193 Node* nod_pt = node_pt(q);
2198 element_has_node_with_aux_node_update_fct =
true;
2202 for (
unsigned i = 0;
i < DIM;
i++)
2204 u_ref[
i] = *(nod_pt->
value_pt(u_nodal_index[
i]));
2208 for (
unsigned p = 0; p < DIM; p++)
2211 double backup = nod_pt->
x(p);
2215 nod_pt->
x(p) += eps_fd;
2222 (*(nod_pt->
value_pt(u_nodal_index[p])) - u_ref[p]) / eps_fd;
2225 nod_pt->
x(p) = backup;
2237 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
2240 for (
unsigned i = 0;
i < DIM;
i++)
2242 s[
i] = integral_pt()->knot(ipt,
i);
2246 const double w = integral_pt()->weight(ipt);
2249 const double J = dshape_and_dtest_eulerian_at_knot_nst(ipt,
2259 pshape_nst(
s, psip, testp);
2263 double interpolated_p = 0.0;
2271 for (
unsigned l = 0; l < n_pres; l++)
2273 interpolated_p += p_nst(l) * psip[l];
2279 for (
unsigned l = 0; l < n_node; l++)
2282 for (
unsigned i = 0;
i < DIM;
i++)
2285 double u_value = raw_nodal_value(l, u_nodal_index[
i]);
2286 interpolated_u[
i] += u_value * psif[l];
2287 interpolated_x[
i] += raw_nodal_position(l,
i) * psif[l];
2288 dudt[
i] += du_dt_nst(l,
i) * psif[l];
2291 for (
unsigned j = 0; j < DIM; j++)
2293 interpolated_dudx(
i, j) += u_value * dpsifdx(l, j);
2298 if (!ALE_is_disabled)
2301 for (
unsigned l = 0; l < n_node; l++)
2304 for (
unsigned i = 0;
i < DIM;
i++)
2306 mesh_velocity[
i] += this->raw_dnodal_position_dt(l,
i) * psif[l];
2312 for (
unsigned q = 0; q < n_node; q++)
2315 for (
unsigned p = 0; p < DIM; p++)
2317 for (
unsigned i = 0;
i < DIM;
i++)
2319 for (
unsigned k = 0; k < DIM; k++)
2322 for (
unsigned j = 0; j < n_node; j++)
2324 aux += raw_nodal_value(j, u_nodal_index[
i]) *
2325 d_dpsifdx_dX(p, q, j, k);
2327 d_dudx_dX(p, q,
i, k) = aux;
2335 const double pos_time_weight =
2336 node_pt(0)->position_time_stepper_pt()->weight(1, 0);
2337 const double val_time_weight =
2338 node_pt(0)->time_stepper_pt()->weight(1, 0);
2342 get_body_force_nst(time, ipt,
s, interpolated_x, body_force);
2345 const double source = get_source_nst(time, ipt, interpolated_x);
2352 get_body_force_gradient_nst(
2353 time, ipt,
s, interpolated_x, d_body_force_dx);
2357 get_source_gradient_nst(time, ipt, interpolated_x, source_gradient);
2367 for (
unsigned l = 0; l < n_node; l++)
2370 for (
unsigned i = 0;
i < DIM;
i++)
2373 local_eqn = nodal_local_eqn(l, u_nodal_index[
i]);
2380 for (
unsigned p = 0; p < DIM; p++)
2383 for (
unsigned q = 0; q < n_node; q++)
2389 double sum = body_force[
i] * testf[l];
2392 sum += scaled_re_inv_fr * testf[l] * G[
i];
2395 sum += interpolated_p * dtestfdx(l,
i);
2401 for (
unsigned k = 0; k < DIM; k++)
2404 (interpolated_dudx(
i, k) +
2405 Gamma[
i] * interpolated_dudx(k,
i)) *
2412 sum -= scaled_re_st * dudt[
i] * testf[l];
2415 for (
unsigned k = 0; k < DIM; k++)
2417 double tmp = scaled_re * interpolated_u[k];
2418 if (!ALE_is_disabled)
2420 tmp -= scaled_re_st * mesh_velocity[k];
2422 sum -= tmp * interpolated_dudx(
i, k) * testf[l];
2426 dresidual_dnodal_coordinates(local_eqn, p, q) +=
2427 sum * dJ_dX(p, q) * w;
2433 sum = d_body_force_dx(
i, p) * psif(q) * testf(l);
2436 sum += interpolated_p * d_dtestfdx_dX(p, q, l,
i);
2439 for (
unsigned k = 0; k < DIM; k++)
2441 sum -= visc_ratio * ((interpolated_dudx(
i, k) +
2442 Gamma[
i] * interpolated_dudx(k,
i)) *
2443 d_dtestfdx_dX(p, q, l, k) +
2444 (d_dudx_dX(p, q,
i, k) +
2445 Gamma[
i] * d_dudx_dX(p, q, k,
i)) *
2450 for (
unsigned k = 0; k < DIM; k++)
2452 double tmp = scaled_re * interpolated_u[k];
2453 if (!ALE_is_disabled)
2455 tmp -= scaled_re_st * mesh_velocity[k];
2457 sum -= tmp * d_dudx_dX(p, q,
i, k) * testf(l);
2459 if (!ALE_is_disabled)
2461 sum += scaled_re_st * pos_time_weight * psif(q) *
2462 interpolated_dudx(
i, p) * testf(l);
2466 dresidual_dnodal_coordinates(local_eqn, p, q) += sum * J * w;
2470 if (element_has_node_with_aux_node_update_fct)
2473 -visc_ratio * Gamma[
i] * dpsifdx(q,
i) * dtestfdx(l, p) -
2474 scaled_re * psif(q) * interpolated_dudx(
i, p) * testf(l);
2477 sum -= scaled_re_st * val_time_weight * psif(q) * testf(l);
2478 for (
unsigned k = 0; k < DIM; k++)
2480 sum -= visc_ratio * dpsifdx(q, k) * dtestfdx(l, k);
2481 double tmp = scaled_re * interpolated_u[k];
2482 if (!ALE_is_disabled)
2483 tmp -= scaled_re_st * mesh_velocity[k];
2484 sum -= tmp * dpsifdx(q, k) * testf(l);
2487 dresidual_dnodal_coordinates(local_eqn, p, q) +=
2488 sum * d_U_dX(p, q) * J * w;
2501 for (
unsigned l = 0; l < n_pres; l++)
2503 local_eqn = p_local_eqn(l);
2509 for (
unsigned p = 0; p < DIM; p++)
2512 for (
unsigned q = 0; q < n_node; q++)
2518 double aux = -source;
2521 for (
unsigned k = 0; k < DIM; k++)
2523 aux += interpolated_dudx(k, k);
2527 dresidual_dnodal_coordinates(local_eqn, p, q) +=
2528 aux * dJ_dX(p, q) * testp[l] * w;
2534 aux = -source_gradient[p] * psif(q);
2535 for (
unsigned k = 0; k < DIM; k++)
2537 aux += d_dudx_dX(p, q, k, k);
2540 dresidual_dnodal_coordinates(local_eqn, p, q) +=
2541 aux * testp[l] * J * w;
2545 if (element_has_node_with_aux_node_update_fct)
2547 aux = dpsifdx(q, p) * testp(l);
2548 dresidual_dnodal_coordinates(local_eqn, p, q) +=
2549 aux * d_U_dX(p, q) * J * w;
2567 2, 2, 2, 2, 2, 2, 2, 2, 2};
2573 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2574 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3};
2580 template<
unsigned DIM>
2582 const unsigned& n)
const
2584 return Initial_Nvalue[n];
2597 template<
unsigned DIM>
2599 std::set<std::pair<Data*, unsigned>>& paired_load_data)
2602 unsigned u_index[DIM];
2603 for (
unsigned i = 0;
i < DIM;
i++)
2605 u_index[
i] = this->u_index_nst(
i);
2609 unsigned n_node = this->nnode();
2610 for (
unsigned n = 0; n < n_node; n++)
2614 for (
unsigned i = 0;
i < DIM;
i++)
2616 paired_load_data.insert(std::make_pair(this->node_pt(n), u_index[
i]));
2621 identify_pressure_data(paired_load_data);
2634 template<
unsigned DIM>
2636 std::set<std::pair<Data*, unsigned>>& paired_pressure_data)
2639 unsigned n_internal = this->ninternal_data();
2640 for (
unsigned l = 0; l < n_internal; l++)
2642 unsigned nval = this->internal_data_pt(l)->nvalue();
2644 for (
unsigned j = 0; j < nval; j++)
2646 paired_pressure_data.insert(
2647 std::make_pair(this->internal_data_pt(l), j));
2661 template<
unsigned DIM>
2663 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
2666 unsigned n_node = this->nnode();
2669 unsigned n_press = this->npres_nst();
2672 std::pair<unsigned, unsigned> dof_lookup;
2675 unsigned pressure_dof_number = DIM;
2678 for (
unsigned n = 0; n < n_press; n++)
2681 int local_eqn_number = this->p_local_eqn(n);
2686 if (local_eqn_number >= 0)
2690 dof_lookup.first = this->eqn_number(local_eqn_number);
2691 dof_lookup.second = pressure_dof_number;
2694 dof_lookup_list.push_front(dof_lookup);
2699 for (
unsigned n = 0; n < n_node; n++)
2702 unsigned nv = this->node_pt(n)->nvalue();
2705 for (
unsigned v = 0; v < nv; v++)
2708 int local_eqn_number = this->nodal_local_eqn(n, v);
2711 if (local_eqn_number >= 0)
2715 dof_lookup.first = this->eqn_number(local_eqn_number);
2716 dof_lookup.second = v;
2719 dof_lookup_list.push_front(dof_lookup);
2735 3, 2, 3, 2, 2, 2, 3, 2, 3};
2745 4, 3, 4, 3, 3, 3, 4, 3, 4, 3, 3, 3, 3, 3,
2746 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4};
2761 template<
unsigned DIM>
2763 std::set<std::pair<Data*, unsigned>>& paired_load_data)
2766 unsigned u_index[DIM];
2767 for (
unsigned i = 0;
i < DIM;
i++)
2769 u_index[
i] = this->u_index_nst(
i);
2773 unsigned n_node = this->nnode();
2774 for (
unsigned n = 0; n < n_node; n++)
2778 for (
unsigned i = 0;
i < DIM;
i++)
2780 paired_load_data.insert(std::make_pair(this->node_pt(n), u_index[
i]));
2785 this->identify_pressure_data(paired_load_data);
2797 template<
unsigned DIM>
2799 std::set<std::pair<Data*, unsigned>>& paired_pressure_data)
2802 unsigned p_index =
static_cast<unsigned>(this->p_nodal_index_nst());
2805 unsigned n_pres = npres_nst();
2806 for (
unsigned l = 0; l < n_pres; l++)
2810 paired_pressure_data.insert(
2811 std::make_pair(this->node_pt(Pconv[l]), p_index));
2824 template<
unsigned DIM>
2826 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
2829 unsigned n_node = this->nnode();
2835 std::pair<unsigned, unsigned> dof_lookup;
2838 for (
unsigned n = 0; n < n_node; n++)
2841 unsigned nv = this->required_nvalue(n);
2844 for (
unsigned v = 0; v < nv; v++)
2847 int local_eqn_number = this->nodal_local_eqn(n, v);
2852 if (local_eqn_number >= 0)
2856 dof_lookup.first = this->eqn_number(local_eqn_number);
2859 dof_lookup.second = v;
2862 dof_lookup_list.push_front(dof_lookup);
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
double * value_pt(const unsigned &i) const
Return the pointer to the i-the stored value. Typically this is required when direct access to the st...
unsigned long nrow() const
Return the number of rows of the matrix.
unsigned long ncol() const
Return the number of columns of the matrix.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as .
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as .
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void get_vorticity(const Vector< double > &s, Vector< double > &vorticity) const
Compute the vorticity vector at local coordinate s.
double kin_energy() const
Get integral of kinetic energy over element.
static int Pressure_not_stored_at_node
Static "magic" number that indicates that the pressure is not stored at a node.
void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Compute the hessian tensor vector products required to perform continuation of bifurcations analytica...
void get_pressure_and_velocity_mass_matrix_diagonal(Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed,...
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Validate against exact solution at given time Solution is provided via function pointer....
virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp precond...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates....
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Strain-rate tensor: 1/2 (du_i/dx_j + du_j/dx_i)
double d_kin_energy_dt() const
Get integral of time derivative of kinetic energy over element.
void compute_norm(double &norm)
Compute norm of solution: square of the L2 norm of the velocities.
static double Default_Physical_Constant_Value
Static default value for the physical constants (all initialised to zero)
void full_output(std::ostream &outfile)
Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format....
virtual void fill_in_generic_dresidual_contribution_nst(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, unsigned flag)
Compute the derivatives of the residuals for the Navier–Stokes equations with respect to a parameter ...
void output_veloc(std::ostream &outfile, const unsigned &nplot, const unsigned &t)
Output function: x,y,[z],u,v,[w] in tecplot format. nplot points in each coordinate direction at time...
static double Default_Physical_Ratio_Value
Static default value for the physical ratios (all are initialised to one)
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s....
virtual void fill_in_generic_residual_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Compute the residuals for the Navier–Stokes equations. Flag=1 (or 0): do (or don't) compute the Jacob...
double pressure_integral() const
Integral of pressure over element.
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
void output(std::ostream &outfile)
Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
void output_vorticity(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z], [omega_x,omega_y,[and/or omega_z]] in tecplot format. nplot points in each ...
double dissipation() const
Return integral of dissipation over element.
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact solution specified via function pointer at a given number of plot points....
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
void perform_auxiliary_node_update_fct()
Execute auxiliary update function (if any) – this can be used to update any nodal values following th...
bool has_auxiliary_node_update_fct_pt()
Boolean to indicate if node has a pointer to and auxiliary update function.
An OomphLibError object which should be thrown when an run-time error is encountered....
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Add to the set paired_load_data pairs containing.
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Add to the set paired_pressure_data pairs containing.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
/////////////////////////////////////////////////////////////////////////
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Add to the set paired_pressure_data pairs containing.
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Add to the set paired_load_data pairs containing.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...