32 #ifndef OOMPH_NAVIER_STOKES_ELEMENTS_HEADER 33 #define OOMPH_NAVIER_STOKES_ELEMENTS_HEADER 37 #include <oomph-lib-config.h> 42 #include "../generic/Qelements.h" 43 #include "../generic/fsi.h" 44 #include "../generic/projection.h" 91 template <
class ELEMENT>
105 const bool& called_from_refineable_constructor=
false)
116 if (!called_from_refineable_constructor)
119 if(element_pt->
dim()==3)
129 "This flux element will not work correctly if nodes are hanging\n",
130 OOMPH_CURRENT_FUNCTION,
131 OOMPH_EXCEPTION_LOCATION);
156 std::ostringstream error_message;
158 <<
"fill_in_contribution_to_residuals() must not be called directly.\n" 159 <<
"since it uses the local equation numbering of the bulk element\n" 160 <<
"which calls the relevant helper function directly.\n";
163 OOMPH_CURRENT_FUNCTION,
164 OOMPH_EXCEPTION_LOCATION);
171 std::ostringstream error_message;
173 <<
"fill_in_contribution_to_jacobian() must not be called directly.\n" 174 <<
"since it uses the local equation numbering of the bulk element\n" 175 <<
"which calls the relevant helper function directly.\n";
178 OOMPH_CURRENT_FUNCTION,
179 OOMPH_EXCEPTION_LOCATION);
186 void output(std::ostream &outfile,
const unsigned &nplot)
202 template<
class ELEMENT>
210 unsigned my_dim=this->
dim();
231 unsigned n_pres = bulk_el_pt->npres_nst();
234 double re = bulk_el_pt->re();
237 Shape psip(n_pres), testp(n_pres);
240 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
255 bulk_el_pt->interpolated_u_nst(s_bulk,veloc);
259 for (
unsigned i=0;
i<my_dim+1;
i++)
261 flux+=veloc[
i]*unit_normal[
i];
265 if (flux>0.0) flux=0.0;
268 double interpolated_press=bulk_el_pt->interpolated_p_nst(s_bulk);
271 bulk_el_pt->pshape_nst(s_bulk,psip,testp);
281 for(
unsigned l=0;l<n_pres;l++)
283 local_eqn=bulk_el_pt->p_local_eqn(l);
288 residuals[local_eqn] -=
289 re*flux*interpolated_press*testp[l]*
W;
295 for(
unsigned l2=0;l2<n_pres;l2++)
297 local_unknown = bulk_el_pt->p_local_eqn(l2);
300 if(local_unknown >= 0)
302 jacobian(local_eqn,local_unknown)-=
303 re*flux*psip[l2]*testp[l]*
W;
337 virtual void fill_in_pressure_advection_diffusion_residuals(
Vector<double>&
342 virtual void fill_in_pressure_advection_diffusion_jacobian(
348 virtual int p_nodal_index_nst()
const =0;
353 virtual int p_local_eqn(
const unsigned &n)
const=0;
357 virtual int& pinned_fp_pressure_eqn()=0;
361 virtual void pin_all_non_pressure_dofs(std::map<
Data*,std::vector<int> >&
362 eqn_number_backup)=0;
367 virtual void build_fp_press_adv_diff_robin_bc_element(
const unsigned&
373 virtual void delete_pressure_advection_diffusion_robin_elements()=0;
380 virtual void get_pressure_and_velocity_mass_matrix_diagonal(
382 const unsigned& which_one=0)=0;
419 template <
unsigned DIM>
428 typedef void (*NavierStokesBodyForceFctPt)(
const double& time,
434 typedef double (*NavierStokesSourceFctPt)(
const double& time,
441 typedef double (*NavierStokesPressureAdvDiffSourceFctPt)(
521 virtual double dshape_and_dtest_eulerian_at_knot_nst(
const unsigned &ipt,
530 virtual double dshape_and_dtest_eulerian_at_knot_nst(
551 if(Body_force_fct_pt == 0)
554 for(
unsigned i=0;
i<DIM;
i++) {result[
i] = 0.0;}
559 (*Body_force_fct_pt)(time,x,result);
581 get_body_force_nst(time,ipt,s,x,body_force);
587 for (
unsigned i=0;
i<DIM;
i++)
590 get_body_force_nst(time,ipt,s,x_pls,body_force_pls);
591 for (
unsigned j=0;j<DIM;j++)
593 d_body_force_dx(j,
i)=(body_force_pls[j]-body_force[j])/eps_fd;
613 if (Source_fct_pt == 0) {
return 0;}
615 else {
return (*Source_fct_pt)(time,x);}
635 double source=get_source_nst(time,ipt,x);
639 double source_pls=0.0;
641 for (
unsigned i=0;
i<DIM;
i++)
644 source_pls=get_source_nst(time,ipt,x_pls);
645 gradient[
i]=(source_pls-source)/eps_fd;
660 virtual void fill_in_generic_residual_contribution_nst(
668 virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst(
675 virtual void fill_in_generic_dresidual_contribution_nst(
676 double*
const ¶meter_pt,
693 Press_adv_diff_source_fct_pt(0), ALE_is_disabled(false),
694 Pinned_fp_pressure_eqn(-1)
700 G_pt = &Default_Gravity_vector;
702 Viscosity_Ratio_pt = &Default_Physical_Ratio_Value;
703 Density_Ratio_pt = &Default_Physical_Ratio_Value;
715 const double &
re()
const {
return *Re_pt;}
718 const double &
re_st()
const {
return *ReSt_pt;}
741 const double &
re_invfr()
const {
return *ReInvFr_pt;}
754 {
return Body_force_fct_pt;}
758 {
return Body_force_fct_pt;}
769 {
return Press_adv_diff_source_fct_pt;}
775 {
return Press_adv_diff_source_fct_pt;}
782 virtual unsigned npres_nst()
const=0;
790 Shape &test)
const=0;
795 virtual double dpshape_and_dptest_eulerian_nst(
const Vector<double> &s,
799 DShape &dptestdx)
const=0;
806 double u_nst(
const unsigned &n,
const unsigned &
i)
const 811 double u_nst(
const unsigned &
t,
const unsigned &n,
812 const unsigned &
i)
const 841 const unsigned u_nodal_index = this->u_index_nst(i);
844 const unsigned n_time = time_stepper_pt->
ntstorage();
846 for(
unsigned t=0;
t<n_time;
t++)
859 ALE_is_disabled=
true;
868 ALE_is_disabled=
false;
873 virtual double p_nst(
const unsigned &n_p)
const=0;
876 virtual double p_nst(
const unsigned &
t,
const unsigned &n_p)
const=0;
879 virtual void fix_pressure(
const unsigned &p_dof,
const double &p_value)=0;
887 double pressure_integral()
const;
890 double dissipation()
const;
899 double kin_energy()
const;
902 double d_kin_energy_dt()
const;
939 get_traction(s,N,load);
946 void get_pressure_and_velocity_mass_matrix_diagonal(
948 const unsigned& which_one=0);
961 const unsigned& nplot)
const 969 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
976 if(i<DIM) {file_out << interpolated_u_nst(s,i) << std::endl;}
979 else if(i==DIM) {file_out << interpolated_p_nst(s) << std::endl;}
985 std::stringstream error_stream;
987 <<
"These Navier Stokes elements only store " << DIM+1 <<
" fields, " 988 <<
"but i is currently " << i << std::endl;
991 OOMPH_CURRENT_FUNCTION,
992 OOMPH_EXCEPTION_LOCATION);
1016 std::stringstream error_stream;
1018 <<
"These Navier Stokes elements only store " << DIM+1 <<
" fields,\n" 1019 <<
"but i is currently " << i << std::endl;
1022 OOMPH_CURRENT_FUNCTION,
1023 OOMPH_EXCEPTION_LOCATION);
1039 void output(std::ostream &outfile,
const unsigned &nplot);
1051 void output(FILE* file_pt,
const unsigned &nplot);
1059 full_output(outfile,nplot);
1065 void full_output(std::ostream &outfile,
const unsigned &nplot);
1071 void output_veloc(std::ostream &outfile,
const unsigned &nplot,
1077 void output_vorticity(std::ostream &outfile,
1078 const unsigned &nplot);
1083 void output_fct(std::ostream &outfile,
const unsigned &nplot,
1089 void output_fct(std::ostream &outfile,
const unsigned &nplot,
1103 double& error,
double& norm);
1111 double& error,
double& norm);
1118 fill_in_generic_residual_contribution_nst(
1129 fill_in_generic_residual_contribution_nst(residuals,jacobian,
1140 fill_in_generic_residual_contribution_nst(residuals,jacobian,mass_matrix,2);
1149 fill_in_generic_dresidual_contribution_nst(
1162 fill_in_generic_dresidual_contribution_nst(
1170 double*
const ¶meter_pt,
1176 fill_in_generic_dresidual_contribution_nst(
1177 parameter_pt,dres_dparam,djac_dparam,dmass_matrix_dparam,2);
1185 fill_in_generic_pressure_advection_diffusion_contribution_nst(
1194 fill_in_generic_pressure_advection_diffusion_contribution_nst(
1195 residuals,jacobian,1);
1206 for (
unsigned j=0;j<nint;j++)
1209 if (eqn_number_backup[data_pt].
size()==0)
1211 unsigned nvalue=data_pt->
nvalue();
1212 eqn_number_backup[data_pt].resize(nvalue);
1213 for (
unsigned i=0;
i<nvalue;
i++)
1225 unsigned nnod=this->
nnode();
1226 for (
unsigned j=0;j<nnod;j++)
1230 if (eqn_number_backup[nod_pt].
size()==0)
1233 unsigned nvalue=nod_pt->
nvalue();
1234 eqn_number_backup[nod_pt].resize(nvalue);
1235 for (
unsigned i=0;
i<nvalue;
i++)
1239 if (
int(
i)!=this->p_nodal_index_nst())
1251 if (this->p_nodal_index_nst()>=0)
1262 if (solid_nod_pt!=0)
1265 if (eqn_number_backup[solid_posn_data_pt].
size()==0)
1267 unsigned nvalue=solid_posn_data_pt->
nvalue();
1268 eqn_number_backup[solid_posn_data_pt].resize(nvalue);
1269 for (
unsigned i=0;
i<nvalue;
i++)
1272 eqn_number_backup[solid_posn_data_pt][
i]=
1276 solid_posn_data_pt->
pin(
i);
1288 virtual void build_fp_press_adv_diff_robin_bc_element(
const unsigned&
1296 unsigned nel=Pressure_advection_diffusion_robin_element_pt.size();
1297 for (
unsigned e=0;
e<nel;
e++)
1299 FaceElement* face_el_pt=Pressure_advection_diffusion_robin_element_pt[
e];
1300 outfile <<
"ZONE" << std::endl;
1305 for (
unsigned ipt=0;ipt<n;ipt++)
1307 for(
unsigned i=0;
i<DIM-1;
i++)
1313 for (
unsigned i=0;
i<DIM;
i++)
1315 outfile << x[
i] <<
" ";
1317 for (
unsigned i=0;
i<DIM;
i++)
1319 outfile << unit_normal[
i] <<
" ";
1321 outfile << std::endl;
1331 unsigned nel=Pressure_advection_diffusion_robin_element_pt.size();
1332 for (
unsigned e=0;
e<nel;
e++)
1334 delete Pressure_advection_diffusion_robin_element_pt[
e];
1336 Pressure_advection_diffusion_robin_element_pt.clear();
1344 dresidual_dnodal_coordinates);
1352 unsigned n_node =
nnode();
1358 for (
unsigned i=0;
i<DIM;
i++)
1361 unsigned u_nodal_index = u_index_nst(
i);
1365 for(
unsigned l=0;l<n_node;l++)
1376 unsigned n_node =
nnode();
1383 unsigned u_nodal_index = u_index_nst(i);
1386 double interpolated_u = 0.0;
1388 for(
unsigned l=0;l<n_node;l++)
1390 interpolated_u +=
nodal_value(l,u_nodal_index)*psi[l];
1393 return(interpolated_u);
1400 const unsigned &
i)
const 1403 unsigned n_node =
nnode();
1412 unsigned u_nodal_index = u_index_nst(i);
1415 double interpolated_u = 0.0;
1417 for(
unsigned l=0;l<n_node;l++)
1419 interpolated_u +=
nodal_value(t,l,u_nodal_index)*psi[l];
1422 return(interpolated_u);
1436 unsigned n_node =
nnode();
1443 const unsigned u_nodal_index = u_index_nst(i);
1447 for(
unsigned l=0;l<n_node;l++)
1451 if(global_eqn >= 0) {++n_u_dof;}
1455 du_ddata.resize(n_u_dof,0.0);
1456 global_eqn_number.resize(n_u_dof,0);
1461 for(
unsigned l=0;l<n_node;l++)
1465 if (global_eqn >= 0)
1468 global_eqn_number[count] = global_eqn;
1470 du_ddata[count] = psi[l];
1482 unsigned n_pres = npres_nst();
1489 double interpolated_p = 0.0;
1491 for(
unsigned l=0;l<n_pres;l++)
1493 interpolated_p += p_nst(l)*psi[l];
1496 return(interpolated_p);
1504 unsigned n_pres = npres_nst();
1511 double interpolated_p = 0.0;
1513 for(
unsigned l=0;l<n_pres;l++)
1515 interpolated_p += p_nst(t,l)*psi[l];
1518 return(interpolated_p);
1526 const unsigned &j)
const 1529 const unsigned n_node =
nnode();
1534 DShape dpsifdx(n_node,DIM);
1540 const unsigned u_nodal_index = u_index_nst(i);
1543 double interpolated_dudx = 0.0;
1546 for(
unsigned l=0;l<n_node;l++)
1548 interpolated_dudx +=
nodal_value(l,u_nodal_index)*dpsifdx(l,j);
1551 return(interpolated_dudx);
1560 unsigned dim=s.size();
1563 data.resize(2*dim+1);
1566 for (
unsigned i=0;
i<
dim;
i++)
1569 data[
i+
dim]=this->interpolated_u_nst(s,
i);
1571 data[2*
dim]=this->interpolated_p_nst(s);
1587 template <
unsigned DIM>
1594 static const unsigned Initial_Nvalue[];
1615 inline double dshape_and_dtest_eulerian_at_knot_nst(
const unsigned &ipt,
1624 inline double dshape_and_dtest_eulerian_at_knot_nst(
1625 const unsigned &ipt,
1665 double p_nst(
const unsigned &
t,
const unsigned &
i)
const 1674 inline double dpshape_and_dptest_eulerian_nst(
const Vector<double> &s,
1698 this->Pressure_advection_diffusion_robin_element_pt.push_back(
1710 void identify_load_data(
1711 std::set<std::pair<Data*,unsigned> > &paired_load_data);
1721 void identify_pressure_data(
1722 std::set<std::pair<Data*,unsigned> > &paired_pressure_data);
1730 void output(std::ostream &outfile,
const unsigned &nplot)
1738 void output(FILE* file_pt,
const unsigned &nplot)
1769 std::list<std::pair<unsigned long,unsigned> >& dof_lookup_list)
const;
1780 template<
unsigned DIM>
1800 template<
unsigned DIM>
1803 const unsigned &ipt,
Shape &psi,
1842 for(
unsigned i=0;
i<9;
i++)
1846 for(
unsigned k=0;k<2;k++)
1848 dtestdx(
i,k) = dpsidx(
i,k);
1850 for(
unsigned p=0;p<2;p++)
1852 for(
unsigned q=0;q<9;q++)
1854 d_dtestdx_dX(p,q,
i,k) = d_dpsidx_dX(p,q,
i,k);
1890 for(
unsigned i=0;
i<27;
i++)
1894 for(
unsigned k=0;k<3;k++)
1896 dtestdx(
i,k) = dpsidx(
i,k);
1898 for(
unsigned p=0;p<3;p++)
1900 for(
unsigned q=0;q<27;q++)
1902 d_dtestdx_dX(p,q,
i,k) = d_dpsidx_dX(p,q,
i,k);
1986 template<
unsigned DIM>
1993 this->pshape_nst(s,psi);
2132 template <
unsigned DIM>
2139 static const unsigned Initial_Nvalue[];
2145 static const unsigned Pconv[];
2158 inline double dshape_and_dtest_eulerian_at_knot_nst(
const unsigned &ipt,
2167 inline double dshape_and_dtest_eulerian_at_knot_nst(
2168 const unsigned &ipt,
2185 {
return Initial_Nvalue[n];}
2205 {
return this->
nodal_value(Pconv[n_p],this->p_nodal_index_nst());}
2209 double p_nst(
const unsigned &
t,
const unsigned &n_p)
const 2210 {
return this->
nodal_value(t,Pconv[n_p],this->p_nodal_index_nst());}
2215 inline double dpshape_and_dptest_eulerian_nst(
const Vector<double> &s,
2223 {
return static_cast<unsigned>(pow(2.0,static_cast<int>(DIM)));}
2228 this->
node_pt(Pconv[p_dof])->
pin(this->p_nodal_index_nst());
2240 this->Pressure_advection_diffusion_robin_element_pt.push_back(
2253 void identify_load_data(
2254 std::set<std::pair<Data*,unsigned> > &paired_load_data);
2265 void identify_pressure_data(
2266 std::set<std::pair<Data*,unsigned> > &paired_pressure_data);
2274 void output(std::ostream &outfile,
const unsigned &nplot)
2281 void output(FILE* file_pt,
const unsigned &nplot)
2299 std::list<std::pair<unsigned long, unsigned> >& dof_lookup_list)
const;
2311 template<
unsigned DIM>
2335 template<
unsigned DIM>
2367 double psi1[2], psi2[2];
2368 double dpsi1[2],dpsi2[2];
2378 for(
unsigned i=0;
i<2;
i++)
2380 for(
unsigned j=0;j<2;j++)
2383 ppsi[2*
i+j] = psi2[
i]*psi1[j];
2384 dppsidx(2*
i+j,0)= psi2[
i]*dpsi1[j];
2385 dppsidx(2*
i+j,1)=dpsi2[
i]* psi1[j];
2441 for(
unsigned i=0;
i<9;
i++)
2445 for(
unsigned k=0;k<2;k++)
2447 dtestdx(
i,k) = dpsidx(
i,k);
2449 for(
unsigned p=0;p<2;p++)
2451 for(
unsigned q=0;q<9;q++)
2453 d_dtestdx_dX(p,q,
i,k) = d_dpsidx_dX(p,q,
i,k);
2489 for(
unsigned i=0;
i<27;
i++)
2493 for(
unsigned k=0;k<3;k++)
2495 dtestdx(
i,k) = dpsidx(
i,k);
2497 for(
unsigned p=0;p<3;p++)
2499 for(
unsigned q=0;q<27;q++)
2501 d_dtestdx_dX(p,q,
i,k) = d_dpsidx_dX(p,q,
i,k);
2523 double psi1[2], psi2[2];
2530 for(
unsigned i=0;
i<2;
i++)
2532 for(
unsigned j=0;j<2;j++)
2535 psi[2*
i + j] = psi2[
i]*psi1[j];
2555 double psi1[2], psi2[2], psi3[2];
2556 double dpsi1[2],dpsi2[2],dpsi3[2];
2568 for(
unsigned i=0;
i<2;
i++)
2570 for(
unsigned j=0;j<2;j++)
2572 for(
unsigned k=0;k<2;k++)
2575 ppsi[4*
i + 2*j + k] = psi3[
i]*psi2[j]*psi1[k];
2576 dppsidx(4*
i + 2*j + k,0) = psi3[
i] * psi2[j] *dpsi1[k];
2577 dppsidx(4*
i + 2*j + k,1) = psi3[
i] *dpsi2[j] * psi1[k];
2578 dppsidx(4*
i + 2*j + k,2) = dpsi3[
i] * psi2[j] * psi1[k];
2618 double psi1[2], psi2[2], psi3[2];
2627 for(
unsigned i=0;
i<2;
i++)
2629 for(
unsigned j=0;j<2;j++)
2631 for(
unsigned k=0;k<2;k++)
2634 psi[4*
i + 2*j + k] = psi3[
i]*psi2[j]*psi1[k];
2644 template<
unsigned DIM>
2650 this->pshape_nst(s,psi);
2715 template<
class TAYLOR_HOOD_ELEMENT>
2739 if (fld<this->
dim())
2742 unsigned nnod=this->
nnode();
2743 for (
unsigned j=0;j<nnod;j++)
2746 data_values.push_back(std::make_pair(this->
node_pt(j),fld));
2753 unsigned Pconv_size=this->
dim()+1;
2754 for (
unsigned j=0;j<Pconv_size;j++)
2757 unsigned vertex_index=this->Pconv[j];
2758 data_values.push_back(std::make_pair(this->
node_pt(vertex_index),fld));
2771 return this->
dim()+1;
2780 if (fld==this->
dim())
2804 unsigned n_dim=this->
dim();
2805 unsigned n_node=this->
nnode();
2810 this->pshape_nst(s,psi);
2812 Shape psif(n_node),testf(n_node);
2813 DShape dpsifdx(n_node,n_dim), dtestfdx(n_node,n_dim);
2816 double J=this->dshape_and_dtest_eulerian_nst(s,psif,dpsifdx,
2822 Shape testf(n_node);
2823 DShape dpsifdx(n_node,n_dim), dtestfdx(n_node,n_dim);
2826 double J=this->dshape_and_dtest_eulerian_nst(s,psi,dpsifdx,
2837 const unsigned &fld,
2840 unsigned n_dim =this->
dim();
2841 unsigned n_node=this->
nnode();
2846 return this->interpolated_p_nst(t,s);
2852 unsigned u_nodal_index = this->u_index_nst(fld);
2861 double interpolated_u = 0.0;
2864 for(
unsigned l=0;l<n_node;l++)
2866 interpolated_u += this->
nodal_value(t,l,u_nodal_index)*psi[l];
2868 return interpolated_u;
2877 if (fld==this->
dim())
2879 return this->npres_nst();
2883 return this->
nnode();
2892 if (fld==this->
dim())
2894 return this->p_local_eqn(j);
2898 const unsigned u_nodal_index = this->u_index_nst(fld);
2910 template<
class ELEMENT>
2923 template<
class ELEMENT>
2935 template<
class CROUZEIX_RAVIART_ELEMENT>
2958 if (fld < this->
dim())
2961 const unsigned n_node=this->
nnode();
2962 for (
unsigned n=0;n<n_node;n++)
2965 data_values.push_back(std::make_pair(this->
node_pt(n),fld));
2972 const unsigned n_press = this->npres_nst();
2974 for(
unsigned j=0;j<n_press;j++)
2976 data_values.push_back(
2990 return this->
dim()+1;
2999 if (fld==this->
dim())
3023 unsigned n_dim=this->
dim();
3024 unsigned n_node=this->
nnode();
3029 this->pshape_nst(s,psi);
3031 Shape psif(n_node),testf(n_node);
3032 DShape dpsifdx(n_node,n_dim), dtestfdx(n_node,n_dim);
3035 double J=this->dshape_and_dtest_eulerian_nst(s,psif,dpsifdx,
3041 Shape testf(n_node);
3042 DShape dpsifdx(n_node,n_dim), dtestfdx(n_node,n_dim);
3045 double J=this->dshape_and_dtest_eulerian_nst(s,psi,dpsifdx,
3056 const unsigned &fld,
3059 unsigned n_dim =this->
dim();
3064 return this->interpolated_p_nst(s);
3069 return this->interpolated_u_nst(t,s,fld);
3077 if (fld==this->
dim())
3079 return this->npres_nst();
3083 return this->
nnode();
3092 if (fld==this->
dim())
3094 return this->p_local_eqn(j);
3098 const unsigned u_nodal_index = this->u_index_nst(fld);
3110 template<
class ELEMENT>
3123 template<
class ELEMENT>
double interpolated_p_nst(const unsigned &t, const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s at time level t.
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
void output_pressure_advection_diffusion_robin_elements(std::ostream &outfile)
Output the FaceElements that apply the Robin boundary condition to the pressure advection diffusion p...
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
NavierStokesBodyForceFctPt body_force_fct_pt() const
Access function for the body-force pointer. Const version.
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
GeneralisedAxisymAdvectionDiffusionSourceFctPt Source_fct_pt
Pointer to source function:
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
int p_local_eqn(const unsigned &n) const
Return the local equation numbers for the pressure values.
FpPressureAdvDiffRobinBCElement(FiniteElement *const &element_pt, const int &face_index, const bool &called_from_refineable_constructor=false)
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...
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. Whatever the timestepper has set up for the v...
double interpolated_dudx_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
w.r.t spatial global coordinate direction x[j] at local coordinate s
Vector< FpPressureAdvDiffRobinBCElementBase * > Pressure_advection_diffusion_robin_element_pt
Storage for FaceElements that apply Robin BC for pressure adv diff equation used in Fp preconditioner...
virtual unsigned required_nvalue(const unsigned &n) const
Number of values that must be stored at local node n by the element. The default is 0...
double du_dt_nst(const unsigned &n, const unsigned &i) const
i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes...
double p_nst(const unsigned &n_p) const
Access function for the pressure values at local pressure node n_p (const version) ...
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
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 dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
void output(FILE *file_pt, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
Taylor Hood upgraded to become projectable.
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
QTaylorHoodElement()
Constructor, no internal data points.
void fill_in_contribution_to_djacobian_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by h...
double dpshape_and_dptest_eulerian_nst(const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
Pressure shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
virtual void dinterpolated_u_nst_ddata(const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Compute the derivatives of the i-th component of velocity at point s with respect to all data that ca...
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into: Velocity and ...
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
void pin_all_non_pressure_dofs(std::map< Data *, std::vector< int > > &eqn_number_backup)
Pin all non-pressure dofs and backup eqn numbers.
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
NavierStokesPressureAdvDiffSourceFctPt & source_fct_for_pressure_adv_diff()
Access function for the source-function pointer for pressure advection diffusion (used for validation...
double * Re_pt
Pointer to global Reynolds number.
virtual void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Fill in contribution to the product of the Hessian (derivative of Jacobian with respect to all variab...
NavierStokesSourceFctPt & source_fct_pt()
Access function for the source-function pointer.
unsigned npres_nst() const
Return number of pressure values.
static double Default_Physical_Constant_Value
Static default value for the physical constants (all initialised to zero)
double dshape_and_dtest_eulerian_at_knot_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
unsigned npres_nst() const
Return number of pressure values.
void outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at node n. Can be overwritten for hanging node version...
void build_fp_press_adv_diff_robin_bc_element(const unsigned &face_index)
Build FaceElements that apply the Robin boundary condition to the pressure advection diffusion proble...
unsigned nfields_for_projection()
Number of fields to be projected: dim+1, corresponding to velocity components and pressure...
A general Finite Element class.
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
virtual void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Calculate the body force at a given time and local and/or Eulerian position. This function is virtual...
const double & density_ratio() const
Density ratio for element: Element's density relative to the viscosity used in the definition of the ...
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
double dshape_and_dtest_eulerian_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
static double Default_Physical_Ratio_Value
Static default value for the physical ratios (all are initialised to one)
void enable_ALE()
(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.
void fill_in_pressure_advection_diffusion_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the residuals and Jacobian for the associated pressure advection diffusion problem...
double * ReInvFr_pt
Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number) ...
virtual void get_body_force_gradient_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, DenseMatrix< double > &d_body_force_dx)
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
ProjectableTaylorHoodElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
ProjectableCrouzeixRaviartElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
double *& re_pt()
Pointer to Reynolds number.
double interpolated_u_nst(const unsigned &t, const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s at time level t (t=0: present; t>0: histor...
virtual double get_source_nst(const double &time, const unsigned &ipt, const Vector< double > &x)
Calculate the source fct at given time and Eulerian position.
double u_nst(const unsigned &n, const unsigned &i) const
Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_ns...
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
unsigned P_nst_internal_index
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void pin(const unsigned &i)
Pin the i-th stored variable.
QCrouzeixRaviartElement()
Constructor, there are DIM+1 internal values (for the pressure)
virtual void fill_in_generic_residual_contribution_fp_press_adv_diff_robin_bc(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)=0
This function returns the residuals for the traction function. flag=1 (or 0): do (or don't) compute t...
void full_output(std::ostream &outfile, const unsigned &nplot)
Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format...
double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s...
virtual void compute_norm(double &norm)
Compute norm of solution – broken virtual can be overloaded by element writer to implement whatever ...
const double & re_invfr() const
Global inverse Froude number.
NavierStokesSourceFctPt Source_fct_pt
Pointer to volumetric source function.
int p_local_eqn(const unsigned &n) const
Return the local equation numbers for the pressure values.
virtual ~FpPressureAdvDiffRobinBCElementBase()
Empty virtual destructor.
Vector< double > *& g_pt()
Pointer to Vector of gravitational components.
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
double *& re_st_pt()
Pointer to product of Reynolds and Strouhal number (=Womersley number)
NavierStokesSourceFctPt source_fct_pt() const
Access function for the source-function pointer. Const version.
bool ALE_is_disabled
Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed...
virtual int p_nodal_index_nst() const
Set the value at which the pressure is stored in the nodes.
void get_load(const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
This implements a pure virtual function defined in the FSIFluidElement class. The function computes t...
NavierStokesEquations()
Constructor: NULL the body force and source function and make sure the ALE terms are included by defa...
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
void output(FILE *file_pt, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
int Pinned_fp_pressure_eqn
Global eqn number of pressure dof that's pinned in pressure advection diffusion problem (defaults to ...
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
void output(FILE *file_pt)
C-style output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points...
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
virtual ~TemplateFreeNavierStokesEquationsBase()
Virtual destructor (empty)
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Convert derivative w.r.t.local coordinates to derivatives w.r.t the coordinates used to assemble the ...
virtual unsigned u_index_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component.
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values. (Note: count includes current value!)
unsigned nfields_for_projection()
Number of fields to be projected: dim+1, corresponding to velocity components and pressure...
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
double *& viscosity_ratio_pt()
Pointer to Viscosity Ratio.
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names in specific elements.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const
Create a list of pairs for the unknowns that this element is "in charge of" – ignore any unknowns as...
void delete_pressure_advection_diffusion_robin_elements()
Delete the FaceElements that apply the Robin boundary condition to the pressure advection diffusion p...
void interpolated_u_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
void point_output_data(const Vector< double > &s, Vector< double > &data)
Output solution in data vector at local cordinates s: x,y [,z], u,v,[w], p.
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
~FpPressureAdvDiffRobinBCElement()
Empty destructor.
double dshape_and_dtest_eulerian_at_knot_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at ipt-th integation point...
FpPressureAdvDiffRobinBCElementBase()
Constructor.
double dpshape_and_dptest_eulerian_nst(const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
Pressure shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
void disable_ALE()
Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
int & pinned_fp_pressure_eqn()
Global eqn number of pressure dof that's pinned in pressure adv diff problem.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
double *& re_invfr_pt()
Pointer to global inverse Froude number.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
double dshape_and_dtest_eulerian_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
Vector< double > * G_pt
Pointer to global gravity Vector.
A class that represents a collection of data; each Data object may contain many different individual ...
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
Data *const & variable_position_pt() const
Pointer to variable_position data (const version)
double p_nst(const unsigned &t, const unsigned &n_p) const
Access function for the pressure values at local pressure node n_p (const version) ...
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
unsigned n_u_nst() const
Return the number of velocity components Used in FluidInterfaceElements.
double *& density_ratio_pt()
Pointer to Density ratio.
void fill_in_contribution_to_dresiduals_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam)
Compute the element's residual Vector.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specif...
double Default_Physical_Constant_Value
Default value for physical constants.
unsigned ndof_types() const
Returns the number of "DOF types" that degrees of freedom in this element are sub-divided into: Veloc...
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
unsigned ntstorage() const
Return total number of doubles stored per value to record time history of each value (one for steady ...
Crouzeix Raviart upgraded to become projectable.
void output(std::ostream &outfile, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Reimplements broken virtual function in base class...
void output(std::ostream &outfile)
Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned ninternal_data() const
Return the number of internal data objects.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by h...
void output(std::ostream &outfile, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
NavierStokesBodyForceFctPt & body_force_fct_pt()
Access function for the body-force pointer.
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
double * Viscosity_Ratio_pt
Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds numb...
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
NavierStokesPressureAdvDiffSourceFctPt Press_adv_diff_source_fct_pt
Pointer to source function pressure advection diffusion equation (only to be used during validation) ...
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement...
void output(std::ostream &outfile)
Overload the output function.
const double & viscosity_ratio() const
Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of ...
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
double p_nst(const unsigned &t, const unsigned &i) const
Return the i-th pressure value (Discontinous pressure interpolation – no need to cater for hanging n...
double interpolated_u_nst(const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
NavierStokesPressureAdvDiffSourceFctPt source_fct_for_pressure_adv_diff() const
Access function for the source-function pointer for pressure advection diffusion (used for validation...
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Note: count includes current value!)
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
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 int p_nodal_index_nst() const
Return the index at which the pressure is stored if it is stored at the nodes. If not stored at the n...
double * Density_Ratio_pt
Pointer to the density ratio (relative to the density used in the definition of the Reynolds number) ...
virtual void get_source_gradient_nst(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. Whatever the timestepper has set up for the v...
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Add the element's contribution to its residuals vector, jacobian matrix and mass matrix.
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
static int Pressure_not_stored_at_node
Static "magic" number that indicates that the pressure is not stored at a node.
void fill_in_pressure_advection_diffusion_residuals(Vector< double > &residuals)
Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp precond...
virtual double interpolated_p_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
NavierStokesBodyForceFctPt Body_force_fct_pt
Pointer to body force function.
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
unsigned nnode() const
Return the number of nodes.
Vector< double > local_coordinate_in_bulk(const Vector< double > &s) const
Return vector of local coordinates in bulk element, given the local coordinates in this FaceElement...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
void build_fp_press_adv_diff_robin_bc_element(const unsigned &face_index)
Build FaceElements that apply the Robin boundary condition to the pressure advection diffusion proble...
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
void fix_pressure(const unsigned &p_dof, const double &p_value)
Pin p_dof-th pressure dof and set it to value specified by p_value.
TemplateFreeNavierStokesEquationsBase()
Constructor (empty)
The FSIFluidElement class is a base class for all fluid finite elements that apply a load (traction) ...
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
double p_nst(const unsigned &i) const
Return the i-th pressure value (Discontinous pressure interpolation – no need to cater for hanging n...
void fix_pressure(const unsigned &p_dof, const double &p_value)
Pin p_dof-th pressure dof and set it to value specified by p_value.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
std::string to_string(T object, unsigned float_precision=8)
Conversion function that should work for anything with operator<< defined (at least all basic types)...
const double & re() const
Reynolds number.
const Vector< double > & g() const
Vector of gravitational components.
double u_nst(const unsigned &t, const unsigned &n, const unsigned &i) const
Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated va...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates. Default implementation by FD can be overwritten for specific elements. dresidual_dnodal_coordinates(l,i,j) = d res(l) / dX_{ij}.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data...
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
virtual void fill_in_generic_residual_contribution_fp_press_adv_diff_robin_bc(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
This function returns the residuals for the traction function. flag=1 (or 0): do (or don't) compute t...