27 #ifndef OOMPH_NAVIER_STOKES_ELEMENTS_WITH_SINGULARITY_HEADER
28 #define OOMPH_NAVIER_STOKES_ELEMENTS_WITH_SINGULARITY_HEADER
62 template<
class WRAPPED_NAVIER_STOKES_ELEMENT>
155 (WRAPPED_NAVIER_STOKES_ELEMENT* wrapped_navier_stokes_el_pt,
157 unsigned* direction_pt)
163 unsigned nnod=wrapped_navier_stokes_el_pt->nnode();
166 for (
unsigned j=0;
j<nnod;
j++)
206 std::stringstream error_stream;
208 <<
"Pointer to velocity singular function hasn't been defined!"
229 std::stringstream error_stream;
231 <<
"Pointer to gradient of velocity singular function "
232 <<
"hasn't been defined!"
251 std::stringstream error_stream;
253 <<
"Pointer to pressure singular function hasn't been defined!"
272 std::stringstream error_stream;
274 <<
"Pointer to gradient of pressure singular function "
275 <<
"hasn't been defined!"
302 for (
unsigned d=0;d<cached_dim;d++)
327 for (
unsigned d=0;d<cached_dim;d++)
329 for (
unsigned i=0;
i<cached_dim;
i++)
365 for (
unsigned d=0;d<cached_dim;d++)
393 const unsigned& flag)
415 Shape psip(n_pres), testp(n_pres);
416 DShape dpsipdx(n_pres,cached_dim), dtestpdx(n_pres,cached_dim);
426 for (
unsigned j=0;
j<n_pres;
j++)
432 if (local_unknown >= 0)
488 template<
class BASIC_NAVIER_STOKES_ELEMENT>
500 unsigned n_node = this->nnode();
503 unsigned cached_dim = this->dim();
512 for (
unsigned j=0;
j<n_node;
j++)
515 for (
unsigned d=0;d<cached_dim;d++)
530 for (
unsigned j=0;
j<n_node;
j++)
533 for (
unsigned d=0;d<cached_dim;d++)
540 unsigned n_pres = this->npres_nst();
549 for (
unsigned l=0;l<n_pres;l++)
562 for (
unsigned l=0;l<n_pres;l++)
633 this->add_external_data(c_pt->internal_data_pt(0));
643 unsigned n_pres = this->npres_nst();
646 unsigned cached_dim=this->dim();
649 Shape psip(n_pres), testp(n_pres);
650 DShape dpsipdx(n_pres,cached_dim), dtestpdx(n_pres,cached_dim);
656 this->dpshape_and_dptest_eulerian_nst
657 (
s,psip,dpsipdx,testp,dtestpdx);
660 double interpolated_dpdx_fe_only=0.0;
664 for (
unsigned j=0;
j<n_pres;
j++)
666 interpolated_dpdx_fe_only +=
667 this->p_nst(
j)*dpsipdx(
j,*direction_pt);
670 return interpolated_dpdx_fe_only;
703 void output(std::ostream &outfile,
const unsigned &nplot)
706 unsigned cached_dim = this->dim();
712 outfile << this->tecplot_zone_string(nplot);
715 unsigned num_plot_points=this->nplot_points(nplot);
716 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
719 this->get_s_plot(iplot,nplot,
s);
722 for(
unsigned i=0;
i<cached_dim;
i++)
724 outfile << this->interpolated_x(
s,
i) <<
" ";
725 x[
i] = this->interpolated_x(
s,
i);
730 for (
unsigned i=0;
i<cached_dim;
i++)
735 for (
unsigned i=0;
i<cached_dim;
i++)
737 outfile << velocity_fe_only[
i] <<
" ";
740 for (
unsigned i=0;
i<cached_dim;
i++)
742 outfile <<
velocity[
i] - velocity_fe_only[
i] <<
" ";
752 this->write_tecplot_zone_footer(outfile,nplot);
760 const bool& include_pressure,
761 double&
error,
double& norm)
764 unsigned cached_dim=this->dim();
776 unsigned n_intpt = this->integral_pt()->nweight();
779 outfile <<
"ZONE" << std::endl;
786 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
790 for(
unsigned i=0;
i<cached_dim;
i++)
792 s[
i] = this->integral_pt()->knot(ipt,
i);
796 double w = this->integral_pt()->weight(ipt);
799 double J=this->J_eulerian(
s);
805 this->interpolated_x(
s,
x);
810 for(
unsigned i=0;
i<cached_dim;
i++)
812 computed_soln[
i]=u_comp[
i];
814 unsigned hi_limit=cached_dim;
815 if (include_pressure)
818 hi_limit=cached_dim+1;
823 for(
unsigned i=0;
i<hi_limit;
i++)
831 for(
unsigned i=0;
i<cached_dim;
i++)
833 outfile <<
x[
i] <<
" ";
837 for(
unsigned i=0;
i<hi_limit;
i++)
841 outfile << std::endl;
852 unsigned cached_dim=this->dim();
855 const unsigned n_node = this->nnode();
870 for (
unsigned d=0;d<cached_dim;d++)
873 const unsigned u_nodal_index = this->u_index_nst(d);
876 for(
unsigned j=0;
j<n_node;
j++)
878 interpolated_u[d] += this->nodal_value(
j,u_nodal_index)*psif[
j];
879 x[d]+=this->raw_nodal_position(
j,d)*psif(
j);
885 for (
unsigned d=0;d<cached_dim;d++)
887 interpolated_u[d] += u_bar_local[d];
889 return(interpolated_u);
899 unsigned cached_dim = this->dim();
903 const unsigned n_node = this->nnode();
912 for(
unsigned j=0;
j<n_node;
j++)
914 for (
unsigned d=0;d<cached_dim;d++)
916 x[d]+=this->raw_nodal_position(
j,d)*psif(
j);
923 return interpolated_p;
944 unsigned cached_dim=this->dim();
946 for (
unsigned s=0;
s<n_sing;
s++)
950 for (
unsigned i=0;
i<cached_dim;
i++)
952 sum[
i]+=u_bar_local[
i];
975 unsigned cached_dim=this->dim();
977 for (
unsigned i=0;
i<cached_dim;
i++)
979 sum[
i].resize(cached_dim,0.0);
981 for (
unsigned s=0;
s<n_sing;
s++)
985 for (
unsigned i=0;
i<cached_dim;
i++)
987 for (
unsigned j=0;
j<cached_dim;
j++)
989 sum[
i][
j]+=grad_u_bar_local[
i][
j];
1037 for (
unsigned i=0;
i<n_sing;
i++)
1050 const unsigned n_node = this->nnode();
1053 unsigned cached_dim = this->dim();
1062 this->
shape(s,psif);
1065 for (
unsigned d=0;d<cached_dim;d++)
1068 const unsigned u_nodal_index = this->u_index_nst(d);
1072 for(
unsigned j=0;
j<n_node;
j++)
1074 interpolated_u[d] += this->nodal_value(
j,u_nodal_index)*psif[
j];
1078 return interpolated_u;
1087 unsigned n_pres = this->npres_nst();
1090 Shape psip(n_pres), testp(n_pres);
1094 this->pshape_nst(
s,psip,testp);
1097 double interpolated_p = 0.0;
1101 for (
unsigned l=0;l<n_pres;l++)
1103 interpolated_p += this->p_nst(l)*psip[l];
1106 return interpolated_p;
1114 const unsigned& flag)
1117 BASIC_NAVIER_STOKES_ELEMENT::fill_in_generic_residual_contribution_nst
1121 unsigned cached_dim = this->dim();
1124 bool all_singular_functions_satisfy_stokes_equation=
true;
1131 for (
unsigned i=0;
i<n_sing;
i++)
1133 local_equation_number_C[
i] = this->external_local_eqn(
i,0);
1135 singular_function_satisfies_stokes_equation()))
1137 all_singular_functions_satisfy_stokes_equation=
false;
1142 unsigned n_node = this->nnode();
1145 unsigned n_pres = this->npres_nst();
1149 for (
unsigned d=0;d<cached_dim;d++)
1151 u_nodal_index[d] = this->u_index_nst(d);
1155 int local_eqn=0, local_unknown=0;
1158 for (
unsigned j=0;
j<n_node;
j++)
1160 if (!(this->node_pt(
j)->time_stepper_pt()->is_steady()))
1162 std::stringstream error_stream;
1164 <<
"Currently, the NavierStokesElementWithSingularity elements\n"
1165 <<
"only work for steady problems, but we have detected a\n"
1166 <<
"non-steady time-stepper for node " <<
j <<
".\n"
1167 <<
"If your problem is time-dependent you're welcome to \n"
1168 <<
"volunteer and implement the required functionality in \n\n"
1169 <<
" NavierStokesElementWithSingularity::fill_in_generic_residual_contribution_wrapped_nst()\n\n"
1183 std::stringstream error_stream;
1185 <<
"Currently, the NavierStokesElementWithSingularity elements\n"
1186 <<
"only work on fixed meshes, and to check this we require\n"
1187 <<
"that you assert that this is the case by calling \n\n"
1188 <<
" NavierStokesElementWithSingularity::disable_ALE()"
1190 <<
"for all bulk Navier-Stokes elements.\n"
1191 <<
"If your mesh is moving you're welcome to volunteer and implement\n"
1192 <<
"the required functionality in \n\n"
1193 <<
" NavierStokesElementWithSingularity::fill_in_generic_residual_contribution_wrapped_nst()\n\n"
1203 if ((!all_singular_functions_satisfy_stokes_equation)&&(flag==1))
1205 std::stringstream error_stream;
1207 <<
"Currently, the analytical computation of the Jacobian for the\n"
1208 <<
"NavierStokesElementWithSingularity elements\n"
1209 <<
"only work with singular solutions that satisfy the Stokes eqns.\n"
1210 <<
"Of course, there's no way of checking this, so you'll have to\n"
1211 <<
"assert that this is the case by calling \n\n"
1212 <<
" SingularNavierStokesSolutionElement::singular_function_satisfies_stokes_equation()"
1214 <<
"for the SingularNavierStokesSolutionElement that specifies the singular functions.\n"
1215 <<
"If your singular functions do not satisfy the Stokes equations\n"
1216 <<
"you're welcome to volunteer and implement the required \n"
1217 <<
"functionality in \n\n"
1218 <<
" NavierStokesElementWithSingularity::fill_in_generic_residual_contribution_wrapped_nst()\n\n"
1219 <<
"Fragments of code are already there...\n"
1220 <<
"Alternatively, use FD-based setup of Jacobian (still there, commented out, in code).\n"
1221 <<
"The reason this never got implemented is because this case typically only arises\n"
1222 <<
"when trying to \"blend\" solutions (to give them finite support) and this didn't\n"
1223 <<
"seem to work too well and was sort of abandoned. Next person to look at this\n"
1224 <<
"should consider only adding the non-integrated by parts (source-fct-like) terms\n"
1225 <<
"arising from the singular functions...\n"
1235 double scaled_re = this->re()*this->density_ratio();
1238 if ((scaled_re>0.0)||(!all_singular_functions_satisfy_stokes_equation))
1242 Shape psif(n_node), testf(n_node);
1243 DShape dpsifdx(n_node,cached_dim), dtestfdx(n_node,cached_dim);
1246 Shape psip(n_pres), testp(n_pres);
1249 unsigned n_intpt = this->integral_pt()->nweight();
1255 double visc_ratio = this->viscosity_ratio();
1258 for (
unsigned ipt=0;ipt<n_intpt;ipt++)
1261 for (
unsigned d=0;d<cached_dim;d++)
1263 s[d] = this->integral_pt()->knot(ipt,d);
1267 double w = this->integral_pt()->weight(ipt);
1271 this->dshape_and_dtest_eulerian_at_knot_nst(ipt,psif,dpsifdx,
1275 this->pshape_nst(
s,psip,testp);
1287 for (
unsigned l=0;l<n_node;l++)
1290 for (
unsigned i=0;
i<cached_dim;
i++)
1292 double u_value = this->raw_nodal_value(l,u_nodal_index[
i]);
1293 interpolated_u[
i] += u_value*psif[l];
1294 interpolated_x[
i] += this->raw_nodal_position(l,
i)*psif(l);
1295 for(
unsigned j=0;
j<cached_dim;
j++)
1297 interpolated_dudx(
i,
j) += u_value*dpsifdx(l,
j);
1305 double p_bar_local=this->
p_bar(interpolated_x);
1309 for (
unsigned s=0;
s<n_sing;
s++)
1314 for (
unsigned s=0;
s<n_sing;
s++)
1316 grad_u_hat_local[
s]=
1324 for (
unsigned l=0;l<n_node;l++)
1327 for (
unsigned i=0;
i<cached_dim;
i++)
1330 local_eqn = this->nodal_local_eqn(l,u_nodal_index[
i]);
1344 if (!all_singular_functions_satisfy_stokes_equation)
1346 residuals[local_eqn]+=p_bar_local*dtestfdx(l,
i)*
W;
1347 for (
unsigned k=0;
k<cached_dim;
k++)
1349 residuals[local_eqn] -= visc_ratio*
1350 (grad_u_bar_local[
i][
k]+this->
Gamma[
i]*grad_u_bar_local[
k][
i])
1362 for (
unsigned k=0;
k<cached_dim;
k++)
1364 sum+=u_bar_local[
k]*(grad_u_bar_local[
i][
k]+interpolated_dudx(
i,
k))
1365 +interpolated_u[
k]*grad_u_bar_local[
i][
k];
1367 residuals[local_eqn] -= scaled_re*sum*testf[l]*
W;
1382 for (
unsigned ss=0;ss<n_sing;ss++)
1384 local_unknown=local_equation_number_C[ss];
1385 if (local_unknown>=0)
1388 for (
unsigned k=0;
k<cached_dim;
k++)
1390 sum+=u_hat_local[ss][
k]*(grad_u_bar_local[
i][
k]+
1391 interpolated_dudx(
i,
k))+
1392 grad_u_hat_local[ss][
i][
k]*
1393 (u_bar_local[
k]+interpolated_u[
k]);
1395 jacobian(local_eqn,local_unknown)-=scaled_re*sum*testf[l]*
W;
1401 for(
unsigned l2=0;l2<n_node;l2++)
1404 for(
unsigned i2=0;i2<cached_dim;i2++)
1407 local_unknown = this->nodal_local_eqn(l2,u_nodal_index[i2]);
1408 if(local_unknown >= 0)
1413 for (
unsigned k=0;
k<cached_dim;
k++)
1415 sum+=u_bar_local[
k]*dpsifdx(l2,
k);
1418 sum+=psif(l2)*grad_u_bar_local[
i][i2];
1421 jacobian(local_eqn,local_unknown) -=
1422 scaled_re*sum*testf[l]*
W;
1439 if (!all_singular_functions_satisfy_stokes_equation)
1442 for (
unsigned l=0;l<n_pres;l++)
1444 local_eqn = this->p_local_eqn(l);
1454 for (
unsigned k=0;
k<cached_dim;
k++)
1456 aux += grad_u_bar_local[
k][
k];
1458 residuals[local_eqn] += aux*testp[l]*
W;
1473 for (
unsigned i=0;
i<n_sing;
i++)
1475 u_hat_at_node[
i].resize(cached_dim);
1479 for (
unsigned l=0;l<n_node;l++)
1483 for (
unsigned d=0;d<cached_dim;d++)
1485 global_coordinate[d] = this->raw_nodal_position(l,d);
1489 u_bar_at_node=this->
u_bar(global_coordinate);
1490 for (
unsigned i=0;
i<n_sing;
i++)
1496 for (
unsigned d=0;d<cached_dim;d++)
1499 local_eqn = this->nodal_local_eqn(l,u_nodal_index[d]);
1508 residuals[local_eqn] = 0.0;
1511 residuals[local_eqn] += this->raw_nodal_value(l,u_nodal_index[d]);
1514 residuals[local_eqn] += u_bar_at_node[d];
1523 unsigned n_dof=this->ndof();
1524 for (
unsigned j=0;
j<n_dof;
j++)
1526 jacobian(local_eqn,
j)=0.0;
1530 jacobian(local_eqn,local_eqn) += 1.0;
1534 for (
unsigned i=0;
i<n_sing;
i++)
1538 local_unknown=local_equation_number_C[
i];
1539 if (local_unknown>=0)
1541 jacobian(local_eqn,local_unknown) +=
1542 u_hat_at_node[
i][d];
1557 for (
unsigned l=0;l<n_pres;l++)
1560 local_eqn = this->p_local_eqn(l);
1571 Node* p_nod_pt=this->node_pt(this->Pconv[l]);
1574 << this->Pconv[l] <<
" at: ";
1577 for (
unsigned d=0;d<cached_dim;d++)
1579 global_coordinate[d] = p_nod_pt->
x(d);
1585 residuals[local_eqn] = 0.0;
1588 residuals[local_eqn] += this->p_nst(l);
1591 residuals[local_eqn] +=
p_bar(global_coordinate);
1600 unsigned n_dof=this->ndof();
1601 for (
unsigned j=0;
j<n_dof;
j++)
1603 jacobian(local_eqn,
j)=0.0;
1607 jacobian(local_eqn,local_eqn) += 1.0;
1610 for (
unsigned i=0;
i<n_sing;
i++)
1614 local_unknown=local_equation_number_C[
i];
1615 if (local_unknown>=0)
1617 jacobian(local_eqn,local_unknown) +=
int i
Definition: BiCGSTAB_step_by_step.cpp:9
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void unpin(const unsigned &i)
Unpin the i-th stored variable.
Definition: nodes.h:391
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
double value(const unsigned &i) const
Definition: nodes.h:293
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
Definition: elements.h:73
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
Definition: navier_stokes_elements_with_singularity.h:491
Vector< double > interpolated_u_nst_fe_only(const Vector< double > &s) const
Definition: navier_stokes_elements_with_singularity.h:1047
void undo_dirichlet_bc_on_pressure_dof(const unsigned &j)
Undo Dirichlet BC at the j-th pressure dof.
Definition: navier_stokes_elements_with_singularity.h:602
void add_c_equation_element_pt(SingularNavierStokesSolutionElement< NavierStokesElementWithSingularity< BASIC_NAVIER_STOKES_ELEMENT > > *c_pt)
Definition: navier_stokes_elements_with_singularity.h:624
double pressure_singular_function(const unsigned &i, const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:1015
void set_dirichlet_value_on_pressure_dof(const unsigned &j, const double &value)
Specify Dirichlet boundary value for the j-th pressure dof.
Definition: navier_stokes_elements_with_singularity.h:608
Vector< Vector< double > > Imposed_velocity_values_at_node
Definition: navier_stokes_elements_with_singularity.h:1643
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: navier_stokes_elements_with_singularity.h:675
Vector< Vector< double > > grad_velocity_singular_function(const unsigned &i, const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:1007
Vector< double > Imposed_value_at_pressure_dof
Definition: navier_stokes_elements_with_singularity.h:1652
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: navier_stokes_elements_with_singularity.h:687
double p_bar(const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:1031
double interpolated_p_nst_fe_only(const Vector< double > &s) const
Definition: navier_stokes_elements_with_singularity.h:1084
Vector< SingularNavierStokesSolutionElement< NavierStokesElementWithSingularity< BASIC_NAVIER_STOKES_ELEMENT > > * > c_equation_elements_pt()
Access function to vector of pointers to SingularNavierStokesSolutionElements.
Definition: navier_stokes_elements_with_singularity.h:616
double interpolated_p_nst(const Vector< double > &s) const
Version of interpolated pressure including the singular contributions.
Definition: navier_stokes_elements_with_singularity.h:893
std::vector< bool > Pressure_dof_is_subject_to_dirichlet_bc
Definition: navier_stokes_elements_with_singularity.h:1647
void set_velocity_dirichlet_value_on_node(const unsigned &j, const unsigned &d, const double &value)
Definition: navier_stokes_elements_with_singularity.h:587
double p_bar(const unsigned &i, const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:1024
void fill_in_generic_residual_contribution_wrapped_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Overloaded fill-in function.
Definition: navier_stokes_elements_with_singularity.h:1111
Vector< double > u_bar(const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:938
void impose_dirichlet_bc_on_pressure_dof(const unsigned &j)
Impose Dirichlet BC at the j-th pressure dof.
Definition: navier_stokes_elements_with_singularity.h:596
void output(std::ostream &outfile, const unsigned &nplot)
Definition: navier_stokes_elements_with_singularity.h:703
Vector< Vector< double > > grad_u_bar(const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:969
Vector< Vector< double > > grad_u_bar(const unsigned &i, const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:961
void undo_velocity_dirichlet_bc_on_node(const unsigned &j, const unsigned &d)
Definition: navier_stokes_elements_with_singularity.h:580
Vector< double > interpolated_u_nst(const Vector< double > &s) const
Definition: navier_stokes_elements_with_singularity.h:848
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, const bool &include_pressure, double &error, double &norm)
Overloaded compute error function; uses FE+singular parts.
Definition: navier_stokes_elements_with_singularity.h:758
double dpdx_fe_only(Vector< double > s, const unsigned *direction_pt)
Derivative of pressure in direction indicated by pointer to unsigned.
Definition: navier_stokes_elements_with_singularity.h:638
Vector< double > velocity_singular_function(const unsigned &i, const Vector< double > &x) const
Evaluate i-th "raw" velocity singular function at Eulerian position x.
Definition: navier_stokes_elements_with_singularity.h:998
Vector< std::vector< bool > > Node_is_subject_to_velocity_dirichlet_bcs
Definition: navier_stokes_elements_with_singularity.h:1638
void impose_velocity_dirichlet_bc_on_node(const unsigned &j, const unsigned &d)
Definition: navier_stokes_elements_with_singularity.h:573
NavierStokesElementWithSingularity()
Constructor.
Definition: navier_stokes_elements_with_singularity.h:496
Vector< SingularNavierStokesSolutionElement< NavierStokesElementWithSingularity< BASIC_NAVIER_STOKES_ELEMENT > > * > C_equation_elements_pt
Vector of pointers to SingularNavierStokesSolutionElement objects.
Definition: navier_stokes_elements_with_singularity.h:1633
Vector< double > u_bar(const unsigned &i, const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:931
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: oomph_definitions.h:222
Definition: navier_stokes_elements_with_singularity.h:64
bool & singular_function_satisfies_stokes_equation()
Definition: navier_stokes_elements_with_singularity.h:119
NavierStokesPressureSingularFctPt Pressure_singular_fct_pt
Pointer to pressure singular function.
Definition: navier_stokes_elements_with_singularity.h:453
double pressure_singular_function(const Vector< double > &x) const
Evaluate pressure singular function at Eulerian position x.
Definition: navier_stokes_elements_with_singularity.h:246
void fill_in_contribution_to_jacobian(Vector< double > &residual, DenseMatrix< double > &jacobian)
Definition: navier_stokes_elements_with_singularity.h:382
Vector< Vector< double > > grad_u_bar(const Vector< double > &x)
Definition: navier_stokes_elements_with_singularity.h:315
NavierStokesVelocitySingularFctPt & velocity_singular_fct_pt()
Access function to pointer to velocity singular function.
Definition: navier_stokes_elements_with_singularity.h:185
unsigned * Direction_pt
Direction of the derivative used for the residual of the element.
Definition: navier_stokes_elements_with_singularity.h:462
Vector< double > S_in_wrapped_navier_stokes_element
Local coordinates of singulariity in wrapped Navier-Stokes element.
Definition: navier_stokes_elements_with_singularity.h:459
NavierStokesGradVelocitySingularFctPt & grad_velocity_singular_fct_pt()
Access function to pointer to gradient of velocity singular function.
Definition: navier_stokes_elements_with_singularity.h:189
double(* NavierStokesPressureSingularFctPt)(const Vector< double > &x)
Function pointer to the pressure singular function:
Definition: navier_stokes_elements_with_singularity.h:78
Vector< Vector< double > > grad_velocity_singular_function(const Vector< double > &x) const
Definition: navier_stokes_elements_with_singularity.h:223
void fill_in_generic_contribution_to_residuals(Vector< double > &residual, DenseMatrix< double > &jacobian, const unsigned &flag)
Compute local residual, and, if flag=1, local jacobian matrix.
Definition: navier_stokes_elements_with_singularity.h:391
Vector< double > grad_p_bar(const Vector< double > &x)
Definition: navier_stokes_elements_with_singularity.h:353
void set_wrapped_navier_stokes_element_pt(WRAPPED_NAVIER_STOKES_ELEMENT *wrapped_navier_stokes_el_pt, const Vector< double > &s, unsigned *direction_pt)
Definition: navier_stokes_elements_with_singularity.h:155
void set_c(const double &value)
Find the value of the unknown amplitude C.
Definition: navier_stokes_elements_with_singularity.h:132
NavierStokesGradPressureSingularFctPt Grad_pressure_singular_fct_pt
Pointer to gradient of pressure singular function.
Definition: navier_stokes_elements_with_singularity.h:456
NavierStokesGradPressureSingularFctPt & grad_pressure_singular_fct_pt()
Access function to pointer to gradient of pressure singular function.
Definition: navier_stokes_elements_with_singularity.h:197
Vector< double > velocity_singular_function(const Vector< double > &x) const
Evaluate velocity singular function at Eulerian position x.
Definition: navier_stokes_elements_with_singularity.h:201
NavierStokesVelocitySingularFctPt Velocity_singular_fct_pt
Pointer to velocity singular function.
Definition: navier_stokes_elements_with_singularity.h:446
void pin_c()
Pin the value of the unknown amplitude C.
Definition: navier_stokes_elements_with_singularity.h:138
Vector< double > u_bar(const Vector< double > &x)
Definition: navier_stokes_elements_with_singularity.h:290
Vector< double >(* NavierStokesVelocitySingularFctPt)(const Vector< double > &x)
Function pointer to the velocity singular function:
Definition: navier_stokes_elements_with_singularity.h:70
Vector< double > grad_pressure_singular_function(const Vector< double > &x) const
Evaluate gradient of pressure singular function at Eulerian position x.
Definition: navier_stokes_elements_with_singularity.h:267
NavierStokesGradVelocitySingularFctPt Grad_velocity_singular_fct_pt
Definition: navier_stokes_elements_with_singularity.h:450
double c() const
Find the value of the unknown amplitude C.
Definition: navier_stokes_elements_with_singularity.h:125
void fill_in_contribution_to_residuals(Vector< double > &residual)
Compute residual.
Definition: navier_stokes_elements_with_singularity.h:375
Vector< double >(* NavierStokesGradPressureSingularFctPt)(const Vector< double > &x)
Function pointer to the gradient of the pressure singular function:
Definition: navier_stokes_elements_with_singularity.h:82
bool Singular_function_satisfies_stokes_equation
Definition: navier_stokes_elements_with_singularity.h:465
void unpin_c()
Unpin the value of the unknown amplitude C.
Definition: navier_stokes_elements_with_singularity.h:144
SingularNavierStokesSolutionElement()
Constructor.
Definition: navier_stokes_elements_with_singularity.h:85
WRAPPED_NAVIER_STOKES_ELEMENT * Wrapped_navier_stokes_el_pt
Pointer to wrapped Navier-Stokes element.
Definition: navier_stokes_elements_with_singularity.h:443
double p_bar(const Vector< double > &x)
Definition: navier_stokes_elements_with_singularity.h:341
NavierStokesPressureSingularFctPt & pressure_singular_fct_pt()
Access function to pointer to pressure singular function.
Definition: navier_stokes_elements_with_singularity.h:193
Vector< Vector< double > >(* NavierStokesGradVelocitySingularFctPt)(const Vector< double > &x)
Function pointer to the gradient of the velocity singular function:
Definition: navier_stokes_elements_with_singularity.h:74
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
squared absolute value
Definition: GlobalFunctions.h:87
double Gamma
Aspect ratio (cylinder height / cylinder radius)
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:70
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107
void exact_soln(const double &time, const Vector< double > &x, Vector< double > &soln)
Definition: unstructured_two_d_curved.cc:301
int error
Definition: calibrate.py:297
void shape(const double &s, double *Psi)
Definition: shape.h:564
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
bool ALE_is_disabled
Definition: gen_axisym_advection_diffusion_elements.h:638
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
list x
Definition: plotDoE.py:28
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2