oomph::SpaceTimeNavierStokesEquations< DIM > Class Template Referenceabstract

#include <discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h>

+ Inheritance diagram for oomph::SpaceTimeNavierStokesEquations< DIM >:

Public Types

typedef void(* NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)
 
typedef double(* NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)
 Function pointer to source function fct(t,x) (x is a Vector!) More...
 
typedef double(* NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)
 
typedef void(* NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)
 
typedef double(* NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)
 Function pointer to source function fct(t,x) (x is a Vector!) More...
 
typedef double(* NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)
 
typedef void(* NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)
 
typedef double(* NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)
 Function pointer to source function fct(t,x) (x is a Vector!) More...
 
typedef double(* NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)
 
- Public Types inherited from oomph::FiniteElement
typedef void(* SteadyExactSolutionFctPt) (const Vector< double > &, Vector< double > &)
 
typedef void(* UnsteadyExactSolutionFctPt) (const double &, const Vector< double > &, Vector< double > &)
 

Public Member Functions

 SpaceTimeNavierStokesEquations ()
 
void store_strouhal_as_external_data (Data *strouhal_data_pt)
 Function that tells us whether the period is stored as external data. More...
 
const doublere () const
 Reynolds number. More...
 
double *& re_pt ()
 Pointer to Reynolds number. More...
 
bool is_strouhal_stored_as_external_data () const
 Are we storing the Strouhal number as external data? More...
 
const doublest () const
 Strouhal parameter (const. version) More...
 
doublest_pt () const
 Pointer to Strouhal parameter (const. version) More...
 
double *& st_pt ()
 Pointer to Strouhal number (can only assign to private member data) More...
 
double re_st () const
 Product of Reynolds and Strouhal number (=Womersley number) More...
 
const doubleviscosity_ratio () const
 
double *& viscosity_ratio_pt ()
 Pointer to Viscosity Ratio. More...
 
const doubledensity_ratio () const
 
double *& density_ratio_pt ()
 Pointer to Density ratio. More...
 
const doublere_invfr () const
 Global inverse Froude number. More...
 
double *& re_invfr_pt ()
 Pointer to global inverse Froude number. More...
 
const Vector< double > & g () const
 Vector of gravitational components. More...
 
Vector< double > *& g_pt ()
 Pointer to Vector of gravitational components. More...
 
NavierStokesBodyForceFctPtbody_force_fct_pt ()
 Access function for the body-force pointer. More...
 
NavierStokesBodyForceFctPt body_force_fct_pt () const
 Access function for the body-force pointer. Const version. More...
 
NavierStokesSourceFctPtsource_fct_pt ()
 Access function for the source-function pointer. More...
 
NavierStokesSourceFctPt source_fct_pt () const
 Access function for the source-function pointer. Const version. More...
 
NavierStokesPressureAdvDiffSourceFctPtsource_fct_for_pressure_adv_diff ()
 
NavierStokesPressureAdvDiffSourceFctPt source_fct_for_pressure_adv_diff () const
 
intpinned_fp_pressure_eqn ()
 
virtual unsigned npres_nst () const =0
 Function to return number of pressure degrees of freedom. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi) const =0
 Compute the pressure shape functions at local coordinate s. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi, Shape &test) const =0
 
double u_nst (const unsigned &n, const unsigned &i) const
 
double u_nst (const unsigned &t, const unsigned &n, const unsigned &i) const
 
virtual unsigned u_index_nst (const unsigned &i) const
 
unsigned n_u_nst () const
 
double get_du_dt (const unsigned &n, const unsigned &i) const
 
double du_dt_nst (const unsigned &n, const unsigned &i) const
 
double interpolated_du_dt_nst (const Vector< double > &s, const unsigned &i) const
 
void disable_ALE ()
 
void enable_ALE ()
 
virtual double p_nst (const unsigned &n_p) const =0
 
virtual double p_nst (const unsigned &t, const unsigned &n_p) const =0
 Pressure at local pressure "node" n_p at time level t. More...
 
virtual void fix_pressure (const unsigned &p_dof, const double &p_value)=0
 Pin p_dof-th pressure dof and set it to value specified by p_value. More...
 
virtual int p_nodal_index_nst () const
 
double pressure_integral () const
 Integral of pressure over element. More...
 
double dissipation () const
 Return integral of dissipation over element. More...
 
double dissipation (const Vector< double > &s) const
 Return dissipation at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
double kin_energy () const
 Get integral of kinetic energy over element. More...
 
double d_kin_energy_dt () const
 Get integral of time derivative of kinetic energy over element. More...
 
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) More...
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction_p, Vector< double > &traction_visc_n, Vector< double > &traction_visc_t)
 
void get_load (const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
 
void get_pressure_and_velocity_mass_matrix_diagonal (Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
 
unsigned nscalar_paraview () const
 
void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
std::string scalar_name_paraview (const unsigned &i) const
 
void output (std::ostream &outfile)
 
void output (std::ostream &outfile, const unsigned &n_plot)
 
void output (FILE *file_pt)
 
void output (FILE *file_pt, const unsigned &n_plot)
 
void full_output (std::ostream &outfile)
 
void full_output (std::ostream &outfile, const unsigned &n_plot)
 
void output_veloc (std::ostream &outfile, const unsigned &nplot, const unsigned &t)
 
void output_vorticity (std::ostream &outfile, const unsigned &nplot)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 
void compute_norm (Vector< double > &norm)
 Compute the vector norm of the FEM solution. More...
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Compute the element's residual Vector. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
void fill_in_pressure_advection_diffusion_residuals (Vector< double > &residuals)
 
void fill_in_pressure_advection_diffusion_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void pin_all_non_pressure_dofs (std::map< Data *, std::vector< int >> &eqn_number_backup)
 Pin all non-pressure dofs and backup eqn numbers. More...
 
virtual void build_fp_press_adv_diff_robin_bc_element (const unsigned &face_index)=0
 
void output_pressure_advection_diffusion_robin_elements (std::ostream &outfile)
 
void delete_pressure_advection_diffusion_robin_elements ()
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
void interpolated_u_nst (const Vector< double > &s, Vector< double > &velocity) const
 Compute vector of FE interpolated velocity u at local coordinate s. More...
 
double interpolated_u_nst (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated velocity u[i] at local coordinate s. More...
 
double interpolated_u_nst (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void dinterpolated_u_nst_ddata (const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
 
virtual double interpolated_p_nst (const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s. More...
 
double interpolated_p_nst (const unsigned &t, const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s at time level t. More...
 
void point_output_data (const Vector< double > &s, Vector< double > &data)
 
 SpaceTimeNavierStokesEquations ()
 
void store_strouhal_as_external_data (Data *strouhal_data_pt)
 Function that tells us whether the period is stored as external data. More...
 
const doublere () const
 Reynolds number. More...
 
double *& re_pt ()
 Pointer to Reynolds number. More...
 
bool is_strouhal_stored_as_external_data () const
 Are we storing the Strouhal number as external data? More...
 
const doublest () const
 Strouhal parameter (const. version) More...
 
doublest_pt () const
 Pointer to Strouhal parameter (const. version) More...
 
double *& st_pt ()
 Pointer to Strouhal number (can only assign to private member data) More...
 
double re_st () const
 Product of Reynolds and Strouhal number (=Womersley number) More...
 
const doubleviscosity_ratio () const
 
double *& viscosity_ratio_pt ()
 Pointer to Viscosity Ratio. More...
 
const doubledensity_ratio () const
 
double *& density_ratio_pt ()
 Pointer to Density ratio. More...
 
const doublere_invfr () const
 Global inverse Froude number. More...
 
double *& re_invfr_pt ()
 Pointer to global inverse Froude number. More...
 
const Vector< double > & g () const
 Vector of gravitational components. More...
 
Vector< double > *& g_pt ()
 Pointer to Vector of gravitational components. More...
 
NavierStokesBodyForceFctPtbody_force_fct_pt ()
 Access function for the body-force pointer. More...
 
NavierStokesBodyForceFctPt body_force_fct_pt () const
 Access function for the body-force pointer. Const version. More...
 
NavierStokesSourceFctPtsource_fct_pt ()
 Access function for the source-function pointer. More...
 
NavierStokesSourceFctPt source_fct_pt () const
 Access function for the source-function pointer. Const version. More...
 
NavierStokesPressureAdvDiffSourceFctPtsource_fct_for_pressure_adv_diff ()
 
NavierStokesPressureAdvDiffSourceFctPt source_fct_for_pressure_adv_diff () const
 
intpinned_fp_pressure_eqn ()
 
virtual unsigned npres_nst () const =0
 Function to return number of pressure degrees of freedom. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi) const =0
 Compute the pressure shape functions at local coordinate s. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi, Shape &test) const =0
 
double u_nst (const unsigned &n, const unsigned &i) const
 
double u_nst (const unsigned &t, const unsigned &n, const unsigned &i) const
 
virtual unsigned u_index_nst (const unsigned &i) const
 
unsigned n_u_nst () const
 
double get_du_dt (const unsigned &n, const unsigned &i) const
 
double du_dt_nst (const unsigned &n, const unsigned &i) const
 
double interpolated_du_dt_nst (const Vector< double > &s, const unsigned &i) const
 
void disable_ALE ()
 
void enable_ALE ()
 
virtual double p_nst (const unsigned &n_p) const =0
 
virtual double p_nst (const unsigned &t, const unsigned &n_p) const =0
 Pressure at local pressure "node" n_p at time level t. More...
 
virtual void fix_pressure (const unsigned &p_dof, const double &p_value)=0
 Pin p_dof-th pressure dof and set it to value specified by p_value. More...
 
virtual int p_nodal_index_nst () const
 
double pressure_integral () const
 Integral of pressure over element. More...
 
double dissipation () const
 Return integral of dissipation over element. More...
 
double dissipation (const Vector< double > &s) const
 Return dissipation at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
double kin_energy () const
 Get integral of kinetic energy over element. More...
 
double d_kin_energy_dt () const
 Get integral of time derivative of kinetic energy over element. More...
 
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) More...
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction_p, Vector< double > &traction_visc_n, Vector< double > &traction_visc_t)
 
void get_load (const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
 
void get_pressure_and_velocity_mass_matrix_diagonal (Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
 
unsigned nscalar_paraview () const
 
void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
std::string scalar_name_paraview (const unsigned &i) const
 
void output (std::ostream &outfile)
 
void output (std::ostream &outfile, const unsigned &n_plot)
 
void output (FILE *file_pt)
 
void output (FILE *file_pt, const unsigned &n_plot)
 
void full_output (std::ostream &outfile)
 
void full_output (std::ostream &outfile, const unsigned &n_plot)
 
void output_veloc (std::ostream &outfile, const unsigned &nplot, const unsigned &t)
 
void output_vorticity (std::ostream &outfile, const unsigned &nplot)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 
void compute_norm (Vector< double > &norm)
 Compute the vector norm of the FEM solution. More...
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Compute the element's residual Vector. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
void fill_in_pressure_advection_diffusion_residuals (Vector< double > &residuals)
 
void fill_in_pressure_advection_diffusion_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void pin_all_non_pressure_dofs (std::map< Data *, std::vector< int >> &eqn_number_backup)
 Pin all non-pressure dofs and backup eqn numbers. More...
 
virtual void build_fp_press_adv_diff_robin_bc_element (const unsigned &face_index)=0
 
void output_pressure_advection_diffusion_robin_elements (std::ostream &outfile)
 
void delete_pressure_advection_diffusion_robin_elements ()
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
void interpolated_u_nst (const Vector< double > &s, Vector< double > &velocity) const
 Compute vector of FE interpolated velocity u at local coordinate s. More...
 
double interpolated_u_nst (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated velocity u[i] at local coordinate s. More...
 
double interpolated_u_nst (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void dinterpolated_u_nst_ddata (const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
 
virtual double interpolated_p_nst (const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s. More...
 
double interpolated_p_nst (const unsigned &t, const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s at time level t. More...
 
void point_output_data (const Vector< double > &s, Vector< double > &data)
 
 SpaceTimeNavierStokesEquations ()
 
void store_strouhal_as_external_data (Data *strouhal_data_pt)
 Function that tells us whether the period is stored as external data. More...
 
bool is_reynolds_strouhal_stored_as_external_data () const
 Are we storing the Strouhal number as external data? More...
 
const doublere () const
 Reynolds number. More...
 
double *& re_pt ()
 Pointer to Reynolds number. More...
 
const doublere_st () const
 ReSt parameter (const. version) More...
 
doublere_st_pt () const
 Pointer to Strouhal parameter (const. version) More...
 
double *& re_st_pt ()
 Pointer to ReSt number (can only assign to private member data) More...
 
const doubleviscosity_ratio () const
 
double *& viscosity_ratio_pt ()
 Pointer to Viscosity Ratio. More...
 
const doubledensity_ratio () const
 
double *& density_ratio_pt ()
 Pointer to Density ratio. More...
 
const doublere_invfr () const
 Global inverse Froude number. More...
 
double *& re_invfr_pt ()
 Pointer to global inverse Froude number. More...
 
const Vector< double > & g () const
 Vector of gravitational components. More...
 
Vector< double > *& g_pt ()
 Pointer to Vector of gravitational components. More...
 
NavierStokesBodyForceFctPtbody_force_fct_pt ()
 Access function for the body-force pointer. More...
 
NavierStokesBodyForceFctPt body_force_fct_pt () const
 Access function for the body-force pointer. Const version. More...
 
NavierStokesSourceFctPtsource_fct_pt ()
 Access function for the source-function pointer. More...
 
NavierStokesSourceFctPt source_fct_pt () const
 Access function for the source-function pointer. Const version. More...
 
NavierStokesPressureAdvDiffSourceFctPtsource_fct_for_pressure_adv_diff ()
 
NavierStokesPressureAdvDiffSourceFctPt source_fct_for_pressure_adv_diff () const
 
intpinned_fp_pressure_eqn ()
 
virtual unsigned npres_nst () const =0
 Function to return number of pressure degrees of freedom. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi) const =0
 Compute the pressure shape functions at local coordinate s. More...
 
virtual void pshape_nst (const Vector< double > &s, Shape &psi, Shape &test) const =0
 
double u_nst (const unsigned &n, const unsigned &i) const
 
double u_nst (const unsigned &t, const unsigned &n, const unsigned &i) const
 
virtual unsigned u_index_nst (const unsigned &i) const
 
unsigned n_u_nst () const
 
double get_du_dt (const unsigned &n, const unsigned &i) const
 
double du_dt_nst (const unsigned &n, const unsigned &i) const
 
double interpolated_du_dt_nst (const Vector< double > &s, const unsigned &i) const
 
void disable_ALE ()
 
void enable_ALE ()
 
virtual double p_nst (const unsigned &n_p) const =0
 
virtual double p_nst (const unsigned &t, const unsigned &n_p) const =0
 Pressure at local pressure "node" n_p at time level t. More...
 
virtual void fix_pressure (const unsigned &p_dof, const double &p_value)=0
 Pin p_dof-th pressure dof and set it to value specified by p_value. More...
 
virtual int p_nodal_index_nst () const
 
double pressure_integral () const
 Integral of pressure over element. More...
 
double dissipation () const
 Return integral of dissipation over element. More...
 
double dissipation (const Vector< double > &s) const
 Return dissipation at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 Compute the vorticity vector at local coordinate s. More...
 
double kin_energy () const
 Get integral of kinetic energy over element. More...
 
double d_kin_energy_dt () const
 Get integral of time derivative of kinetic energy over element. More...
 
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) More...
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
 
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction_p, Vector< double > &traction_visc_n, Vector< double > &traction_visc_t)
 
void get_load (const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
 
void get_pressure_and_velocity_mass_matrix_diagonal (Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
 
unsigned nscalar_paraview () const
 
void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
std::string scalar_name_paraview (const unsigned &i) const
 
void output (std::ostream &outfile)
 
void output (std::ostream &outfile, const unsigned &n_plot)
 
void output (FILE *file_pt)
 
void output (FILE *file_pt, const unsigned &n_plot)
 
void full_output (std::ostream &outfile)
 
void full_output (std::ostream &outfile, const unsigned &n_plot)
 
void output_veloc (std::ostream &outfile, const unsigned &nplot, const unsigned &t)
 
void output_vorticity (std::ostream &outfile, const unsigned &nplot)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_norm (Vector< double > &norm)
 Compute the vector norm of the FEM solution. More...
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Compute the element's residual Vector. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
void fill_in_pressure_advection_diffusion_residuals (Vector< double > &residuals)
 
void fill_in_pressure_advection_diffusion_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void pin_all_non_pressure_dofs (std::map< Data *, std::vector< int >> &eqn_number_backup)
 Pin all non-pressure dofs and backup eqn numbers. More...
 
virtual void build_fp_press_adv_diff_robin_bc_element (const unsigned &face_index)=0
 
void output_pressure_advection_diffusion_robin_elements (std::ostream &outfile)
 
void delete_pressure_advection_diffusion_robin_elements ()
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
void interpolated_u_nst (const Vector< double > &s, Vector< double > &velocity) const
 Compute vector of FE interpolated velocity u at local coordinate s. More...
 
double interpolated_u_nst (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated velocity u[i] at local coordinate s. More...
 
double interpolated_u_nst (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void dinterpolated_u_nst_ddata (const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
 
virtual double interpolated_p_nst (const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s. More...
 
double interpolated_p_nst (const unsigned &t, const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s at time level t. More...
 
void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 
void get_vorticity (const Vector< double > &s, double &vorticity) const
 
- Public Member Functions inherited from oomph::FSIFluidElement
 FSIFluidElement ()
 Constructor. More...
 
 FSIFluidElement (const FSIFluidElement &)=delete
 Broken copy constructor. More...
 
void operator= (const FSIFluidElement &)=delete
 Broken assignment operator. More...
 
virtual void identify_load_data (std::set< std::pair< Data *, unsigned >> &paired_load_data)=0
 
virtual void identify_pressure_data (std::set< std::pair< Data *, unsigned >> &paired_pressure_data)=0
 
- Public Member Functions inherited from oomph::FiniteElement
void set_dimension (const unsigned &dim)
 
void set_nodal_dimension (const unsigned &nodal_dim)
 
void set_nnodal_position_type (const unsigned &nposition_type)
 Set the number of types required to interpolate the coordinate. More...
 
void set_n_node (const unsigned &n)
 
int nodal_local_eqn (const unsigned &n, const unsigned &i) const
 
double dJ_eulerian_at_knot (const unsigned &ipt, Shape &psi, DenseMatrix< double > &djacobian_dX) const
 
 FiniteElement ()
 Constructor. More...
 
virtual ~FiniteElement ()
 
 FiniteElement (const FiniteElement &)=delete
 Broken copy constructor. More...
 
virtual bool local_coord_is_valid (const Vector< double > &s)
 Broken assignment operator. More...
 
virtual void move_local_coord_back_into_element (Vector< double > &s) const
 
void get_centre_of_gravity_and_max_radius_in_terms_of_zeta (Vector< double > &cog, double &max_radius) const
 
virtual void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
virtual void local_fraction_of_node (const unsigned &j, Vector< double > &s_fraction)
 
virtual double local_one_d_fraction_of_node (const unsigned &n1d, const unsigned &i)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 Set the spatial integration scheme. More...
 
Integral *const & integral_pt () const
 Return the pointer to the integration scheme (const version) More...
 
virtual void shape (const Vector< double > &s, Shape &psi) const =0
 
virtual void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual double J_eulerian (const Vector< double > &s) const
 
virtual double J_eulerian_at_knot (const unsigned &ipt) const
 
void check_J_eulerian_at_knots (bool &passed) const
 
void check_jacobian (const double &jacobian) const
 
double dshape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsi, DenseMatrix< double > &djacobian_dX, RankFourTensor< double > &d_dpsidx_dX) const
 
double d2shape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
Node *& node_pt (const unsigned &n)
 Return a pointer to the local node n. More...
 
Node *const & node_pt (const unsigned &n) const
 Return a pointer to the local node n (const version) More...
 
unsigned nnode () const
 Return the number of nodes. More...
 
virtual unsigned nnode_1d () const
 
double raw_nodal_position (const unsigned &n, const unsigned &i) const
 
double raw_nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position (const unsigned &n, const unsigned &i) const
 
double nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double dnodal_position_dt (const unsigned &n, const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt at local node n. More...
 
double dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual unsigned required_nvalue (const unsigned &n) const
 
unsigned nnodal_position_type () const
 
bool has_hanging_nodes () const
 
unsigned nodal_dimension () const
 Return the required Eulerian dimension of the nodes in this element. More...
 
virtual unsigned nvertex_node () const
 
virtual Nodevertex_node_pt (const unsigned &j) const
 
virtual Nodeconstruct_node (const unsigned &n)
 
virtual Nodeconstruct_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
virtual Nodeconstruct_boundary_node (const unsigned &n)
 
virtual Nodeconstruct_boundary_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
int get_node_number (Node *const &node_pt) const
 
virtual Nodeget_node_at_local_coordinate (const Vector< double > &s) const
 
double raw_nodal_value (const unsigned &n, const unsigned &i) const
 
double raw_nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
unsigned dim () const
 
virtual ElementGeometry::ElementGeometry element_geometry () const
 Return the geometry type of the element (either Q or T usually). More...
 
virtual double interpolated_x (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated coordinate x[i] at local coordinate s. More...
 
virtual double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 Return FE interpolated position x[] at local coordinate s as Vector. More...
 
virtual void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
virtual double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
virtual void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
unsigned ngeom_data () const
 
Datageom_data_pt (const unsigned &j)
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 
void dposition_dt (const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
 
virtual double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 
void locate_zeta (const Vector< double > &zeta, GeomObject *&geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void node_update ()
 
virtual void identify_field_data_for_interactions (std::set< std::pair< Data *, unsigned >> &paired_field_data)
 
virtual void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
virtual double s_min () const
 Min value of local coordinate. More...
 
virtual double s_max () const
 Max. value of local coordinate. More...
 
double size () const
 
virtual double compute_physical_size () const
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
 
virtual std::string tecplot_zone_string (const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (std::ostream &outfile, const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (FILE *file_pt, const unsigned &nplot) const
 
virtual unsigned nplot_points (const unsigned &nplot) const
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_abs_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
 
void integrate_fct (FiniteElement::SteadyExactSolutionFctPt integrand_fct_pt, Vector< double > &integral)
 Integrate Vector-valued function over element. More...
 
void integrate_fct (FiniteElement::UnsteadyExactSolutionFctPt integrand_fct_pt, const double &time, Vector< double > &integral)
 Integrate Vector-valued time-dep function over element. More...
 
virtual void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
virtual unsigned self_test ()
 
virtual unsigned get_bulk_node_number (const int &face_index, const unsigned &i) const
 
virtual int face_outer_unit_normal_sign (const int &face_index) const
 Get the sign of the outer unit normal on the face given by face_index. More...
 
virtual unsigned nnode_on_face () const
 
void face_node_number_error_check (const unsigned &i) const
 Range check for face node numbers. More...
 
virtual CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt (const int &face_index) const
 
virtual BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt (const int &face_index) const
 
- Public Member Functions inherited from oomph::GeneralisedElement
 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual void compute_norm (double &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 
- Public Member Functions inherited from oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase
 TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Constructor (empty) More...
 
virtual ~TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Virtual destructor (empty) More...
 
virtual int p_local_eqn (const unsigned &n) const =0
 
 TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Constructor (empty) More...
 
virtual ~TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Virtual destructor (empty) More...
 
virtual int p_local_eqn (const unsigned &n) const =0
 
 TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Constructor (empty) More...
 
virtual ~TemplateFreeSpaceTimeNavierStokesEquationsBase ()
 Virtual destructor (empty) More...
 
virtual int p_local_eqn (const unsigned &n) const =0
 
- Public Member Functions inherited from oomph::NavierStokesElementWithDiagonalMassMatrices
 NavierStokesElementWithDiagonalMassMatrices ()
 Empty constructor. More...
 
virtual ~NavierStokesElementWithDiagonalMassMatrices ()
 Virtual destructor. More...
 
 NavierStokesElementWithDiagonalMassMatrices (const NavierStokesElementWithDiagonalMassMatrices &)=delete
 Broken copy constructor. More...
 
void operator= (const NavierStokesElementWithDiagonalMassMatrices &)=delete
 Broken assignment operator. More...
 

Static Public Attributes

static Vector< doubleGamma
 Navier-Stokes equations static data. More...
 
- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 

Protected Member Functions

virtual double dshape_and_dtest_eulerian_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, RankFourTensor< double > &d_dpsidx_dX, Shape &test, DShape &dtestdx, RankFourTensor< double > &d_dtestdx_dX, DenseMatrix< double > &djacobian_dX) const =0
 
virtual double dpshape_eulerian (const Vector< double > &s, Shape &ppsi, DShape &dppsidx) const =0
 
virtual double dptest_eulerian (const Vector< double > &s, Shape &ptest, DShape &dptestdx) const =0
 
virtual double dpshape_and_dptest_eulerian_nst (const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const =0
 
virtual void get_body_force_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
 
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)
 
virtual double get_source_nst (const double &time, const unsigned &ipt, const Vector< double > &x)
 Calculate the source fct at a given time and Eulerian position. More...
 
virtual void get_source_gradient_nst (const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
 
virtual void fill_in_generic_residual_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
 
virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
virtual void fill_in_generic_dresidual_contribution_nst (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, const unsigned &flag)
 
void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual double dshape_and_dtest_eulerian_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, RankFourTensor< double > &d_dpsidx_dX, Shape &test, DShape &dtestdx, RankFourTensor< double > &d_dtestdx_dX, DenseMatrix< double > &djacobian_dX) const =0
 
virtual double dpshape_eulerian (const Vector< double > &s, Shape &ppsi, DShape &dppsidx) const =0
 
virtual double dptest_eulerian (const Vector< double > &s, Shape &ptest, DShape &dptestdx) const =0
 
virtual double dpshape_and_dptest_eulerian_nst (const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const =0
 
virtual void get_body_force_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
 
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)
 
virtual double get_source_nst (const double &time, const unsigned &ipt, const Vector< double > &x)
 Calculate the source fct at a given time and Eulerian position. More...
 
virtual void get_source_gradient_nst (const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
 
virtual void fill_in_generic_residual_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
 
virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
virtual void fill_in_generic_dresidual_contribution_nst (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, const unsigned &flag)
 
void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual double dshape_and_dtest_eulerian_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, RankFourTensor< double > &d_dpsidx_dX, Shape &test, DShape &dtestdx, RankFourTensor< double > &d_dtestdx_dX, DenseMatrix< double > &djacobian_dX) const =0
 
virtual double dpshape_and_dptest_eulerian_nst (const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const =0
 
virtual void get_body_force_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
 
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)
 
virtual double get_source_nst (const double &time, const unsigned &ipt, const Vector< double > &x)
 Calculate the source fct at a given time and Eulerian position. More...
 
virtual void get_source_gradient_nst (const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
 
virtual void fill_in_generic_residual_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
 
virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
virtual void fill_in_generic_dresidual_contribution_nst (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, const unsigned &flag)
 
void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Protected Attributes

doubleViscosity_Ratio_pt
 
doubleDensity_Ratio_pt
 
doubleRe_pt
 Pointer to global Reynolds number. More...
 
doubleSt_pt
 Pointer to global Reynolds number x Strouhal number (=Womersley) More...
 
bool Strouhal_is_stored_as_external_data
 
doubleReInvFr_pt
 
Vector< double > * G_pt
 Pointer to global gravity Vector. More...
 
NavierStokesBodyForceFctPt Body_force_fct_pt
 Pointer to body force function. More...
 
NavierStokesSourceFctPt Source_fct_pt
 Pointer to volumetric source function. More...
 
NavierStokesPressureAdvDiffSourceFctPt Press_adv_diff_source_fct_pt
 
bool ALE_is_disabled
 
Vector< FpPressureAdvDiffRobinBCSpaceTimeElementBase * > Pressure_advection_diffusion_robin_element_pt
 
int Pinned_fp_pressure_eqn
 
doubleReSt_pt
 Pointer to global Reynolds number x Strouhal number (= Womersley) More...
 
bool ReynoldsStrouhal_is_stored_as_external_data
 
- Protected Attributes inherited from oomph::FiniteElement
MacroElementMacro_elem_pt
 Pointer to the element's macro element (NULL by default) More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Static Private Attributes

static int Pressure_not_stored_at_node = -100
 
static double Default_Physical_Constant_Value
 Navier-Stokes equations static data. More...
 
static double Default_Physical_Ratio_Value
 Navier-Stokes equations static data. More...
 
static Vector< doubleDefault_Gravity_vector
 Static default value for the gravity vector. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

template<unsigned DIM>
class oomph::SpaceTimeNavierStokesEquations< DIM >

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// A class for elements that solve the Cartesian Navier-Stokes equations, templated by the dimension DIM. This contains the generic maths – any concrete implementation must be derived from this.

We're solving:

\( { Re \left( St \frac{\partial u_i}{\partial t}+ (u_j-u_j^{M}) \frac{\partial u_i}{\partial x_j} \right)= -\frac{\partial p}{\partial x_i} -R_\rho B_i(x_j) - \frac{Re}{Fr} G_i + \frac{\partial }{\partial x_j} \left[ R_\mu \left( \frac{\partial u_i}{\partial x_j}+ \frac{\partial u_j}{\partial x_i} \right) \right] } \)

and

\( { \frac{\partial u_i}{\partial x_i}=Q } \)

We also provide all functions required to use this element in FSI problems, by deriving it from the FSIFluidElement base class.


SPACE-TIME ELEMENTS:

The space-time extension is written ONLY for the 2D Navier-Stokes equations. The result is a 3D problem (x,y,t) to be solved on a 3D mesh. The template parameter DIM now corresponds to the dimension of the space-time problem (i.e. DIM=3 for the 2D flow).

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// A class for elements that solve the Cartesian Navier-Stokes equations, templated by the dimension DIM. This contains the generic maths – any concrete implementation must be derived from this.

We're solving:

\( { Re \left( St \frac{\partial u_i}{\partial t}+ (u_j-u_j^{M}) \frac{\partial u_i}{\partial x_j} \right)= -\frac{\partial p}{\partial x_i} -R_\rho B_i(x_j) - \frac{Re}{Fr} G_i + \frac{\partial }{\partial x_j} \left[ R_\mu \left( \frac{\partial u_i}{\partial x_j}+ \frac{\partial u_j}{\partial x_i} \right) \right] } \)

and

\( { \frac{\partial u_i}{\partial x_i}=Q } \)

We also provide all functions required to use this element in FSI problems, by deriving it from the FSIFluidElement base class.


SPACE-TIME ELEMENTS:

The space-time extension is written ONLY for the 2D Navier-Stokes equations. The result is a 3D problem (x,y,t) to be solved on a 3D mesh. The template parameter DIM now corresponds to the dimension of the space-time problem (i.e. DIM=3 for the 2D flow).

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// A class for elements that solve the Cartesian Navier-Stokes equations, templated by the dimension DIM. This contains the generic maths – any concrete implementation must be derived from this.

We're solving:

\( { Re \left( St \frac{\partial u_i}{\partial t}+ (u_j-u_j^{M}) \frac{\partial u_i}{\partial x_j} \right)= -\frac{\partial p}{\partial x_i} -R_\rho B_i(x_j) - \frac{Re}{Fr} G_i + \frac{\partial }{\partial x_j} \left[ R_\mu \left( \frac{\partial u_i}{\partial x_j}+ \frac{\partial u_j}{\partial x_i} \right) \right] } \)

and

\( { \frac{\partial u_i}{\partial x_i}=Q } \)

We also provide all functions required to use this element in FSI problems, by deriving it from the FSIFluidElement base class.


SPACE-TIME ELEMENTS:

The space-time extension is written ONLY for the 2D Navier-Stokes equations. The result is a 3D problem (x,y,t) to be solved on a 3D mesh. The template parameter DIM now corresponds to the dimension of the space-time problem (i.e. DIM=3 for the 2D flow).

Member Typedef Documentation

◆ NavierStokesBodyForceFctPt [1/3]

template<unsigned DIM>
typedef void(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)

Function pointer to body force function fct(t,x,f(x)) x is a Vector!

◆ NavierStokesBodyForceFctPt [2/3]

template<unsigned DIM>
typedef void(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)

Function pointer to body force function fct(t,x,f(x)) x is a Vector!

◆ NavierStokesBodyForceFctPt [3/3]

template<unsigned DIM>
typedef void(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)

Function pointer to body force function fct(t,x,f(x)) x is a Vector!

◆ NavierStokesPressureAdvDiffSourceFctPt [1/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)

Function pointer to source function fct(x) for the pressure advection diffusion equation (only used during validation!). x is a Vector!

◆ NavierStokesPressureAdvDiffSourceFctPt [2/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)

Function pointer to source function fct(x) for the pressure advection diffusion equation (only used during validation!). x is a Vector!

◆ NavierStokesPressureAdvDiffSourceFctPt [3/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesPressureAdvDiffSourceFctPt) (const Vector< double > &x)

Function pointer to source function fct(x) for the pressure advection diffusion equation (only used during validation!). x is a Vector!

◆ NavierStokesSourceFctPt [1/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)

Function pointer to source function fct(t,x) (x is a Vector!)

◆ NavierStokesSourceFctPt [2/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)

Function pointer to source function fct(t,x) (x is a Vector!)

◆ NavierStokesSourceFctPt [3/3]

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesEquations< DIM >::NavierStokesSourceFctPt) (const double &time, const Vector< double > &x)

Function pointer to source function fct(t,x) (x is a Vector!)

Constructor & Destructor Documentation

◆ SpaceTimeNavierStokesEquations() [1/3]

Constructor: NULL the body force and source function and make sure the ALE terms are included by default.

796  : Body_force_fct_pt(0),
797  Source_fct_pt(0),
799  ALE_is_disabled(false),
801  {
802  // Set all the Physical parameter pointers:
803 
804  // Set the Reynolds number to the value zero
806 
807  // Set the Strouhal number to the value zero
809 
810  // The Strouhal number (which is a proxy for the period here) is not
811  // stored as external data
813 
814  // Set the Reynolds / Froude value to zero
816 
817  // Set the gravity vector to be the zero vector
819 
820  // Set the Physical ratios:
821 
822  // Set the viscosity ratio to the value one
824 
825  // Set the density ratio to the value one
827  }
double * ReInvFr_pt
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:525
int Pinned_fp_pressure_eqn
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:552
NavierStokesBodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:531
NavierStokesPressureAdvDiffSourceFctPt Press_adv_diff_source_fct_pt
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:538
double * St_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:517
double * Density_Ratio_pt
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:509
Vector< double > * G_pt
Pointer to global gravity Vector.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:528
static double Default_Physical_Constant_Value
Navier-Stokes equations static data.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:491
double * Viscosity_Ratio_pt
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:505
double * Re_pt
Pointer to global Reynolds number.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:514
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:498
NavierStokesSourceFctPt Source_fct_pt
Pointer to volumetric source function.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:534
static double Default_Physical_Ratio_Value
Navier-Stokes equations static data.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:495
bool Strouhal_is_stored_as_external_data
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:521
bool ALE_is_disabled
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:543

References oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Gravity_vector, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Constant_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Ratio_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ SpaceTimeNavierStokesEquations() [2/3]

Constructor: NULL the body force and source function and make sure the ALE terms are included by default.

796  : Body_force_fct_pt(0),
797  Source_fct_pt(0),
799  ALE_is_disabled(false),
801  {
802  // Set all the Physical parameter pointers:
803 
804  // Set the Reynolds number to the value zero
806 
807  // Set the Strouhal number to the value zero
809 
810  // The Strouhal number (which is a proxy for the period here) is not
811  // stored as external data
813 
814  // Set the Reynolds / Froude value to zero
816 
817  // Set the gravity vector to be the zero vector
819 
820  // Set the Physical ratios:
821 
822  // Set the viscosity ratio to the value one
824 
825  // Set the density ratio to the value one
827  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Gravity_vector, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Constant_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Ratio_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ SpaceTimeNavierStokesEquations() [3/3]

Constructor: NULL the body force and source function and make sure the ALE terms are included by default.

779  : Body_force_fct_pt(0),
780  Source_fct_pt(0),
782  ALE_is_disabled(false),
784  {
785  // Set all the Physical parameter pointers:
786 
787  // Set the Reynolds number to the value zero
789 
790  // Set the Reynolds x Strouhal (= Womersley) number to the value zero
792 
793  // The Strouhal number (which is a proxy for the period here) is not
794  // stored as external data
796 
797  // Set the Reynolds / Froude value to zero
799 
800  // Set the gravity vector to be the zero vector
802 
803  // Set the Physical ratios:
804 
805  // Set the viscosity ratio to the value one
807 
808  // Set the density ratio to the value one
810  }
bool ReynoldsStrouhal_is_stored_as_external_data
Definition: spacetime_navier_stokes_elements.h:521
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (= Womersley)
Definition: spacetime_navier_stokes_elements.h:517

References oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Gravity_vector, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Constant_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Ratio_Value, oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReSt_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data, and oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

Member Function Documentation

◆ body_force_fct_pt() [1/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( )
inline

Access function for the body-force pointer.

1010  {
1011  return Body_force_fct_pt;
1012  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ body_force_fct_pt() [2/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( )
inline

Access function for the body-force pointer.

1010  {
1011  return Body_force_fct_pt;
1012  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

◆ body_force_fct_pt() [3/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( )
inline

Access function for the body-force pointer.

984  {
985  return Body_force_fct_pt;
986  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

◆ body_force_fct_pt() [4/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( ) const
inline

Access function for the body-force pointer. Const version.

1016  {
1017  return Body_force_fct_pt;
1018  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

◆ body_force_fct_pt() [5/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( ) const
inline

Access function for the body-force pointer. Const version.

1016  {
1017  return Body_force_fct_pt;
1018  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

◆ body_force_fct_pt() [6/6]

template<unsigned DIM>
NavierStokesBodyForceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::body_force_fct_pt ( ) const
inline

Access function for the body-force pointer. Const version.

990  {
991  return Body_force_fct_pt;
992  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt.

◆ build_fp_press_adv_diff_robin_bc_element() [1/3]

◆ build_fp_press_adv_diff_robin_bc_element() [2/3]

◆ build_fp_press_adv_diff_robin_bc_element() [3/3]

◆ compute_error() [1/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Validate against exact velocity solution Solution is provided via a function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

611  {
612  // Initialise the error norm value
613  error = 0.0;
614 
615  // Initialise the solution norm value
616  norm = 0.0;
617 
618  // Vector of local coordinates
619  Vector<double> s(DIM + 1, 0.0);
620 
621  // Vector for the spatial coordinates
622  Vector<double> x(DIM, 0.0);
623 
624  // Set the value of n_intpt
625  unsigned n_intpt = integral_pt()->nweight();
626 
627  // Exact solution Vector (u,v,[w],p)
628  Vector<double> exact_soln(DIM + 1, 0.0);
629 
630  // Loop over the integration points
631  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
632  {
633  // Assign values of s
634  for (unsigned i = 0; i < DIM + 1; i++)
635  {
636  s[i] = integral_pt()->knot(ipt, i);
637  }
638 
639  // Assign values of x
640  for (unsigned i = 0; i < DIM; i++)
641  {
642  // Get x position as Vector
643  x[i] = interpolated_x(s, i);
644  }
645 
646  // Get exact solution at this point
647  (*exact_soln_pt)(x, exact_soln);
648 
649  // Get the integral weight
650  double w = integral_pt()->weight(ipt);
651 
652  // Get Jacobian of mapping
653  double J = J_eulerian(s);
654 
655  // Premultiply the weights and the Jacobian
656  double W = w * J;
657 
658  // Velocity error
659  for (unsigned i = 0; i < DIM; i++)
660  {
661  // Update the solution norm value
662  norm += exact_soln[i] * exact_soln[i] * W;
663 
664  // Update the error norm value
665  error += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
666  }
667  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
668  } // End of compute_error
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
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:4103
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void interpolated_u_nst(const Vector< double > &s, Vector< double > &velocity) const
Compute vector of FE interpolated velocity u at local coordinate s.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1892
RealScalar s
Definition: level1_cplx_impl.h:130
#define DIM
Definition: linearised_navier_stokes_elements.h:44
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
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
@ W
Definition: quadtree.h:63
list x
Definition: plotDoE.py:28

References DIM, calibrate::error, ProblemParameters::exact_soln(), i, J, Eigen::bfloat16_impl::pow(), s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ compute_error() [2/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

◆ compute_error() [3/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

◆ compute_error() [4/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Validate against exact velocity solution at given time. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

536  {
537  // Initialise the error norm value
538  error = 0.0;
539 
540  // Initialise the solution norm value
541  norm = 0.0;
542 
543  // Storage for the time value
544  double interpolated_t = 0.0;
545 
546  // Vector of local coordinates
547  Vector<double> s(DIM + 1, 0.0);
548 
549  // Vector for the spatial coordinates
550  Vector<double> x(DIM, 0.0);
551 
552  // Set the value of n_intpt
553  unsigned n_intpt = integral_pt()->nweight();
554 
555  // Exact solution Vector (u,v,[w],p)
556  Vector<double> exact_soln(DIM + 1, 0.0);
557 
558  // Loop over the integration points
559  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
560  {
561  // Assign values of s
562  for (unsigned i = 0; i < DIM + 1; i++)
563  {
564  s[i] = integral_pt()->knot(ipt, i);
565  }
566 
567  // Assign values of x
568  for (unsigned i = 0; i < DIM; i++)
569  {
570  // Get x position as Vector
571  x[i] = interpolated_x(s, i);
572  }
573 
574  // Get the time value
575  interpolated_t = interpolated_x(s, DIM);
576 
577  // Get exact solution at this point
578  (*exact_soln_pt)(interpolated_t, x, exact_soln);
579 
580  // Get the integral weight
581  double w = integral_pt()->weight(ipt);
582 
583  // Get Jacobian of mapping
584  double J = J_eulerian(s);
585 
586  // Premultiply the weights and the Jacobian
587  double W = w * J;
588 
589  // Velocity error
590  for (unsigned i = 0; i < DIM; i++)
591  {
592  // Update the solution norm value
593  norm += exact_soln[i] * exact_soln[i] * W;
594 
595  // Update the error norm value
596  error += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
597  }
598  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
599  } // End of compute_error

References DIM, calibrate::error, ProblemParameters::exact_soln(), i, J, Eigen::bfloat16_impl::pow(), s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ compute_error() [5/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

◆ compute_error() [6/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

◆ compute_error() [7/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Validate against exact velocity solution Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

682  {
683  // Initialise the error norm value
684  error = 0.0;
685 
686  // Initialise the solution norm value
687  norm = 0.0;
688 
689  // Storage for the time value
690  double interpolated_t = 0.0;
691 
692  // Vector of local coordinates
693  Vector<double> s(DIM + 1, 0.0);
694 
695  // Vector for the spatial coordinates
696  Vector<double> x(DIM, 0.0);
697 
698  // Set the value of n_intpt
699  unsigned n_intpt = integral_pt()->nweight();
700 
701  // Output the tecplot header
702  outfile << "ZONE" << std::endl;
703 
704  // Exact solution Vector (u,v,[w],p)
705  Vector<double> exact_soln(DIM + 1, 0.0);
706 
707  // Loop over the integration points
708  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
709  {
710  // Assign values of s
711  for (unsigned i = 0; i < DIM + 1; i++)
712  {
713  s[i] = integral_pt()->knot(ipt, i);
714  }
715 
716  // Assign values of x
717  for (unsigned i = 0; i < DIM; i++)
718  {
719  // Get x position as Vector
720  x[i] = interpolated_x(s, i);
721  }
722 
723  // Get the time value
724  interpolated_t = interpolated_x(s, DIM);
725 
726  // Get exact solution at this point
727  (*exact_soln_pt)(x, exact_soln);
728 
729  // Get the integral weight
730  double w = integral_pt()->weight(ipt);
731 
732  // Get Jacobian of mapping
733  double J = J_eulerian(s);
734 
735  // Premultiply the weights and the Jacobian
736  double W = w * J;
737 
738  // Velocity error
739  for (unsigned i = 0; i < DIM; i++)
740  {
741  // Update the solution norm value
742  norm += exact_soln[i] * exact_soln[i] * W;
743 
744  // Update the error norm value
745  error += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
746  }
747 
748  // Output x,y,...,u_exact
749  for (unsigned i = 0; i < DIM; i++)
750  {
751  // Output the i-th coordinate value
752  outfile << x[i] << " ";
753  }
754 
755  // Output the time value at this point
756  outfile << interpolated_t << " ";
757 
758  // Output x,y,u_error,v_error
759  for (unsigned i = 0; i < DIM; i++)
760  {
761  // Output the error in the i-th velocity component at this point
762  outfile << exact_soln[i] - interpolated_u_nst(s, i) << " ";
763  }
764 
765  // Finish the line off
766  outfile << std::endl;
767  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
768  } // End of compute_error

References DIM, calibrate::error, ProblemParameters::exact_soln(), i, J, Eigen::bfloat16_impl::pow(), s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ compute_error() [8/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_error() [9/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Validate against exact solution. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_error() [10/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Validate against exact velocity solution at given time. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

249  {
250  // Initialise the error norm value
251  error = 0.0;
252 
253  // Initialise the solution norm value
254  norm = 0.0;
255 
256  // Storage for the time value
257  double interpolated_t = 0.0;
258 
259  // Vector of local coordinates
260  Vector<double> s(DIM + 1, 0.0);
261 
262  // Vector for the spatial coordinates
263  Vector<double> x(DIM, 0.0);
264 
265  // Set the value of n_intpt
266  unsigned n_intpt = integral_pt()->nweight();
267 
268  // Exact solution Vector (u,v,[w],p)
269  Vector<double> exact_soln(DIM + 1, 0.0);
270 
271  // Loop over the integration points
272  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
273  {
274  // Assign values of s
275  for (unsigned i = 0; i < DIM + 1; i++)
276  {
277  s[i] = integral_pt()->knot(ipt, i);
278  }
279 
280  // Assign values of x
281  for (unsigned i = 0; i < DIM; i++)
282  {
283  // Get x position as Vector
284  x[i] = interpolated_x(s, i);
285  }
286 
287  // Get the time value
288  interpolated_t = interpolated_x(s, DIM);
289 
290  // Get exact solution at this point
291  (*exact_soln_pt)(interpolated_t, x, exact_soln);
292 
293  // Get the integral weight
294  double w = integral_pt()->weight(ipt);
295 
296  // Get Jacobian of mapping
297  double J = J_eulerian(s);
298 
299  // Premultiply the weights and the Jacobian
300  double W = w * J;
301 
302  // Velocity error
303  for (unsigned i = 0; i < DIM; i++)
304  {
305  // Update the solution norm value
306  norm += exact_soln[i] * exact_soln[i] * W;
307 
308  // Update the error norm value
309  error += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
310  }
311 
312  // ------ DRAIG: REMOVE ----------------------------------------
313  // Update the solution norm value
314  norm += pow(exact_soln[DIM], 2) * W;
315 
316  // Update the error norm value
318  // ------ DRAIG: REMOVE ----------------------------------------
319  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
320 
321  //------------------------------------------------
322  // Output the error at the appropriate plot points
323  //------------------------------------------------
324  // Just output at the default number of plot points
325  unsigned n_plot = 5;
326 
327  // Tecplot header info
328  outfile << tecplot_zone_string(n_plot);
329 
330  // How many plot points are there in total?
331  unsigned num_plot_points = nplot_points(n_plot);
332 
333  // Loop over plot points
334  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
335  {
336  // Get local coordinates of plot point
337  get_s_plot(i_plot, n_plot, s);
338 
339  // Loop over the spatial coordinates
340  for (unsigned i = 0; i < DIM; i++)
341  {
342  // Assign the i-th spatial coordinate
343  x[i] = interpolated_x(s, i);
344  }
345 
346  // Get the time value
347  interpolated_t = interpolated_x(s, DIM);
348 
349  // Get exact solution at this point
350  (*exact_soln_pt)(interpolated_t, x, exact_soln);
351 
352  // Output x,y,...
353  for (unsigned i = 0; i < DIM; i++)
354  {
355  // Output the i-th spatial coordinate
356  outfile << x[i] << " ";
357  }
358 
359  // Output the time value at this point
360  outfile << interpolated_t << " ";
361 
362  // Output u_error,v_error
363  for (unsigned i = 0; i < DIM; i++)
364  {
365  // Output the error in the i-th velocity component at this point
366  outfile << exact_soln[i] - interpolated_u_nst(s, i) << " ";
367  }
368 
369  // Output the error in the pressure field at this point
370  outfile << exact_soln[DIM] - interpolated_p_nst(s) << " ";
371 
372  // End the line
373  outfile << std::endl;
374  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
375 
376  // Write tecplot footer (e.g. FE connectivity lists)
377  write_tecplot_zone_footer(outfile, n_plot);
378  } // End of compute_error
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
virtual double interpolated_p_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:2037

References DIM, calibrate::error, ProblemParameters::exact_soln(), i, J, Eigen::bfloat16_impl::pow(), s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ compute_error() [11/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_error() [12/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_error() [13/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
Vector< double > &  error,
Vector< double > &  norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Validate against exact velocity solution at given time. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

393  {
394  // Resize the error norm vector
395  error.resize(DIM + 1, 0.0);
396 
397  // Resize the solution norm vector
398  norm.resize(DIM + 1, 0.0);
399 
400  // Storage for the time value
401  double interpolated_t = 0.0;
402 
403  // Vector of local coordinates
404  Vector<double> s(DIM + 1, 0.0);
405 
406  // Vector for the spatial coordinates
407  Vector<double> x(DIM, 0.0);
408 
409  // Set the value of n_intpt
410  unsigned n_intpt = integral_pt()->nweight();
411 
412  // Exact solution Vector (u,v,[w],p)
413  Vector<double> exact_soln(DIM + 1, 0.0);
414 
415  // Loop over the integration points
416  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
417  {
418  // Assign values of s
419  for (unsigned i = 0; i < DIM + 1; i++)
420  {
421  s[i] = integral_pt()->knot(ipt, i);
422  }
423 
424  // Assign values of x
425  for (unsigned i = 0; i < DIM; i++)
426  {
427  // Get x position as Vector
428  x[i] = interpolated_x(s, i);
429  }
430 
431  // Get the time value
432  interpolated_t = interpolated_x(s, DIM);
433 
434  // Get exact solution at this point
435  (*exact_soln_pt)(interpolated_t, x, exact_soln);
436 
437  // Get the integral weight
438  double w = integral_pt()->weight(ipt);
439 
440  // Get Jacobian of mapping
441  double J = J_eulerian(s);
442 
443  // Premultiply the weights and the Jacobian
444  double W = w * J;
445 
446  // Velocity error
447  for (unsigned i = 0; i < DIM; i++)
448  {
449  // Update the solution norm value
450  norm[i] += exact_soln[i] * exact_soln[i] * W;
451 
452  // Update the error norm value
453  error[i] += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
454  }
455 
456  // ------ DRAIG: REMOVE ----------------------------------------
457  // Update the solution norm value
458  norm[DIM] += pow(exact_soln[DIM], 2) * W;
459 
460  // Update the error norm value
462  // ------ DRAIG: REMOVE ----------------------------------------
463  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
464 
465  //------------------------------------------------
466  // Output the error at the appropriate plot points
467  //------------------------------------------------
468  // Just output at the default number of plot points
469  unsigned n_plot = 5;
470 
471  // Tecplot header info
472  outfile << tecplot_zone_string(n_plot);
473 
474  // How many plot points are there in total?
475  unsigned num_plot_points = nplot_points(n_plot);
476 
477  // Loop over plot points
478  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
479  {
480  // Get local coordinates of plot point
481  get_s_plot(i_plot, n_plot, s);
482 
483  // Loop over the spatial coordinates
484  for (unsigned i = 0; i < DIM; i++)
485  {
486  // Assign the i-th spatial coordinate
487  x[i] = interpolated_x(s, i);
488  }
489 
490  // Get the time value
491  interpolated_t = interpolated_x(s, DIM);
492 
493  // Get exact solution at this point
494  (*exact_soln_pt)(interpolated_t, x, exact_soln);
495 
496  // Output x,y,...
497  for (unsigned i = 0; i < DIM; i++)
498  {
499  // Output the i-th spatial coordinate
500  outfile << x[i] << " ";
501  }
502 
503  // Output the time value at this point
504  outfile << interpolated_t << " ";
505 
506  // Output u_error,v_error
507  for (unsigned i = 0; i < DIM; i++)
508  {
509  // Output the error in the i-th velocity component at this point
510  outfile << exact_soln[i] - interpolated_u_nst(s, i) << " ";
511  }
512 
513  // Output the error in the pressure field at this point
514  outfile << exact_soln[DIM] - interpolated_p_nst(s) << " ";
515 
516  // End the line
517  outfile << std::endl;
518  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
519 
520  // Write tecplot footer (e.g. FE connectivity lists)
521  write_tecplot_zone_footer(outfile, n_plot);
522  } // End of compute_error

References DIM, calibrate::error, ProblemParameters::exact_soln(), i, J, Eigen::bfloat16_impl::pow(), s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ compute_error() [14/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
Vector< double > &  error,
Vector< double > &  norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_error() [15/15]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
Vector< double > &  error,
Vector< double > &  norm 
)
virtual

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element

Reimplemented from oomph::FiniteElement.

◆ compute_norm() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_norm ( Vector< double > &  norm)
virtual

Compute the vector norm of the FEM solution.

Compute the vector norm of FEM solution.

Reimplemented from oomph::GeneralisedElement.

196  {
197  // Resize the solution norm vector
198  norm.resize(DIM + 1, 0.0);
199 
200  // Vector of local coordinates
201  Vector<double> s(DIM + 1, 0.0);
202 
203  // Set the value of n_intpt
204  unsigned n_intpt = integral_pt()->nweight();
205 
206  // Loop over the integration points
207  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
208  {
209  // Assign values of s
210  for (unsigned i = 0; i < DIM + 1; i++)
211  {
212  s[i] = integral_pt()->knot(ipt, i);
213  }
214 
215  // Get the integral weight
216  double w = integral_pt()->weight(ipt);
217 
218  // Get Jacobian of mapping
219  double J = J_eulerian(s);
220 
221  // Premultiply the weights and the Jacobian
222  double W = w * J;
223 
224  // Compute the velocity norm
225  for (unsigned i = 0; i < DIM; i++)
226  {
227  // Update the solution norm value
228  norm[i] += pow(interpolated_u_nst(s, i), 2) * W;
229  }
230 
231  // Update the pressure norm value
232  norm[DIM] += pow(interpolated_p_nst(s), 2) * W;
233  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
234  } // End of compute_norm

References DIM, i, J, Eigen::bfloat16_impl::pow(), s, w, and oomph::QuadTreeNames::W.

◆ compute_norm() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_norm ( Vector< double > &  norm)
virtual

Compute the vector norm of the FEM solution.

Reimplemented from oomph::GeneralisedElement.

◆ compute_norm() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::compute_norm ( Vector< double > &  norm)
virtual

Compute the vector norm of the FEM solution.

Reimplemented from oomph::GeneralisedElement.

◆ d_kin_energy_dt() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::d_kin_energy_dt

Get integral of time derivative of kinetic energy over element.

Get integral of time derivative of kinetic energy over element:

1669  {
1670  // Initialise
1671  double d_kin_en_dt = 0.0;
1672 
1673  // Set the value of n_intpt
1674  const unsigned n_intpt = integral_pt()->nweight();
1675 
1676  // Get the number of nodes
1677  const unsigned n_node = this->nnode();
1678 
1679  // Storage for the shape function
1680  Shape psi(n_node);
1681  DShape dpsidx(n_node, DIM + 1);
1682 
1683  // Get the value at which the velocities are stored
1684  unsigned u_index[DIM];
1685  for (unsigned i = 0; i < DIM; i++)
1686  {
1687  u_index[i] = this->u_index_nst(i);
1688  }
1689 
1690  // Loop over the integration points
1691  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1692  {
1693  // Get the jacobian of the mapping
1694  double J = dshape_eulerian_at_knot(ipt, psi, dpsidx);
1695 
1696  // Get the integral weight
1697  double w = integral_pt()->weight(ipt);
1698 
1699  // Now work out the velocity and the time derivative
1700  Vector<double> interpolated_u(DIM, 0.0);
1701  Vector<double> interpolated_dudt(DIM, 0.0);
1702 
1703  // Loop over the shape functions
1704  for (unsigned l = 0; l < n_node; l++)
1705  {
1706  // Loop over the dimensions
1707  for (unsigned i = 0; i < DIM; i++)
1708  {
1709  interpolated_u[i] += nodal_value(l, u_index[i]) * psi(l);
1710  interpolated_dudt[i] += du_dt_nst(l, u_index[i]) * psi(l);
1711  }
1712  }
1713 
1714  // Get mesh velocity bit
1715  if (!ALE_is_disabled)
1716  {
1717  Vector<double> mesh_velocity(DIM, 0.0);
1718  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
1719 
1720  // Loop over nodes again
1721  for (unsigned l = 0; l < n_node; l++)
1722  {
1723  for (unsigned i = 0; i < DIM; i++)
1724  {
1725  mesh_velocity[i] += this->dnodal_position_dt(l, i) * psi(l);
1726 
1727  for (unsigned j = 0; j < DIM; j++)
1728  {
1729  interpolated_dudx(i, j) +=
1730  this->nodal_value(l, u_index[i]) * dpsidx(l, j);
1731  }
1732  }
1733  }
1734 
1735  // Subtract mesh velocity from du_dt
1736  for (unsigned i = 0; i < DIM; i++)
1737  {
1738  for (unsigned k = 0; k < DIM; k++)
1739  {
1740  interpolated_dudt[i] -= mesh_velocity[k] * interpolated_dudx(i, k);
1741  }
1742  }
1743  }
1744 
1745 
1746  // Loop over directions and add up u du/dt terms
1747  double sum = 0.0;
1748  for (unsigned i = 0; i < DIM; i++)
1749  {
1750  sum += interpolated_u[i] * interpolated_dudt[i];
1751  }
1752 
1753  d_kin_en_dt += sum * w * J;
1754  }
1755 
1756  return d_kin_en_dt;
1757 
1758  } // End of d_kin_energy_dt
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3325
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
Definition: elements.h:2333
double du_dt_nst(const unsigned &n, const unsigned &i) const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1149
virtual unsigned u_index_nst(const unsigned &i) const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1102
char char char int int * k
Definition: level2_impl.h:374
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::ALE_is_disabled, DIM, i, J, j, k, and w.

◆ d_kin_energy_dt() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::d_kin_energy_dt ( ) const

Get integral of time derivative of kinetic energy over element.

◆ d_kin_energy_dt() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::d_kin_energy_dt ( ) const

Get integral of time derivative of kinetic energy over element.

◆ delete_pressure_advection_diffusion_robin_elements() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::delete_pressure_advection_diffusion_robin_elements ( )
inlinevirtual

Delete the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1873  {
1874  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1875  for (unsigned e = 0; e < nel; e++)
1876  {
1878  }
1880  } // End of delete_pressure_advection_diffusion_robin_elements
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Vector< FpPressureAdvDiffRobinBCSpaceTimeElementBase * > Pressure_advection_diffusion_robin_element_pt
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:548

References e(), and oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt.

◆ delete_pressure_advection_diffusion_robin_elements() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::delete_pressure_advection_diffusion_robin_elements ( )
inlinevirtual

Delete the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1873  {
1874  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1875  for (unsigned e = 0; e < nel; e++)
1876  {
1878  }
1880  } // End of delete_pressure_advection_diffusion_robin_elements

References e(), and oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt.

◆ delete_pressure_advection_diffusion_robin_elements() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::delete_pressure_advection_diffusion_robin_elements ( )
inlinevirtual

Delete the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1846  {
1847  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1848  for (unsigned e = 0; e < nel; e++)
1849  {
1851  }
1853  } // End of delete_pressure_advection_diffusion_robin_elements

References e(), and oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt.

◆ density_ratio() [1/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio ( ) const
inline

Density ratio for element: Element's density relative to the viscosity used in the definition of the Reynolds number

974  {
975  return *Density_Ratio_pt;
976  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt.

◆ density_ratio() [2/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio ( ) const
inline

Density ratio for element: Element's density relative to the viscosity used in the definition of the Reynolds number

974  {
975  return *Density_Ratio_pt;
976  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt.

◆ density_ratio() [3/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio ( ) const
inline

Density ratio for element: Element's density relative to the viscosity used in the definition of the Reynolds number

948  {
949  return *Density_Ratio_pt;
950  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt.

◆ density_ratio_pt() [1/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio_pt ( )
inline

◆ density_ratio_pt() [2/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio_pt ( )
inline

Pointer to Density ratio.

980  {
981  return Density_Ratio_pt;
982  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt.

◆ density_ratio_pt() [3/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::density_ratio_pt ( )
inline

Pointer to Density ratio.

954  {
955  return Density_Ratio_pt;
956  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Density_Ratio_pt.

◆ dinterpolated_u_nst_ddata() [1/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata ( const Vector< double > &  s,
const unsigned i,
Vector< double > &  du_ddata,
Vector< unsigned > &  global_eqn_number 
)
inlinevirtual

Compute the derivatives of the i-th component of velocity at point s with respect to all data that can affect its value. In addition, return the global equation numbers corresponding to the data. The function is virtual so that it can be overloaded in the refineable version

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

1982  {
1983  // Find the number of nodes
1984  unsigned n_node = nnode();
1985 
1986  // Local shape function
1987  Shape psi(n_node);
1988 
1989  // Find values of shape function
1990  shape(s, psi);
1991 
1992  // Get nodal index at which i-th velocity is stored
1993  unsigned u_nodal_index = u_index_nst(i);
1994 
1995  // Find the number of dofs associated with interpolated u
1996  unsigned n_u_dof = 0;
1997 
1998  // Loop over the nodes
1999  for (unsigned l = 0; l < n_node; l++)
2000  {
2001  // Get the global equation number of the dof
2002  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2003 
2004  // If it's positive add to the count
2005  if (global_eqn >= 0)
2006  {
2007  // Increment the counter
2008  n_u_dof++;
2009  }
2010  } // End of dinterpolated_u_nst_ddata
2011 
2012  // Now resize the storage schemes
2013  du_ddata.resize(n_u_dof, 0.0);
2014  global_eqn_number.resize(n_u_dof, 0);
2015 
2016  // Loop over th nodes again and set the derivatives
2017  unsigned count = 0;
2018  // Loop over the local nodes and sum
2019  for (unsigned l = 0; l < n_node; l++)
2020  {
2021  // Get the global equation number
2022  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2023  if (global_eqn >= 0)
2024  {
2025  // Set the global equation number
2026  global_eqn_number[count] = global_eqn;
2027  // Set the derivative with respect to the unknown
2028  du_ddata[count] = psi[l];
2029  // Increase the counter
2030  ++count;
2031  }
2032  }
2033  } // End of dinterpolated_u_nst_ddata
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
Definition: nodes.h:367
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual void shape(const Vector< double > &s, Shape &psi) const =0

References oomph::Data::eqn_number(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ dinterpolated_u_nst_ddata() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata ( const Vector< double > &  s,
const unsigned i,
Vector< double > &  du_ddata,
Vector< unsigned > &  global_eqn_number 
)
inlinevirtual

Compute the derivatives of the i-th component of velocity at point s with respect to all data that can affect its value. In addition, return the global equation numbers corresponding to the data. The function is virtual so that it can be overloaded in the refineable version

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

1982  {
1983  // Find the number of nodes
1984  unsigned n_node = nnode();
1985 
1986  // Local shape function
1987  Shape psi(n_node);
1988 
1989  // Find values of shape function
1990  shape(s, psi);
1991 
1992  // Get nodal index at which i-th velocity is stored
1993  unsigned u_nodal_index = u_index_nst(i);
1994 
1995  // Find the number of dofs associated with interpolated u
1996  unsigned n_u_dof = 0;
1997 
1998  // Loop over the nodes
1999  for (unsigned l = 0; l < n_node; l++)
2000  {
2001  // Get the global equation number of the dof
2002  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2003 
2004  // If it's positive add to the count
2005  if (global_eqn >= 0)
2006  {
2007  // Increment the counter
2008  n_u_dof++;
2009  }
2010  } // End of dinterpolated_u_nst_ddata
2011 
2012  // Now resize the storage schemes
2013  du_ddata.resize(n_u_dof, 0.0);
2014  global_eqn_number.resize(n_u_dof, 0);
2015 
2016  // Loop over th nodes again and set the derivatives
2017  unsigned count = 0;
2018  // Loop over the local nodes and sum
2019  for (unsigned l = 0; l < n_node; l++)
2020  {
2021  // Get the global equation number
2022  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2023  if (global_eqn >= 0)
2024  {
2025  // Set the global equation number
2026  global_eqn_number[count] = global_eqn;
2027  // Set the derivative with respect to the unknown
2028  du_ddata[count] = psi[l];
2029  // Increase the counter
2030  ++count;
2031  }
2032  }
2033  } // End of dinterpolated_u_nst_ddata

References oomph::Data::eqn_number(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ dinterpolated_u_nst_ddata() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata ( const Vector< double > &  s,
const unsigned i,
Vector< double > &  du_ddata,
Vector< unsigned > &  global_eqn_number 
)
inlinevirtual

Compute the derivatives of the i-th component of velocity at point s with respect to all data that can affect its value. In addition, return the global equation numbers corresponding to the data. The function is virtual so that it can be overloaded in the refineable version

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

1955  {
1956  // Find the number of nodes
1957  unsigned n_node = nnode();
1958 
1959  // Local shape function
1960  Shape psi(n_node);
1961 
1962  // Find values of shape function
1963  shape(s, psi);
1964 
1965  // Get nodal index at which i-th velocity is stored
1966  unsigned u_nodal_index = u_index_nst(i);
1967 
1968  // Find the number of dofs associated with interpolated u
1969  unsigned n_u_dof = 0;
1970 
1971  // Loop over the nodes
1972  for (unsigned l = 0; l < n_node; l++)
1973  {
1974  // Get the global equation number of the dof
1975  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
1976 
1977  // If it's positive add to the count
1978  if (global_eqn >= 0)
1979  {
1980  // Increment the counter
1981  n_u_dof++;
1982  }
1983  } // End of dinterpolated_u_nst_ddata
1984 
1985  // Now resize the storage schemes
1986  du_ddata.resize(n_u_dof, 0.0);
1987  global_eqn_number.resize(n_u_dof, 0);
1988 
1989  // Loop over th nodes again and set the derivatives
1990  unsigned count = 0;
1991  // Loop over the local nodes and sum
1992  for (unsigned l = 0; l < n_node; l++)
1993  {
1994  // Get the global equation number
1995  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
1996  if (global_eqn >= 0)
1997  {
1998  // Set the global equation number
1999  global_eqn_number[count] = global_eqn;
2000  // Set the derivative with respect to the unknown
2001  du_ddata[count] = psi[l];
2002  // Increase the counter
2003  ++count;
2004  }
2005  }
2006  } // End of dinterpolated_u_nst_ddata

References oomph::Data::eqn_number(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ disable_ALE() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::disable_ALE ( )
inlinevirtual

Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!

Reimplemented from oomph::FiniteElement.

1201  {
1202  ALE_is_disabled = true;
1203  } // End of disable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ disable_ALE() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::disable_ALE ( )
inlinevirtual

Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!

Reimplemented from oomph::FiniteElement.

1201  {
1202  ALE_is_disabled = true;
1203  } // End of disable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ disable_ALE() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::disable_ALE ( )
inlinevirtual

Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!

Reimplemented from oomph::FiniteElement.

1175  {
1176  ALE_is_disabled = true;
1177  } // End of disable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ dissipation() [1/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation

Return integral of dissipation over element.

1306  {
1307  // Initialise the elemental dissipation value
1308  double diss = 0.0;
1309 
1310  // Set the value of n_intpt
1311  unsigned n_intpt = integral_pt()->nweight();
1312 
1313  // Set the Vector to hold local coordinates
1314  Vector<double> s(DIM + 1, 0.0);
1315 
1316  // Loop over the integration points
1317  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1318  {
1319  // Assign values of s
1320  for (unsigned i = 0; i < DIM + 1; i++)
1321  {
1322  // Calculate the i-th local coordinate value
1323  s[i] = integral_pt()->knot(ipt, i);
1324  }
1325 
1326  // Get the integral weight
1327  double w = integral_pt()->weight(ipt);
1328 
1329  // Get Jacobian of mapping
1330  double J = J_eulerian(s);
1331 
1332  // Storage for the strain rate matrix
1333  DenseMatrix<double> strainrate(DIM, DIM);
1334 
1335  // Get strain rate matrix
1336  strain_rate(s, strainrate);
1337 
1338  // Initialise the local dissipation
1339  double local_diss = 0.0;
1340 
1341  // Loop over the coordinate directions
1342  for (unsigned i = 0; i < DIM; i++)
1343  {
1344  // Loop over the coordinate directions
1345  for (unsigned j = 0; j < DIM; j++)
1346  {
1347  // Update the local dissipation value
1348  local_diss += 2.0 * strainrate(i, j) * strainrate(i, j);
1349  }
1350  } // for (unsigned i=0;i<DIM;i++)
1351 
1352  // Update the elemental dissipation value
1353  diss += local_diss * w * J;
1354  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
1355 
1356  // Return the elemental dissipation value
1357  return diss;
1358  } // End of dissipation
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)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:1468

References DIM, i, J, j, s, and w.

◆ dissipation() [2/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation ( ) const

Return integral of dissipation over element.

◆ dissipation() [3/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation ( ) const

Return integral of dissipation over element.

◆ dissipation() [4/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation ( const Vector< double > &  s) const

Return dissipation at local coordinate s.

1446  {
1447  // Get strain rate matrix
1448  DenseMatrix<double> strainrate(DIM, DIM);
1449  strain_rate(s, strainrate);
1450 
1451  // Initialise
1452  double local_diss = 0.0;
1453  for (unsigned i = 0; i < DIM; i++)
1454  {
1455  for (unsigned j = 0; j < DIM; j++)
1456  {
1457  local_diss += 2.0 * strainrate(i, j) * strainrate(i, j);
1458  }
1459  }
1460 
1461  return local_diss;
1462  }

References DIM, i, j, and s.

◆ dissipation() [5/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation ( const Vector< double > &  s) const

Return dissipation at local coordinate s.

◆ dissipation() [6/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::dissipation ( const Vector< double > &  s) const

Return dissipation at local coordinate s.

◆ dpshape_and_dptest_eulerian_nst() [1/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dpshape_and_dptest_eulerian_nst ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx,
Shape ptest,
DShape dptestdx 
) const
protectedpure virtual

◆ dpshape_and_dptest_eulerian_nst() [2/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dpshape_and_dptest_eulerian_nst ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx,
Shape ptest,
DShape dptestdx 
) const
protectedpure virtual

◆ dpshape_and_dptest_eulerian_nst() [3/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dpshape_and_dptest_eulerian_nst ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx,
Shape ptest,
DShape dptestdx 
) const
protectedpure virtual

◆ dpshape_eulerian() [1/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dpshape_eulerian ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx 
) const
protectedpure virtual

◆ dpshape_eulerian() [2/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dpshape_eulerian ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx 
) const
protectedpure virtual

◆ dptest_eulerian() [1/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dptest_eulerian ( const Vector< double > &  s,
Shape ptest,
DShape dptestdx 
) const
protectedpure virtual

◆ dptest_eulerian() [2/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dptest_eulerian ( const Vector< double > &  s,
Shape ptest,
DShape dptestdx 
) const
protectedpure virtual

◆ dshape_and_dtest_eulerian_at_knot_nst() [1/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
RankFourTensor< double > &  d_dpsidx_dX,
Shape test,
DShape dtestdx,
RankFourTensor< double > &  d_dtestdx_dX,
DenseMatrix< double > &  djacobian_dX 
) const
protectedpure virtual

◆ dshape_and_dtest_eulerian_at_knot_nst() [2/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
RankFourTensor< double > &  d_dpsidx_dX,
Shape test,
DShape dtestdx,
RankFourTensor< double > &  d_dtestdx_dX,
DenseMatrix< double > &  djacobian_dX 
) const
protectedpure virtual

◆ dshape_and_dtest_eulerian_at_knot_nst() [3/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
RankFourTensor< double > &  d_dpsidx_dX,
Shape test,
DShape dtestdx,
RankFourTensor< double > &  d_dtestdx_dX,
DenseMatrix< double > &  djacobian_dX 
) const
protectedpure virtual

◆ dshape_and_dtest_eulerian_at_knot_nst() [4/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_at_knot_nst() [5/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_at_knot_nst() [6/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned ipt,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_nst() [1/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at local coordinate s. Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_nst() [2/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at local coordinate s. Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_nst() [3/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::dshape_and_dtest_eulerian_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Compute the shape functions and derivatives w.r.t. global coords at local coordinate s. Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ du_dt_nst() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.

1150  {
1151  // Storage for the local coordinates
1152  Vector<double> s(DIM + 1, 0.0);
1153 
1154  // Get the local coordinate at the n-th node
1156 
1157  // Return the interpolated du_i/dt value
1158  return interpolated_du_dt_nst(s, i);
1159  } // End of du_dt_nst
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Definition: elements.h:1842
double interpolated_du_dt_nst(const Vector< double > &s, const unsigned &i) const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1164

References DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst(), oomph::FiniteElement::local_coordinate_of_node(), n, and s.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::get_du_dt().

◆ du_dt_nst() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.

1150  {
1151  // Storage for the local coordinates
1152  Vector<double> s(DIM + 1, 0.0);
1153 
1154  // Get the local coordinate at the n-th node
1156 
1157  // Return the interpolated du_i/dt value
1158  return interpolated_du_dt_nst(s, i);
1159  } // End of du_dt_nst

References DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst(), oomph::FiniteElement::local_coordinate_of_node(), n, and s.

◆ du_dt_nst() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.

1124  {
1125  // Storage for the local coordinates
1126  Vector<double> s(DIM + 1, 0.0);
1127 
1128  // Get the local coordinate at the n-th node
1130 
1131  // Return the interpolated du_i/dt value
1132  return interpolated_du_dt_nst(s, i);
1133  } // End of du_dt_nst

References DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst(), oomph::FiniteElement::local_coordinate_of_node(), n, and s.

◆ enable_ALE() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::enable_ALE ( )
inlinevirtual

(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.

Reimplemented from oomph::FiniteElement.

1211  {
1212  ALE_is_disabled = false;
1213  } // End of enable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ enable_ALE() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::enable_ALE ( )
inlinevirtual

(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.

Reimplemented from oomph::FiniteElement.

1211  {
1212  ALE_is_disabled = false;
1213  } // End of enable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ enable_ALE() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::enable_ALE ( )
inlinevirtual

(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.

Reimplemented from oomph::FiniteElement.

1185  {
1186  ALE_is_disabled = false;
1187  } // End of enable_ALE

References oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled.

◆ fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1699  {
1700  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1701  unsigned compute_matrices_flag = 2;
1702 
1703  // Call the generic routine with the appropriate flag
1705  dres_dparam,
1706  djac_dparam,
1707  dmass_matrix_dparam,
1708  compute_matrices_flag);
1709  } // End of fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter
virtual void fill_in_generic_dresidual_contribution_nst(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, const unsigned &flag)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:2443

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1699  {
1700  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1701  unsigned compute_matrices_flag = 2;
1702 
1703  // Call the generic routine with the appropriate flag
1705  dres_dparam,
1706  djac_dparam,
1707  dmass_matrix_dparam,
1708  compute_matrices_flag);
1709  } // End of fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1672  {
1673  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1674  unsigned compute_matrices_flag = 2;
1675 
1676  // Call the generic routine with the appropriate flag
1678  dres_dparam,
1679  djac_dparam,
1680  dmass_matrix_dparam,
1681  compute_matrices_flag);
1682  } // End of fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_djacobian_dparameter() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::GeneralisedElement.

1678  {
1679  // Do we want to compute the Jacobian? ANSWER: Yes!
1680  unsigned compute_jacobian_flag = 1;
1681 
1682  // Call the generic routine with the flag set to 1
1684  parameter_pt,
1685  dres_dparam,
1686  djac_dparam,
1688  compute_jacobian_flag);
1689  } // End of fill_in_contribution_to_djacobian_dparameter
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_djacobian_dparameter() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::GeneralisedElement.

1678  {
1679  // Do we want to compute the Jacobian? ANSWER: Yes!
1680  unsigned compute_jacobian_flag = 1;
1681 
1682  // Call the generic routine with the flag set to 1
1684  parameter_pt,
1685  dres_dparam,
1686  djac_dparam,
1688  compute_jacobian_flag);
1689  } // End of fill_in_contribution_to_djacobian_dparameter

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_djacobian_dparameter() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::GeneralisedElement.

1651  {
1652  // Do we want to compute the Jacobian? ANSWER: Yes!
1653  unsigned compute_jacobian_flag = 1;
1654 
1655  // Call the generic routine with the flag set to 1
1657  parameter_pt,
1658  dres_dparam,
1659  djac_dparam,
1661  compute_jacobian_flag);
1662  } // End of fill_in_contribution_to_djacobian_dparameter

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_dresiduals_dparameter() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam 
)
inlinevirtual

Compute the element's residual Vector (differentiated w.r.t. a parameter)

Reimplemented from oomph::GeneralisedElement.

1658  {
1659  // Do we want to compute the Jacobian? ANSWER: No!
1660  unsigned compute_jacobian_flag = 0;
1661 
1662  // Call the generic residuals function using a dummy matrix argument
1664  parameter_pt,
1665  dres_dparam,
1668  compute_jacobian_flag);
1669  } // End of fill_in_contribution_to_dresiduals_dparameter

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_dresiduals_dparameter() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam 
)
inlinevirtual

Compute the element's residual Vector (differentiated w.r.t. a parameter)

Reimplemented from oomph::GeneralisedElement.

1658  {
1659  // Do we want to compute the Jacobian? ANSWER: No!
1660  unsigned compute_jacobian_flag = 0;
1661 
1662  // Call the generic residuals function using a dummy matrix argument
1664  parameter_pt,
1665  dres_dparam,
1668  compute_jacobian_flag);
1669  } // End of fill_in_contribution_to_dresiduals_dparameter

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_dresiduals_dparameter() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam 
)
inlinevirtual

Compute the element's residual Vector (differentiated w.r.t. a parameter)

Reimplemented from oomph::GeneralisedElement.

1631  {
1632  // Do we want to compute the Jacobian? ANSWER: No!
1633  unsigned compute_jacobian_flag = 0;
1634 
1635  // Call the generic residuals function using a dummy matrix argument
1637  parameter_pt,
1638  dres_dparam,
1641  compute_jacobian_flag);
1642  } // End of fill_in_contribution_to_dresiduals_dparameter

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst().

◆ fill_in_contribution_to_hessian_vector_products() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_hessian_vector_products ( Vector< double > const &  Y,
DenseMatrix< double > const &  C,
DenseMatrix< double > &  product 
)
protectedvirtual

Compute the hessian tensor vector products required to perform continuation of bifurcations analytically

Reimplemented from oomph::GeneralisedElement.

2466  {
2467  // Throw an error
2468  throw OomphLibError("Not yet implemented\n",
2471  } // End of fill_in_contribution_to_hessian_vector_products
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ fill_in_contribution_to_hessian_vector_products() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_hessian_vector_products ( Vector< double > const &  Y,
DenseMatrix< double > const &  C,
DenseMatrix< double > &  product 
)
protectedvirtual

Compute the hessian tensor vector products required to perform continuation of bifurcations analytically

Reimplemented from oomph::GeneralisedElement.

◆ fill_in_contribution_to_hessian_vector_products() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_hessian_vector_products ( Vector< double > const &  Y,
DenseMatrix< double > const &  C,
DenseMatrix< double > &  product 
)
protectedvirtual

Compute the hessian tensor vector products required to perform continuation of bifurcations analytically

Reimplemented from oomph::GeneralisedElement.

◆ fill_in_contribution_to_jacobian() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::FiniteElement.

1625  {
1626  // Do we want to compute the Jacobian? ANSWER: Yes!
1627  unsigned compute_jacobian_flag = 1;
1628 
1629  // Call the generic routine with the flag set to 1
1631  residuals,
1632  jacobian,
1634  compute_jacobian_flag);
1635  } // End of fill_in_contribution_to_residuals
virtual void fill_in_generic_residual_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, const unsigned &flag)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:1994

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_jacobian() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::FiniteElement.

1625  {
1626  // Do we want to compute the Jacobian? ANSWER: Yes!
1627  unsigned compute_jacobian_flag = 1;
1628 
1629  // Call the generic routine with the flag set to 1
1631  residuals,
1632  jacobian,
1634  compute_jacobian_flag);
1635  } // End of fill_in_contribution_to_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_jacobian() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version

Reimplemented from oomph::FiniteElement.

1598  {
1599  // Do we want to compute the Jacobian? ANSWER: Yes!
1600  unsigned compute_jacobian_flag = 1;
1601 
1602  // Call the generic routine with the flag set to 1
1604  residuals,
1605  jacobian,
1607  compute_jacobian_flag);
1608  } // End of fill_in_contribution_to_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_jacobian_and_mass_matrix() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1644  {
1645  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1646  unsigned compute_matrices_flag = 2;
1647 
1648  // Call the generic routine with the flag set to 2
1650  residuals, jacobian, mass_matrix, compute_matrices_flag);
1651  } // End of fill_in_contribution_to_jacobian_and_mass_matrix

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_jacobian_and_mass_matrix() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1644  {
1645  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1646  unsigned compute_matrices_flag = 2;
1647 
1648  // Call the generic routine with the flag set to 2
1650  residuals, jacobian, mass_matrix, compute_matrices_flag);
1651  } // End of fill_in_contribution_to_jacobian_and_mass_matrix

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_jacobian_and_mass_matrix() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inlinevirtual

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

1617  {
1618  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1619  unsigned compute_matrices_flag = 2;
1620 
1621  // Call the generic routine with the flag set to 2
1623  residuals, jacobian, mass_matrix, compute_matrices_flag);
1624  } // End of fill_in_contribution_to_jacobian_and_mass_matrix

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_residuals() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the element's residual Vector.

Reimplemented from oomph::GeneralisedElement.

1608  {
1609  // Do we want to compute the Jacobian? ANSWER: No!
1610  unsigned compute_jacobian_flag = 0;
1611 
1612  // Call the generic residuals function using a dummy matrix argument
1614  residuals,
1617  compute_jacobian_flag);
1618  } // End of fill_in_contribution_to_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_residuals() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the element's residual Vector.

Reimplemented from oomph::GeneralisedElement.

1608  {
1609  // Do we want to compute the Jacobian? ANSWER: No!
1610  unsigned compute_jacobian_flag = 0;
1611 
1612  // Call the generic residuals function using a dummy matrix argument
1614  residuals,
1617  compute_jacobian_flag);
1618  } // End of fill_in_contribution_to_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_contribution_to_residuals() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the element's residual Vector.

Reimplemented from oomph::GeneralisedElement.

1581  {
1582  // Do we want to compute the Jacobian? ANSWER: No!
1583  unsigned compute_jacobian_flag = 0;
1584 
1585  // Call the generic residuals function using a dummy matrix argument
1587  residuals,
1590  compute_jacobian_flag);
1591  } // End of fill_in_contribution_to_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

◆ fill_in_generic_dresidual_contribution_nst() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam,
const unsigned flag 
)
protectedvirtual

Compute the derivatives of the residuals for the Navier-Stokes equations with respect to a parameter Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

Compute the derivatives of the residuals for the Navier-Stokes equations with respect to a parameter; flag=2 or 1 or 0: do (or don't) compute the Jacobian and mass matrix as well

2449  {
2450  // Throw an error
2451  throw OomphLibError("Not yet implemented\n",
2454  } // End of fill_in_generic_dresidual_contribution_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter(), and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter().

◆ fill_in_generic_dresidual_contribution_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam,
const unsigned flag 
)
protectedvirtual

Compute the derivatives of the residuals for the Navier-Stokes equations with respect to a parameter Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

◆ fill_in_generic_dresidual_contribution_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_dresidual_contribution_nst ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam,
const unsigned flag 
)
protectedvirtual

Compute the derivatives of the residuals for the Navier-Stokes equations with respect to a parameter Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

◆ fill_in_generic_pressure_advection_diffusion_contribution_nst() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner. flag=1(or 0): do (or don't) compute the Jacobian as well.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

1816  {
1817  OomphLibWarning("I'm not sure this is correct yet...",
1820 
1821  // Return immediately if there are no dofs
1822  if (ndof() == 0) return;
1823 
1824  // Find out how many nodes there are
1825  unsigned n_node = nnode();
1826 
1827  // Find out how many pressure dofs there are
1828  unsigned n_pres = npres_nst();
1829 
1830  // Find the indices at which the local velocities are stored
1831  unsigned u_nodal_index[DIM];
1832  for (unsigned i = 0; i < DIM; i++)
1833  {
1834  u_nodal_index[i] = u_index_nst(i);
1835  }
1836 
1837  // Set up memory for the velocity shape fcts
1838  Shape psif(n_node);
1839  DShape dpsidx(n_node, DIM + 1);
1840 
1841  // Set up memory for pressure shape and test functions
1842  Shape psip(n_pres);
1843  Shape testp(n_pres);
1844  DShape dpsip(n_pres, DIM);
1845  DShape dtestp(n_pres, DIM);
1846 
1847  // Number of integration points
1848  unsigned n_intpt = integral_pt()->nweight();
1849 
1850  // Set the Vector to hold local coordinates
1851  Vector<double> s(DIM + 1, 0.0);
1852 
1853  // Get Physical Variables from Element
1854  // Reynolds number must be multiplied by the density ratio
1855  double scaled_re = re() * density_ratio();
1856 
1857  // Integers to store the local equations and unknowns
1858  int local_eqn = 0;
1859  int local_unknown = 0;
1860 
1861  // Loop over the integration points
1862  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1863  {
1864  // Assign values of s
1865  for (unsigned i = 0; i < DIM + 1; i++)
1866  {
1867  s[i] = integral_pt()->knot(ipt, i);
1868  }
1869 
1870  // Get the integral weight
1871  double w = integral_pt()->weight(ipt);
1872 
1873  // Call the derivatives of the velocity shape functions
1874  // (Derivs not needed but they are free)
1875  double J = this->dshape_eulerian_at_knot(ipt, psif, dpsidx);
1876 
1877  // Call the pressure shape and test functions
1878  this->dpshape_and_dptest_eulerian_nst(s, psip, dpsip, testp, dtestp);
1879 
1880  // Premultiply the weights and the Jacobian
1881  double W = w * J;
1882 
1883  // Storage for the (Eulerian) coordinates
1884  Vector<double> x(DIM + 1, 0.0);
1885 
1886  // Calculate local values of the pressure and velocity components
1887  Vector<double> interpolated_u(DIM, 0.0);
1888  Vector<double> interpolated_dpdx(DIM, 0.0);
1889 
1890  // Calculate pressure gradient
1891  for (unsigned l = 0; l < n_pres; l++)
1892  {
1893  for (unsigned i = 0; i < DIM; i++)
1894  {
1895  interpolated_dpdx[i] += p_nst(l) * dpsip(l, i);
1896  }
1897  }
1898 
1899  // Loop over the velocity components
1900  for (unsigned i = 0; i < DIM; i++)
1901  {
1902  interpolated_u[i] = interpolated_u_nst(s, i);
1903  }
1904 
1905  // Loop over coordinate directions
1906  for (unsigned i = 0; i < DIM + 1; i++)
1907  {
1908  x[i] = interpolated_x(s, i);
1909  }
1910 
1911  // Source function (for validaton only)
1912  double source = 0.0;
1914  {
1916  }
1917 
1918  // Loop over the shape functions
1919  for (unsigned l = 0; l < n_pres; l++)
1920  {
1921  local_eqn = p_local_eqn(l);
1922 
1923  // If not a boundary conditions
1924  if (local_eqn >= 0)
1925  {
1926  residuals[local_eqn] -= source * testp[l] * W;
1927 
1928  for (unsigned k = 0; k < DIM; k++)
1929  {
1930  residuals[local_eqn] +=
1931  interpolated_dpdx[k] *
1932  (scaled_re * interpolated_u[k] * testp[l] + dtestp(l, k)) * W;
1933  }
1934 
1935  // Jacobian too?
1936  if (flag)
1937  {
1938  // Loop over the shape functions
1939  for (unsigned l2 = 0; l2 < n_pres; l2++)
1940  {
1941  local_unknown = p_local_eqn(l2);
1942 
1943  // If not a boundary conditions
1944  if (local_unknown >= 0)
1945  {
1946  if ((int(eqn_number(local_eqn)) != Pinned_fp_pressure_eqn) &&
1947  (int(eqn_number(local_unknown)) != Pinned_fp_pressure_eqn))
1948  {
1949  for (unsigned k = 0; k < DIM; k++)
1950  {
1951  jacobian(local_eqn, local_unknown) +=
1952  dtestp(l2, k) *
1953  (scaled_re * interpolated_u[k] * testp[l] +
1954  dtestp(l, k)) *
1955  W;
1956  }
1957  }
1958  else
1959  {
1960  if ((int(eqn_number(local_eqn)) == Pinned_fp_pressure_eqn) &&
1961  (int(eqn_number(local_unknown)) ==
1963  {
1964  //
1965  jacobian(local_eqn, local_unknown) = 1.0;
1966  }
1967  } // if
1968  // ((int(eqn_number(local_eqn))!=Pinned_fp_pressure_eqn)&&...
1969  } // if (local_unknown>=0)
1970  } // for (unsigned l2=0;l2<n_pres;l2++)
1971  } // if (flag)
1972  } // if (local_eqn>=0)
1973  } // for (unsigned l=0;l<n_pres;l++)
1974  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
1975 
1976  // Now add boundary contributions from Robin BCs
1977  unsigned nrobin = Pressure_advection_diffusion_robin_element_pt.size();
1978  for (unsigned e = 0; e < nrobin; e++)
1979  {
1981  ->fill_in_generic_residual_contribution_fp_press_adv_diff_robin_bc(
1982  residuals, jacobian, flag);
1983  }
1984  } // End of fill_in_generic_pressure_advection_diffusion_contribution_nst
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
virtual double dpshape_and_dptest_eulerian_nst(const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const =0
const double & re() const
Reynolds number.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:870
const double & density_ratio() const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:973
virtual double p_nst(const unsigned &n_p) const =0
virtual unsigned npres_nst() const =0
Function to return number of pressure degrees of freedom.
virtual int p_local_eqn(const unsigned &n) const =0
return int(ret)+1
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46

References DIM, e(), i, int(), J, k, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, TestProblem::source(), w, oomph::QuadTreeNames::W, and plotDoE::x.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_jacobian(), and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals().

◆ fill_in_generic_pressure_advection_diffusion_contribution_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner. flag=1(or 0): do (or don't) compute the Jacobian as well.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ fill_in_generic_pressure_advection_diffusion_contribution_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner. flag=1(or 0): do (or don't) compute the Jacobian as well.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ fill_in_generic_residual_contribution_nst() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the Navier-Stokes equations. Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

Compute the residuals for the Navier-Stokes equations; flag=1 (or 0): do (or don't) compute the Jacobian as well.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

1998  {
1999  // Return immediately if there are no dofs
2000  if (ndof() == 0) return;
2001 
2002  // Find out how many nodes there are
2003  unsigned n_node = nnode();
2004 
2005  // Find out how many pressure dofs there are
2006  unsigned n_pres = npres_nst();
2007 
2008  // Allocate storage for the indices of the velocity components
2009  unsigned u_nodal_index[DIM];
2010 
2011  // Loop over the velocity components
2012  for (unsigned i = 0; i < DIM; i++)
2013  {
2014  // Find the index at which the i-th local velocity is stored
2015  u_nodal_index[i] = u_index_nst(i);
2016  }
2017 
2018  // Set up memory for the shape functions
2019  Shape psif(n_node);
2020 
2021  // Set up memory for the test functions
2022  Shape testf(n_node);
2023 
2024  // Allocate space for the derivatives of the shape functions
2025  DShape dpsifdx(n_node, DIM + 1);
2026 
2027  // Allocate space for the derivatives of the test functions
2028  DShape dtestfdx(n_node, DIM + 1);
2029 
2030  // Set up memory for pressure shape functions
2031  Shape psip(n_pres);
2032 
2033  // Set up memory for pressure test functions
2034  Shape testp(n_pres);
2035 
2036  // Number of integration points
2037  unsigned n_intpt = integral_pt()->nweight();
2038 
2039  // Set the Vector to hold local coordinates
2040  Vector<double> s(DIM + 1, 0.0);
2041 
2042  //-------------------------------------
2043  // Get physical variables from element:
2044  //-------------------------------------
2045  // Reynolds number must be multiplied by the density ratio
2046  double scaled_re = re() * density_ratio();
2047 
2048  // Get the scaled Strouhal value
2049  double scaled_re_st = re() * st() * density_ratio();
2050 
2051  // Get the scaled Womersley number differentiated w.r.t. the Strouhal number
2052  double scaled_dre_st_dst = re() * density_ratio();
2053 
2054  // Get the scaled Reynolds / Froude number
2055  double scaled_re_inv_fr = re_invfr() * density_ratio();
2056 
2057  // Get the viscosity ratio
2058  double visc_ratio = viscosity_ratio();
2059 
2060  // Get the gravity vector
2061  Vector<double> G = g();
2062 
2063  // Integer to store the local equation number
2064  int local_eqn = 0;
2065 
2066  // Integer to store the local unknown number
2067  int local_unknown = 0;
2068 
2069  // Loop over the integration points
2070  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
2071  {
2072  // Assign values of s
2073  for (unsigned i = 0; i < DIM + 1; i++)
2074  {
2075  // Calculate the i-th local coordinate
2076  s[i] = integral_pt()->knot(ipt, i);
2077  }
2078 
2079  // Get the integral weight
2080  double w = integral_pt()->weight(ipt);
2081 
2082  // Call the derivatives of the shape and test functions
2084  ipt, psif, dpsifdx, testf, dtestfdx);
2085 
2086  // Call the pressure shape and test functions
2087  pshape_nst(s, psip, testp);
2088 
2089  // Pre-multiply the weights and the Jacobian
2090  double W = w * J;
2091 
2092  // Storage for the interpolated time value
2093  double interpolated_t = 0.0;
2094 
2095  // Storage for the interpolated pressure value
2096  double interpolated_p = 0.0;
2097 
2098  // Storage for the spatial coordinates
2099  Vector<double> interpolated_x(DIM, 0.0);
2100 
2101  // Storage for the interpolated velocity components
2102  Vector<double> interpolated_u(DIM, 0.0);
2103 
2104  // Storage for the interpolated time-derivative of the velocities
2105  Vector<double> interpolated_dudt(DIM, 0.0);
2106 
2107  // Storage for the mesh velocity
2108  Vector<double> mesh_velocity(DIM, 0.0);
2109 
2110  // Storage for the spatial derivatives of the velocity components
2111  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
2112 
2113  // Calculate pressure
2114  for (unsigned l = 0; l < n_pres; l++)
2115  {
2116  // Update the current approximation to the interpolated pressure
2117  interpolated_p += p_nst(l) * psip[l];
2118  }
2119 
2120  //-------------------------------------------------------------------
2121  // Calculate velocities, derivatives, source function and body force:
2122  //-------------------------------------------------------------------
2123  // Loop over nodes
2124  for (unsigned l = 0; l < n_node; l++)
2125  {
2126  // Update the interpolated time value
2127  interpolated_t += raw_nodal_position(l, DIM) * psif(l);
2128 
2129  // Loop over coordinate directions
2130  for (unsigned i = 0; i < DIM; i++)
2131  {
2132  // Get the nodal value
2133  double u_value = raw_nodal_value(l, u_nodal_index[i]);
2134 
2135  // Update the i-th interpolated velocity component
2136  interpolated_u[i] += u_value * psif[l];
2137 
2138  // Update the i-th interpolated coordinate value
2139  interpolated_x[i] += raw_nodal_position(l, i) * psif[l];
2140 
2141  // Update the interpolated du_i/dt value
2142  interpolated_dudt[i] += u_value * dpsifdx(l, DIM);
2143 
2144  // Loop over derivative directions
2145  for (unsigned j = 0; j < DIM; j++)
2146  {
2147  // Update the interpolated du_i/dx_j value
2148  interpolated_dudx(i, j) += u_value * dpsifdx(l, j);
2149  }
2150  } // for (unsigned i=0;i<DIM;i++)
2151  } // for (unsigned l=0;l<n_node;l++)
2152 
2153  // If ALE is enabled
2154  if (!ALE_is_disabled)
2155  {
2156  // Loop over nodes
2157  for (unsigned l = 0; l < n_node; l++)
2158  {
2159  // Loop over directions
2160  for (unsigned i = 0; i < DIM; i++)
2161  {
2162  // DRAIG: Check to see if the velocity is actually consistent
2163  // with the imposed mesh velocity...
2164  // Update the i-th mesh velocity component
2165  mesh_velocity[i] += raw_nodal_position(l, i) * dpsifdx(l, DIM);
2166  }
2167  } // for (unsigned l=0;l<n_node;l++)
2168  } // if (!ALE_is_disabled)
2169 
2170  // Allocate space for the body force
2171  Vector<double> body_force(DIM, 0.0);
2172 
2173  // Get the user-defined body force term
2174  get_body_force_nst(interpolated_t, ipt, s, interpolated_x, body_force);
2175 
2176  // Get the user-defined source function
2177  double source = get_source_nst(interpolated_t, ipt, interpolated_x);
2178 
2179  //---------------------------------
2180  // Assemble residuals and Jacobian:
2181  //---------------------------------
2182  //--------------------
2183  // Momentum equations:
2184  //--------------------
2185  // Loop over the test functions
2186  for (unsigned l = 0; l < n_node; l++)
2187  {
2188  // Loop over the velocity components
2189  for (unsigned i = 0; i < DIM; i++)
2190  {
2191  // Get the local equation number associated with this unknown and node
2192  local_eqn = nodal_local_eqn(l, u_nodal_index[i]);
2193 
2194  // If it's not a boundary condition
2195  if (local_eqn >= 0)
2196  {
2197  // Add the user-defined body force terms
2198  residuals[local_eqn] += body_force[i] * testf[l] * W;
2199 
2200  // Add the gravitational body force term
2201  residuals[local_eqn] += scaled_re_inv_fr * testf[l] * G[i] * W;
2202 
2203  // Add the pressure gradient term
2204  residuals[local_eqn] += interpolated_p * dtestfdx(l, i) * W;
2205 
2206  // Add in the contribution from the time derivative
2207  residuals[local_eqn] -=
2208  scaled_re_st * interpolated_dudt[i] * testf[l] * W;
2209 
2210  // If ALE is enabled
2211  if (!ALE_is_disabled)
2212  {
2213  // Loop over the coordinate directions
2214  for (unsigned k = 0; k < DIM; k++)
2215  {
2216  // Add in the mesh velocity contribution
2217  residuals[local_eqn] +=
2218  (scaled_re_st * mesh_velocity[k] * interpolated_dudx(i, k) *
2219  testf[l] * W);
2220  }
2221  } // if (!ALE_is_disabled)
2222 
2223  // Loop over the coordinate directions
2224  for (unsigned k = 0; k < DIM; k++)
2225  {
2226  // Add in the convective term contribution
2227  residuals[local_eqn] -= (scaled_re * interpolated_u[k] *
2228  interpolated_dudx(i, k) * testf[l] * W);
2229  }
2230 
2231  // Loop over the coordinate directions
2232  for (unsigned k = 0; k < DIM; k++)
2233  {
2234  // Add in the stress tensor terms:
2235  // NOTE: The viscosity ratio needs to go in here to ensure
2236  // continuity of normal stress is satisfied even in flows
2237  // with zero pressure gradient!
2238  residuals[local_eqn] -= ((interpolated_dudx(i, k) +
2239  Gamma[i] * interpolated_dudx(k, i)) *
2240  visc_ratio * dtestfdx(l, k) * W);
2241  }
2242 
2243  //------------------------
2244  // Calculate the Jacobian:
2245  //------------------------
2246  // If we also need to construct the Jacobian
2247  if (flag)
2248  {
2249  // Loop over the velocity shape functions again
2250  for (unsigned l2 = 0; l2 < n_node; l2++)
2251  {
2252  // Loop over the velocity components again
2253  for (unsigned i2 = 0; i2 < DIM; i2++)
2254  {
2255  // Get the local equation number associated with this unknown
2256  local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
2257 
2258  // If we're at a proper degree of freedom
2259  if (local_unknown >= 0)
2260  {
2261  // Add the contribution to the elemental matrix
2262  jacobian(local_eqn, local_unknown) -=
2263  (visc_ratio * Gamma[i] * dpsifdx(l2, i) *
2264  dtestfdx(l, i2) * W);
2265 
2266  // Now add in the inertial terms
2267  jacobian(local_eqn, local_unknown) -=
2268  (scaled_re * psif[l2] * interpolated_dudx(i, i2) *
2269  testf[l] * W);
2270 
2271  // Extra component if i2=i
2272  if (i2 == i)
2273  {
2274  // If we also need to construct the mass matrix (only
2275  // diagonal entries)
2276  if (flag == 2)
2277  {
2278  // NOTE: This is positive because the mass matrix is
2279  // taken to the other side of the equation when
2280  // formulating the generalised eigenproblem.
2281  mass_matrix(local_eqn, local_unknown) +=
2282  (scaled_re_st * psif[l2] * testf[l] * W);
2283  }
2284 
2285  // Add in the time-derivative contribution
2286  jacobian(local_eqn, local_unknown) -=
2287  (scaled_re_st * dpsifdx(l2, DIM) * testf[l] * W);
2288 
2289  // If ALE is enabled
2290  if (!ALE_is_disabled)
2291  {
2292  // Loop over the velocity components
2293  for (unsigned k = 0; k < DIM; k++)
2294  {
2295  // Add in the mesh velocity contribution
2296  jacobian(local_eqn, local_unknown) +=
2297  (scaled_re_st * mesh_velocity[k] * dpsifdx(l2, k) *
2298  testf[l] * W);
2299  }
2300  } // if (!ALE_is_disabled)
2301 
2302  // Loop over the velocity components
2303  for (unsigned k = 0; k < DIM; k++)
2304  {
2305  // Add in the convective term contribution
2306  jacobian(local_eqn, local_unknown) -=
2307  (scaled_re * interpolated_u[k] * dpsifdx(l2, k) *
2308  testf[l] * W);
2309  }
2310 
2311  // Loop over the velocity components
2312  for (unsigned k = 0; k < DIM; k++)
2313  {
2314  // Add in the velocity gradient terms
2315  jacobian(local_eqn, local_unknown) -=
2316  (visc_ratio * dpsifdx(l2, k) * dtestfdx(l, k) * W);
2317  }
2318  } // if (i2==i)
2319  } // if (local_unknown>=0)
2320  } // for (unsigned i2=0;i2<DIM;i2++)
2321  } // for (unsigned l2=0;l2<n_node;l2++)
2322 
2323  // Loop over pressure shape functions
2324  for (unsigned l2 = 0; l2 < n_pres; l2++)
2325  {
2326  // Get the local equation number associated with this degree of
2327  // freedom
2328  local_unknown = p_local_eqn(l2);
2329 
2330  // If we are at a proper degree of freedom
2331  if (local_unknown >= 0)
2332  {
2333  // Add in the pressure gradient contribution
2334  jacobian(local_eqn, local_unknown) +=
2335  psip[l2] * dtestfdx(l, i) * W;
2336  }
2337  } // for (unsigned l2=0;l2<n_pres;l2++)
2338 
2339  //------------------------------------
2340  // Calculate external data information
2341  //------------------------------------
2342  // If we're storing the Strouhal number as external data then we
2343  // need to calculate dr/d(St) in the elemental Jacobian
2345  {
2346  // The index of the external data (there's only one!)
2347  unsigned data_index = 0;
2348 
2349  // The index of the unknown value stored in the external data
2350  unsigned value_index = 0;
2351 
2352  // Get the local equation number associated with the extra
2353  // unknown
2354  local_unknown =
2355  this->external_local_eqn(data_index, value_index);
2356 
2357  // If we're at a non-zero degree of freedom add in the entry
2358  if (local_unknown >= 0)
2359  {
2360  // Add in the contribution from the time derivative
2361  jacobian(local_eqn, local_unknown) -=
2362  (scaled_dre_st_dst * interpolated_dudt[i] * testf[l] * W);
2363 
2364  // If ALE is enabled
2365  if (!ALE_is_disabled)
2366  {
2367  // Loop over the coordinate directions
2368  for (unsigned k = 0; k < DIM; k++)
2369  {
2370  // Add in the mesh velocity contribution
2371  jacobian(local_eqn, local_unknown) +=
2372  (scaled_dre_st_dst * mesh_velocity[k] *
2373  interpolated_dudx(i, k) * testf[l] * W);
2374  }
2375  } // if (!ALE_is_disabled)
2376  } // if (local_unknown>=0)
2377  } // if (Strouhal_is_stored_as_external_data)
2378  } // if (flag)
2379  } // if (local_eqn>=0)
2380  } // for (unsigned i=0;i<DIM;i++)
2381  } // for (unsigned l=0;l<n_node;l++)
2382 
2383  //---------------------
2384  // Continuity equation:
2385  //---------------------
2386  // Loop over the shape functions
2387  for (unsigned l = 0; l < n_pres; l++)
2388  {
2389  // Get the local equation number associated with the pressure dof
2390  local_eqn = p_local_eqn(l);
2391 
2392  // If it's not a boundary condition
2393  if (local_eqn >= 0)
2394  {
2395  // Add in the source term contribution
2396  residuals[local_eqn] -= source * testp[l] * W;
2397 
2398  // Loop over velocity components
2399  for (unsigned k = 0; k < DIM; k++)
2400  {
2401  // Add in the velocity gradient terms
2402  residuals[local_eqn] += interpolated_dudx(k, k) * testp[l] * W;
2403  }
2404 
2405  //------------------------
2406  // Calculate the Jacobian:
2407  //------------------------
2408  // If we also need to construct the Jacobian
2409  if (flag)
2410  {
2411  // Loop over the velocity shape functions
2412  for (unsigned l2 = 0; l2 < n_node; l2++)
2413  {
2414  // Loop over velocity components
2415  for (unsigned i2 = 0; i2 < DIM; i2++)
2416  {
2417  // Get the local equation number associated with this node
2418  local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
2419 
2420  // If we're at a proper degree of freedom
2421  if (local_unknown >= 0)
2422  {
2423  // Add in the velocity gradient contribution
2424  jacobian(local_eqn, local_unknown) +=
2425  dpsifdx(l2, i2) * testp[l] * W;
2426  }
2427  } // for (unsigned i2=0;i2<DIM;i2++)
2428  } // for (unsigned l2=0;l2<n_node;l2++)
2429  } // if (flag)
2430  } // if (local_eqn>=0)
2431  } // for (unsigned l=0;l<n_pres;l++)
2432  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
2433  } // End of fill_in_generic_residual_contribution_nst
JacobiRotation< float > G
Definition: Jacobi_makeGivens.cpp:2
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2576
double raw_nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.cc:1686
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
static Vector< double > Gamma
Navier-Stokes equations static data.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:833
const double & st() const
Strouhal parameter (const. version)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:894
virtual double dshape_and_dtest_eulerian_at_knot_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
const Vector< double > & g() const
Vector of gravitational components.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:997
virtual void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:620
const double & re_invfr() const
Global inverse Froude number.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:985
virtual void pshape_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
virtual double get_source_nst(const double &time, const unsigned &ipt, const Vector< double > &x)
Calculate the source fct at a given time and Eulerian position.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:691
const double & viscosity_ratio() const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:960
void body_force(const double &time, const Vector< double > &x, Vector< double > &result)
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:96

References oomph::ALE_is_disabled, Global_Parameters::body_force(), DIM, G, GlobalPhysicalVariables::Gamma, i, J, j, k, s, TestProblem::source(), w, and oomph::QuadTreeNames::W.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_residuals().

◆ fill_in_generic_residual_contribution_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the Navier-Stokes equations. Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ fill_in_generic_residual_contribution_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix,
const unsigned flag 
)
protectedvirtual

Compute the residuals for the Navier-Stokes equations. Flag=1 (or 0): do (or don't) compute the Jacobian as well. Flag=2: Fill in mass matrix too.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ fill_in_pressure_advection_diffusion_jacobian() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the residuals and Jacobian for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1730  {
1731  // Do we want to compute the Jacobian? ANSWER: Yes!
1732  unsigned compute_jacobian_flag = 1;
1733 
1734  // Call the generic routine with the appropriate flag
1736  residuals, jacobian, compute_jacobian_flag);
1737  } // End of fill_in_pressure_advection_diffusion_jacobian
virtual void fill_in_generic_pressure_advection_diffusion_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:1812

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fill_in_pressure_advection_diffusion_jacobian() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the residuals and Jacobian for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1730  {
1731  // Do we want to compute the Jacobian? ANSWER: Yes!
1732  unsigned compute_jacobian_flag = 1;
1733 
1734  // Call the generic routine with the appropriate flag
1736  residuals, jacobian, compute_jacobian_flag);
1737  } // End of fill_in_pressure_advection_diffusion_jacobian

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fill_in_pressure_advection_diffusion_jacobian() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute the residuals and Jacobian for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1703  {
1704  // Do we want to compute the Jacobian? ANSWER: Yes!
1705  unsigned compute_jacobian_flag = 1;
1706 
1707  // Call the generic routine with the appropriate flag
1709  residuals, jacobian, compute_jacobian_flag);
1710  } // End of fill_in_pressure_advection_diffusion_jacobian

References oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fill_in_pressure_advection_diffusion_residuals() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1716  {
1717  // Do we want to compute the Jacobian? ANSWER: No!
1718  unsigned compute_jacobian_flag = 0;
1719 
1720  // Call the generic routine with the appropriate flag
1722  residuals, GeneralisedElement::Dummy_matrix, compute_jacobian_flag);
1723  } // End of fill_in_pressure_advection_diffusion_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fill_in_pressure_advection_diffusion_residuals() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1716  {
1717  // Do we want to compute the Jacobian? ANSWER: No!
1718  unsigned compute_jacobian_flag = 0;
1719 
1720  // Call the generic routine with the appropriate flag
1722  residuals, GeneralisedElement::Dummy_matrix, compute_jacobian_flag);
1723  } // End of fill_in_pressure_advection_diffusion_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fill_in_pressure_advection_diffusion_residuals() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp preconditioner.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1689  {
1690  // Do we want to compute the Jacobian? ANSWER: No!
1691  unsigned compute_jacobian_flag = 0;
1692 
1693  // Call the generic routine with the appropriate flag
1695  residuals, GeneralisedElement::Dummy_matrix, compute_jacobian_flag);
1696  } // End of fill_in_pressure_advection_diffusion_residuals

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_generic_pressure_advection_diffusion_contribution_nst().

◆ fix_pressure() [1/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fix_pressure ( const unsigned p_dof,
const double p_value 
)
pure virtual

◆ fix_pressure() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fix_pressure ( const unsigned p_dof,
const double p_value 
)
pure virtual

◆ fix_pressure() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::fix_pressure ( const unsigned p_dof,
const double p_value 
)
pure virtual

◆ full_output() [1/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile)
inline

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. The default number of plot points is five

1508  {
1509  // Set the number of plot points in each direction
1510  unsigned n_plot = 5;
1511 
1512  // Forward the call to the appropriate output function
1513  full_output(outfile, n_plot);
1514  } // End of full_output
void full_output(std::ostream &outfile)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1507

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::full_output().

◆ full_output() [2/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile)
inline

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. The default number of plot points is five

1508  {
1509  // Set the number of plot points in each direction
1510  unsigned n_plot = 5;
1511 
1512  // Forward the call to the appropriate output function
1513  full_output(outfile, n_plot);
1514  } // End of full_output

References oomph::SpaceTimeNavierStokesEquations< DIM >::full_output().

◆ full_output() [3/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile)
inline

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. The default number of plot points is five

1482  {
1483  // Set the number of plot points in each direction
1484  unsigned n_plot = 5;
1485 
1486  // Forward the call to the appropriate output function
1487  full_output(outfile, n_plot);
1488  } // End of full_output

References oomph::SpaceTimeNavierStokesEquations< DIM >::full_output().

◆ full_output() [4/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile,
const unsigned n_plot 
)

Full output function: x,y,t,u,v,p,du/dt,dv/dt,dissipation in tecplot format. Use n_plot plot points in each coordinate direction

Full output function: x,y,t,u,v,p,du/dt,dv/dt,dissipation in tecplot format. Specified number of plot points in each coordinate direction

1093  {
1094  // Vector of local coordinates
1095  Vector<double> s(DIM + 1, 0.0);
1096 
1097  // Tecplot header info
1098  outfile << tecplot_zone_string(n_plot);
1099 
1100  // Find out how many nodes there are
1101  unsigned n_node = nnode();
1102 
1103  // Set up memory for the shape functions
1104  Shape psif(n_node);
1105 
1106  // Set up memory for the shape function derivatives
1107  DShape dpsifdx(n_node, DIM);
1108 
1109  // How many plot points in total?
1110  unsigned num_plot_points = nplot_points(n_plot);
1111 
1112  // Loop over plot points
1113  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
1114  {
1115  // Get the local coordinates of plot point
1116  get_s_plot(i_plot, n_plot, s);
1117 
1118  // Call the derivatives of the shape and test functions
1119  dshape_eulerian(s, psif, dpsifdx);
1120 
1121  // Allocate storage for the mesh velocity
1122  Vector<double> mesh_velocity(DIM, 0.0);
1123 
1124  // Allocate storage for the acceleration
1125  Vector<double> du_dt(DIM, 0.0);
1126 
1127  // Allocate storage for the ALE acceleration
1128  Vector<double> du_dt_ALE(DIM, 0.0);
1129 
1130  // Allocate storage for the velocity derivatives
1131  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
1132 
1133  //--------------------------------------
1134  // Calculate velocities and derivatives:
1135  //--------------------------------------
1136  // Loop over directions
1137  for (unsigned i = 0; i < DIM; i++)
1138  {
1139  // Get the index at which velocity i is stored
1140  unsigned u_nodal_index = u_index_nst(i);
1141 
1142  // Loop over nodes
1143  for (unsigned l = 0; l < n_node; l++)
1144  {
1145  // Get the nodal value
1146  double u_value = nodal_value(l, u_nodal_index);
1147 
1148  // Update the i-th acceleration component
1149  du_dt[i] += u_value * dpsifdx(l, DIM);
1150 
1151  // Update the i-th mesh velocity component
1152  mesh_velocity[i] += nodal_position(l, i) * dpsifdx(l, DIM);
1153 
1154  // Loop over derivative directions for velocity gradients
1155  for (unsigned j = 0; j < DIM; j++)
1156  {
1157  // Update the value of du_i/dx_j
1158  interpolated_dudx(i, j) += u_value * dpsifdx(l, j);
1159  }
1160  } // for (unsigned l=0;l<n_node;l++)
1161  } // for (unsigned i=0;i<DIM;i++)
1162 
1163  //---------------------------------------------
1164  // Get du/dt in ALE form (incl. mesh velocity):
1165  //---------------------------------------------
1166  // Loop over the coordinate directions
1167  for (unsigned i = 0; i < DIM; i++)
1168  {
1169  // Store the i-th acceleration component
1170  du_dt_ALE[i] = du_dt[i];
1171 
1172  // Loop over the coordinate directions
1173  for (unsigned k = 0; k < DIM; k++)
1174  {
1175  // Take the mesh velocity into account
1176  du_dt_ALE[i] -= mesh_velocity[k] * interpolated_dudx(i, k);
1177  }
1178  } // for (unsigned i=0;i<DIM;i++)
1179 
1180  // Output the coordinates
1181  for (unsigned i = 0; i < DIM + 1; i++)
1182  {
1183  // Output the i-th coordinate value
1184  outfile << interpolated_x(s, i) << " ";
1185  }
1186 
1187  // Output the velocity components
1188  for (unsigned i = 0; i < DIM; i++)
1189  {
1190  // Output the i-th velocity component
1191  outfile << interpolated_u_nst(s, i) << " ";
1192  }
1193 
1194  // Output the pressure
1195  outfile << interpolated_p_nst(s) << " ";
1196 
1197  // Output the acceleration
1198  for (unsigned i = 0; i < DIM; i++)
1199  {
1200  // Output the ALE acceleration term
1201  outfile << du_dt_ALE[i] << " ";
1202  }
1203 
1204  // Dissipation
1205  outfile << dissipation(s) << " ";
1206 
1207  // End the line
1208  outfile << std::endl;
1209  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
1210 
1211  // Write tecplot footer (e.g. FE connectivity lists)
1212  write_tecplot_zone_footer(outfile, n_plot);
1213  } // End of full_output
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
double dissipation() const
Return integral of dissipation over element.
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:1305

References DIM, i, j, k, and s.

◆ full_output() [5/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile,
const unsigned n_plot 
)

Full output function: x,y,t,u,v,p,du/dt,dv/dt,dissipation in tecplot format. Use n_plot plot points in each coordinate direction

◆ full_output() [6/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::full_output ( std::ostream &  outfile,
const unsigned n_plot 
)

Full output function: x,y,t,u,v,p,du/dt,dv/dt,dissipation in tecplot format. Use n_plot plot points in each coordinate direction

◆ g() [1/3]

template<unsigned DIM>
const Vector<double>& oomph::SpaceTimeNavierStokesEquations< DIM >::g ( ) const
inline

Vector of gravitational components.

998  {
999  return *G_pt;
1000  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

◆ g() [2/3]

template<unsigned DIM>
const Vector<double>& oomph::SpaceTimeNavierStokesEquations< DIM >::g ( ) const
inline

Vector of gravitational components.

998  {
999  return *G_pt;
1000  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

◆ g() [3/3]

template<unsigned DIM>
const Vector<double>& oomph::SpaceTimeNavierStokesEquations< DIM >::g ( ) const
inline

Vector of gravitational components.

972  {
973  return *G_pt;
974  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

◆ g_pt() [1/3]

template<unsigned DIM>
Vector<double>*& oomph::SpaceTimeNavierStokesEquations< DIM >::g_pt ( )
inline

Pointer to Vector of gravitational components.

1004  {
1005  return G_pt;
1006  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ g_pt() [2/3]

template<unsigned DIM>
Vector<double>*& oomph::SpaceTimeNavierStokesEquations< DIM >::g_pt ( )
inline

Pointer to Vector of gravitational components.

1004  {
1005  return G_pt;
1006  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

◆ g_pt() [3/3]

template<unsigned DIM>
Vector<double>*& oomph::SpaceTimeNavierStokesEquations< DIM >::g_pt ( )
inline

Pointer to Vector of gravitational components.

978  {
979  return G_pt;
980  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::G_pt.

◆ get_body_force_gradient_nst() [1/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::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 
)
inlineprotectedvirtual

Get gradient of body force term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

652  {
653  // Reference value
654  Vector<double> body_force(DIM, 0.0);
655 
656  // Get the body force vector
657  get_body_force_nst(time, ipt, s, x, body_force);
658 
659  // Get the finite-difference step size
661 
662  // The body force computed at the perturbed coordinates
663  Vector<double> body_force_pls(DIM, 0.0);
664 
665  // Copy the (Eulerian) coordinate vector x
666  Vector<double> x_pls(x);
667 
668  // Loop over the coordinate directions
669  for (unsigned i = 0; i < DIM; i++)
670  {
671  // Update the i-th entry
672  x_pls[i] += eps_fd;
673 
674  // Get the body force at the current time
675  get_body_force_nst(time, ipt, s, x_pls, body_force_pls);
676 
677  // Loop over the coordinate directions
678  for (unsigned j = 0; j < DIM; j++)
679  {
680  // Finite-difference the body force derivative
681  d_body_force_dx(j, i) = (body_force_pls[j] - body_force[j]) / eps_fd;
682  }
683 
684  // Reset the i-th entry
685  x_pls[i] = x[i];
686  }
687  } // End of get_body_force_gradient_nst
static double Default_fd_jacobian_step
Definition: elements.h:1198

References Global_Parameters::body_force(), oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst(), i, j, s, and plotDoE::x.

◆ get_body_force_gradient_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::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 
)
inlineprotectedvirtual

Get gradient of body force term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

652  {
653  // Reference value
654  Vector<double> body_force(DIM, 0.0);
655 
656  // Get the body force vector
657  get_body_force_nst(time, ipt, s, x, body_force);
658 
659  // Get the finite-difference step size
661 
662  // The body force computed at the perturbed coordinates
663  Vector<double> body_force_pls(DIM, 0.0);
664 
665  // Copy the (Eulerian) coordinate vector x
666  Vector<double> x_pls(x);
667 
668  // Loop over the coordinate directions
669  for (unsigned i = 0; i < DIM; i++)
670  {
671  // Update the i-th entry
672  x_pls[i] += eps_fd;
673 
674  // Get the body force at the current time
675  get_body_force_nst(time, ipt, s, x_pls, body_force_pls);
676 
677  // Loop over the coordinate directions
678  for (unsigned j = 0; j < DIM; j++)
679  {
680  // Finite-difference the body force derivative
681  d_body_force_dx(j, i) = (body_force_pls[j] - body_force[j]) / eps_fd;
682  }
683 
684  // Reset the i-th entry
685  x_pls[i] = x[i];
686  }
687  } // End of get_body_force_gradient_nst

References Global_Parameters::body_force(), oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst(), i, j, s, and plotDoE::x.

◆ get_body_force_gradient_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::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 
)
inlineprotectedvirtual

Get gradient of body force term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

635  {
636  // Reference value
637  Vector<double> body_force(DIM, 0.0);
638 
639  // Get the body force vector
640  get_body_force_nst(time, ipt, s, x, body_force);
641 
642  // Get the finite-difference step size
644 
645  // The body force computed at the perturbed coordinates
646  Vector<double> body_force_pls(DIM, 0.0);
647 
648  // Copy the (Eulerian) coordinate vector x
649  Vector<double> x_pls(x);
650 
651  // Loop over the coordinate directions
652  for (unsigned i = 0; i < DIM; i++)
653  {
654  // Update the i-th entry
655  x_pls[i] += eps_fd;
656 
657  // Get the body force at the current time
658  get_body_force_nst(time, ipt, s, x_pls, body_force_pls);
659 
660  // Loop over the coordinate directions
661  for (unsigned j = 0; j < DIM; j++)
662  {
663  // Finite-difference the body force derivative
664  d_body_force_dx(j, i) = (body_force_pls[j] - body_force[j]) / eps_fd;
665  }
666 
667  // Reset the i-th entry
668  x_pls[i] = x[i];
669  }
670  } // End of get_body_force_gradient_nst

References Global_Parameters::body_force(), oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst(), i, j, s, and plotDoE::x.

◆ get_body_force_nst() [1/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst ( const double time,
const unsigned ipt,
const Vector< double > &  s,
const Vector< double > &  x,
Vector< double > &  result 
)
inlineprotectedvirtual

Calculate the body force at a given time and local and/or Eulerian position. This function is virtual so that it can be overloaded in multi-physics elements where the body force might depend on another variable.

625  {
626  // If a function has not been provided
627  if (Body_force_fct_pt == 0)
628  {
629  // Set the body forces to zero
630  result.initialise(0.0);
631  }
632  // If the function pointer is non-zero
633  else
634  {
635  // Call the function
636  (*Body_force_fct_pt)(time, x, result);
637  } // if (Body_force_fct_pt!=0)
638  } // End of get_body_force_nst
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt, oomph::Vector< _Tp >::initialise(), and plotDoE::x.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_gradient_nst().

◆ get_body_force_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst ( const double time,
const unsigned ipt,
const Vector< double > &  s,
const Vector< double > &  x,
Vector< double > &  result 
)
inlineprotectedvirtual

Calculate the body force at a given time and local and/or Eulerian position. This function is virtual so that it can be overloaded in multi-physics elements where the body force might depend on another variable.

625  {
626  // If a function has not been provided
627  if (Body_force_fct_pt == 0)
628  {
629  // Set the body forces to zero
630  result.initialise(0.0);
631  }
632  // If the function pointer is non-zero
633  else
634  {
635  // Call the function
636  (*Body_force_fct_pt)(time, x, result);
637  } // if (Body_force_fct_pt!=0)
638  } // End of get_body_force_nst

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt, oomph::Vector< _Tp >::initialise(), and plotDoE::x.

◆ get_body_force_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst ( const double time,
const unsigned ipt,
const Vector< double > &  s,
const Vector< double > &  x,
Vector< double > &  result 
)
inlineprotectedvirtual

Calculate the body force at a given time and local and/or Eulerian position. This function is virtual so that it can be overloaded in multi-physics elements where the body force might depend on another variable.

608  {
609  // If a function has not been provided
610  if (Body_force_fct_pt == 0)
611  {
612  // Set the body forces to zero
613  result.initialise(0.0);
614  }
615  // If the function pointer is non-zero
616  else
617  {
618  // Call the function
619  (*Body_force_fct_pt)(time, x, result);
620  } // if (Body_force_fct_pt!=0)
621  } // End of get_body_force_nst

References oomph::SpaceTimeNavierStokesEquations< DIM >::Body_force_fct_pt, oomph::Vector< _Tp >::initialise(), and plotDoE::x.

◆ get_dresidual_dnodal_coordinates() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates ( RankThreeTensor< double > &  dresidual_dnodal_coordinates)
virtual

Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j)=d res(l) / dX_{ij}

Compute derivatives of elemental residual vector with respect to nodal coordinates. dresidual_dnodal_coordinates(l,i,j)=d res(l) / dX_{ij} Overloads the FD-based version in the FE base class. DRAIG: This needs doing carefully if the ALE nodes aren't fixed!!!

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

2483  {
2484  // Throw a warning
2485  throw OomphLibError("Space-time update needs to be checked!",
2488 
2489  // Return immediately if there are no dofs
2490  if (ndof() == 0)
2491  {
2492  return;
2493  }
2494 
2495  // Determine number of nodes in element
2496  const unsigned n_node = nnode();
2497 
2498  // Determine number of pressure dofs in element
2499  const unsigned n_pres = npres_nst();
2500 
2501  // Find the indices at which the local velocities are stored
2502  unsigned u_nodal_index[DIM];
2503  for (unsigned i = 0; i < DIM; i++)
2504  {
2505  u_nodal_index[i] = u_index_nst(i);
2506  }
2507 
2508  // Set up memory for the shape and test functions
2509  Shape psif(n_node);
2510  Shape testf(n_node);
2511  DShape dpsifdx(n_node, DIM + 1);
2512  DShape dtestfdx(n_node, DIM + 1);
2513 
2514  // Set up memory for pressure shape and test functions
2515  Shape psip(n_pres), testp(n_pres);
2516 
2517  // Deriatives of shape fct derivatives w.r.t. nodal coords
2518  RankFourTensor<double> d_dpsifdx_dX(DIM, n_node, n_node, DIM);
2519  RankFourTensor<double> d_dtestfdx_dX(DIM, n_node, n_node, DIM);
2520 
2521  // Derivative of Jacobian of mapping w.r.t. to nodal coords
2522  DenseMatrix<double> dJ_dX(DIM, n_node);
2523 
2524  // Derivatives of derivative of u w.r.t. nodal coords
2525  RankFourTensor<double> d_dudx_dX(DIM, n_node, DIM, DIM);
2526 
2527  // Derivatives of nodal velocities w.r.t. nodal coords:
2528  // Assumption: Interaction only local via no-slip so
2529  // X_ij only affects U_ij.
2530  DenseMatrix<double> d_U_dX(DIM, n_node, 0.0);
2531 
2532  // Determine the number of integration points
2533  const unsigned n_intpt = integral_pt()->nweight();
2534 
2535  // Vector to hold local coordinates
2536  Vector<double> s(DIM + 1, 0.0);
2537 
2538  // Get physical variables from element
2539  // (Reynolds number must be multiplied by the density ratio)
2540  double scaled_re = re() * density_ratio();
2541  double scaled_re_st = re_st() * density_ratio();
2542  double scaled_re_inv_fr = re_invfr() * density_ratio();
2543  double visc_ratio = viscosity_ratio();
2544  Vector<double> G = g();
2545 
2546  // FD step
2548 
2549  // Pre-compute derivatives of nodal velocities w.r.t. nodal coords:
2550  // Assumption: Interaction only local via no-slip so
2551  // X_ij only affects U_ij.
2552  bool element_has_node_with_aux_node_update_fct = false;
2553  for (unsigned q = 0; q < n_node; q++)
2554  {
2555  Node* nod_pt = node_pt(q);
2556 
2557  // Only compute if there's a node-update fct involved
2558  if (nod_pt->has_auxiliary_node_update_fct_pt())
2559  {
2560  element_has_node_with_aux_node_update_fct = true;
2561 
2562  // Current nodal velocity
2563  Vector<double> u_ref(DIM);
2564  for (unsigned i = 0; i < DIM; i++)
2565  {
2566  u_ref[i] = *(nod_pt->value_pt(u_nodal_index[i]));
2567  }
2568 
2569  // FD
2570  for (unsigned p = 0; p < DIM; p++)
2571  {
2572  // Make backup
2573  double backup = nod_pt->x(p);
2574 
2575  // Do FD step. No node update required as we're
2576  // attacking the coordinate directly...
2577  nod_pt->x(p) += eps_fd;
2578 
2579  // Do auxiliary node update (to apply no-slip)
2580  nod_pt->perform_auxiliary_node_update_fct();
2581 
2582  // Evaluate
2583  d_U_dX(p, q) =
2584  (*(nod_pt->value_pt(u_nodal_index[p])) - u_ref[p]) / eps_fd;
2585 
2586  // Reset
2587  nod_pt->x(p) = backup;
2588 
2589  // Do auxiliary node update (to apply no slip)
2590  nod_pt->perform_auxiliary_node_update_fct();
2591  }
2592  }
2593  }
2594 
2595  // Integer to store the local equation number
2596  int local_eqn = 0;
2597 
2598  // Loop over the integration points
2599  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
2600  {
2601  // Assign values of s
2602  for (unsigned i = 0; i < DIM + 1; i++)
2603  {
2604  s[i] = integral_pt()->knot(ipt, i);
2605  }
2606 
2607  // Get the integral weight
2608  const double w = integral_pt()->weight(ipt);
2609 
2610  // Call the derivatives of the shape and test functions
2611  const double J = dshape_and_dtest_eulerian_at_knot_nst(ipt,
2612  psif,
2613  dpsifdx,
2614  d_dpsifdx_dX,
2615  testf,
2616  dtestfdx,
2617  d_dtestfdx_dX,
2618  dJ_dX);
2619 
2620  // Call the pressure shape and test functions
2621  pshape_nst(s, psip, testp);
2622 
2623  // Storage for the interpolated time value
2624  double interpolated_t = 0.0;
2625 
2626  // Storage for the interpolated pressure value
2627  double interpolated_p = 0.0;
2628 
2629  // Storage for the spatial coordinates
2630  Vector<double> interpolated_x(DIM, 0.0);
2631 
2632  // Storage for the interpolated velocity components
2633  Vector<double> interpolated_u(DIM, 0.0);
2634 
2635  // Storage for the interpolated time-derivative of the velocities
2636  Vector<double> interpolated_dudt(DIM, 0.0);
2637 
2638  // Storage for the mesh velocity
2639  Vector<double> mesh_velocity(DIM, 0.0);
2640 
2641  // Storage for the spatial derivatives of the velocity components
2642  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
2643 
2644  // Calculate pressure
2645  for (unsigned l = 0; l < n_pres; l++)
2646  {
2647  // Update the current approximation to the interpolated pressure
2648  interpolated_p += p_nst(l) * psip[l];
2649  }
2650 
2651  //-------------------------------------------------------------------
2652  // Calculate velocities, derivatives, source function and body force:
2653  //-------------------------------------------------------------------
2654  // Loop over nodes
2655  for (unsigned l = 0; l < n_node; l++)
2656  {
2657  // Update the interpolated time value
2658  interpolated_t += raw_nodal_position(l, DIM) * psif(l);
2659 
2660  // Loop over coordinate directions
2661  for (unsigned i = 0; i < DIM; i++)
2662  {
2663  // Get the nodal value
2664  double u_value = raw_nodal_value(l, u_nodal_index[i]);
2665 
2666  // Update the i-th interpolated velocity component
2667  interpolated_u[i] += u_value * psif[l];
2668 
2669  // Update the i-th interpolated coordinate value
2670  interpolated_x[i] += raw_nodal_position(l, i) * psif[l];
2671 
2672  // Update the interpolated du_i/dt value
2673  interpolated_dudt[i] += u_value * dpsifdx(l, DIM);
2674 
2675  // Loop over derivative directions
2676  for (unsigned j = 0; j < DIM; j++)
2677  {
2678  // Update the interpolated du_i/dx_j value
2679  interpolated_dudx(i, j) += u_value * dpsifdx(l, j);
2680  }
2681  } // for (unsigned i=0;i<DIM;i++)
2682  } // for (unsigned l=0;l<n_node;l++)
2683 
2684  // If ALE is enabled
2685  if (!ALE_is_disabled)
2686  {
2687  // Loop over nodes
2688  for (unsigned l = 0; l < n_node; l++)
2689  {
2690  // Loop over directions
2691  for (unsigned i = 0; i < DIM; i++)
2692  {
2693  // Update the i-th mesh velocity component
2694  mesh_velocity[i] += raw_nodal_position(l, i) * dpsifdx(l, DIM);
2695  }
2696  } // for (unsigned l=0;l<n_node;l++)
2697  } // if (!ALE_is_disabled)
2698 
2699  // Calculate derivative of du_i/dx_k w.r.t. nodal positions X_{pq}
2700  // DRAIG: CHECK
2701  for (unsigned q = 0; q < n_node; q++)
2702  {
2703  // Loop over coordinate directions
2704  for (unsigned p = 0; p < DIM; p++)
2705  {
2706  for (unsigned i = 0; i < DIM; i++)
2707  {
2708  for (unsigned k = 0; k < DIM; k++)
2709  {
2710  double aux = 0.0;
2711 
2712  for (unsigned j = 0; j < n_node; j++)
2713  {
2714  aux += raw_nodal_value(j, u_nodal_index[i]) *
2715  d_dpsifdx_dX(p, q, j, k);
2716  }
2717 
2718  //
2719  d_dudx_dX(p, q, i, k) = aux;
2720  }
2721  }
2722  }
2723  }
2724 
2725  // Allocate space for the body force
2726  Vector<double> body_force(DIM);
2727 
2728  // Get the user-defined body force term
2729  get_body_force_nst(interpolated_t, ipt, s, interpolated_x, body_force);
2730 
2731  // Get the user-defined source function
2732  const double source = get_source_nst(interpolated_t, ipt, interpolated_x);
2733 
2734  // Note: Can use raw values and avoid bypassing hanging information
2735  // because this is the non-refineable version!
2736 
2737  // Allocate space for the gradient of the body force function
2738  DenseMatrix<double> d_body_force_dx(DIM, DIM, 0.0);
2739 
2740  // Get gradient of body force function
2742  interpolated_t, ipt, s, interpolated_x, d_body_force_dx);
2743 
2744  // Allocate space for the gradient of the source function
2745  Vector<double> source_gradient(DIM, 0.0);
2746 
2747  // Get gradient of source function
2749  interpolated_t, ipt, interpolated_x, source_gradient);
2750 
2751  // Get weight of actual nodal position in computation of mesh velocity
2752  // from positional time stepper
2753  const double pos_time_weight =
2754  (node_pt(0)->position_time_stepper_pt()->weight(1, 0));
2755 
2756  // Get weight of actual nodal value in computation of mesh velocity
2757  // from value time stepper
2758  const double val_time_weight =
2759  node_pt(0)->time_stepper_pt()->weight(1, 0);
2760 
2761  //---------------------------------
2762  // Assemble residuals and Jacobian:
2763  //---------------------------------
2764  //--------------------
2765  // Momentum equations:
2766  //--------------------
2767  // Loop over the test functions
2768  for (unsigned l = 0; l < n_node; l++)
2769  {
2770  // Loop over coordinate directions
2771  for (unsigned i = 0; i < DIM; i++)
2772  {
2773  // Get the local equation number associated with this degree of
2774  // freedom
2775  local_eqn = nodal_local_eqn(l, u_nodal_index[i]);
2776 
2777  // If it's not a boundary condition
2778  if (local_eqn >= 0)
2779  {
2780  // Loop over coordinate directions
2781  for (unsigned p = 0; p < DIM; p++)
2782  {
2783  // Loop over nodes
2784  for (unsigned q = 0; q < n_node; q++)
2785  {
2786  //-----------------------------------
2787  // Residual x derivative of Jacobian:
2788  //-----------------------------------
2789  // Add the user-defined body force terms
2790  double sum = body_force[i] * testf[l];
2791 
2792  // Add the gravitational body force term
2793  sum += scaled_re_inv_fr * testf[l] * G[i];
2794 
2795  // Add the pressure gradient term
2796  sum += interpolated_p * dtestfdx(l, i);
2797 
2798  // Loop over the coordinate directions
2799  for (unsigned k = 0; k < DIM; k++)
2800  {
2801  // Add in the stress tensor contribution
2802  // NOTE: The viscosity ratio needs to go in here to ensure
2803  // continuity of normal stress is satisfied even in flows
2804  // with zero pressure gradient!
2805  sum -= (visc_ratio *
2806  (interpolated_dudx(i, k) +
2807  Gamma[i] * interpolated_dudx(k, i)) *
2808  dtestfdx(l, k));
2809  }
2810 
2811  // Add in the contribution from the time derivative
2812  sum -= scaled_re_st * interpolated_dudt[i] * testf[l];
2813 
2814  // Loop over the coordinate directions
2815  for (unsigned k = 0; k < DIM; k++)
2816  {
2817  // Add in convective term contribution
2818  sum -= scaled_re * interpolated_u[k] *
2819  interpolated_dudx(i, k) * testf[l];
2820  }
2821 
2822  // If ALE is enabled
2823  if (!ALE_is_disabled)
2824  {
2825  // Loop over the coordinate directions
2826  for (unsigned k = 0; k < DIM; k++)
2827  {
2828  // Add in the mesh velocity contribution
2829  sum += scaled_re_st * mesh_velocity[k] *
2830  interpolated_dudx(i, k) * testf[l];
2831  }
2832  }
2833 
2834  // Multiply through by derivative of Jacobian and integration
2835  // weight
2836  dresidual_dnodal_coordinates(local_eqn, p, q) +=
2837  sum * dJ_dX(p, q) * w;
2838 
2839  //----------------------------------
2840  // Derivative of residual x Jacobian
2841  //----------------------------------
2842  // Body force
2843  sum = d_body_force_dx(i, p) * psif(q) * testf(l);
2844 
2845  // Pressure gradient term
2846  sum += interpolated_p * d_dtestfdx_dX(p, q, l, i);
2847 
2848  // Viscous term
2849  for (unsigned k = 0; k < DIM; k++)
2850  {
2851  sum -= (visc_ratio * ((interpolated_dudx(i, k) +
2852  Gamma[i] * interpolated_dudx(k, i)) *
2853  d_dtestfdx_dX(p, q, l, k) +
2854  (d_dudx_dX(p, q, i, k) +
2855  Gamma[i] * d_dudx_dX(p, q, k, i)) *
2856  dtestfdx(l, k)));
2857  }
2858 
2859  // Convective terms, including mesh velocity
2860  for (unsigned k = 0; k < DIM; k++)
2861  {
2862  double tmp = scaled_re * interpolated_u[k];
2863  if (!ALE_is_disabled)
2864  {
2865  tmp -= scaled_re_st * mesh_velocity[k];
2866  }
2867  sum -= tmp * d_dudx_dX(p, q, i, k) * testf(l);
2868  }
2869 
2870  if (!ALE_is_disabled)
2871  {
2872  sum += scaled_re_st * pos_time_weight * psif(q) *
2873  interpolated_dudx(i, p) * testf(l);
2874  }
2875 
2876  // Multiply through by Jacobian and integration weight
2877  dresidual_dnodal_coordinates(local_eqn, p, q) += sum * J * w;
2878 
2879  // Derivs w.r.t. to nodal velocities
2880  // ---------------------------------
2881  if (element_has_node_with_aux_node_update_fct)
2882  {
2883  sum =
2884  -visc_ratio * Gamma[i] * dpsifdx(q, i) * dtestfdx(l, p) -
2885  scaled_re * psif(q) * interpolated_dudx(i, p) * testf(l);
2886  if (i == p)
2887  {
2888  sum -= scaled_re_st * val_time_weight * psif(q) * testf(l);
2889  for (unsigned k = 0; k < DIM; k++)
2890  {
2891  sum -= visc_ratio * dpsifdx(q, k) * dtestfdx(l, k);
2892  double tmp = scaled_re * interpolated_u[k];
2893  if (!ALE_is_disabled)
2894  tmp -= scaled_re_st * mesh_velocity[k];
2895  sum -= tmp * dpsifdx(q, k) * testf(l);
2896  }
2897  }
2898  dresidual_dnodal_coordinates(local_eqn, p, q) +=
2899  sum * d_U_dX(p, q) * J * w;
2900  }
2901  }
2902  }
2903  }
2904  }
2905  } // End of loop over test functions
2906 
2907 
2908  // CONTINUITY EQUATION
2909  // -------------------
2910 
2911  // Loop over the shape functions
2912  for (unsigned l = 0; l < n_pres; l++)
2913  {
2914  local_eqn = p_local_eqn(l);
2915 
2916  // If not a boundary conditions
2917  if (local_eqn >= 0)
2918  {
2919  // Loop over coordinate directions
2920  for (unsigned p = 0; p < DIM; p++)
2921  {
2922  // Loop over nodes
2923  for (unsigned q = 0; q < n_node; q++)
2924  {
2925  // Residual x deriv of Jacobian
2926  //-----------------------------
2927 
2928  // Source term
2929  double aux = -source;
2930 
2931  // Loop over velocity components
2932  for (unsigned k = 0; k < DIM; k++)
2933  {
2934  aux += interpolated_dudx(k, k);
2935  }
2936 
2937  // Multiply through by deriv of Jacobian and integration weight
2938  dresidual_dnodal_coordinates(local_eqn, p, q) +=
2939  aux * dJ_dX(p, q) * testp[l] * w;
2940 
2941  // Derivative of residual x Jacobian
2942  //----------------------------------
2943 
2944  // Loop over velocity components
2945  aux = -source_gradient[p] * psif(q);
2946  for (unsigned k = 0; k < DIM; k++)
2947  {
2948  aux += d_dudx_dX(p, q, k, k);
2949  }
2950  // Multiply through by Jacobian and integration weight
2951  dresidual_dnodal_coordinates(local_eqn, p, q) +=
2952  aux * testp[l] * J * w;
2953 
2954  // Derivs w.r.t. to nodal velocities
2955  //---------------------------------
2956  if (element_has_node_with_aux_node_update_fct)
2957  {
2958  aux = dpsifdx(q, p) * testp(l);
2959  dresidual_dnodal_coordinates(local_eqn, p, q) +=
2960  aux * d_U_dX(p, q) * J * w;
2961  }
2962  }
2963  }
2964  }
2965  }
2966  } // End of loop over integration points
2967  } // End of get_dresidual_dnodal_coordinates
float * p
Definition: Tutorial_Map_using.cpp:9
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
double re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:951
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)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:646
virtual void get_source_gradient_nst(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:715
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Definition: timesteppers.h:594
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:2019

References oomph::ALE_is_disabled, Global_Parameters::body_force(), oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, G, GlobalPhysicalVariables::Gamma, oomph::Node::has_auxiliary_node_update_fct_pt(), i, J, j, k, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, p, oomph::Node::perform_auxiliary_node_update_fct(), Eigen::numext::q, s, TestProblem::source(), tmp, oomph::Data::value_pt(), w, and oomph::Node::x().

◆ get_dresidual_dnodal_coordinates() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates ( RankThreeTensor< double > &  dresidual_dnodal_coordinates)
virtual

Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j)=d res(l) / dX_{ij}

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ get_dresidual_dnodal_coordinates() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates ( RankThreeTensor< double > &  dresidual_dnodal_coordinates)
virtual

Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j)=d res(l) / dX_{ij}

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ get_du_dt() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::get_du_dt ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes. NOTE: This is essentially a wrapper for du_dt_nst() so it can be called externally.

1141  {
1142  // Return the value calculated by du_dt_vdp
1143  return du_dt_nst(n, i);
1144  } // End of get_du_dt

References oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst(), i, and n.

◆ get_du_dt() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::get_du_dt ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes. NOTE: This is essentially a wrapper for du_dt_nst() so it can be called externally.

1141  {
1142  // Return the value calculated by du_dt_vdp
1143  return du_dt_nst(n, i);
1144  } // End of get_du_dt

References oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst(), i, and n.

◆ get_du_dt() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::get_du_dt ( const unsigned n,
const unsigned i 
) const
inline

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes. NOTE: This is essentially a wrapper for du_dt_nst() so it can be called externally.

1115  {
1116  // Return the value calculated by du_dt_vdp
1117  return du_dt_nst(n, i);
1118  } // End of get_du_dt

References oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst(), i, and n.

◆ get_load() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_load ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  load 
)
inlinevirtual

This implements a pure virtual function defined in the FSIFluidElement class. The function computes the traction (on the viscous scale), at the element's local coordinate s, that the fluid element exerts onto an adjacent solid element. The number of arguments is imposed by the interface defined in the FSIFluidElement – only the unit normal N (pointing into the fluid!) is actually used in the computation.

Implements oomph::FSIFluidElement.

1288  {
1289  // Note: get_traction() computes the traction onto the fluid
1290  // if N is the outer unit normal onto the fluid; here we're
1291  // expecting N to point into the fluid so we're getting the
1292  // traction onto the adjacent wall instead!
1293  get_traction(s, N, load);
1294  }
void load(Archive &ar, ParticleHandler &handl)
Definition: Particles.h:21
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.cc:1366
@ N
Definition: constructor.cpp:22

References oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction(), load(), N, and s.

◆ get_load() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_load ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  load 
)
inlinevirtual

This implements a pure virtual function defined in the FSIFluidElement class. The function computes the traction (on the viscous scale), at the element's local coordinate s, that the fluid element exerts onto an adjacent solid element. The number of arguments is imposed by the interface defined in the FSIFluidElement – only the unit normal N (pointing into the fluid!) is actually used in the computation.

Implements oomph::FSIFluidElement.

1288  {
1289  // Note: get_traction() computes the traction onto the fluid
1290  // if N is the outer unit normal onto the fluid; here we're
1291  // expecting N to point into the fluid so we're getting the
1292  // traction onto the adjacent wall instead!
1293  get_traction(s, N, load);
1294  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction(), load(), N, and s.

◆ get_load() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_load ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  load 
)
inlinevirtual

This implements a pure virtual function defined in the FSIFluidElement class. The function computes the traction (on the viscous scale), at the element's local coordinate s, that the fluid element exerts onto an adjacent solid element. The number of arguments is imposed by the interface defined in the FSIFluidElement – only the unit normal N (pointing into the fluid!) is actually used in the computation.

Implements oomph::FSIFluidElement.

1262  {
1263  // Note: get_traction() computes the traction onto the fluid
1264  // if N is the outer unit normal onto the fluid; here we're
1265  // expecting N to point into the fluid so we're getting the
1266  // traction onto the adjacent wall instead!
1267  get_traction(s, N, load);
1268  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction(), load(), N, and s.

◆ get_pressure_and_velocity_mass_matrix_diagonal() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_pressure_and_velocity_mass_matrix_diagonal ( Vector< double > &  press_mass_diag,
Vector< double > &  veloc_mass_diag,
const unsigned which_one = 0 
)
virtual

Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed, otherwise only the pressure (which_one=1) or the velocity mass matrix (which_one=2 – the LSC version of the preconditioner only needs that one)

Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed, otherwise only the pressure (which_one=1) or the velocity mass matrix (which_one=2 – the LSC version of the preconditioner only needs that one).

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

74  {
75  // Resize and initialise
76  unsigned n_dof = ndof();
77 
78  // If space needs to be assigned for the pressure mass matrix
79  if ((which_one == 0) || (which_one == 1))
80  {
81  // Assign the appropriate amount of space
82  press_mass_diag.assign(n_dof, 0.0);
83  }
84 
85  // If space needs to be assigned for the velocity mass matrix
86  if ((which_one == 0) || (which_one == 2))
87  {
88  // Assign the appropriate amount of space
89  veloc_mass_diag.assign(n_dof, 0.0);
90  }
91 
92  // Find out how many nodes there are
93  unsigned n_node = nnode();
94 
95  // Storage for the local coordinates
96  Vector<double> s(DIM + 1, 0.0);
97 
98  // Storage for the local velocity indices
99  Vector<unsigned> u_nodal_index(DIM, 0.0);
100 
101  // Find the indices at which the local velocities are stored
102  for (unsigned i = 0; i < DIM; i++)
103  {
104  // Calculate the i-th local velocity component
105  u_nodal_index[i] = this->u_index_nst(i);
106  }
107 
108  // Set up memory for velocity shape functions
109  Shape psi(n_node);
110 
111  // Find number of pressure dofs
112  unsigned n_pres = npres_nst();
113 
114  // Pressure shape function
115  Shape psi_p(n_pres);
116 
117  // Number of integration points
118  unsigned n_intpt = integral_pt()->nweight();
119 
120  // Integer to store the local equations no
121  int local_eqn = 0;
122 
123  // Loop over the integration points
124  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
125  {
126  // Get the integral weight
127  double w = integral_pt()->weight(ipt);
128 
129  // Get determinant of Jacobian of the mapping
130  double J = J_eulerian_at_knot(ipt);
131 
132  // Assign values of s
133  for (unsigned i = 0; i < DIM + 1; i++)
134  {
135  // Calculate the i-th local coordinate at the ipt-th integration point
136  s[i] = integral_pt()->knot(ipt, i);
137  }
138 
139  // Premultiply weights and Jacobian
140  double W = w * J;
141 
142  // Do we want the velocity one?
143  if ((which_one == 0) || (which_one == 2))
144  {
145  // Get the velocity shape functions
146  shape_at_knot(ipt, psi);
147 
148  // Loop over the velocity shape functions
149  for (unsigned l = 0; l < n_node; l++)
150  {
151  // Loop over the velocity components
152  for (unsigned i = 0; i < DIM; i++)
153  {
154  // Get the local equation number
155  local_eqn = nodal_local_eqn(l, u_nodal_index[i]);
156 
157  // If not a boundary condition
158  if (local_eqn >= 0)
159  {
160  // Add the contribution
161  veloc_mass_diag[local_eqn] += pow(psi[l], 2) * W;
162  }
163  } // for (unsigned i=0;i<n_dim;i++)
164  } // for (unsigned l=0;l<n_node;l++)
165  } // if ((which_one==0)||(which_one==2))
166 
167  // Do we want the pressure one?
168  if ((which_one == 0) || (which_one == 1))
169  {
170  // Get the pressure shape functions
171  pshape_nst(s, psi_p);
172 
173  // Loop over the veclocity shape functions
174  for (unsigned l = 0; l < n_pres; l++)
175  {
176  // Get equation number
177  local_eqn = p_local_eqn(l);
178 
179  // If not a boundary condition
180  if (local_eqn >= 0)
181  {
182  // Add the contribution
183  press_mass_diag[local_eqn] += pow(psi_p[l], 2) * W;
184  }
185  } // for (unsigned l=0;l<n_pres;l++)
186  } // if ((which_one==0)||(which_one==1))
187  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
188  } // End of get_pressure_and_velocity_mass_matrix_diagonal
virtual double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:4168
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220

References DIM, i, J, Eigen::bfloat16_impl::pow(), s, w, and oomph::QuadTreeNames::W.

◆ get_pressure_and_velocity_mass_matrix_diagonal() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_pressure_and_velocity_mass_matrix_diagonal ( Vector< double > &  press_mass_diag,
Vector< double > &  veloc_mass_diag,
const unsigned which_one = 0 
)
virtual

Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed, otherwise only the pressure (which_one=1) or the velocity mass matrix (which_one=2 – the LSC version of the preconditioner only needs that one)

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, oomph::RefineableSpaceTimeNavierStokesEquations< DIM >, and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >.

◆ get_pressure_and_velocity_mass_matrix_diagonal() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_pressure_and_velocity_mass_matrix_diagonal ( Vector< double > &  press_mass_diag,
Vector< double > &  veloc_mass_diag,
const unsigned which_one = 0 
)
virtual

Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed, otherwise only the pressure (which_one=1) or the velocity mass matrix (which_one=2 – the LSC version of the preconditioner only needs that one)

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

◆ get_source_gradient_nst() [1/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_gradient_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x,
Vector< double > &  gradient 
)
inlineprotectedvirtual

Get gradient of source term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

719  {
720  // Reference value
721  double source = get_source_nst(time, ipt, x);
722 
723  // Get the finite-difference step size
725 
726  // The source function value computed at the perturbed coordinates
727  double source_pls = 0.0;
728 
729  // Copy the (Eulerian) coordinate vector, x
730  Vector<double> x_pls(x);
731 
732  // Loop over the coordinate directions
733  for (unsigned i = 0; i < DIM; i++)
734  {
735  // Update the i-th entry
736  x_pls[i] += eps_fd;
737 
738  // Get the body force at the current time
739  source_pls = get_source_nst(time, ipt, x_pls);
740 
741  // Loop over the coordinate directions
742  for (unsigned j = 0; j < DIM; j++)
743  {
744  // Finite-difference the source function gradient
745  gradient[i] = (source_pls - source) / eps_fd;
746  }
747 
748  // Reset the i-th entry
749  x_pls[i] = x[i];
750  }
751  } // End of get_source_gradient_nst

References oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst(), i, j, TestProblem::source(), and plotDoE::x.

◆ get_source_gradient_nst() [2/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_gradient_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x,
Vector< double > &  gradient 
)
inlineprotectedvirtual

Get gradient of source term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

719  {
720  // Reference value
721  double source = get_source_nst(time, ipt, x);
722 
723  // Get the finite-difference step size
725 
726  // The source function value computed at the perturbed coordinates
727  double source_pls = 0.0;
728 
729  // Copy the (Eulerian) coordinate vector, x
730  Vector<double> x_pls(x);
731 
732  // Loop over the coordinate directions
733  for (unsigned i = 0; i < DIM; i++)
734  {
735  // Update the i-th entry
736  x_pls[i] += eps_fd;
737 
738  // Get the body force at the current time
739  source_pls = get_source_nst(time, ipt, x_pls);
740 
741  // Loop over the coordinate directions
742  for (unsigned j = 0; j < DIM; j++)
743  {
744  // Finite-difference the source function gradient
745  gradient[i] = (source_pls - source) / eps_fd;
746  }
747 
748  // Reset the i-th entry
749  x_pls[i] = x[i];
750  }
751  } // End of get_source_gradient_nst

References oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst(), i, j, TestProblem::source(), and plotDoE::x.

◆ get_source_gradient_nst() [3/3]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_gradient_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x,
Vector< double > &  gradient 
)
inlineprotectedvirtual

Get gradient of source term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

702  {
703  // Reference value
704  double source = get_source_nst(time, ipt, x);
705 
706  // Get the finite-difference step size
708 
709  // The source function value computed at the perturbed coordinates
710  double source_pls = 0.0;
711 
712  // Copy the (Eulerian) coordinate vector, x
713  Vector<double> x_pls(x);
714 
715  // Loop over the coordinate directions
716  for (unsigned i = 0; i < DIM; i++)
717  {
718  // Update the i-th entry
719  x_pls[i] += eps_fd;
720 
721  // Get the body force at the current time
722  source_pls = get_source_nst(time, ipt, x_pls);
723 
724  // Loop over the coordinate directions
725  for (unsigned j = 0; j < DIM; j++)
726  {
727  // Finite-difference the source function gradient
728  gradient[i] = (source_pls - source) / eps_fd;
729  }
730 
731  // Reset the i-th entry
732  x_pls[i] = x[i];
733  }
734  } // End of get_source_gradient_nst

References oomph::GeneralisedElement::Default_fd_jacobian_step, DIM, oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst(), i, j, TestProblem::source(), and plotDoE::x.

◆ get_source_nst() [1/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x 
)
inlineprotectedvirtual

Calculate the source fct at a given time and Eulerian position.

694  {
695  // If the function pointer is null
696  if (Source_fct_pt == 0)
697  {
698  // Set the source function value to zero
699  return 0;
700  }
701  // Otherwise call the function pointer
702  else
703  {
704  // Return the appropriate value
705  return (*Source_fct_pt)(time, x);
706  }
707  } // End of get_source_nst

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt, and plotDoE::x.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_gradient_nst().

◆ get_source_nst() [2/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x 
)
inlineprotectedvirtual

Calculate the source fct at a given time and Eulerian position.

694  {
695  // If the function pointer is null
696  if (Source_fct_pt == 0)
697  {
698  // Set the source function value to zero
699  return 0;
700  }
701  // Otherwise call the function pointer
702  else
703  {
704  // Return the appropriate value
705  return (*Source_fct_pt)(time, x);
706  }
707  } // End of get_source_nst

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt, and plotDoE::x.

◆ get_source_nst() [3/3]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_nst ( const double time,
const unsigned ipt,
const Vector< double > &  x 
)
inlineprotectedvirtual

Calculate the source fct at a given time and Eulerian position.

677  {
678  // If the function pointer is null
679  if (Source_fct_pt == 0)
680  {
681  // Set the source function value to zero
682  return 0;
683  }
684  // Otherwise call the function pointer
685  else
686  {
687  // Return the appropriate value
688  return (*Source_fct_pt)(time, x);
689  }
690  } // End of get_source_nst

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt, and plotDoE::x.

◆ get_traction() [1/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::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. N has to be outer unit normal to the fluid.

1368  {
1369  // Allocate space for the strain rate matrix
1370  DenseMatrix<double> strainrate(DIM, DIM);
1371 
1372  // Get velocity gradients
1373  strain_rate(s, strainrate);
1374 
1375  // Get pressure
1376  double press = interpolated_p_nst(s);
1377 
1378  // Loop over traction components
1379  for (unsigned i = 0; i < DIM; i++)
1380  {
1381  // Add in the pressure contribution
1382  traction[i] = -press * N[i];
1383 
1384  // Loop over the strain rate entries
1385  for (unsigned j = 0; j < DIM; j++)
1386  {
1387  // Add in the strain rate contribution
1388  traction[i] += 2.0 * strainrate(i, j) * N[j];
1389  }
1390  } // for (unsigned i=0;i<DIM;i++)
1391  } // End of get_traction

References DIM, i, j, N, and s.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::get_load().

◆ get_traction() [2/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::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. N has to be outer unit normal to the fluid.

◆ get_traction() [3/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::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. N has to be outer unit normal to the fluid.

◆ get_traction() [4/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  traction_p,
Vector< double > &  traction_visc_n,
Vector< double > &  traction_visc_t 
)

Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s, decomposed into pressure and normal and tangential viscous components. N has to be outer unit normal to the fluid.

1406  {
1407  // Allocate space for the traction components
1408  Vector<double> traction_visc(DIM);
1409 
1410  // Allocate space for the velocity gradients
1411  DenseMatrix<double> strainrate(DIM, DIM);
1412 
1413  // Calculate the strain rate at the local coordinate s
1414  strain_rate(s, strainrate);
1415 
1416  // Get pressure
1417  double press = interpolated_p_nst(s);
1418 
1419  // Loop over traction components
1420  for (unsigned i = 0; i < DIM; i++)
1421  {
1422  // Get the pressure contribution
1423  traction_p[i] = -press * N[i];
1424 
1425  // Loop over the coordinate directions
1426  for (unsigned j = 0; j < DIM; j++)
1427  {
1428  // Add in the viscous stress contribution
1429  traction_visc[i] += 2.0 * strainrate(i, j) * N[j];
1430  }
1431 
1432  // Get the normal component of the viscous stress
1433  traction_visc_n[i] = traction_visc[i] * N[i];
1434 
1435  // Get the tangential component of the viscous stress
1436  traction_visc_t[i] = traction_visc[i] - traction_visc_n[i];
1437  } // for (unsigned i=0;i<DIM;i++)
1438  } // End of get_traction

References DIM, i, j, N, and s.

◆ get_traction() [5/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  traction_p,
Vector< double > &  traction_visc_n,
Vector< double > &  traction_visc_t 
)

Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s, decomposed into pressure and normal and tangential viscous components. N has to be outer unit normal to the fluid.

◆ get_traction() [6/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_traction ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  traction_p,
Vector< double > &  traction_visc_n,
Vector< double > &  traction_visc_t 
)

Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s, decomposed into pressure and normal and tangential viscous components. N has to be outer unit normal to the fluid.

◆ get_vorticity() [1/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector as a double

1603  {
1604  // Create a vector to store the vorticity
1605  Vector<double> vort(1, 0.0);
1606 
1607  // Calculate the vorticity
1608  get_vorticity(s, vort);
1609 
1610  // Assign the vorticity
1611  vorticity = vort[0];
1612  } // End of get_vorticity
void get_vorticity(const Vector< double > &s, Vector< double > &vorticity) const
Compute the vorticity vector at local coordinate s.

References s.

◆ get_vorticity() [2/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [3/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector as a double

1603  {
1604  // Create a vector to store the vorticity
1605  Vector<double> vort(1, 0.0);
1606 
1607  // Calculate the vorticity
1608  get_vorticity(s, vort);
1609 
1610  // Assign the vorticity
1611  vorticity = vort[0];
1612  } // End of get_vorticity

References s.

◆ get_vorticity() [4/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [5/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector as a double

1603  {
1604  // Create a vector to store the vorticity
1605  Vector<double> vort(1, 0.0);
1606 
1607  // Calculate the vorticity
1608  get_vorticity(s, vort);
1609 
1610  // Assign the vorticity
1611  vorticity = vort[0];
1612  } // End of get_vorticity

References s.

◆ get_vorticity() [6/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
double vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [7/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector

1538  {
1539 #ifdef PARANOID
1540  if (vorticity.size() != 1)
1541  {
1542  std::ostringstream error_message;
1543  error_message << "Computation of vorticity in 2D requires a 1D vector\n"
1544  << "which contains the only non-zero component of the\n"
1545  << "vorticity vector. You've passed a vector of size "
1546  << vorticity.size() << std::endl;
1547 
1548  throw OomphLibError(
1549  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1550  }
1551 #endif
1552 
1553  // Specify spatial dimension
1554  unsigned DIM = 2;
1555 
1556  // Velocity gradient matrix
1557  DenseMatrix<double> dudx(DIM, DIM, 0.0);
1558 
1559  // Find out how many nodes there are in the element
1560  unsigned n_node = nnode();
1561 
1562  // Set up memory for the shape and test functions
1563  Shape psi(n_node);
1564 
1565  // Set up memory for the shape and test function derivatives
1566  DShape dpsidx(n_node, DIM + 1);
1567 
1568  // Evaluate the shape functions and shape function derivatives at this point
1569  dshape_eulerian(s, psi, dpsidx);
1570 
1571  // Initialise to zero
1572  dudx.initialise(0.0);
1573 
1574  // Loop over velocity components
1575  for (unsigned i = 0; i < DIM; i++)
1576  {
1577  // Get the index at which the i-th velocity is stored
1578  unsigned u_nodal_index = u_index_nst(i);
1579 
1580  // Loop over derivative directions
1581  for (unsigned j = 0; j < DIM; j++)
1582  {
1583  // Loop over nodes
1584  for (unsigned l = 0; l < n_node; l++)
1585  {
1586  // Update the value of du_i/dx_j
1587  dudx(i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1588  }
1589  } // for (unsigned j=0;j<DIM;j++)
1590  } // for (unsigned i=0;i<DIM;i++)
1591 
1592  // Z-component of vorticity
1593  vorticity[0] = dudx(1, 0) - dudx(0, 1);
1594  } // End of get_vorticity

References DIM, i, oomph::DenseMatrix< T >::initialise(), j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ get_vorticity() [8/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [9/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector

1538  {
1539 #ifdef PARANOID
1540  if (vorticity.size() != 1)
1541  {
1542  std::ostringstream error_message;
1543  error_message << "Computation of vorticity in 2D requires a 1D vector\n"
1544  << "which contains the only non-zero component of the\n"
1545  << "vorticity vector. You've passed a vector of size "
1546  << vorticity.size() << std::endl;
1547 
1548  throw OomphLibError(
1549  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1550  }
1551 #endif
1552 
1553  // Specify spatial dimension
1554  unsigned DIM = 2;
1555 
1556  // Velocity gradient matrix
1557  DenseMatrix<double> dudx(DIM, DIM, 0.0);
1558 
1559  // Find out how many nodes there are in the element
1560  unsigned n_node = nnode();
1561 
1562  // Set up memory for the shape and test functions
1563  Shape psi(n_node);
1564 
1565  // Set up memory for the shape and test function derivatives
1566  DShape dpsidx(n_node, DIM + 1);
1567 
1568  // Evaluate the shape functions and shape function derivatives at this point
1569  dshape_eulerian(s, psi, dpsidx);
1570 
1571  // Initialise to zero
1572  dudx.initialise(0.0);
1573 
1574  // Loop over velocity components
1575  for (unsigned i = 0; i < DIM; i++)
1576  {
1577  // Get the index at which the i-th velocity is stored
1578  unsigned u_nodal_index = u_index_nst(i);
1579 
1580  // Loop over derivative directions
1581  for (unsigned j = 0; j < DIM; j++)
1582  {
1583  // Loop over nodes
1584  for (unsigned l = 0; l < n_node; l++)
1585  {
1586  // Update the value of du_i/dx_j
1587  dudx(i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1588  }
1589  } // for (unsigned j=0;j<DIM;j++)
1590  } // for (unsigned i=0;i<DIM;i++)
1591 
1592  // Z-component of vorticity
1593  vorticity[0] = dudx(1, 0) - dudx(0, 1);
1594  } // End of get_vorticity

References DIM, i, oomph::DenseMatrix< T >::initialise(), j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ get_vorticity() [10/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [11/12]

void oomph::SpaceTimeNavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector

1538  {
1539 #ifdef PARANOID
1540  if (vorticity.size() != 1)
1541  {
1542  std::ostringstream error_message;
1543  error_message << "Computation of vorticity in 2D requires a 1D vector\n"
1544  << "which contains the only non-zero component of the\n"
1545  << "vorticity vector. You've passed a vector of size "
1546  << vorticity.size() << std::endl;
1547 
1548  throw OomphLibError(
1549  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1550  }
1551 #endif
1552 
1553  // Specify spatial dimension
1554  unsigned DIM = 2;
1555 
1556  // Velocity gradient matrix
1557  DenseMatrix<double> dudx(DIM, DIM, 0.0);
1558 
1559  // Find out how many nodes there are in the element
1560  unsigned n_node = nnode();
1561 
1562  // Set up memory for the shape and test functions
1563  Shape psi(n_node);
1564 
1565  // Set up memory for the shape and test function derivatives
1566  DShape dpsidx(n_node, DIM + 1);
1567 
1568  // Evaluate the shape functions and shape function derivatives at this point
1569  dshape_eulerian(s, psi, dpsidx);
1570 
1571  // Initialise to zero
1572  dudx.initialise(0.0);
1573 
1574  // Loop over velocity components
1575  for (unsigned i = 0; i < DIM; i++)
1576  {
1577  // Get the index at which the i-th velocity is stored
1578  unsigned u_nodal_index = u_index_nst(i);
1579 
1580  // Loop over derivative directions
1581  for (unsigned j = 0; j < DIM; j++)
1582  {
1583  // Loop over nodes
1584  for (unsigned l = 0; l < n_node; l++)
1585  {
1586  // Update the value of du_i/dx_j
1587  dudx(i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1588  }
1589  } // for (unsigned j=0;j<DIM;j++)
1590  } // for (unsigned i=0;i<DIM;i++)
1591 
1592  // Z-component of vorticity
1593  vorticity[0] = dudx(1, 0) - dudx(0, 1);
1594  } // End of get_vorticity

References DIM, i, oomph::DenseMatrix< T >::initialise(), j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ get_vorticity() [12/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute the vorticity vector at local coordinate s.

◆ interpolated_du_dt_nst() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE representation of function value du_i/dt(s) at local coordinate s

1166  {
1167  // Find number of nodes
1168  unsigned n_node = nnode();
1169 
1170  // Local shape function
1171  Shape psi(n_node);
1172 
1173  // Allocate space for the derivatives of the shape functions
1174  DShape dpsidx(n_node, DIM + 1);
1175 
1176  // Compute the geometric shape functions and also first derivatives
1177  // w.r.t. global coordinates at local coordinate s
1178  dshape_eulerian(s, psi, dpsidx);
1179 
1180  // Initialise value of du_i/dt
1181  double interpolated_dudt = 0.0;
1182 
1183  // Find the index at which the variable is stored
1184  unsigned u_nodal_index = u_index_nst(i);
1185 
1186  // Loop over the local nodes and sum
1187  for (unsigned l = 0; l < n_node; l++)
1188  {
1189  // Update the interpolated du_i/dt value
1190  interpolated_dudt += nodal_value(l, u_nodal_index) * dpsidx(l, DIM);
1191  }
1192 
1193  // Return the interpolated du_i/dt value
1194  return interpolated_dudt;
1195  } // End of interpolated_du_dt_nst

References DIM, oomph::FiniteElement::dshape_eulerian(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::du_dt_nst().

◆ interpolated_du_dt_nst() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE representation of function value du_i/dt(s) at local coordinate s

1166  {
1167  // Find number of nodes
1168  unsigned n_node = nnode();
1169 
1170  // Local shape function
1171  Shape psi(n_node);
1172 
1173  // Allocate space for the derivatives of the shape functions
1174  DShape dpsidx(n_node, DIM + 1);
1175 
1176  // Compute the geometric shape functions and also first derivatives
1177  // w.r.t. global coordinates at local coordinate s
1178  dshape_eulerian(s, psi, dpsidx);
1179 
1180  // Initialise value of du_i/dt
1181  double interpolated_dudt = 0.0;
1182 
1183  // Find the index at which the variable is stored
1184  unsigned u_nodal_index = u_index_nst(i);
1185 
1186  // Loop over the local nodes and sum
1187  for (unsigned l = 0; l < n_node; l++)
1188  {
1189  // Update the interpolated du_i/dt value
1190  interpolated_dudt += nodal_value(l, u_nodal_index) * dpsidx(l, DIM);
1191  }
1192 
1193  // Return the interpolated du_i/dt value
1194  return interpolated_dudt;
1195  } // End of interpolated_du_dt_nst

References DIM, oomph::FiniteElement::dshape_eulerian(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ interpolated_du_dt_nst() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE representation of function value du_i/dt(s) at local coordinate s

1140  {
1141  // Find number of nodes
1142  unsigned n_node = nnode();
1143 
1144  // Local shape function
1145  Shape psi(n_node);
1146 
1147  // Allocate space for the derivatives of the shape functions
1148  DShape dpsidx(n_node, DIM + 1);
1149 
1150  // Compute the geometric shape functions and also first derivatives
1151  // w.r.t. global coordinates at local coordinate s
1152  dshape_eulerian(s, psi, dpsidx);
1153 
1154  // Initialise value of du_i/dt
1155  double interpolated_dudt = 0.0;
1156 
1157  // Find the index at which the variable is stored
1158  unsigned u_nodal_index = u_index_nst(i);
1159 
1160  // Loop over the local nodes and sum
1161  for (unsigned l = 0; l < n_node; l++)
1162  {
1163  // Update the interpolated du_i/dt value
1164  interpolated_dudt += nodal_value(l, u_nodal_index) * dpsidx(l, DIM);
1165  }
1166 
1167  // Return the interpolated du_i/dt value
1168  return interpolated_dudt;
1169  } // End of interpolated_du_dt_nst

References DIM, oomph::FiniteElement::dshape_eulerian(), i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ interpolated_p_nst() [1/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const unsigned t,
const Vector< double > &  s 
) const
inline

Return FE interpolated pressure at local coordinate s at time level t.

2060  {
2061  // Find number of nodes
2062  unsigned n_pres = npres_nst();
2063  // Local shape function
2064  Shape psi(n_pres);
2065  // Find values of shape function
2066  pshape_nst(s, psi);
2067 
2068  // Initialise value of p
2069  double interpolated_p = 0.0;
2070  // Loop over the local nodes and sum
2071  for (unsigned l = 0; l < n_pres; l++)
2072  {
2073  interpolated_p += p_nst(t, l) * psi[l];
2074  }
2075 
2076  return (interpolated_p);
2077  }
t
Definition: plotPSD.py:36

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), s, and plotPSD::t.

◆ interpolated_p_nst() [2/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const unsigned t,
const Vector< double > &  s 
) const
inline

Return FE interpolated pressure at local coordinate s at time level t.

2060  {
2061  // Find number of nodes
2062  unsigned n_pres = npres_nst();
2063  // Local shape function
2064  Shape psi(n_pres);
2065  // Find values of shape function
2066  pshape_nst(s, psi);
2067 
2068  // Initialise value of p
2069  double interpolated_p = 0.0;
2070  // Loop over the local nodes and sum
2071  for (unsigned l = 0; l < n_pres; l++)
2072  {
2073  interpolated_p += p_nst(t, l) * psi[l];
2074  }
2075 
2076  return (interpolated_p);
2077  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), s, and plotPSD::t.

◆ interpolated_p_nst() [3/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const unsigned t,
const Vector< double > &  s 
) const
inline

Return FE interpolated pressure at local coordinate s at time level t.

2033  {
2034  // Find number of nodes
2035  unsigned n_pres = npres_nst();
2036  // Local shape function
2037  Shape psi(n_pres);
2038  // Find values of shape function
2039  pshape_nst(s, psi);
2040 
2041  // Initialise value of p
2042  double interpolated_p = 0.0;
2043  // Loop over the local nodes and sum
2044  for (unsigned l = 0; l < n_pres; l++)
2045  {
2046  interpolated_p += p_nst(t, l) * psi[l];
2047  }
2048 
2049  return (interpolated_p);
2050  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), s, and plotPSD::t.

◆ interpolated_p_nst() [4/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const Vector< double > &  s) const
inlinevirtual

Return FE interpolated pressure at local coordinate s.

2038  {
2039  // Find number of nodes
2040  unsigned n_pres = npres_nst();
2041  // Local shape function
2042  Shape psi(n_pres);
2043  // Find values of shape function
2044  pshape_nst(s, psi);
2045 
2046  // Initialise value of p
2047  double interpolated_p = 0.0;
2048  // Loop over the local nodes and sum
2049  for (unsigned l = 0; l < n_pres; l++)
2050  {
2051  interpolated_p += p_nst(l) * psi[l];
2052  }
2053 
2054  return (interpolated_p);
2055  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), and s.

Referenced by oomph::RefineableQTaylorHoodSpaceTimeElement< DIM >::get_interpolated_values(), oomph::SpaceTimeNavierStokesEquations< DIM >::point_output_data(), and oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_paraview().

◆ interpolated_p_nst() [5/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const Vector< double > &  s) const
inlinevirtual

Return FE interpolated pressure at local coordinate s.

2038  {
2039  // Find number of nodes
2040  unsigned n_pres = npres_nst();
2041  // Local shape function
2042  Shape psi(n_pres);
2043  // Find values of shape function
2044  pshape_nst(s, psi);
2045 
2046  // Initialise value of p
2047  double interpolated_p = 0.0;
2048  // Loop over the local nodes and sum
2049  for (unsigned l = 0; l < n_pres; l++)
2050  {
2051  interpolated_p += p_nst(l) * psi[l];
2052  }
2053 
2054  return (interpolated_p);
2055  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), and s.

◆ interpolated_p_nst() [6/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst ( const Vector< double > &  s) const
inlinevirtual

Return FE interpolated pressure at local coordinate s.

2011  {
2012  // Find number of nodes
2013  unsigned n_pres = npres_nst();
2014  // Local shape function
2015  Shape psi(n_pres);
2016  // Find values of shape function
2017  pshape_nst(s, psi);
2018 
2019  // Initialise value of p
2020  double interpolated_p = 0.0;
2021  // Loop over the local nodes and sum
2022  for (unsigned l = 0; l < n_pres; l++)
2023  {
2024  interpolated_p += p_nst(l) * psi[l];
2025  }
2026 
2027  return (interpolated_p);
2028  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::npres_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst(), and s.

◆ interpolated_u_nst() [1/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const unsigned t,
const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s time level, t. Purposely broken for space-time elements.

1958  {
1959  // Create an output stream
1960  std::ostringstream error_message_stream;
1961 
1962  // Create an error message
1963  error_message_stream << "This interface doesn't make sense in "
1964  << "space-time elements!" << std::endl;
1965 
1966  // Throw an error
1967  throw OomphLibError(error_message_stream.str(),
1970  } // End of interpolated_u_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ interpolated_u_nst() [2/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const unsigned t,
const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s time level, t. Purposely broken for space-time elements.

1958  {
1959  // Create an output stream
1960  std::ostringstream error_message_stream;
1961 
1962  // Create an error message
1963  error_message_stream << "This interface doesn't make sense in "
1964  << "space-time elements!" << std::endl;
1965 
1966  // Throw an error
1967  throw OomphLibError(error_message_stream.str(),
1970  } // End of interpolated_u_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ interpolated_u_nst() [3/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const unsigned t,
const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s time level, t. Purposely broken for space-time elements.

1931  {
1932  // Create an output stream
1933  std::ostringstream error_message_stream;
1934 
1935  // Create an error message
1936  error_message_stream << "This interface doesn't make sense in "
1937  << "space-time elements!" << std::endl;
1938 
1939  // Throw an error
1940  throw OomphLibError(error_message_stream.str(),
1943  } // End of interpolated_u_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ interpolated_u_nst() [4/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s.

1925  {
1926  // Find the number of nodes
1927  unsigned n_node = nnode();
1928 
1929  // Local shape function
1930  Shape psi(n_node);
1931 
1932  // Find values of shape function
1933  shape(s, psi);
1934 
1935  // Get nodal index at which i-th velocity is stored
1936  unsigned u_nodal_index = u_index_nst(i);
1937 
1938  // Initialise value of u
1939  double interpolated_u = 0.0;
1940 
1941  // Loop over the local nodes and sum
1942  for (unsigned l = 0; l < n_node; l++)
1943  {
1944  // Update the i-th velocity component approximation
1945  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
1946  }
1947 
1948  // Return the calculated approximation to the i-th velocity component
1949  return interpolated_u;
1950  } // End of interpolated_u_nst

References i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ interpolated_u_nst() [5/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s.

1925  {
1926  // Find the number of nodes
1927  unsigned n_node = nnode();
1928 
1929  // Local shape function
1930  Shape psi(n_node);
1931 
1932  // Find values of shape function
1933  shape(s, psi);
1934 
1935  // Get nodal index at which i-th velocity is stored
1936  unsigned u_nodal_index = u_index_nst(i);
1937 
1938  // Initialise value of u
1939  double interpolated_u = 0.0;
1940 
1941  // Loop over the local nodes and sum
1942  for (unsigned l = 0; l < n_node; l++)
1943  {
1944  // Update the i-th velocity component approximation
1945  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
1946  }
1947 
1948  // Return the calculated approximation to the i-th velocity component
1949  return interpolated_u;
1950  } // End of interpolated_u_nst

References i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ interpolated_u_nst() [6/9]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated velocity u[i] at local coordinate s.

1898  {
1899  // Find the number of nodes
1900  unsigned n_node = nnode();
1901 
1902  // Local shape function
1903  Shape psi(n_node);
1904 
1905  // Find values of shape function
1906  shape(s, psi);
1907 
1908  // Get nodal index at which i-th velocity is stored
1909  unsigned u_nodal_index = u_index_nst(i);
1910 
1911  // Initialise value of u
1912  double interpolated_u = 0.0;
1913 
1914  // Loop over the local nodes and sum
1915  for (unsigned l = 0; l < n_node; l++)
1916  {
1917  // Update the i-th velocity component approximation
1918  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
1919  }
1920 
1921  // Return the calculated approximation to the i-th velocity component
1922  return interpolated_u;
1923  } // End of interpolated_u_nst

References i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ interpolated_u_nst() [7/9]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
Vector< double > &  velocity 
) const
inline

Compute vector of FE interpolated velocity u at local coordinate s.

1894  {
1895  // Find the number of nodes
1896  unsigned n_node = nnode();
1897 
1898  // Local shape function
1899  Shape psi(n_node);
1900 
1901  // Find values of shape function
1902  shape(s, psi);
1903 
1904  // Loop over the velocity components
1905  for (unsigned i = 0; i < DIM; i++)
1906  {
1907  // Index at which the nodal value is stored
1908  unsigned u_nodal_index = u_index_nst(i);
1909 
1910  // Initialise the i-th value of the velocity vector
1911  velocity[i] = 0.0;
1912 
1913  // Loop over the local nodes and sum
1914  for (unsigned l = 0; l < n_node; l++)
1915  {
1916  // Update the i-th velocity component approximation
1917  velocity[i] += nodal_value(l, u_nodal_index) * psi[l];
1918  }
1919  } // for (unsigned i=0;i<DIM;i++)
1920  } // End of interpolated_u_nst
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107

References DIM, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst(), and Jeffery_Solution::velocity().

Referenced by oomph::RefineableQTaylorHoodSpaceTimeElement< DIM >::get_interpolated_values(), oomph::SpaceTimeNavierStokesEquations< DIM >::point_output_data(), and oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_paraview().

◆ interpolated_u_nst() [8/9]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
Vector< double > &  velocity 
) const
inline

Compute vector of FE interpolated velocity u at local coordinate s.

1894  {
1895  // Find the number of nodes
1896  unsigned n_node = nnode();
1897 
1898  // Local shape function
1899  Shape psi(n_node);
1900 
1901  // Find values of shape function
1902  shape(s, psi);
1903 
1904  // Loop over the velocity components
1905  for (unsigned i = 0; i < DIM; i++)
1906  {
1907  // Index at which the nodal value is stored
1908  unsigned u_nodal_index = u_index_nst(i);
1909 
1910  // Initialise the i-th value of the velocity vector
1911  velocity[i] = 0.0;
1912 
1913  // Loop over the local nodes and sum
1914  for (unsigned l = 0; l < n_node; l++)
1915  {
1916  // Update the i-th velocity component approximation
1917  velocity[i] += nodal_value(l, u_nodal_index) * psi[l];
1918  }
1919  } // for (unsigned i=0;i<DIM;i++)
1920  } // End of interpolated_u_nst

References DIM, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst(), and Jeffery_Solution::velocity().

◆ interpolated_u_nst() [9/9]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
Vector< double > &  velocity 
) const
inline

Compute vector of FE interpolated velocity u at local coordinate s.

1867  {
1868  // Find the number of nodes
1869  unsigned n_node = nnode();
1870 
1871  // Local shape function
1872  Shape psi(n_node);
1873 
1874  // Find values of shape function
1875  shape(s, psi);
1876 
1877  // Loop over the velocity components
1878  for (unsigned i = 0; i < DIM; i++)
1879  {
1880  // Index at which the nodal value is stored
1881  unsigned u_nodal_index = u_index_nst(i);
1882 
1883  // Initialise the i-th value of the velocity vector
1884  velocity[i] = 0.0;
1885 
1886  // Loop over the local nodes and sum
1887  for (unsigned l = 0; l < n_node; l++)
1888  {
1889  // Update the i-th velocity component approximation
1890  velocity[i] += nodal_value(l, u_nodal_index) * psi[l];
1891  }
1892  } // for (unsigned i=0;i<DIM;i++)
1893  } // End of interpolated_u_nst

References DIM, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst(), and Jeffery_Solution::velocity().

◆ is_reynolds_strouhal_stored_as_external_data()

template<unsigned DIM>
bool oomph::SpaceTimeNavierStokesEquations< DIM >::is_reynolds_strouhal_stored_as_external_data ( ) const
inline

Are we storing the Strouhal number as external data?

854  {
855  // Return the flags value
857  } // End of is_reynolds_strouhal_stored_as_external_data

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data.

◆ is_strouhal_stored_as_external_data() [1/2]

template<unsigned DIM>
bool oomph::SpaceTimeNavierStokesEquations< DIM >::is_strouhal_stored_as_external_data ( ) const
inline

Are we storing the Strouhal number as external data?

887  {
888  // Return the flags value
890  } // End of is_strouhal_stored_as_external_data

References oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ is_strouhal_stored_as_external_data() [2/2]

template<unsigned DIM>
bool oomph::SpaceTimeNavierStokesEquations< DIM >::is_strouhal_stored_as_external_data ( ) const
inline

Are we storing the Strouhal number as external data?

887  {
888  // Return the flags value
890  } // End of is_strouhal_stored_as_external_data

References oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data.

◆ kin_energy() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::kin_energy

Get integral of kinetic energy over element.

Get integral of kinetic energy over element: Note that this is the "raw" kinetic energy in the sense that the density ratio has not been included. In problems with two or more fluids the user will have to remember to premultiply certain elements by the appropriate density ratio.

1624  {
1625  // Initialise the elemental kinetic energy value
1626  double kin_en = 0.0;
1627 
1628  // Set the value of n_intpt
1629  unsigned n_intpt = integral_pt()->nweight();
1630 
1631  // Set the Vector to hold local coordinates
1632  Vector<double> s(DIM + 1, 0.0);
1633 
1634  // Loop over the integration points
1635  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1636  {
1637  // Assign values of s
1638  for (unsigned i = 0; i < DIM + 1; i++)
1639  {
1640  s[i] = integral_pt()->knot(ipt, i);
1641  }
1642 
1643  // Get the integral weight
1644  double w = integral_pt()->weight(ipt);
1645 
1646  // Get Jacobian of mapping
1647  double J = J_eulerian(s);
1648 
1649  // Loop over directions
1650  double veloc_squared = 0.0;
1651  for (unsigned i = 0; i < DIM; i++)
1652  {
1653  veloc_squared += interpolated_u_nst(s, i) * interpolated_u_nst(s, i);
1654  }
1655 
1656  kin_en += 0.5 * veloc_squared * w * J;
1657  }
1658 
1659  return kin_en;
1660 
1661  } // End of kin_energy

References DIM, i, J, s, and w.

◆ kin_energy() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::kin_energy ( ) const

Get integral of kinetic energy over element.

◆ kin_energy() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::kin_energy ( ) const

Get integral of kinetic energy over element.

◆ n_u_nst() [1/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::n_u_nst ( ) const
inline

Return the number of velocity components (used in FluidInterfaceElements)

1130  {
1131  // Return the number of equations to solve
1132  return DIM;
1133  } // End of n_u_nst

References DIM.

◆ n_u_nst() [2/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::n_u_nst ( ) const
inline

Return the number of velocity components (used in FluidInterfaceElements)

1130  {
1131  // Return the number of equations to solve
1132  return DIM;
1133  } // End of n_u_nst

References DIM.

◆ n_u_nst() [3/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::n_u_nst ( ) const
inline

Return the number of velocity components (used in FluidInterfaceElements)

1104  {
1105  // Return the number of equations to solve
1106  return DIM;
1107  } // End of n_u_nst

References DIM.

◆ npres_nst() [1/3]

◆ npres_nst() [2/3]

◆ npres_nst() [3/3]

◆ nscalar_paraview() [1/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::nscalar_paraview ( ) const
inlinevirtual

Number of scalars/fields output by this element. Reimplements broken virtual function in base class.

Reimplemented from oomph::FiniteElement.

1308  {
1309  // The number of velocity components plus the pressure field
1310  return DIM + 1;
1311  }

References DIM.

◆ nscalar_paraview() [2/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::nscalar_paraview ( ) const
inlinevirtual

Number of scalars/fields output by this element. Reimplements broken virtual function in base class.

Reimplemented from oomph::FiniteElement.

1308  {
1309  // The number of velocity components plus the pressure field
1310  return DIM + 1;
1311  }

References DIM.

◆ nscalar_paraview() [3/3]

template<unsigned DIM>
unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::nscalar_paraview ( ) const
inlinevirtual

Number of scalars/fields output by this element. Reimplements broken virtual function in base class.

Reimplemented from oomph::FiniteElement.

1282  {
1283  // The number of velocity components plus the pressure field
1284  return DIM + 1;
1285  }

References DIM.

◆ output() [1/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt)
inlinevirtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1490  {
1491  // Set the number of plot points in each direction
1492  unsigned n_plot = 5;
1493 
1494  // Forward the call to the appropriate output function
1495  output(file_pt, n_plot);
1496  } // End of output
void output(std::ostream &outfile)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1472

References oomph::SpaceTimeNavierStokesEquations< DIM >::output().

◆ output() [2/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt)
inlinevirtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1490  {
1491  // Set the number of plot points in each direction
1492  unsigned n_plot = 5;
1493 
1494  // Forward the call to the appropriate output function
1495  output(file_pt, n_plot);
1496  } // End of output

References oomph::SpaceTimeNavierStokesEquations< DIM >::output().

◆ output() [3/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt)
inlinevirtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1464  {
1465  // Set the number of plot points in each direction
1466  unsigned n_plot = 5;
1467 
1468  // Forward the call to the appropriate output function
1469  output(file_pt, n_plot);
1470  } // End of output

References oomph::SpaceTimeNavierStokesEquations< DIM >::output().

◆ output() [4/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt,
const unsigned n_plot 
)
virtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Use n_plot points in each coordinate direction

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Specified number of plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1043  {
1044  // Vector of local coordinates
1045  Vector<double> s(DIM + 1, 0.0);
1046 
1047  // Tecplot header info
1048  fprintf(file_pt, "%s", tecplot_zone_string(n_plot).c_str());
1049 
1050  // How many plot points in total?
1051  unsigned num_plot_points = nplot_points(n_plot);
1052 
1053  // Loop over plot points
1054  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
1055  {
1056  // Get the local coordinates associated with this plot point
1057  get_s_plot(i_plot, n_plot, s);
1058 
1059  // Loop over the coordinate directions
1060  for (unsigned i = 0; i < DIM + 1; i++)
1061  {
1062  // Output the i-th coordinate value to file
1063  fprintf(file_pt, "%g ", interpolated_x(s, i));
1064  }
1065 
1066  // Loop over the velocity components
1067  for (unsigned i = 0; i < DIM; i++)
1068  {
1069  // Output the i-th velocity component to file
1070  fprintf(file_pt, "%g ", interpolated_u_nst(s, i));
1071  }
1072 
1073  // Pressure
1074  fprintf(file_pt, "%g \n", interpolated_p_nst(s));
1075  }
1076 
1077  // Finish the line off
1078  fprintf(file_pt, "\n");
1079 
1080  // Write tecplot footer (e.g. FE connectivity lists)
1081  write_tecplot_zone_footer(file_pt, n_plot);
1082  } // End of output

References DIM, i, and s.

◆ output() [5/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt,
const unsigned n_plot 
)
virtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Use n_plot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ output() [6/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( FILE *  file_pt,
const unsigned n_plot 
)
virtual

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Use n_plot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ output() [7/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile)
inlinevirtual

Output function: x,y,t,u,v,p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1473  {
1474  // Set the number of plot points in each direction
1475  unsigned n_plot = 5;
1476 
1477  // Forward the call to the appropriate output function
1478  output(outfile, n_plot);
1479  } // End of output

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::output(), and oomph::QTaylorHoodSpaceTimeElement< DIM >::output().

◆ output() [8/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile)
inlinevirtual

Output function: x,y,t,u,v,p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1473  {
1474  // Set the number of plot points in each direction
1475  unsigned n_plot = 5;
1476 
1477  // Forward the call to the appropriate output function
1478  output(outfile, n_plot);
1479  } // End of output

References oomph::SpaceTimeNavierStokesEquations< DIM >::output().

◆ output() [9/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile)
inlinevirtual

Output function: x,y,t,u,v,p in tecplot format. The default number of plot points is five

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1447  {
1448  // Set the number of plot points in each direction
1449  unsigned n_plot = 5;
1450 
1451  // Forward the call to the appropriate output function
1452  output(outfile, n_plot);
1453  } // End of output

References oomph::SpaceTimeNavierStokesEquations< DIM >::output().

◆ output() [10/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
virtual

Output function: x,y,[z],u,v,[w],p in tecplot format. Here, we use n_plot plot points in each coordinate direction

Output function: x,y,[z],u,v,[w],p in tecplot format. Specified number of plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

984  {
985  // Find number of nodes
986  unsigned n_node = nnode();
987 
988  // Local shape function
989  Shape psi(n_node);
990 
991  // Vectors of local coordinates
992  Vector<double> s(DIM + 1, 0.0);
993 
994  // Tecplot header info
995  outfile << tecplot_zone_string(n_plot);
996 
997  // How many plot points are there?
998  unsigned num_plot_points = nplot_points(n_plot);
999 
1000  // Loop over plot points
1001  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
1002  {
1003  // Get the local coordinates of plot point
1004  get_s_plot(i_plot, n_plot, s);
1005 
1006  // Coordinates
1007  for (unsigned i = 0; i < DIM + 1; i++)
1008  {
1009  // Output the i-th spatial coordinate value
1010  outfile << interpolated_x(s, i) << " ";
1011  }
1012 
1013  // Velocities
1014  for (unsigned i = 0; i < DIM; i++)
1015  {
1016  // Output the i-th velocity component
1017  outfile << interpolated_u_nst(s, i) << " ";
1018  }
1019 
1020  // Pressure
1021  outfile << interpolated_p_nst(s) << " ";
1022 
1023  // End the line
1024  outfile << std::endl;
1025  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
1026 
1027  // Add an extra line
1028  outfile << std::endl;
1029 
1030  // Write tecplot footer (e.g. FE connectivity lists)
1031  write_tecplot_zone_footer(outfile, n_plot);
1032  } // End of output

References DIM, i, and s.

◆ output() [11/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
virtual

Output function: x,y,[z],u,v,[w],p in tecplot format. Here, we use n_plot plot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ output() [12/12]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
virtual

Output function: x,y,[z],u,v,[w],p in tecplot format. Here, we use n_plot plot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< 2 >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

◆ output_fct() [1/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned n_plot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector.

Output "exact" solution at a given time Solution is provided via function pointer. Plot at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

856  {
857  // Storage for the time value
858  double interpolated_t = 0.0;
859 
860  // Vector of local coordinates
861  Vector<double> s(DIM + 1, 0.0);
862 
863  // Vector for coordinates
864  Vector<double> x(DIM, 0.0);
865 
866  // Tecplot header info
867  outfile << tecplot_zone_string(n_plot);
868 
869  // Exact solution Vector
870  Vector<double> exact_soln;
871 
872  // How many plot points are there in total?
873  unsigned num_plot_points = nplot_points(n_plot);
874 
875  // Loop over plot points
876  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
877  {
878  // Get local coordinates of plot point
879  get_s_plot(i_plot, n_plot, s);
880 
881  // Loop over the spatial coordinates
882  for (unsigned i = 0; i < DIM; i++)
883  {
884  // Assign the i-th spatial coordinate
885  x[i] = interpolated_x(s, i);
886  }
887 
888  // Get the time value
889  interpolated_t = interpolated_x(s, DIM);
890 
891  // Get exact solution at this point
892  (*exact_soln_pt)(interpolated_t, x, exact_soln);
893 
894  // Output x,y,...
895  for (unsigned i = 0; i < DIM; i++)
896  {
897  // Output the i-th spatial coordinate value
898  outfile << x[i] << " ";
899  }
900 
901  // Output the time value at this point
902  outfile << interpolated_t << " ";
903 
904  // Output "exact solution"
905  for (unsigned i = 0; i < exact_soln.size(); i++)
906  {
907  // Output the i-th (exact) velocity component value
908  outfile << exact_soln[i] << " ";
909  }
910 
911  // End the line
912  outfile << std::endl;
913  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
914 
915  // Write tecplot footer (e.g. FE connectivity lists)
916  write_tecplot_zone_footer(outfile, n_plot);
917  } // End of output_fct

References DIM, ProblemParameters::exact_soln(), i, s, and plotDoE::x.

◆ output_fct() [2/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

◆ output_fct() [3/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

◆ output_fct() [4/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned n_plot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector

Output "exact" solution Solution is provided via function pointer. Plot at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

781  {
782  // Storage for the time value
783  double interpolated_t = 0.0;
784 
785  // Vector of local coordinates
786  Vector<double> s(DIM + 1, 0.0);
787 
788  // Vector for coordinates
789  Vector<double> x(DIM, 0.0);
790 
791  // Tecplot header info
792  outfile << tecplot_zone_string(n_plot);
793 
794  // Exact solution Vector
795  Vector<double> exact_soln;
796 
797  // How many plot points are there in total?
798  unsigned num_plot_points = nplot_points(n_plot);
799 
800  // Loop over plot points
801  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
802  {
803  // Get local coordinates of plot point
804  get_s_plot(i_plot, n_plot, s);
805 
806  // Loop over the spatial coordinates
807  for (unsigned i = 0; i < DIM; i++)
808  {
809  // Assign the i-th spatial coordinate
810  x[i] = interpolated_x(s, i);
811  }
812 
813  // Get the time value
814  interpolated_t = interpolated_x(s, DIM);
815 
816  // Get exact solution at this point
817  (*exact_soln_pt)(x, exact_soln);
818 
819  // Output x,y,...
820  for (unsigned i = 0; i < DIM; i++)
821  {
822  // Output the i-th spatial coordinate
823  outfile << x[i] << " ";
824  }
825 
826  // Output the time value at this point
827  outfile << interpolated_t << " ";
828 
829  // Output "exact solution"
830  for (unsigned i = 0; i < exact_soln.size(); i++)
831  {
832  // Output the i-th (exact) velocity component value
833  outfile << exact_soln[i] << " ";
834  }
835 
836  // End the line
837  outfile << std::endl;
838  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
839 
840  // Write tecplot footer (e.g. FE connectivity lists)
841  write_tecplot_zone_footer(outfile, n_plot);
842  } // End of output_fct

References DIM, ProblemParameters::exact_soln(), i, s, and plotDoE::x.

◆ output_fct() [5/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector

Reimplemented from oomph::FiniteElement.

◆ output_fct() [6/6]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector

Reimplemented from oomph::FiniteElement.

◆ output_pressure_advection_diffusion_robin_elements() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements ( std::ostream &  outfile)
inline

Output the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

1836  {
1837  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1838  for (unsigned e = 0; e < nel; e++)
1839  {
1840  FaceElement* face_el_pt =
1842  outfile << "ZONE" << std::endl;
1843  Vector<double> unit_normal(DIM);
1844  Vector<double> x(DIM + 1);
1845  Vector<double> s(DIM);
1846  unsigned n = face_el_pt->integral_pt()->nweight();
1847  for (unsigned ipt = 0; ipt < n; ipt++)
1848  {
1849  for (unsigned i = 0; i < DIM; i++)
1850  {
1851  s[i] = face_el_pt->integral_pt()->knot(ipt, i);
1852  }
1853  face_el_pt->interpolated_x(s, x);
1854  face_el_pt->outer_unit_normal(ipt, unit_normal);
1855  for (unsigned i = 0; i < DIM + 1; i++)
1856  {
1857  outfile << x[i] << " ";
1858  }
1859  for (unsigned i = 0; i < DIM; i++)
1860  {
1861  outfile << unit_normal[i] << " ";
1862  }
1863  outfile << std::endl;
1864  }
1865  }
1866  } // End of output_pressure_advection_diffusion_robin_elements

References DIM, e(), i, oomph::FiniteElement::integral_pt(), oomph::FaceElement::interpolated_x(), oomph::Integral::knot(), n, oomph::Integral::nweight(), oomph::FaceElement::outer_unit_normal(), oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt, s, and plotDoE::x.

◆ output_pressure_advection_diffusion_robin_elements() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements ( std::ostream &  outfile)
inline

Output the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

1836  {
1837  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1838  for (unsigned e = 0; e < nel; e++)
1839  {
1840  FaceElement* face_el_pt =
1842  outfile << "ZONE" << std::endl;
1843  Vector<double> unit_normal(DIM);
1844  Vector<double> x(DIM + 1);
1845  Vector<double> s(DIM);
1846  unsigned n = face_el_pt->integral_pt()->nweight();
1847  for (unsigned ipt = 0; ipt < n; ipt++)
1848  {
1849  for (unsigned i = 0; i < DIM; i++)
1850  {
1851  s[i] = face_el_pt->integral_pt()->knot(ipt, i);
1852  }
1853  face_el_pt->interpolated_x(s, x);
1854  face_el_pt->outer_unit_normal(ipt, unit_normal);
1855  for (unsigned i = 0; i < DIM + 1; i++)
1856  {
1857  outfile << x[i] << " ";
1858  }
1859  for (unsigned i = 0; i < DIM; i++)
1860  {
1861  outfile << unit_normal[i] << " ";
1862  }
1863  outfile << std::endl;
1864  }
1865  }
1866  } // End of output_pressure_advection_diffusion_robin_elements

References DIM, e(), i, oomph::FiniteElement::integral_pt(), oomph::FaceElement::interpolated_x(), oomph::Integral::knot(), n, oomph::Integral::nweight(), oomph::FaceElement::outer_unit_normal(), oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt, s, and plotDoE::x.

◆ output_pressure_advection_diffusion_robin_elements() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements ( std::ostream &  outfile)
inline

Output the FaceElements that apply the Robin boundary condition to the pressure advection diffusion problem required by Fp preconditioner

1809  {
1810  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1811  for (unsigned e = 0; e < nel; e++)
1812  {
1813  FaceElement* face_el_pt =
1815  outfile << "ZONE" << std::endl;
1816  Vector<double> unit_normal(DIM);
1817  Vector<double> x(DIM + 1);
1818  Vector<double> s(DIM);
1819  unsigned n = face_el_pt->integral_pt()->nweight();
1820  for (unsigned ipt = 0; ipt < n; ipt++)
1821  {
1822  for (unsigned i = 0; i < DIM; i++)
1823  {
1824  s[i] = face_el_pt->integral_pt()->knot(ipt, i);
1825  }
1826  face_el_pt->interpolated_x(s, x);
1827  face_el_pt->outer_unit_normal(ipt, unit_normal);
1828  for (unsigned i = 0; i < DIM + 1; i++)
1829  {
1830  outfile << x[i] << " ";
1831  }
1832  for (unsigned i = 0; i < DIM; i++)
1833  {
1834  outfile << unit_normal[i] << " ";
1835  }
1836  outfile << std::endl;
1837  }
1838  }
1839  } // End of output_pressure_advection_diffusion_robin_elements

References DIM, e(), i, oomph::FiniteElement::integral_pt(), oomph::FaceElement::interpolated_x(), oomph::Integral::knot(), n, oomph::Integral::nweight(), oomph::FaceElement::outer_unit_normal(), oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_advection_diffusion_robin_element_pt, s, and plotDoE::x.

◆ output_veloc() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_veloc ( std::ostream &  outfile,
const unsigned n_plot,
const unsigned t 
)

Output function: x,y,t,u,v in tecplot format. Use n_plot points in each coordinate direction at timestep t (t=0: present; t>0: previous timestep)

Output function: Velocities only x,y,[z],u,v,[w] in tecplot format at specified previous timestep (t=0: present; t>0: previous timestep). Specified number of plot points in each coordinate direction. DRAIG: Should be broken!

931  {
932  // Find number of nodes
933  unsigned n_node = nnode();
934 
935  // Local shape function
936  Shape psi(n_node);
937 
938  // Vectors of local coordinates
939  Vector<double> s(DIM + 1, 0.0);
940 
941  // Tecplot header info
942  outfile << tecplot_zone_string(n_plot);
943 
944  // How many plot points are there?
945  unsigned num_plot_points = nplot_points(n_plot);
946 
947  // Loop over plot points
948  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
949  {
950  // Get the local coordinates of plot point
951  get_s_plot(i_plot, n_plot, s);
952 
953  // Coordinates
954  for (unsigned i = 0; i < DIM + 1; i++)
955  {
956  // Output the i-th spatial coordinate value
957  outfile << interpolated_x(s, i) << " ";
958  }
959 
960  // Velocities
961  for (unsigned i = 0; i < DIM; i++)
962  {
963  // Output the i-th velocity component
964  outfile << interpolated_u_nst(s, i) << " ";
965  }
966 
967  // End the line
968  outfile << std::endl;
969  } // for (unsigned i_plot=0;i_plot<num_plot_points;i_plot++)
970 
971  // Write tecplot footer (e.g. FE connectivity lists)
972  write_tecplot_zone_footer(outfile, n_plot);
973  } // End of output_veloc

References DIM, i, and s.

◆ output_veloc() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_veloc ( std::ostream &  outfile,
const unsigned nplot,
const unsigned t 
)

Output function: x,y,t,u,v in tecplot format. Use n_plot points in each coordinate direction at timestep t (t=0: present; t>0: previous timestep)

◆ output_veloc() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_veloc ( std::ostream &  outfile,
const unsigned nplot,
const unsigned t 
)

Output function: x,y,t,u,v in tecplot format. Use n_plot points in each coordinate direction at timestep t (t=0: present; t>0: previous timestep)

◆ output_vorticity() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_vorticity ( std::ostream &  outfile,
const unsigned n_plot 
)

Output function: x,y,t,omega in tecplot format. nplot points in each coordinate direction

Output function for vorticity. x,y,[z],[omega_x,omega_y,[and/or omega_z]] in tecplot format. Specified number of plot points in each coordinate direction.

1225  {
1226  // Vector of local coordinates
1227  Vector<double> s(DIM + 1, 0.0);
1228 
1229  // Create vorticity vector of the required size
1230  Vector<double> vorticity;
1231 
1232  // If we're in 2D the vorticity field is a scalar field
1233  if (DIM == 2)
1234  {
1235  // Resize the vorticity vector
1236  vorticity.resize(1);
1237  }
1238  // If we're in 3D the vorticity field is a vector field
1239  else if (DIM == 3)
1240  {
1241  // Resize the vorticity vector
1242  vorticity.resize(3);
1243  }
1244  // If we're in 1D
1245  else
1246  {
1247  std::string error_message =
1248  "Can't output vorticity in 1D - in fact, what ";
1249  error_message += "do you mean\nby the 1D Navier-Stokes equations?\n";
1250  throw OomphLibError(
1252  }
1253 
1254  // Tecplot header info
1255  outfile << tecplot_zone_string(n_plot);
1256 
1257  // How many plot points are there in total?
1258  unsigned num_plot_points = nplot_points(n_plot);
1259 
1260  // Loop over plot points
1261  for (unsigned i_plot = 0; i_plot < num_plot_points; i_plot++)
1262  {
1263  // Get local coordinates of plot point
1264  get_s_plot(i_plot, n_plot, s);
1265 
1266  // Coordinates
1267  for (unsigned i = 0; i < DIM + 1; i++)
1268  {
1269  // Output the i-th coordinate value
1270  outfile << interpolated_x(s, i) << " ";
1271  }
1272 
1273  // Get vorticity
1274  get_vorticity(s, vorticity);
1275 
1276  // If we're in 2D
1277  if (DIM == 2)
1278  {
1279  // Output the vorticity field value
1280  outfile << vorticity[0];
1281  }
1282  // If we're in 3D
1283  else
1284  {
1285  // Output the vorticity field
1286  outfile << vorticity[0] << " " << vorticity[1] << " " << vorticity[2]
1287  << " ";
1288  }
1289 
1290  // Finish the line off
1291  outfile << std::endl;
1292  }
1293 
1294  // Add in an extra line
1295  outfile << std::endl;
1296 
1297  // Write tecplot footer (e.g. FE connectivity lists)
1298  write_tecplot_zone_footer(outfile, n_plot);
1299  } // End of output_vorticity
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References DIM, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, and oomph::Global_string_for_annotation::string().

◆ output_vorticity() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_vorticity ( std::ostream &  outfile,
const unsigned nplot 
)

Output function: x,y,t,omega in tecplot format. nplot points in each coordinate direction

◆ output_vorticity() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::output_vorticity ( std::ostream &  outfile,
const unsigned nplot 
)

Output function: x,y,t,omega in tecplot format. nplot points in each coordinate direction

◆ p_nodal_index_nst() [1/3]

template<unsigned DIM>
virtual int oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst ( ) const
inlinevirtual

Return the index at which the pressure is stored if it is stored at the nodes. If not stored at the nodes this will return a negative number.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

Reimplemented in oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::QTaylorHoodSpaceTimeElement< DIM >, and oomph::QTaylorHoodSpaceTimeElement< 2 >.

1230  {
1232  }
static int Pressure_not_stored_at_node
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:487

References oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_not_stored_at_node.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs().

◆ p_nodal_index_nst() [2/3]

template<unsigned DIM>
virtual int oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst ( ) const
inlinevirtual

◆ p_nodal_index_nst() [3/3]

template<unsigned DIM>
virtual int oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst ( ) const
inlinevirtual

◆ p_nst() [1/6]

◆ p_nst() [2/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst ( const unsigned n_p) const
pure virtual

◆ p_nst() [3/6]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesEquations< DIM >::p_nst ( const unsigned n_p) const
pure virtual

◆ p_nst() [4/6]

◆ p_nst() [5/6]

◆ p_nst() [6/6]

◆ pin_all_non_pressure_dofs() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs ( std::map< Data *, std::vector< int >> &  eqn_number_backup)
inlinevirtual

Pin all non-pressure dofs and backup eqn numbers.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1743  {
1744  // Loop over internal data and pin the values (having established that
1745  // pressure dofs aren't amongst those)
1746  unsigned nint = this->ninternal_data();
1747  for (unsigned j = 0; j < nint; j++)
1748  {
1749  Data* data_pt = this->internal_data_pt(j);
1750  if (eqn_number_backup[data_pt].size() == 0)
1751  {
1752  unsigned nvalue = data_pt->nvalue();
1753  eqn_number_backup[data_pt].resize(nvalue);
1754  for (unsigned i = 0; i < nvalue; i++)
1755  {
1756  // Backup
1757  eqn_number_backup[data_pt][i] = data_pt->eqn_number(i);
1758 
1759  // Pin everything
1760  data_pt->pin(i);
1761  }
1762  }
1763  }
1764 
1765  // Now deal with nodal values
1766  unsigned nnod = this->nnode();
1767  for (unsigned j = 0; j < nnod; j++)
1768  {
1769  Node* nod_pt = this->node_pt(j);
1770  if (eqn_number_backup[nod_pt].size() == 0)
1771  {
1772  unsigned nvalue = nod_pt->nvalue();
1773  eqn_number_backup[nod_pt].resize(nvalue);
1774  for (unsigned i = 0; i < nvalue; i++)
1775  {
1776  // Pin everything apart from the nodal pressure
1777  // value
1778  if (int(i) != this->p_nodal_index_nst())
1779  {
1780  // Backup
1781  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1782 
1783  // Pin
1784  nod_pt->pin(i);
1785  }
1786  // Else it's a pressure value
1787  else
1788  {
1789  // Exclude non-nodal pressure based elements
1790  if (this->p_nodal_index_nst() >= 0)
1791  {
1792  // Backup
1793  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1794  }
1795  }
1796  }
1797 
1798 
1799  // If it's a solid node deal with its positional data too
1800  SolidNode* solid_nod_pt = dynamic_cast<SolidNode*>(nod_pt);
1801  if (solid_nod_pt != 0)
1802  {
1803  Data* solid_posn_data_pt = solid_nod_pt->variable_position_pt();
1804  if (eqn_number_backup[solid_posn_data_pt].size() == 0)
1805  {
1806  unsigned nvalue = solid_posn_data_pt->nvalue();
1807  eqn_number_backup[solid_posn_data_pt].resize(nvalue);
1808  for (unsigned i = 0; i < nvalue; i++)
1809  {
1810  // Backup
1811  eqn_number_backup[solid_posn_data_pt][i] =
1812  solid_posn_data_pt->eqn_number(i);
1813 
1814  // Pin
1815  solid_posn_data_pt->pin(i);
1816  }
1817  }
1818  }
1819  }
1820  }
1821  } // End of pin_all_non_pressure_dofs
double size() const
Definition: elements.cc:4290
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
unsigned ninternal_data() const
Return the number of internal data objects.
Definition: elements.h:823
virtual int p_nodal_index_nst() const
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:1229

References oomph::Data::eqn_number(), i, oomph::GeneralisedElement::internal_data_pt(), j, oomph::GeneralisedElement::ninternal_data(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst(), oomph::Data::pin(), oomph::FiniteElement::size(), and oomph::SolidNode::variable_position_pt().

◆ pin_all_non_pressure_dofs() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs ( std::map< Data *, std::vector< int >> &  eqn_number_backup)
inlinevirtual

Pin all non-pressure dofs and backup eqn numbers.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1743  {
1744  // Loop over internal data and pin the values (having established that
1745  // pressure dofs aren't amongst those)
1746  unsigned nint = this->ninternal_data();
1747  for (unsigned j = 0; j < nint; j++)
1748  {
1749  Data* data_pt = this->internal_data_pt(j);
1750  if (eqn_number_backup[data_pt].size() == 0)
1751  {
1752  unsigned nvalue = data_pt->nvalue();
1753  eqn_number_backup[data_pt].resize(nvalue);
1754  for (unsigned i = 0; i < nvalue; i++)
1755  {
1756  // Backup
1757  eqn_number_backup[data_pt][i] = data_pt->eqn_number(i);
1758 
1759  // Pin everything
1760  data_pt->pin(i);
1761  }
1762  }
1763  }
1764 
1765  // Now deal with nodal values
1766  unsigned nnod = this->nnode();
1767  for (unsigned j = 0; j < nnod; j++)
1768  {
1769  Node* nod_pt = this->node_pt(j);
1770  if (eqn_number_backup[nod_pt].size() == 0)
1771  {
1772  unsigned nvalue = nod_pt->nvalue();
1773  eqn_number_backup[nod_pt].resize(nvalue);
1774  for (unsigned i = 0; i < nvalue; i++)
1775  {
1776  // Pin everything apart from the nodal pressure
1777  // value
1778  if (int(i) != this->p_nodal_index_nst())
1779  {
1780  // Backup
1781  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1782 
1783  // Pin
1784  nod_pt->pin(i);
1785  }
1786  // Else it's a pressure value
1787  else
1788  {
1789  // Exclude non-nodal pressure based elements
1790  if (this->p_nodal_index_nst() >= 0)
1791  {
1792  // Backup
1793  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1794  }
1795  }
1796  }
1797 
1798 
1799  // If it's a solid node deal with its positional data too
1800  SolidNode* solid_nod_pt = dynamic_cast<SolidNode*>(nod_pt);
1801  if (solid_nod_pt != 0)
1802  {
1803  Data* solid_posn_data_pt = solid_nod_pt->variable_position_pt();
1804  if (eqn_number_backup[solid_posn_data_pt].size() == 0)
1805  {
1806  unsigned nvalue = solid_posn_data_pt->nvalue();
1807  eqn_number_backup[solid_posn_data_pt].resize(nvalue);
1808  for (unsigned i = 0; i < nvalue; i++)
1809  {
1810  // Backup
1811  eqn_number_backup[solid_posn_data_pt][i] =
1812  solid_posn_data_pt->eqn_number(i);
1813 
1814  // Pin
1815  solid_posn_data_pt->pin(i);
1816  }
1817  }
1818  }
1819  }
1820  }
1821  } // End of pin_all_non_pressure_dofs

References oomph::Data::eqn_number(), i, oomph::GeneralisedElement::internal_data_pt(), j, oomph::GeneralisedElement::ninternal_data(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst(), oomph::Data::pin(), oomph::FiniteElement::size(), and oomph::SolidNode::variable_position_pt().

◆ pin_all_non_pressure_dofs() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs ( std::map< Data *, std::vector< int >> &  eqn_number_backup)
inlinevirtual

Pin all non-pressure dofs and backup eqn numbers.

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1716  {
1717  // Loop over internal data and pin the values (having established that
1718  // pressure dofs aren't amongst those)
1719  unsigned nint = this->ninternal_data();
1720  for (unsigned j = 0; j < nint; j++)
1721  {
1722  Data* data_pt = this->internal_data_pt(j);
1723  if (eqn_number_backup[data_pt].size() == 0)
1724  {
1725  unsigned nvalue = data_pt->nvalue();
1726  eqn_number_backup[data_pt].resize(nvalue);
1727  for (unsigned i = 0; i < nvalue; i++)
1728  {
1729  // Backup
1730  eqn_number_backup[data_pt][i] = data_pt->eqn_number(i);
1731 
1732  // Pin everything
1733  data_pt->pin(i);
1734  }
1735  }
1736  }
1737 
1738  // Now deal with nodal values
1739  unsigned nnod = this->nnode();
1740  for (unsigned j = 0; j < nnod; j++)
1741  {
1742  Node* nod_pt = this->node_pt(j);
1743  if (eqn_number_backup[nod_pt].size() == 0)
1744  {
1745  unsigned nvalue = nod_pt->nvalue();
1746  eqn_number_backup[nod_pt].resize(nvalue);
1747  for (unsigned i = 0; i < nvalue; i++)
1748  {
1749  // Pin everything apart from the nodal pressure
1750  // value
1751  if (int(i) != this->p_nodal_index_nst())
1752  {
1753  // Backup
1754  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1755 
1756  // Pin
1757  nod_pt->pin(i);
1758  }
1759  // Else it's a pressure value
1760  else
1761  {
1762  // Exclude non-nodal pressure based elements
1763  if (this->p_nodal_index_nst() >= 0)
1764  {
1765  // Backup
1766  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1767  }
1768  }
1769  }
1770 
1771 
1772  // If it's a solid node deal with its positional data too
1773  SolidNode* solid_nod_pt = dynamic_cast<SolidNode*>(nod_pt);
1774  if (solid_nod_pt != 0)
1775  {
1776  Data* solid_posn_data_pt = solid_nod_pt->variable_position_pt();
1777  if (eqn_number_backup[solid_posn_data_pt].size() == 0)
1778  {
1779  unsigned nvalue = solid_posn_data_pt->nvalue();
1780  eqn_number_backup[solid_posn_data_pt].resize(nvalue);
1781  for (unsigned i = 0; i < nvalue; i++)
1782  {
1783  // Backup
1784  eqn_number_backup[solid_posn_data_pt][i] =
1785  solid_posn_data_pt->eqn_number(i);
1786 
1787  // Pin
1788  solid_posn_data_pt->pin(i);
1789  }
1790  }
1791  }
1792  }
1793  }
1794  } // End of pin_all_non_pressure_dofs

References oomph::Data::eqn_number(), i, oomph::GeneralisedElement::internal_data_pt(), j, oomph::GeneralisedElement::ninternal_data(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst(), oomph::Data::pin(), oomph::FiniteElement::size(), and oomph::SolidNode::variable_position_pt().

◆ pinned_fp_pressure_eqn() [1/3]

template<unsigned DIM>
int& oomph::SpaceTimeNavierStokesEquations< DIM >::pinned_fp_pressure_eqn ( )
inlinevirtual

Global eqn number of pressure dof that's pinned in pressure adv diff problem

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1050  {
1051  // Return the appropriate equation number
1052  return Pinned_fp_pressure_eqn;
1053  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Pinned_fp_pressure_eqn.

◆ pinned_fp_pressure_eqn() [2/3]

template<unsigned DIM>
int& oomph::SpaceTimeNavierStokesEquations< DIM >::pinned_fp_pressure_eqn ( )
inlinevirtual

Global eqn number of pressure dof that's pinned in pressure adv diff problem

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1050  {
1051  // Return the appropriate equation number
1052  return Pinned_fp_pressure_eqn;
1053  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Pinned_fp_pressure_eqn.

◆ pinned_fp_pressure_eqn() [3/3]

template<unsigned DIM>
int& oomph::SpaceTimeNavierStokesEquations< DIM >::pinned_fp_pressure_eqn ( )
inlinevirtual

Global eqn number of pressure dof that's pinned in pressure adv diff problem

Implements oomph::TemplateFreeSpaceTimeNavierStokesEquationsBase.

1024  {
1025  // Return the appropriate equation number
1026  return Pinned_fp_pressure_eqn;
1027  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Pinned_fp_pressure_eqn.

◆ point_output_data() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::point_output_data ( const Vector< double > &  s,
Vector< double > &  data 
)
inlinevirtual

Output solution in data vector at local cordinates s: x,y,z,u,v,p

Reimplemented from oomph::FiniteElement.

2083  {
2084  // Resize data for values
2085  data.resize(2 * DIM + 2);
2086 
2087  // Write values in the vector
2088  for (unsigned i = 0; i < DIM + 1; i++)
2089  {
2090  // Output the i-th (Eulerian) coordinate at these local coordinates
2091  data[i] = interpolated_x(s, i);
2092  }
2093 
2094  // Write values in the vector
2095  for (unsigned i = 0; i < DIM; i++)
2096  {
2097  // Output the i-th velocity component at these local coordinates
2098  data[i + (DIM + 1)] = this->interpolated_u_nst(s, i);
2099  }
2100 
2101  // Output the pressure field value at these local coordinates
2102  data[2 * DIM + 1] = this->interpolated_p_nst(s);
2103  } // End of point_output_data
int data[]
Definition: Map_placement_new.cpp:1

References data, DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), and s.

◆ point_output_data() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::point_output_data ( const Vector< double > &  s,
Vector< double > &  data 
)
inlinevirtual

Output solution in data vector at local cordinates s: x,y,z,u,v,p

Reimplemented from oomph::FiniteElement.

2083  {
2084  // Resize data for values
2085  data.resize(2 * DIM + 2);
2086 
2087  // Write values in the vector
2088  for (unsigned i = 0; i < DIM + 1; i++)
2089  {
2090  // Output the i-th (Eulerian) coordinate at these local coordinates
2091  data[i] = interpolated_x(s, i);
2092  }
2093 
2094  // Write values in the vector
2095  for (unsigned i = 0; i < DIM; i++)
2096  {
2097  // Output the i-th velocity component at these local coordinates
2098  data[i + (DIM + 1)] = this->interpolated_u_nst(s, i);
2099  }
2100 
2101  // Output the pressure field value at these local coordinates
2102  data[2 * DIM + 1] = this->interpolated_p_nst(s);
2103  } // End of point_output_data

References data, DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), and s.

◆ point_output_data() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::point_output_data ( const Vector< double > &  s,
Vector< double > &  data 
)
inlinevirtual

Output solution in data vector at local cordinates s: x,y,z,u,v,p

Reimplemented from oomph::FiniteElement.

2056  {
2057  // Resize data for values
2058  data.resize(2 * DIM + 2);
2059 
2060  // Write values in the vector
2061  for (unsigned i = 0; i < DIM + 1; i++)
2062  {
2063  // Output the i-th (Eulerian) coordinate at these local coordinates
2064  data[i] = interpolated_x(s, i);
2065  }
2066 
2067  // Write values in the vector
2068  for (unsigned i = 0; i < DIM; i++)
2069  {
2070  // Output the i-th velocity component at these local coordinates
2071  data[i + (DIM + 1)] = this->interpolated_u_nst(s, i);
2072  }
2073 
2074  // Output the pressure field value at these local coordinates
2075  data[2 * DIM + 1] = this->interpolated_p_nst(s);
2076  } // End of point_output_data

References data, DIM, i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), and s.

◆ pressure_integral() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::pressure_integral

Integral of pressure over element.

Return pressure integrated over the element.

1766  {
1767  // Initialise
1768  double press_int = 0;
1769 
1770  // Set the value of n_intpt
1771  unsigned n_intpt = integral_pt()->nweight();
1772 
1773  // Set the Vector to hold local coordinates
1774  Vector<double> s(DIM + 1, 0.0);
1775 
1776  // Loop over the integration points
1777  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1778  {
1779  // Assign values of s
1780  for (unsigned i = 0; i < DIM + 1; i++)
1781  {
1782  s[i] = integral_pt()->knot(ipt, i);
1783  }
1784 
1785  // Get the integral weight
1786  double w = integral_pt()->weight(ipt);
1787 
1788  // Get Jacobian of mapping
1789  double J = J_eulerian(s);
1790 
1791  // Premultiply the weights and the Jacobian
1792  double W = w * J;
1793 
1794  // Get pressure
1795  double press = interpolated_p_nst(s);
1796 
1797  // Add
1798  press_int += press * W;
1799  }
1800 
1801  return press_int;
1802  }

References DIM, i, J, s, w, and oomph::QuadTreeNames::W.

◆ pressure_integral() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::pressure_integral ( ) const

Integral of pressure over element.

◆ pressure_integral() [3/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::pressure_integral ( ) const

Integral of pressure over element.

◆ pshape_nst() [1/6]

◆ pshape_nst() [2/6]

◆ pshape_nst() [3/6]

◆ pshape_nst() [4/6]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi,
Shape test 
) const
pure virtual

◆ pshape_nst() [5/6]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi,
Shape test 
) const
pure virtual

◆ pshape_nst() [6/6]

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesEquations< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi,
Shape test 
) const
pure virtual

◆ re() [1/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re ( ) const
inline

Reynolds number.

871  {
872  // Use the Reynolds number pointer to get the Reynolds value
873  return *Re_pt;
874  } // End of re

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

◆ re() [2/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re ( ) const
inline

Reynolds number.

871  {
872  // Use the Reynolds number pointer to get the Reynolds value
873  return *Re_pt;
874  } // End of re

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

◆ re() [3/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re ( ) const
inline

Reynolds number.

862  {
863  // Use the Reynolds number pointer to get the Reynolds value
864  return *Re_pt;
865  } // End of re

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

◆ re_invfr() [1/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr ( ) const
inline

Global inverse Froude number.

986  {
987  return *ReInvFr_pt;
988  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

◆ re_invfr() [2/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr ( ) const
inline

Global inverse Froude number.

986  {
987  return *ReInvFr_pt;
988  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

◆ re_invfr() [3/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr ( ) const
inline

Global inverse Froude number.

960  {
961  return *ReInvFr_pt;
962  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

◆ re_invfr_pt() [1/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr_pt ( )
inline

Pointer to global inverse Froude number.

992  {
993  return ReInvFr_pt;
994  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ re_invfr_pt() [2/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr_pt ( )
inline

Pointer to global inverse Froude number.

992  {
993  return ReInvFr_pt;
994  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

◆ re_invfr_pt() [3/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_invfr_pt ( )
inline

Pointer to global inverse Froude number.

966  {
967  return ReInvFr_pt;
968  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReInvFr_pt.

◆ re_pt() [1/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_pt ( )
inline

Pointer to Reynolds number.

879  {
880  // Return the Reynolds number pointer
881  return Re_pt;
882  } // End of re_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ re_pt() [2/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_pt ( )
inline

Pointer to Reynolds number.

879  {
880  // Return the Reynolds number pointer
881  return Re_pt;
882  } // End of re_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

◆ re_pt() [3/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_pt ( )
inline

Pointer to Reynolds number.

870  {
871  // Return the Reynolds number pointer
872  return Re_pt;
873  } // End of re_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt.

◆ re_st() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::re_st ( ) const
inline

Product of Reynolds and Strouhal number (=Womersley number)

952  {
953  // Return the product of the appropriate physical constants
954  return (*Re_pt) * (*st_pt());
955  } // End of re_st
double * st_pt() const
Pointer to Strouhal parameter (const. version)
Definition: discontinuous_galerkin_equal_order_pressure_spacetime_navier_stokes_elements.h:918

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt, and oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt().

◆ re_st() [2/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::re_st ( ) const
inline

Product of Reynolds and Strouhal number (=Womersley number)

952  {
953  // Return the product of the appropriate physical constants
954  return (*Re_pt) * (*st_pt());
955  } // End of re_st

References oomph::SpaceTimeNavierStokesEquations< DIM >::Re_pt, and oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt().

◆ re_st() [3/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::re_st ( ) const
inline

ReSt parameter (const. version)

878  {
879  // If the st is stored as external data
881  {
882  // The index of the external data (which contains the st)
883  unsigned data_index = 0;
884 
885  // The index of the value at which the ReynoldsStrouhal number is stored
886  unsigned re_st_index = 0;
887 
888  // Return the value of the st in the external data
889  return *(this->external_data_pt(data_index)->value_pt(re_st_index));
890  }
891  // Otherwise the st is just stored as a pointer
892  else
893  {
894  // Return the value of St
895  return *ReSt_pt;
896  }
897  } // End of re_st
double * value_pt(const unsigned &i) const
Definition: nodes.h:324
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::ReSt_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ re_st_pt() [1/2]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::re_st_pt ( )
inline

Pointer to ReSt number (can only assign to private member data)

926  {
927  // Return the ReSt number pointer
928  return ReSt_pt;
929  } // End of st_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::ReSt_pt.

◆ re_st_pt() [2/2]

template<unsigned DIM>
double* oomph::SpaceTimeNavierStokesEquations< DIM >::re_st_pt ( ) const
inline

Pointer to Strouhal parameter (const. version)

902  {
903  // If the strouhal is stored as external data
905  {
906  // The index of the external data (which contains the strouhal)
907  unsigned data_index = 0;
908 
909  // The index of the value at which the ReynoldsStrouhal number is stored
910  unsigned re_st_index = 0;
911 
912  // Return the value of the st in the external data
913  return this->external_data_pt(data_index)->value_pt(re_st_index);
914  }
915  // Otherwise the strouhal is just stored as a pointer
916  else
917  {
918  // Return the value of Strouhal
919  return ReSt_pt;
920  }
921  } // End of re_st_pt

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::ReSt_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ scalar_name_paraview() [1/3]

template<unsigned DIM>
std::string oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_name_paraview ( const unsigned i) const
inlinevirtual

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.

Reimplemented from oomph::FiniteElement.

1437  {
1438  // Velocities
1439  if (i < DIM)
1440  {
1441  // Return the appropriate string for the i-th velocity component
1442  return "Velocity " + StringConversion::to_string(i);
1443  }
1444  // Pressure
1445  else if (i == DIM)
1446  {
1447  // Return the name for the pressure
1448  return "Pressure";
1449  }
1450  // Never get here
1451  else
1452  {
1453  // Create an output stream
1454  std::stringstream error_stream;
1455 
1456  // Create the error message
1457  error_stream << "These Navier Stokes elements only store " << DIM + 1
1458  << " fields,\nbut i is currently " << i << std::endl;
1459 
1460  // Throw the error message
1461  throw OomphLibError(
1462  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1463 
1464  // Dummy return so the compiler doesn't complain
1465  return " ";
1466  }
1467  } // End of scalar_name_paraview
std::string to_string(T object, unsigned float_precision=8)
Definition: oomph_utilities.h:189

References DIM, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::StringConversion::to_string().

◆ scalar_name_paraview() [2/3]

template<unsigned DIM>
std::string oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_name_paraview ( const unsigned i) const
inlinevirtual

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.

Reimplemented from oomph::FiniteElement.

1437  {
1438  // Velocities
1439  if (i < DIM)
1440  {
1441  // Return the appropriate string for the i-th velocity component
1442  return "Velocity " + StringConversion::to_string(i);
1443  }
1444  // Pressure
1445  else if (i == DIM)
1446  {
1447  // Return the name for the pressure
1448  return "Pressure";
1449  }
1450  // Never get here
1451  else
1452  {
1453  // Create an output stream
1454  std::stringstream error_stream;
1455 
1456  // Create the error message
1457  error_stream << "These Navier Stokes elements only store " << DIM + 1
1458  << " fields,\nbut i is currently " << i << std::endl;
1459 
1460  // Throw the error message
1461  throw OomphLibError(
1462  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1463 
1464  // Dummy return so the compiler doesn't complain
1465  return " ";
1466  }
1467  } // End of scalar_name_paraview

References DIM, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::StringConversion::to_string().

◆ scalar_name_paraview() [3/3]

template<unsigned DIM>
std::string oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_name_paraview ( const unsigned i) const
inlinevirtual

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.

Reimplemented from oomph::FiniteElement.

1411  {
1412  // Velocities
1413  if (i < DIM)
1414  {
1415  // Return the appropriate string for the i-th velocity component
1416  return "Velocity " + StringConversion::to_string(i);
1417  }
1418  // Pressure
1419  else if (i == DIM)
1420  {
1421  // Return the name for the pressure
1422  return "Pressure";
1423  }
1424  // Never get here
1425  else
1426  {
1427  // Create an output stream
1428  std::stringstream error_stream;
1429 
1430  // Create the error message
1431  error_stream << "These Navier Stokes elements only store " << DIM + 1
1432  << " fields,\nbut i is currently " << i << std::endl;
1433 
1434  // Throw the error message
1435  throw OomphLibError(
1436  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1437 
1438  // Dummy return so the compiler doesn't complain
1439  return " ";
1440  }
1441  } // End of scalar_name_paraview

References DIM, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::StringConversion::to_string().

◆ scalar_value_fct_paraview() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_fct_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1373  {
1374 #ifdef PARANOID
1375  if (i > DIM)
1376  {
1377  // Create an output stream
1378  std::stringstream error_stream;
1379 
1380  // Create the error message
1381  error_stream << "These Navier Stokes elements only store " << DIM + 1
1382  << " fields, but i is currently " << i << std::endl;
1383 
1384  // Throw the error message
1385  throw OomphLibError(
1386  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1387  }
1388 #endif
1389 
1390  // Vector of local coordinates
1391  Vector<double> s(DIM + 1, 0.0);
1392 
1393  // Storage for the time value
1394  double interpolated_t = 0.0;
1395 
1396  // Storage for the spatial coordinates
1397  Vector<double> spatial_coordinates(DIM, 0.0);
1398 
1399  // How many plot points do we have in total?
1400  unsigned num_plot_points = nplot_points_paraview(nplot);
1401 
1402  // Loop over plot points
1403  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1404  {
1405  // Get the local coordinates of the iplot-th plot point
1406  get_s_plot(iplot, nplot, s);
1407 
1408  // Loop over the spatial coordinates
1409  for (unsigned i = 0; i < DIM; i++)
1410  {
1411  // Assign the i-th spatial coordinate
1412  spatial_coordinates[i] = interpolated_x(s, i);
1413  }
1414 
1415  // Get the time value
1416  interpolated_t = interpolated_x(s, DIM);
1417 
1418  // ------ DRAIG: REMOVE ----------------------------------------
1419  // Exact solution vector (here it's simply a scalar)
1420  Vector<double> exact_soln(DIM + 1, 0.0);
1421  // DRAIG: Needs to be changed to a Vector of size DIM
1422  // ------ DRAIG: REMOVE ----------------------------------------
1423 
1424  // Get the exact solution at this point
1425  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
1426 
1427  // Output the interpolated solution value
1428  file_out << exact_soln[i] << std::endl;
1429  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1430  } // End of scalar_value_fct_paraview
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: elements.h:2862

References DIM, ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_fct_paraview() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_fct_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1373  {
1374 #ifdef PARANOID
1375  if (i > DIM)
1376  {
1377  // Create an output stream
1378  std::stringstream error_stream;
1379 
1380  // Create the error message
1381  error_stream << "These Navier Stokes elements only store " << DIM + 1
1382  << " fields, but i is currently " << i << std::endl;
1383 
1384  // Throw the error message
1385  throw OomphLibError(
1386  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1387  }
1388 #endif
1389 
1390  // Vector of local coordinates
1391  Vector<double> s(DIM + 1, 0.0);
1392 
1393  // Storage for the time value
1394  double interpolated_t = 0.0;
1395 
1396  // Storage for the spatial coordinates
1397  Vector<double> spatial_coordinates(DIM, 0.0);
1398 
1399  // How many plot points do we have in total?
1400  unsigned num_plot_points = nplot_points_paraview(nplot);
1401 
1402  // Loop over plot points
1403  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1404  {
1405  // Get the local coordinates of the iplot-th plot point
1406  get_s_plot(iplot, nplot, s);
1407 
1408  // Loop over the spatial coordinates
1409  for (unsigned i = 0; i < DIM; i++)
1410  {
1411  // Assign the i-th spatial coordinate
1412  spatial_coordinates[i] = interpolated_x(s, i);
1413  }
1414 
1415  // Get the time value
1416  interpolated_t = interpolated_x(s, DIM);
1417 
1418  // ------ DRAIG: REMOVE ----------------------------------------
1419  // Exact solution vector (here it's simply a scalar)
1420  Vector<double> exact_soln(DIM + 1, 0.0);
1421  // DRAIG: Needs to be changed to a Vector of size DIM
1422  // ------ DRAIG: REMOVE ----------------------------------------
1423 
1424  // Get the exact solution at this point
1425  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
1426 
1427  // Output the interpolated solution value
1428  file_out << exact_soln[i] << std::endl;
1429  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1430  } // End of scalar_value_fct_paraview

References DIM, ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_fct_paraview() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_fct_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1347  {
1348 #ifdef PARANOID
1349  if (i > DIM)
1350  {
1351  // Create an output stream
1352  std::stringstream error_stream;
1353 
1354  // Create the error message
1355  error_stream << "These Navier Stokes elements only store " << DIM + 1
1356  << " fields, but i is currently " << i << std::endl;
1357 
1358  // Throw the error message
1359  throw OomphLibError(
1360  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1361  }
1362 #endif
1363 
1364  // Vector of local coordinates
1365  Vector<double> s(DIM + 1, 0.0);
1366 
1367  // Storage for the time value
1368  double interpolated_t = 0.0;
1369 
1370  // Storage for the spatial coordinates
1371  Vector<double> spatial_coordinates(DIM, 0.0);
1372 
1373  // How many plot points do we have in total?
1374  unsigned num_plot_points = nplot_points_paraview(nplot);
1375 
1376  // Loop over plot points
1377  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1378  {
1379  // Get the local coordinates of the iplot-th plot point
1380  get_s_plot(iplot, nplot, s);
1381 
1382  // Loop over the spatial coordinates
1383  for (unsigned i = 0; i < DIM; i++)
1384  {
1385  // Assign the i-th spatial coordinate
1386  spatial_coordinates[i] = interpolated_x(s, i);
1387  }
1388 
1389  // Get the time value
1390  interpolated_t = interpolated_x(s, DIM);
1391 
1392  // ------ DRAIG: REMOVE ----------------------------------------
1393  // Exact solution vector (here it's simply a scalar)
1394  Vector<double> exact_soln(DIM + 1, 0.0);
1395  // DRAIG: Needs to be changed to a Vector of size DIM
1396  // ------ DRAIG: REMOVE ----------------------------------------
1397 
1398  // Get the exact solution at this point
1399  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
1400 
1401  // Output the interpolated solution value
1402  file_out << exact_soln[i] << std::endl;
1403  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1404  } // End of scalar_value_fct_paraview

References DIM, ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_paraview() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1318  {
1319  // Vector of local coordinates
1320  Vector<double> s(DIM + 1, 0.0);
1321 
1322  // How many plot points do we have in total?
1323  unsigned num_plot_points = nplot_points_paraview(nplot);
1324 
1325  // Loop over plot points
1326  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1327  {
1328  // Get the local coordinates of the iplot-th plot point
1329  get_s_plot(iplot, nplot, s);
1330 
1331  // Velocities
1332  if (i < DIM)
1333  {
1334  // Output the i-th velocity component
1335  file_out << interpolated_u_nst(s, i) << std::endl;
1336  }
1337  // Pressure
1338  else if (i == DIM)
1339  {
1340  // Output the pressure at this point
1341  file_out << interpolated_p_nst(s) << std::endl;
1342  }
1343  // Never get here
1344  else
1345  {
1346 #ifdef PARANOID
1347  // Create an output stream
1348  std::stringstream error_stream;
1349 
1350  // Create the error message
1351  error_stream << "These Navier Stokes elements only store " << DIM + 1
1352  << " fields, "
1353  << "but i is currently " << i << std::endl;
1354 
1355  // Throw the error message
1356  throw OomphLibError(error_stream.str(),
1359 #endif
1360  }
1361  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1362  } // End of scalar_value_paraview

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_paraview() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1318  {
1319  // Vector of local coordinates
1320  Vector<double> s(DIM + 1, 0.0);
1321 
1322  // How many plot points do we have in total?
1323  unsigned num_plot_points = nplot_points_paraview(nplot);
1324 
1325  // Loop over plot points
1326  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1327  {
1328  // Get the local coordinates of the iplot-th plot point
1329  get_s_plot(iplot, nplot, s);
1330 
1331  // Velocities
1332  if (i < DIM)
1333  {
1334  // Output the i-th velocity component
1335  file_out << interpolated_u_nst(s, i) << std::endl;
1336  }
1337  // Pressure
1338  else if (i == DIM)
1339  {
1340  // Output the pressure at this point
1341  file_out << interpolated_p_nst(s) << std::endl;
1342  }
1343  // Never get here
1344  else
1345  {
1346 #ifdef PARANOID
1347  // Create an output stream
1348  std::stringstream error_stream;
1349 
1350  // Create the error message
1351  error_stream << "These Navier Stokes elements only store " << DIM + 1
1352  << " fields, "
1353  << "but i is currently " << i << std::endl;
1354 
1355  // Throw the error message
1356  throw OomphLibError(error_stream.str(),
1359 #endif
1360  }
1361  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1362  } // End of scalar_value_paraview

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_paraview() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_value_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1292  {
1293  // Vector of local coordinates
1294  Vector<double> s(DIM + 1, 0.0);
1295 
1296  // How many plot points do we have in total?
1297  unsigned num_plot_points = nplot_points_paraview(nplot);
1298 
1299  // Loop over plot points
1300  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1301  {
1302  // Get the local coordinates of the iplot-th plot point
1303  get_s_plot(iplot, nplot, s);
1304 
1305  // Velocities
1306  if (i < DIM)
1307  {
1308  // Output the i-th velocity component
1309  file_out << interpolated_u_nst(s, i) << std::endl;
1310  }
1311  // Pressure
1312  else if (i == DIM)
1313  {
1314  // Output the pressure at this point
1315  file_out << interpolated_p_nst(s) << std::endl;
1316  }
1317  // Never get here
1318  else
1319  {
1320 #ifdef PARANOID
1321  // Create an output stream
1322  std::stringstream error_stream;
1323 
1324  // Create the error message
1325  error_stream << "These Navier Stokes elements only store " << DIM + 1
1326  << " fields, "
1327  << "but i is currently " << i << std::endl;
1328 
1329  // Throw the error message
1330  throw OomphLibError(error_stream.str(),
1333 #endif
1334  }
1335  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1336  } // End of scalar_value_paraview

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ source_fct_for_pressure_adv_diff() [1/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( )
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only).

1035  {
1037  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [2/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( )
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only).

1035  {
1037  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [3/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( )
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only).

1009  {
1011  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [4/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( ) const
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only). Const version.

1043  {
1045  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [5/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( ) const
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only). Const version.

1043  {
1045  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [6/6]

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff ( ) const
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only). Const version.

1017  {
1019  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_pt() [1/6]

template<unsigned DIM>
NavierStokesSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( )
inline

Access function for the source-function pointer.

1022  {
1023  return Source_fct_pt;
1024  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ source_fct_pt() [2/6]

template<unsigned DIM>
NavierStokesSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( )
inline

Access function for the source-function pointer.

1022  {
1023  return Source_fct_pt;
1024  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

◆ source_fct_pt() [3/6]

template<unsigned DIM>
NavierStokesSourceFctPt& oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( )
inline

Access function for the source-function pointer.

996  {
997  return Source_fct_pt;
998  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

◆ source_fct_pt() [4/6]

template<unsigned DIM>
NavierStokesSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( ) const
inline

Access function for the source-function pointer. Const version.

1028  {
1029  return Source_fct_pt;
1030  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

◆ source_fct_pt() [5/6]

template<unsigned DIM>
NavierStokesSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( ) const
inline

Access function for the source-function pointer. Const version.

1028  {
1029  return Source_fct_pt;
1030  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

◆ source_fct_pt() [6/6]

template<unsigned DIM>
NavierStokesSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_pt ( ) const
inline

Access function for the source-function pointer. Const version.

1002  {
1003  return Source_fct_pt;
1004  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Source_fct_pt.

◆ st() [1/2]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::st ( ) const
inline

Strouhal parameter (const. version)

895  {
896  // If the st is stored as external data
898  {
899  // The index of the external data (which contains the st)
900  unsigned data_index = 0;
901 
902  // The index of the value at which the Strouhal is stored
903  unsigned strouhal_index = 0;
904 
905  // Return the value of the st in the external data
906  return *(this->external_data_pt(data_index)->value_pt(strouhal_index));
907  }
908  // Otherwise the st is just stored as a pointer
909  else
910  {
911  // Return the value of St
912  return *St_pt;
913  }
914  } // End of st

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ st() [2/2]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::st ( ) const
inline

Strouhal parameter (const. version)

895  {
896  // If the st is stored as external data
898  {
899  // The index of the external data (which contains the st)
900  unsigned data_index = 0;
901 
902  // The index of the value at which the Strouhal is stored
903  unsigned strouhal_index = 0;
904 
905  // Return the value of the st in the external data
906  return *(this->external_data_pt(data_index)->value_pt(strouhal_index));
907  }
908  // Otherwise the st is just stored as a pointer
909  else
910  {
911  // Return the value of St
912  return *St_pt;
913  }
914  } // End of st

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ st_pt() [1/4]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt ( )
inline

Pointer to Strouhal number (can only assign to private member data)

944  {
945  // Return the Strouhal number pointer
946  return St_pt;
947  } // End of st_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt.

◆ st_pt() [2/4]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt ( )
inline

Pointer to Strouhal number (can only assign to private member data)

944  {
945  // Return the Strouhal number pointer
946  return St_pt;
947  } // End of st_pt

References oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt.

◆ st_pt() [3/4]

template<unsigned DIM>
double* oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt ( ) const
inline

Pointer to Strouhal parameter (const. version)

919  {
920  // If the strouhal is stored as external data
922  {
923  // The index of the external data (which contains the strouhal)
924  unsigned data_index = 0;
925 
926  // The index of the value at which the strouhal is stored (the only
927  // value)
928  unsigned strouhal_index = 0;
929 
930  // Return the value of the strouhal in the external data
931  return this->external_data_pt(data_index)->value_pt(strouhal_index);
932  }
933  // Otherwise the strouhal is just stored as a pointer
934  else
935  {
936  // Return the value of Strouhal
937  return St_pt;
938  }
939  } // End of st_pt

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::Data::value_pt().

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build(), and oomph::SpaceTimeNavierStokesEquations< DIM >::re_st().

◆ st_pt() [4/4]

template<unsigned DIM>
double* oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt ( ) const
inline

Pointer to Strouhal parameter (const. version)

919  {
920  // If the strouhal is stored as external data
922  {
923  // The index of the external data (which contains the strouhal)
924  unsigned data_index = 0;
925 
926  // The index of the value at which the strouhal is stored (the only
927  // value)
928  unsigned strouhal_index = 0;
929 
930  // Return the value of the strouhal in the external data
931  return this->external_data_pt(data_index)->value_pt(strouhal_index);
932  }
933  // Otherwise the strouhal is just stored as a pointer
934  else
935  {
936  // Return the value of Strouhal
937  return St_pt;
938  }
939  } // End of st_pt

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::St_pt, oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ store_strouhal_as_external_data() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::store_strouhal_as_external_data ( Data strouhal_data_pt)
inline

Function that tells us whether the period is stored as external data.

838  {
839 #ifdef PARANOID
840  // Sanity check; make sure it's not a null pointer
841  if (strouhal_data_pt == 0)
842  {
843  // Create an output stream
844  std::ostringstream error_message_stream;
845 
846  // Create an error message
847  error_message_stream
848  << "User supplied Strouhal number as external data\n"
849  << "but the pointer provided is a null pointer!" << std::endl;
850 
851  // Throw an error
852  throw OomphLibError(error_message_stream.str(),
855  }
856 #endif
857 
858  // Set the Strouhal value pointer (the Strouhal number is stored as the
859  // only piece of internal data in the phase condition element)
860  this->add_external_data(strouhal_data_pt);
861 
862  // Indicate that the Strouhal number is store as external data
864  } // End of store_strouhal_as_external_data
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307

References oomph::GeneralisedElement::add_external_data(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ store_strouhal_as_external_data() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::store_strouhal_as_external_data ( Data strouhal_data_pt)
inline

Function that tells us whether the period is stored as external data.

838  {
839 #ifdef PARANOID
840  // Sanity check; make sure it's not a null pointer
841  if (strouhal_data_pt == 0)
842  {
843  // Create an output stream
844  std::ostringstream error_message_stream;
845 
846  // Create an error message
847  error_message_stream
848  << "User supplied Strouhal number as external data\n"
849  << "but the pointer provided is a null pointer!" << std::endl;
850 
851  // Throw an error
852  throw OomphLibError(error_message_stream.str(),
855  }
856 #endif
857 
858  // Set the Strouhal value pointer (the Strouhal number is stored as the
859  // only piece of internal data in the phase condition element)
860  this->add_external_data(strouhal_data_pt);
861 
862  // Indicate that the Strouhal number is store as external data
864  } // End of store_strouhal_as_external_data

References oomph::GeneralisedElement::add_external_data(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::SpaceTimeNavierStokesEquations< DIM >::Strouhal_is_stored_as_external_data.

◆ store_strouhal_as_external_data() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::store_strouhal_as_external_data ( Data strouhal_data_pt)
inline

Function that tells us whether the period is stored as external data.

821  {
822 #ifdef PARANOID
823  // Sanity check; make sure it's not a null pointer
824  if (strouhal_data_pt == 0)
825  {
826  // Create an output stream
827  std::ostringstream error_message_stream;
828 
829  // Create an error message
830  error_message_stream
831  << "User supplied Strouhal number as external data\n"
832  << "but the pointer provided is a null pointer!" << std::endl;
833 
834  // Throw an error
835  throw OomphLibError(error_message_stream.str(),
838  }
839 #endif
840 
841  // Set the Strouhal value pointer (the Strouhal number is stored as the
842  // only piece of internal data in the phase condition element)
843  this->add_external_data(strouhal_data_pt);
844 
845  // Indicate that the Strouhal number is store as external data
847  } // End of store_strouhal_as_external_data

References oomph::GeneralisedElement::add_external_data(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::SpaceTimeNavierStokesEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data.

◆ strain_rate() [1/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::strain_rate ( const Vector< double > &  s,
DenseMatrix< double > &  strain_rate 
) const

Strain-rate tensor: 1/2 (du_i/dx_j+du_j/dx_i)

Get strain-rate tensor: (1/2)*(du_i/dx_j+du_j/dx_i)

1470  {
1471 #ifdef PARANOID
1472  if ((strainrate.ncol() != DIM) || (strainrate.nrow() != DIM))
1473  {
1474  std::ostringstream error_message;
1475  error_message << "The strain rate has incorrect dimensions "
1476  << strainrate.ncol() << " x " << strainrate.nrow()
1477  << " not " << DIM << std::endl;
1478  throw OomphLibError(
1479  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1480  }
1481 #endif
1482 
1483  // Velocity gradient matrix
1484  DenseMatrix<double> dudx(DIM);
1485 
1486  // Find out how many nodes there are in the element
1487  unsigned n_node = nnode();
1488 
1489  // Set up memory for the shape and test functions
1490  Shape psi(n_node);
1491 
1492  // Set up memory for the shape and test function derivatives
1493  DShape dpsidx(n_node, DIM + 1);
1494 
1495  // Evaluate the shape functions and shape function derivatives at this point
1496  dshape_eulerian(s, psi, dpsidx);
1497 
1498  // Initialise to zero
1499  dudx.initialise(0.0);
1500 
1501  // Loop over velocity components
1502  for (unsigned i = 0; i < DIM; i++)
1503  {
1504  // Get the index at which the i-th velocity is stored
1505  unsigned u_nodal_index = u_index_nst(i);
1506 
1507  // Loop over derivative directions
1508  for (unsigned j = 0; j < DIM; j++)
1509  {
1510  // Loop over nodes
1511  for (unsigned l = 0; l < n_node; l++)
1512  {
1513  // Update the value of du_i/dx_j
1514  dudx(i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1515  }
1516  } // for (unsigned j=0;j<DIM;j++)
1517  } // for (unsigned i=0;i<DIM;i++)
1518 
1519  // Loop over velocity components
1520  for (unsigned i = 0; i < DIM; i++)
1521  {
1522  // Loop over derivative directions
1523  for (unsigned j = 0; j < DIM; j++)
1524  {
1525  // Calculate the (i,j)-th strain rate entry
1526  strainrate(i, j) = 0.5 * (dudx(i, j) + dudx(j, i));
1527  }
1528  } // for (unsigned i=0;i<DIM;i++)
1529  } // End of strain_rate

References DIM, i, oomph::DenseMatrix< T >::initialise(), j, oomph::DenseMatrix< T >::ncol(), oomph::DenseMatrix< T >::nrow(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::get_Z2_flux().

◆ strain_rate() [2/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::strain_rate ( const Vector< double > &  s,
DenseMatrix< double > &  strain_rate 
) const

Strain-rate tensor: 1/2 (du_i/dx_j+du_j/dx_i)

◆ strain_rate() [3/3]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesEquations< DIM >::strain_rate ( const Vector< double > &  s,
DenseMatrix< double > &  strain_rate 
) const

Strain-rate tensor: 1/2 (du_i/dx_j+du_j/dx_i)

◆ u_index_nst() [1/3]

template<unsigned DIM>
virtual unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst ( const unsigned i) const
inlinevirtual

Return the index at which the i-th unknown velocity component is stored. The default value, i, is appropriate for single-physics problems. In derived multi-physics elements, this function should be overloaded to reflect the chosen storage scheme. Note that these equations require that the unknowns are always stored at the same indices at each node.

1103  {
1104 #ifdef PARANOID
1105  if (i > DIM - 1)
1106  {
1107  // Create an output stream
1108  std::ostringstream error_message_stream;
1109 
1110  // Create an error message
1111  error_message_stream << "Input index " << i << " does not correspond "
1112  << "to a velocity component when DIM=" << DIM
1113  << "!" << std::endl;
1114 
1115  // Throw an error
1116  throw OomphLibError(error_message_stream.str(),
1119  }
1120 #endif
1121 
1122  // Return the appropriate entry
1123  return i;
1124  } // End of u_index_nst

References DIM, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::get_Z2_flux(), oomph::RefineableQTaylorHoodSpaceTimeElement< DIM >::identify_load_data(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_du_dt_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::interpolated_u_nst(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst().

◆ u_index_nst() [2/3]

template<unsigned DIM>
virtual unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst ( const unsigned i) const
inlinevirtual

Return the index at which the i-th unknown velocity component is stored. The default value, i, is appropriate for single-physics problems. In derived multi-physics elements, this function should be overloaded to reflect the chosen storage scheme. Note that these equations require that the unknowns are always stored at the same indices at each node.

1103  {
1104 #ifdef PARANOID
1105  if (i > DIM - 1)
1106  {
1107  // Create an output stream
1108  std::ostringstream error_message_stream;
1109 
1110  // Create an error message
1111  error_message_stream << "Input index " << i << " does not correspond "
1112  << "to a velocity component when DIM=" << DIM
1113  << "!" << std::endl;
1114 
1115  // Throw an error
1116  throw OomphLibError(error_message_stream.str(),
1119  }
1120 #endif
1121 
1122  // Return the appropriate entry
1123  return i;
1124  } // End of u_index_nst

References DIM, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ u_index_nst() [3/3]

template<unsigned DIM>
virtual unsigned oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst ( const unsigned i) const
inlinevirtual

Return the index at which the i-th unknown velocity component is stored. The default value, i, is appropriate for single-physics problems. In derived multi-physics elements, this function should be overloaded to reflect the chosen storage scheme. Note that these equations require that the unknowns are always stored at the same indices at each node.

1077  {
1078 #ifdef PARANOID
1079  if (i > DIM - 1)
1080  {
1081  // Create an output stream
1082  std::ostringstream error_message_stream;
1083 
1084  // Create an error message
1085  error_message_stream << "Input index " << i << " does not correspond "
1086  << "to a velocity component when DIM=" << DIM
1087  << "!" << std::endl;
1088 
1089  // Throw an error
1090  throw OomphLibError(error_message_stream.str(),
1093  }
1094 #endif
1095 
1096  // Return the appropriate entry
1097  return i;
1098  } // End of u_index_nst

References DIM, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ u_nst() [1/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_nst() permits the use of this element as the basis for multi-physics elements. The default is to assume that the i-th velocity component is stored at the i-th location of the node

1073  {
1074  return nodal_value(n, u_index_nst(i));
1075  }

References i, n, oomph::FiniteElement::nodal_value(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ u_nst() [2/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_nst() permits the use of this element as the basis for multi-physics elements. The default is to assume that the i-th velocity component is stored at the i-th location of the node

1073  {
1074  return nodal_value(n, u_index_nst(i));
1075  }

References i, n, oomph::FiniteElement::nodal_value(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ u_nst() [3/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_nst() permits the use of this element as the basis for multi-physics elements. The default is to assume that the i-th velocity component is stored at the i-th location of the node

1047  {
1048  return nodal_value(n, u_index_nst(i));
1049  }

References i, n, oomph::FiniteElement::nodal_value(), and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ u_nst() [4/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned t,
const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated value for hanging nodes.

1080  {
1081 #ifdef PARANOID
1082  // Since we're using space-time elements, this only makes sense if t=0
1083  if (t != 0)
1084  {
1085  // Throw an error
1086  throw OomphLibError("Space-time elements cannot have history values!",
1089  }
1090 #endif
1091 
1092  // Return the appropriate nodal value (noting that t=0 here)
1093  return nodal_value(t, n, u_index_nst(i));
1094  } // End of u_nst

References i, n, oomph::FiniteElement::nodal_value(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, plotPSD::t, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ u_nst() [5/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned t,
const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated value for hanging nodes.

1080  {
1081 #ifdef PARANOID
1082  // Since we're using space-time elements, this only makes sense if t=0
1083  if (t != 0)
1084  {
1085  // Throw an error
1086  throw OomphLibError("Space-time elements cannot have history values!",
1089  }
1090 #endif
1091 
1092  // Return the appropriate nodal value (noting that t=0 here)
1093  return nodal_value(t, n, u_index_nst(i));
1094  } // End of u_nst

References i, n, oomph::FiniteElement::nodal_value(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, plotPSD::t, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ u_nst() [6/6]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesEquations< DIM >::u_nst ( const unsigned t,
const unsigned n,
const unsigned i 
) const
inline

Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated value for hanging nodes.

1054  {
1055 #ifdef PARANOID
1056  // Since we're using space-time elements, this only makes sense if t=0
1057  if (t != 0)
1058  {
1059  // Throw an error
1060  throw OomphLibError("Space-time elements cannot have history values!",
1063  }
1064 #endif
1065 
1066  // Return the appropriate nodal value (noting that t=0 here)
1067  return nodal_value(t, n, u_index_nst(i));
1068  } // End of u_nst

References i, n, oomph::FiniteElement::nodal_value(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, plotPSD::t, and oomph::SpaceTimeNavierStokesEquations< DIM >::u_index_nst().

◆ viscosity_ratio() [1/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio ( ) const
inline

Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of the Reynolds number

961  {
962  return *Viscosity_Ratio_pt;
963  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ viscosity_ratio() [2/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio ( ) const
inline

Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of the Reynolds number

961  {
962  return *Viscosity_Ratio_pt;
963  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ viscosity_ratio() [3/3]

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio ( ) const
inline

Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of the Reynolds number

935  {
936  return *Viscosity_Ratio_pt;
937  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ viscosity_ratio_pt() [1/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio_pt ( )
inline

◆ viscosity_ratio_pt() [2/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio_pt ( )
inline

Pointer to Viscosity Ratio.

967  {
968  return Viscosity_Ratio_pt;
969  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

◆ viscosity_ratio_pt() [3/3]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesEquations< DIM >::viscosity_ratio_pt ( )
inline

Pointer to Viscosity Ratio.

941  {
942  return Viscosity_Ratio_pt;
943  }

References oomph::SpaceTimeNavierStokesEquations< DIM >::Viscosity_Ratio_pt.

Member Data Documentation

◆ ALE_is_disabled

template<unsigned DIM>
bool oomph::SpaceTimeNavierStokesEquations< DIM >::ALE_is_disabled
protected

Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed. Only set to true if you're sure that the mesh is stationary.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::disable_ALE(), oomph::SpaceTimeNavierStokesEquations< DIM >::enable_ALE(), and oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build().

◆ Body_force_fct_pt

◆ Default_Gravity_vector

template<unsigned DIM>
static Vector< double > oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Gravity_vector
staticprivate

Static default value for the gravity vector.

Navier-Stokes equations default gravity vector.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::SpaceTimeNavierStokesEquations().

◆ Default_Physical_Constant_Value

template<unsigned DIM>
static double oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Constant_Value
staticprivate
Initial value:
=
0.0

Navier-Stokes equations static data.

Static default value for the physical constants (all initialised to zero)

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::SpaceTimeNavierStokesEquations().

◆ Default_Physical_Ratio_Value

template<unsigned DIM>
static double oomph::SpaceTimeNavierStokesEquations< DIM >::Default_Physical_Ratio_Value
staticprivate
Initial value:
=
1.0

Navier-Stokes equations static data.

Static default value for the physical ratios (all are initialised to one)

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::SpaceTimeNavierStokesEquations().

◆ Density_Ratio_pt

◆ G_pt

◆ Gamma

template<unsigned DIM>
static Vector< double > oomph::SpaceTimeNavierStokesEquations< DIM >::Gamma
static

Navier-Stokes equations static data.

Vector to decide whether the stress-divergence form is used or not N.B. This needs to be public so that the intel compiler gets things correct somehow the access function messes things up when going to refineable Navier-Stokes

◆ Pinned_fp_pressure_eqn

template<unsigned DIM>
int oomph::SpaceTimeNavierStokesEquations< DIM >::Pinned_fp_pressure_eqn
protected

Global eqn number of pressure dof that's pinned in pressure advection diffusion problem (defaults to -1)

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::pinned_fp_pressure_eqn().

◆ Press_adv_diff_source_fct_pt

template<unsigned DIM>
NavierStokesPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesEquations< DIM >::Press_adv_diff_source_fct_pt
protected

Pointer to source function pressure advection diffusion equation (only to be used during validation)

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::source_fct_for_pressure_adv_diff().

◆ Pressure_advection_diffusion_robin_element_pt

◆ Pressure_not_stored_at_node

template<unsigned DIM>
static int oomph::SpaceTimeNavierStokesEquations< DIM >::Pressure_not_stored_at_node = -100
staticprivate

Static "magic" number that indicates that the pressure is not stored at a node

"Magic" negative number that indicates that the pressure is not stored at a node. This cannot be -1 because that represents the positional hanging scheme in the hanging_pt object of nodes.

Referenced by oomph::SpaceTimeNavierStokesEquations< DIM >::p_nodal_index_nst().

◆ Re_pt

◆ ReInvFr_pt

◆ ReSt_pt

◆ ReynoldsStrouhal_is_stored_as_external_data

◆ Source_fct_pt

◆ St_pt

◆ Strouhal_is_stored_as_external_data

◆ Viscosity_Ratio_pt


The documentation for this class was generated from the following files: