oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM > Class Template Referenceabstract

#include <mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h>

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

Public Types

typedef void(* NavierStokesMixedOrderBodyForceFctPt) (const double &time, const Vector< double > &x, Vector< double > &body_force)
 
typedef double(* NavierStokesMixedOrderSourceFctPt) (const double &time, const Vector< double > &x)
 Function pointer to source function fct(t,x) (x is a Vector!) More...
 
typedef double(* NavierStokesMixedOrderPressureAdvDiffSourceFctPt) (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

 SpaceTimeNavierStokesMixedOrderEquations ()
 
void store_reynolds_strouhal_as_external_data (Data *reynolds_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...
 
NavierStokesMixedOrderBodyForceFctPtbody_force_fct_pt ()
 Access function for the body-force pointer. More...
 
NavierStokesMixedOrderBodyForceFctPt body_force_fct_pt () const
 Access function for the body-force pointer. Const version. More...
 
NavierStokesMixedOrderSourceFctPtsource_fct_pt ()
 Access function for the source-function pointer. More...
 
NavierStokesMixedOrderSourceFctPt source_fct_pt () const
 Access function for the source-function pointer. Const version. More...
 
NavierStokesMixedOrderPressureAdvDiffSourceFctPtsource_fct_for_pressure_adv_diff ()
 
NavierStokesMixedOrderPressureAdvDiffSourceFctPt 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)
 
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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase
 TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase ()
 Constructor (empty) More...
 
virtual ~TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase ()
 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 void shape_u_nst (const Vector< double > &s, Shape &psi) const =0
 DRAIG: Fill in later... More...
 
virtual void dshape_local_u_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx) const =0
 DRAIG: Fill in later... More...
 
virtual void dtest_local_u_nst (const Vector< double > &s, Shape &test, DShape &dtestdx) const =0
 DRAIG: Fill in later... More...
 
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)
 
- 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...
 
doubleReSt_pt
 Pointer to global Reynolds number x Strouhal number (=Womersley) More...
 
bool ReynoldsStrouhal_is_stored_as_external_data
 
doubleReInvFr_pt
 
Vector< double > * G_pt
 Pointer to global gravity Vector. More...
 
NavierStokesMixedOrderBodyForceFctPt Body_force_fct_pt
 Pointer to body force function. More...
 
NavierStokesMixedOrderSourceFctPt Source_fct_pt
 Pointer to volumetric source function. More...
 
NavierStokesMixedOrderPressureAdvDiffSourceFctPt Press_adv_diff_source_fct_pt
 
bool ALE_is_disabled
 
Vector< FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElementBase * > Pressure_advection_diffusion_robin_element_pt
 
int Pinned_fp_pressure_eqn
 
- 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
 
static double Default_Physical_Constant_Value = 0.0
 Navier-Stokes equations static data. More...
 
static double Default_Physical_Ratio_Value = 1.0
 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::SpaceTimeNavierStokesMixedOrderEquations< 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).

Member Typedef Documentation

◆ NavierStokesMixedOrderBodyForceFctPt

template<unsigned DIM>
typedef void(* oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::NavierStokesMixedOrderBodyForceFctPt) (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!

◆ NavierStokesMixedOrderPressureAdvDiffSourceFctPt

template<unsigned DIM>
typedef double(* oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::NavierStokesMixedOrderPressureAdvDiffSourceFctPt) (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!

◆ NavierStokesMixedOrderSourceFctPt

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

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

Constructor & Destructor Documentation

◆ SpaceTimeNavierStokesMixedOrderEquations()

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

816  : Body_force_fct_pt(0),
817  Source_fct_pt(0),
819  ALE_is_disabled(false),
821  {
822  // Set all the Physical parameter pointers:
823 
824  // Set the Reynolds number to the value zero
826 
827  // Set the Strouhal number to the value zero
829 
830  // The Strouhal number (which is a proxy for the period here) is not
831  // stored as external data
833 
834  // Set the Reynolds / Froude value to zero
836 
837  // Set the gravity vector to be the zero vector
839 
840  // Set the Physical ratios:
841 
842  // Set the viscosity ratio to the value one
844 
845  // Set the density ratio to the value one
847  }
NavierStokesMixedOrderBodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:534
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:520
double * Viscosity_Ratio_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:508
bool ReynoldsStrouhal_is_stored_as_external_data
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:524
double * Re_pt
Pointer to global Reynolds number.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:517
static double Default_Physical_Ratio_Value
Navier-Stokes equations static data.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:498
bool ALE_is_disabled
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:547
static double Default_Physical_Constant_Value
Navier-Stokes equations static data.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:494
int Pinned_fp_pressure_eqn
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:556
double * ReInvFr_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:528
Vector< double > * G_pt
Pointer to global gravity Vector.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:531
NavierStokesMixedOrderPressureAdvDiffSourceFctPt Press_adv_diff_source_fct_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:542
NavierStokesMixedOrderSourceFctPt Source_fct_pt
Pointer to volumetric source function.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:537
double * Density_Ratio_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:512
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:501

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

Member Function Documentation

◆ body_force_fct_pt() [1/2]

template<unsigned DIM>
NavierStokesMixedOrderBodyForceFctPt& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::body_force_fct_pt ( )
inline

Access function for the body-force pointer.

1023  {
1024  return Body_force_fct_pt;
1025  }

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

◆ body_force_fct_pt() [2/2]

template<unsigned DIM>
NavierStokesMixedOrderBodyForceFctPt oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::body_force_fct_pt ( ) const
inline

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

1029  {
1030  return Body_force_fct_pt;
1031  }

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

◆ build_fp_press_adv_diff_robin_bc_element()

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::build_fp_press_adv_diff_robin_bc_element ( const unsigned face_index)
pure virtual

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

Implements oomph::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

Implemented in oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >, oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

◆ compute_error() [1/5]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

614  {
615  // Initialise the error norm value
616  error = 0.0;
617 
618  // Initialise the solution norm value
619  norm = 0.0;
620 
621  // Vector of local coordinates
622  Vector<double> s(DIM + 1, 0.0);
623 
624  // Vector for the spatial coordinates
625  Vector<double> x(DIM, 0.0);
626 
627  // Set the value of n_intpt
628  unsigned n_intpt = integral_pt()->nweight();
629 
630  // Exact solution Vector (u,v,[w],p)
631  Vector<double> exact_soln(DIM + 1, 0.0);
632 
633  // Loop over the integration points
634  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
635  {
636  // Assign values of s
637  for (unsigned i = 0; i < DIM + 1; i++)
638  {
639  s[i] = integral_pt()->knot(ipt, i);
640  }
641 
642  // Assign values of x
643  for (unsigned i = 0; i < DIM; i++)
644  {
645  // Get x position as Vector
646  x[i] = interpolated_x(s, i);
647  }
648 
649  // Get exact solution at this point
650  (*exact_soln_pt)(x, exact_soln);
651 
652  // Get the integral weight
653  double w = integral_pt()->weight(ipt);
654 
655  // Get Jacobian of mapping
656  double J = J_eulerian(s);
657 
658  // Premultiply the weights and the Jacobian
659  double W = w * J;
660 
661  // Velocity error
662  for (unsigned i = 0; i < DIM; i++)
663  {
664  // Update the solution norm value
665  norm += exact_soln[i] * exact_soln[i] * W;
666 
667  // Update the error norm value
668  error += pow(exact_soln[i] - interpolated_u_nst(s, i), 2) * W;
669  }
670  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
671  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1919
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/5]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ compute_error() [5/5]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ d_kin_energy_dt()

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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:

1680  {
1681  // Initialise
1682  double d_kin_en_dt = 0.0;
1683 
1684  // Set the value of n_intpt
1685  const unsigned n_intpt = integral_pt()->nweight();
1686 
1687  // Get the number of nodes
1688  const unsigned n_node = this->nnode();
1689 
1690  // Storage for the shape function
1691  Shape psi(n_node);
1692  DShape dpsidx(n_node, DIM + 1);
1693 
1694  // Get the value at which the velocities are stored
1695  unsigned u_index[DIM];
1696  for (unsigned i = 0; i < DIM; i++)
1697  {
1698  u_index[i] = this->u_index_nst(i);
1699  }
1700 
1701  // Loop over the integration points
1702  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1703  {
1704  // Get the jacobian of the mapping
1705  double J = dshape_eulerian_at_knot(ipt, psi, dpsidx);
1706 
1707  // Get the integral weight
1708  double w = integral_pt()->weight(ipt);
1709 
1710  // Now work out the velocity and the time derivative
1711  Vector<double> interpolated_u(DIM, 0.0);
1712  Vector<double> interpolated_dudt(DIM, 0.0);
1713 
1714  // Loop over the shape functions
1715  for (unsigned l = 0; l < n_node; l++)
1716  {
1717  // Loop over the dimensions
1718  for (unsigned i = 0; i < DIM; i++)
1719  {
1720  interpolated_u[i] += nodal_value(l, u_index[i]) * psi(l);
1721  interpolated_dudt[i] += du_dt_nst(l, u_index[i]) * psi(l);
1722  }
1723  }
1724 
1725  // Get mesh velocity bit
1726  if (!ALE_is_disabled)
1727  {
1728  Vector<double> mesh_velocity(DIM, 0.0);
1729  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
1730 
1731  // Loop over nodes again
1732  for (unsigned l = 0; l < n_node; l++)
1733  {
1734  for (unsigned i = 0; i < DIM; i++)
1735  {
1736  mesh_velocity[i] += this->dnodal_position_dt(l, i) * psi(l);
1737 
1738  for (unsigned j = 0; j < DIM; j++)
1739  {
1740  interpolated_dudx(i, j) +=
1741  this->nodal_value(l, u_index[i]) * dpsidx(l, j);
1742  }
1743  }
1744  }
1745 
1746  // Subtract mesh velocity from du_dt
1747  for (unsigned i = 0; i < DIM; i++)
1748  {
1749  for (unsigned k = 0; k < DIM; k++)
1750  {
1751  interpolated_dudt[i] -= mesh_velocity[k] * interpolated_dudx(i, k);
1752  }
1753  }
1754  }
1755 
1756 
1757  // Loop over directions and add up u du/dt terms
1758  double sum = 0.0;
1759  for (unsigned i = 0; i < DIM; i++)
1760  {
1761  sum += interpolated_u[i] * interpolated_dudt[i];
1762  }
1763 
1764  d_kin_en_dt += sum * w * J;
1765  }
1766 
1767  return d_kin_en_dt;
1768 
1769  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1162
virtual unsigned u_index_nst(const unsigned &i) const
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1115
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.

◆ delete_pressure_advection_diffusion_robin_elements()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

1900  {
1901  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1902  for (unsigned e = 0; e < nel; e++)
1903  {
1905  }
1907  } // End of delete_pressure_advection_diffusion_robin_elements
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Vector< FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElementBase * > Pressure_advection_diffusion_robin_element_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:552

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

◆ density_ratio()

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

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

987  {
988  return *Density_Ratio_pt;
989  }

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

◆ density_ratio_pt()

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

Pointer to Density ratio.

993  {
994  return Density_Ratio_pt;
995  }

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

◆ dinterpolated_u_nst_ddata()

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >.

2009  {
2010  // Find the number of nodes
2011  unsigned n_node = nnode();
2012 
2013  // Local shape function
2014  Shape psi(n_node);
2015 
2016  // Find values of shape function
2017  shape_u_nst(s, psi);
2018 
2019  // Get nodal index at which i-th velocity is stored
2020  unsigned u_nodal_index = u_index_nst(i);
2021 
2022  // Find the number of dofs associated with interpolated u
2023  unsigned n_u_dof = 0;
2024 
2025  // Loop over the nodes
2026  for (unsigned l = 0; l < n_node; l++)
2027  {
2028  // Get the global equation number of the dof
2029  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2030 
2031  // If it's positive add to the count
2032  if (global_eqn >= 0)
2033  {
2034  // Increment the counter
2035  n_u_dof++;
2036  }
2037  } // End of dinterpolated_u_nst_ddata
2038 
2039  // Now resize the storage schemes
2040  du_ddata.resize(n_u_dof, 0.0);
2041  global_eqn_number.resize(n_u_dof, 0);
2042 
2043  // Loop over th nodes again and set the derivatives
2044  unsigned count = 0;
2045  // Loop over the local nodes and sum
2046  for (unsigned l = 0; l < n_node; l++)
2047  {
2048  // Get the global equation number
2049  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
2050  if (global_eqn >= 0)
2051  {
2052  // Set the global equation number
2053  global_eqn_number[count] = global_eqn;
2054  // Set the derivative with respect to the unknown
2055  du_ddata[count] = psi[l];
2056  // Increase the counter
2057  ++count;
2058  }
2059  }
2060  } // 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_u_nst(const Vector< double > &s, Shape &psi) const =0
DRAIG: Fill in later...

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

◆ disable_ALE()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1228  {
1229  ALE_is_disabled = true;
1230  } // End of disable_ALE

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

◆ dissipation() [1/2]

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

Return integral of dissipation over element.

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

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

◆ dissipation() [2/2]

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

Return dissipation at local coordinate s.

1453  {
1454  // Get strain rate matrix
1455  DenseMatrix<double> strainrate(DIM, DIM);
1456  strain_rate(s, strainrate);
1457 
1458  // Initialise
1459  double local_diss = 0.0;
1460  for (unsigned i = 0; i < DIM; i++)
1461  {
1462  for (unsigned j = 0; j < DIM; j++)
1463  {
1464  local_diss += 2.0 * strainrate(i, j) * strainrate(i, j);
1465  }
1466  }
1467 
1468  return local_diss;
1469  }

References DIM, i, j, and s.

◆ dpshape_and_dptest_eulerian_nst()

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

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

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

◆ dpshape_eulerian()

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

Pressure shape functions and their derivs w.r.t. to global coords at local coordinate s (taken from geometry). Return Jacobian of mapping between local and global coordinates.

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

◆ dptest_eulerian()

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

Pressure test functions and their derivs w.r.t. to global coords at local coordinate s (taken from geometry). Return Jacobian of mapping between local and global coordinates.

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

◆ dshape_and_dtest_eulerian_at_knot_nst() [1/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of mapping (J). Also compute derivatives of dpsidx, dtestdx and J w.r.t. nodal coordinates.

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

◆ dshape_and_dtest_eulerian_at_knot_nst() [2/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

◆ dshape_and_dtest_eulerian_nst()

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

◆ dshape_local_u_nst()

◆ dtest_local_u_nst()

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::dtest_local_u_nst ( const Vector< double > &  s,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

◆ du_dt_nst()

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1163  {
1164  // Storage for the local coordinates
1165  Vector<double> s(DIM + 1, 0.0);
1166 
1167  // Get the local coordinate at the n-th node
1169 
1170  // Return the interpolated du_i/dt value
1171  return interpolated_du_dt_nst(s, i);
1172  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1177

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

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

◆ enable_ALE()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1238  {
1239  ALE_is_disabled = false;
1240  } // End of enable_ALE

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

◆ fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1726  {
1727  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1728  unsigned compute_matrices_flag = 2;
1729 
1730  // Call the generic routine with the appropriate flag
1732  dres_dparam,
1733  djac_dparam,
1734  dmass_matrix_dparam,
1735  compute_matrices_flag);
1736  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.cc:2292

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

◆ fill_in_contribution_to_djacobian_dparameter()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1705  {
1706  // Do we want to compute the Jacobian? ANSWER: Yes!
1707  unsigned compute_jacobian_flag = 1;
1708 
1709  // Call the generic routine with the flag set to 1
1711  parameter_pt,
1712  dres_dparam,
1713  djac_dparam,
1715  compute_jacobian_flag);
1716  } // End of fill_in_contribution_to_djacobian_dparameter
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227

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

◆ fill_in_contribution_to_dresiduals_dparameter()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1685  {
1686  // Do we want to compute the Jacobian? ANSWER: No!
1687  unsigned compute_jacobian_flag = 0;
1688 
1689  // Call the generic residuals function using a dummy matrix argument
1691  parameter_pt,
1692  dres_dparam,
1695  compute_jacobian_flag);
1696  } // End of fill_in_contribution_to_dresiduals_dparameter

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

◆ fill_in_contribution_to_hessian_vector_products()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

2315  {
2316  // Throw an error
2317  throw OomphLibError("Not yet implemented\n",
2320  } // 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_jacobian()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1652  {
1653  // Do we want to compute the Jacobian? ANSWER: Yes!
1654  unsigned compute_jacobian_flag = 1;
1655 
1656  // Call the generic routine with the flag set to 1
1658  residuals,
1659  jacobian,
1661  compute_jacobian_flag);
1662  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.cc:1843

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

◆ fill_in_contribution_to_jacobian_and_mass_matrix()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1671  {
1672  // Do we want to compute the Jacobian AND mass matrix? ANSWER: Yes!
1673  unsigned compute_matrices_flag = 2;
1674 
1675  // Call the generic routine with the flag set to 2
1677  residuals, jacobian, mass_matrix, compute_matrices_flag);
1678  } // End of fill_in_contribution_to_jacobian_and_mass_matrix

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

◆ fill_in_contribution_to_residuals()

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

Compute the element's residual Vector.

Reimplemented from oomph::GeneralisedElement.

1635  {
1636  // Do we want to compute the Jacobian? ANSWER: No!
1637  unsigned compute_jacobian_flag = 0;
1638 
1639  // Call the generic residuals function using a dummy matrix argument
1641  residuals,
1644  compute_jacobian_flag);
1645  } // End of fill_in_contribution_to_residuals

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

◆ fill_in_generic_dresidual_contribution_nst()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

2298  {
2299  // Throw an error
2300  throw OomphLibError("Not yet implemented\n",
2303  } // End of fill_in_generic_dresidual_contribution_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

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

◆ fill_in_generic_pressure_advection_diffusion_contribution_nst()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >.

1828  {
1829  // Throw an error
1830  throw OomphLibError("Not yet implemented\n",
1833  } // End of fill_in_generic_pressure_advection_diffusion_contribution_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

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

◆ fill_in_generic_residual_contribution_nst()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >.

1847  {
1848  // Return immediately if there are no dofs
1849  if (ndof() == 0) return;
1850 
1851  // Find out how many nodes there are
1852  unsigned n_node = nnode();
1853 
1854  // Find out how many pressure dofs there are
1855  unsigned n_pres = npres_nst();
1856 
1857  // Allocate storage for the indices of the velocity components
1858  unsigned u_nodal_index[DIM];
1859 
1860  // Loop over the velocity components
1861  for (unsigned i = 0; i < DIM; i++)
1862  {
1863  // Find the index at which the i-th local velocity is stored
1864  u_nodal_index[i] = u_index_nst(i);
1865  }
1866 
1867  // Set up memory for the shape functions
1868  Shape psif(n_node);
1869 
1870  // Set up memory for the test functions
1871  Shape testf(n_node);
1872 
1873  // Allocate space for the derivatives of the shape functions
1874  DShape dpsifdx(n_node, DIM + 1);
1875 
1876  // Allocate space for the derivatives of the test functions
1877  DShape dtestfdx(n_node, DIM + 1);
1878 
1879  // Set up memory for pressure shape functions
1880  Shape psip(n_pres);
1881 
1882  // Set up memory for pressure test functions
1883  Shape testp(n_pres);
1884 
1885  // Number of integration points
1886  unsigned n_intpt = integral_pt()->nweight();
1887 
1888  // Set the Vector to hold local coordinates
1889  Vector<double> s(DIM + 1, 0.0);
1890 
1891  //-------------------------------------
1892  // Get physical variables from element:
1893  //-------------------------------------
1894  // Reynolds number must be multiplied by the density ratio
1895  double scaled_re = re() * density_ratio();
1896 
1897  // Get the scaled Strouhal value
1898  double scaled_re_st = re_st() * density_ratio();
1899 
1900  // Get the scaled Womersley number differentiated w.r.t. the Womersley
1901  // number
1902  double scaled_dre_st_dre_st = density_ratio();
1903 
1904  // Get the scaled Reynolds / Froude number
1905  double scaled_re_inv_fr = re_invfr() * density_ratio();
1906 
1907  // Get the viscosity ratio
1908  double visc_ratio = viscosity_ratio();
1909 
1910  // Get the gravity vector
1911  Vector<double> G = g();
1912 
1913  // Integer to store the local equation number
1914  int local_eqn = 0;
1915 
1916  // Integer to store the local unknown number
1917  int local_unknown = 0;
1918 
1919  // Loop over the integration points
1920  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1921  {
1922  // Assign values of s
1923  for (unsigned i = 0; i < DIM + 1; i++)
1924  {
1925  // Calculate the i-th local coordinate
1926  s[i] = integral_pt()->knot(ipt, i);
1927  }
1928 
1929  // Get the integral weight
1930  double w = integral_pt()->weight(ipt);
1931 
1932  // Call the derivatives of the shape and test functions
1934  ipt, psif, dpsifdx, testf, dtestfdx);
1935 
1936  // Call the pressure shape and test functions
1937  pshape_nst(s, psip, testp);
1938 
1939  // Pre-multiply the weights and the Jacobian
1940  double W = w * J;
1941 
1942  // Storage for the interpolated time value
1943  double interpolated_t = 0.0;
1944 
1945  // Storage for the interpolated pressure value
1946  double interpolated_p = 0.0;
1947 
1948  // Storage for the spatial coordinates
1949  Vector<double> interpolated_x(DIM, 0.0);
1950 
1951  // Storage for the interpolated velocity components
1952  Vector<double> interpolated_u(DIM, 0.0);
1953 
1954  // Storage for the interpolated time-derivative of the velocities
1955  Vector<double> interpolated_dudt(DIM, 0.0);
1956 
1957  // Storage for the mesh velocity
1958  Vector<double> mesh_velocity(DIM, 0.0);
1959 
1960  // Storage for the spatial derivatives of the velocity components
1961  DenseMatrix<double> interpolated_dudx(DIM, DIM, 0.0);
1962 
1963  // Calculate pressure
1964  for (unsigned l = 0; l < n_pres; l++)
1965  {
1966  // Update the current approximation to the interpolated pressure
1967  interpolated_p += p_nst(l) * psip[l];
1968  }
1969 
1970  //-------------------------------------------------------------------
1971  // Calculate velocities, derivatives, source function and body force:
1972  //-------------------------------------------------------------------
1973  // Loop over nodes
1974  for (unsigned l = 0; l < n_node; l++)
1975  {
1976  // Update the interpolated time value
1977  interpolated_t += raw_nodal_position(l, DIM) * psif(l);
1978 
1979  // Loop over coordinate directions
1980  for (unsigned i = 0; i < DIM; i++)
1981  {
1982  // Get the nodal value
1983  double u_value = raw_nodal_value(l, u_nodal_index[i]);
1984 
1985  // Update the i-th interpolated velocity component
1986  interpolated_u[i] += u_value * psif[l];
1987 
1988  // Update the i-th interpolated coordinate value
1989  interpolated_x[i] += raw_nodal_position(l, i) * psif[l];
1990 
1991  // Update the interpolated du_i/dt value
1992  interpolated_dudt[i] += u_value * dpsifdx(l, DIM);
1993 
1994  // Loop over derivative directions
1995  for (unsigned j = 0; j < DIM; j++)
1996  {
1997  // Update the interpolated du_i/dx_j value
1998  interpolated_dudx(i, j) += u_value * dpsifdx(l, j);
1999  }
2000  } // for (unsigned i=0;i<DIM;i++)
2001  } // for (unsigned l=0;l<n_node;l++)
2002 
2003  // If ALE is enabled
2004  if (!ALE_is_disabled)
2005  {
2006  // Loop over nodes
2007  for (unsigned l = 0; l < n_node; l++)
2008  {
2009  // Loop over directions
2010  for (unsigned i = 0; i < DIM; i++)
2011  {
2012  // Update the i-th mesh velocity component
2013  mesh_velocity[i] += raw_nodal_position(l, i) * dpsifdx(l, DIM);
2014  }
2015  } // for (unsigned l=0;l<n_node;l++)
2016  } // if (!ALE_is_disabled)
2017 
2018  // Allocate space for the body force
2019  Vector<double> body_force(DIM, 0.0);
2020 
2021  // Get the user-defined body force term
2022  get_body_force_nst(interpolated_t, ipt, s, interpolated_x, body_force);
2023 
2024  // Get the user-defined source function
2025  double source = get_source_nst(interpolated_t, ipt, interpolated_x);
2026 
2027  //---------------------------------
2028  // Assemble residuals and Jacobian:
2029  //---------------------------------
2030  //--------------------
2031  // Momentum equations:
2032  //--------------------
2033  // Loop over the test functions
2034  for (unsigned l = 0; l < n_node; l++)
2035  {
2036  // Loop over the velocity components
2037  for (unsigned i = 0; i < DIM; i++)
2038  {
2039  // Get the local equation number associated with this unknown and node
2040  local_eqn = nodal_local_eqn(l, u_nodal_index[i]);
2041 
2042  // If it's not a boundary condition
2043  if (local_eqn >= 0)
2044  {
2045  // Add the user-defined body force terms
2046  residuals[local_eqn] += body_force[i] * testf[l] * W;
2047 
2048  // Add the gravitational body force term
2049  residuals[local_eqn] += scaled_re_inv_fr * testf[l] * G[i] * W;
2050 
2051  // Add the pressure gradient term
2052  residuals[local_eqn] += interpolated_p * dtestfdx(l, i) * W;
2053 
2054  // Add in the contribution from the time derivative
2055  residuals[local_eqn] -=
2056  scaled_re_st * interpolated_dudt[i] * testf[l] * W;
2057 
2058  // If ALE is enabled
2059  if (!ALE_is_disabled)
2060  {
2061  // Loop over the coordinate directions
2062  for (unsigned k = 0; k < DIM; k++)
2063  {
2064  // Add in the mesh velocity contribution
2065  residuals[local_eqn] +=
2066  (scaled_re_st * mesh_velocity[k] * interpolated_dudx(i, k) *
2067  testf[l] * W);
2068  }
2069  } // if (!ALE_is_disabled)
2070 
2071  // Loop over the coordinate directions
2072  for (unsigned k = 0; k < DIM; k++)
2073  {
2074  // Add in the convective term contribution
2075  residuals[local_eqn] -= (scaled_re * interpolated_u[k] *
2076  interpolated_dudx(i, k) * testf[l] * W);
2077  }
2078 
2079  // Loop over the coordinate directions
2080  for (unsigned k = 0; k < DIM; k++)
2081  {
2082  // Add in the stress tensor terms:
2083  // NOTE: The viscosity ratio needs to go in here to ensure
2084  // continuity of normal stress is satisfied even in flows
2085  // with zero pressure gradient!
2086  residuals[local_eqn] -= ((interpolated_dudx(i, k) +
2087  Gamma[i] * interpolated_dudx(k, i)) *
2088  visc_ratio * dtestfdx(l, k) * W);
2089  }
2090 
2091  //------------------------
2092  // Calculate the Jacobian:
2093  //------------------------
2094  // If we also need to construct the Jacobian
2095  if (flag)
2096  {
2097  // Loop over the velocity shape functions again
2098  for (unsigned l2 = 0; l2 < n_node; l2++)
2099  {
2100  // Loop over the velocity components again
2101  for (unsigned i2 = 0; i2 < DIM; i2++)
2102  {
2103  // Get the local equation number associated with this unknown
2104  local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
2105 
2106  // If we're at a proper degree of freedom
2107  if (local_unknown >= 0)
2108  {
2109  // Add the contribution to the elemental matrix
2110  jacobian(local_eqn, local_unknown) -=
2111  (visc_ratio * Gamma[i] * dpsifdx(l2, i) *
2112  dtestfdx(l, i2) * W);
2113 
2114  // Now add in the inertial terms
2115  jacobian(local_eqn, local_unknown) -=
2116  (scaled_re * psif[l2] * interpolated_dudx(i, i2) *
2117  testf[l] * W);
2118 
2119  // Extra component if i2=i
2120  if (i2 == i)
2121  {
2122  // If we also need to construct the mass matrix (only
2123  // diagonal entries)
2124  if (flag == 2)
2125  {
2126  // NOTE: This is positive because the mass matrix is
2127  // taken to the other side of the equation when
2128  // formulating the generalised eigenproblem.
2129  mass_matrix(local_eqn, local_unknown) +=
2130  (scaled_re_st * psif[l2] * testf[l] * W);
2131  }
2132 
2133  // Add in the time-derivative contribution
2134  jacobian(local_eqn, local_unknown) -=
2135  (scaled_re_st * dpsifdx(l2, DIM) * testf[l] * W);
2136 
2137  // If ALE is enabled
2138  if (!ALE_is_disabled)
2139  {
2140  // Loop over the velocity components
2141  for (unsigned k = 0; k < DIM; k++)
2142  {
2143  // Add in the mesh velocity contribution
2144  jacobian(local_eqn, local_unknown) +=
2145  (scaled_re_st * mesh_velocity[k] * dpsifdx(l2, k) *
2146  testf[l] * W);
2147  }
2148  } // if (!ALE_is_disabled)
2149 
2150  // Loop over the velocity components
2151  for (unsigned k = 0; k < DIM; k++)
2152  {
2153  // Add in the convective term contribution
2154  jacobian(local_eqn, local_unknown) -=
2155  (scaled_re * interpolated_u[k] * dpsifdx(l2, k) *
2156  testf[l] * W);
2157  }
2158 
2159  // Loop over the velocity components
2160  for (unsigned k = 0; k < DIM; k++)
2161  {
2162  // Add in the velocity gradient terms
2163  jacobian(local_eqn, local_unknown) -=
2164  (visc_ratio * dpsifdx(l2, k) * dtestfdx(l, k) * W);
2165  }
2166  } // if (i2==i)
2167  } // if (local_unknown>=0)
2168  } // for (unsigned i2=0;i2<DIM;i2++)
2169  } // for (unsigned l2=0;l2<n_node;l2++)
2170 
2171  // Loop over pressure shape functions
2172  for (unsigned l2 = 0; l2 < n_pres; l2++)
2173  {
2174  // Get the local equation number associated with this degree of
2175  // freedom
2176  local_unknown = p_local_eqn(l2);
2177 
2178  // If we are at a proper degree of freedom
2179  if (local_unknown >= 0)
2180  {
2181  // Add in the pressure gradient contribution
2182  jacobian(local_eqn, local_unknown) +=
2183  psip[l2] * dtestfdx(l, i) * W;
2184  }
2185  } // for (unsigned l2=0;l2<n_pres;l2++)
2186 
2187  //------------------------------------
2188  // Calculate external data information
2189  //------------------------------------
2190  // If we're storing the Strouhal number as external data then we
2191  // need to calculate dr/d(St) in the elemental Jacobian
2193  {
2194  // The index of the external data (there's only one!)
2195  unsigned data_index = 0;
2196 
2197  // The index of the unknown value stored in the external data
2198  unsigned value_index = 0;
2199 
2200  // Get the local equation number associated with the extra
2201  // unknown
2202  local_unknown =
2203  this->external_local_eqn(data_index, value_index);
2204 
2205  // If we're at a non-zero degree of freedom add in the entry
2206  if (local_unknown >= 0)
2207  {
2208  // Add in the contribution from the time derivative
2209  jacobian(local_eqn, local_unknown) -=
2210  (scaled_dre_st_dre_st * interpolated_dudt[i] * testf[l] *
2211  W);
2212 
2213  // If ALE is enabled
2214  if (!ALE_is_disabled)
2215  {
2216  // Loop over the coordinate directions
2217  for (unsigned k = 0; k < DIM; k++)
2218  {
2219  // Add in the mesh velocity contribution
2220  jacobian(local_eqn, local_unknown) +=
2221  (scaled_dre_st_dre_st * mesh_velocity[k] *
2222  interpolated_dudx(i, k) * testf[l] * W);
2223  }
2224  } // if (!ALE_is_disabled)
2225  } // if (local_unknown>=0)
2226  } // if (Strouhal_is_stored_as_external_data)
2227  } // if (flag)
2228  } // if (local_eqn>=0)
2229  } // for (unsigned i=0;i<DIM;i++)
2230  } // for (unsigned l=0;l<n_node;l++)
2231 
2232  //---------------------
2233  // Continuity equation:
2234  //---------------------
2235  // Loop over the shape functions
2236  for (unsigned l = 0; l < n_pres; l++)
2237  {
2238  // Get the local equation number associated with the pressure dof
2239  local_eqn = p_local_eqn(l);
2240 
2241  // If it's not a boundary condition
2242  if (local_eqn >= 0)
2243  {
2244  // Add in the source term contribution
2245  residuals[local_eqn] -= source * testp[l] * W;
2246 
2247  // Loop over velocity components
2248  for (unsigned k = 0; k < DIM; k++)
2249  {
2250  // Add in the velocity gradient terms
2251  residuals[local_eqn] += interpolated_dudx(k, k) * testp[l] * W;
2252  }
2253 
2254  //------------------------
2255  // Calculate the Jacobian:
2256  //------------------------
2257  // If we also need to construct the Jacobian
2258  if (flag)
2259  {
2260  // Loop over the velocity shape functions
2261  for (unsigned l2 = 0; l2 < n_node; l2++)
2262  {
2263  // Loop over velocity components
2264  for (unsigned i2 = 0; i2 < DIM; i2++)
2265  {
2266  // Get the local equation number associated with this node
2267  local_unknown = nodal_local_eqn(l2, u_nodal_index[i2]);
2268 
2269  // If we're at a proper degree of freedom
2270  if (local_unknown >= 0)
2271  {
2272  // Add in the velocity gradient contribution
2273  jacobian(local_eqn, local_unknown) +=
2274  dpsifdx(l2, i2) * testp[l] * W;
2275  }
2276  } // for (unsigned i2=0;i2<DIM;i2++)
2277  } // for (unsigned l2=0;l2<n_node;l2++)
2278  } // if (flag)
2279  } // if (local_eqn>=0)
2280  } // for (unsigned l=0;l<n_pres;l++)
2281  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
2282  } // 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
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:711
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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1010
const double & viscosity_ratio() const
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:973
virtual void pshape_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
const double & re() const
Reynolds number.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:900
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.
const double & density_ratio() const
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:986
static Vector< double > Gamma
Navier-Stokes equations static data.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:853
const double & re_st() const
ReSt parameter (const. version)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:916
virtual void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:640
const double & re_invfr() const
Global inverse Froude number.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:998
virtual int p_local_eqn(const unsigned &n) const =0
void body_force(const double &time, const Vector< double > &x, Vector< double > &result)
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:96
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46

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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_residuals().

◆ fill_in_pressure_advection_diffusion_jacobian()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

1757  {
1758  // Do we want to compute the Jacobian? ANSWER: Yes!
1759  unsigned compute_jacobian_flag = 1;
1760 
1761  // Call the generic routine with the appropriate flag
1763  residuals, jacobian, compute_jacobian_flag);
1764  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.cc:1824

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

◆ fill_in_pressure_advection_diffusion_residuals()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

1743  {
1744  // Do we want to compute the Jacobian? ANSWER: No!
1745  unsigned compute_jacobian_flag = 0;
1746 
1747  // Call the generic routine with the appropriate flag
1749  residuals, GeneralisedElement::Dummy_matrix, compute_jacobian_flag);
1750  } // End of fill_in_pressure_advection_diffusion_residuals

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

◆ fix_pressure()

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

Pin p_dof-th pressure dof and set it to value specified by p_value.

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

◆ full_output() [1/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

1535  {
1536  // Set the number of plot points in each direction
1537  unsigned n_plot = 5;
1538 
1539  // Forward the call to the appropriate output function
1540  full_output(outfile, n_plot);
1541  } // End of full_output
void full_output(std::ostream &outfile)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1534

◆ full_output() [2/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

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

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

◆ g()

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

Vector of gravitational components.

1011  {
1012  return *G_pt;
1013  }

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

◆ g_pt()

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

Pointer to Vector of gravitational components.

1017  {
1018  return G_pt;
1019  }

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

◆ get_body_force_gradient_nst()

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

672  {
673  // Reference value
674  Vector<double> body_force(DIM, 0.0);
675 
676  // Get the body force vector
677  get_body_force_nst(time, ipt, s, x, body_force);
678 
679  // Get the finite-difference step size
681 
682  // The body force computed at the perturbed coordinates
683  Vector<double> body_force_pls(DIM, 0.0);
684 
685  // Copy the (Eulerian) coordinate vector x
686  Vector<double> x_pls(x);
687 
688  // Loop over the coordinate directions
689  for (unsigned i = 0; i < DIM; i++)
690  {
691  // Update the i-th entry
692  x_pls[i] += eps_fd;
693 
694  // Get the body force at the current time
695  get_body_force_nst(time, ipt, s, x_pls, body_force_pls);
696 
697  // Loop over the coordinate directions
698  for (unsigned j = 0; j < DIM; j++)
699  {
700  // Finite-difference the body force derivative
701  d_body_force_dx(j, i) = (body_force_pls[j] - body_force[j]) / eps_fd;
702  }
703 
704  // Reset the i-th entry
705  x_pls[i] = x[i];
706  }
707  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::get_body_force_nst(), i, j, s, and plotDoE::x.

◆ get_body_force_nst()

template<unsigned DIM>
virtual void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

645  {
646  // If a function has not been provided
647  if (Body_force_fct_pt == 0)
648  {
649  // Set the body forces to zero
650  result.initialise(0.0);
651  }
652  // If the function pointer is non-zero
653  else
654  {
655  // Call the function
656  (*Body_force_fct_pt)(time, x, result);
657  } // if (Body_force_fct_pt!=0)
658  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Body_force_fct_pt, oomph::Vector< _Tp >::initialise(), and plotDoE::x.

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

◆ get_dresidual_dnodal_coordinates()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >.

2333  {
2334  // Throw a warning
2335  throw OomphLibError("Space-time update needs to be checked!",
2338  } // End of get_dresidual_dnodal_coordinates

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ get_du_dt()

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1154  {
1155  // Return the value calculated by du_dt_vdp
1156  return du_dt_nst(n, i);
1157  } // End of get_du_dt

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

◆ get_load()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1315  {
1316  // Note: get_traction() computes the traction onto the fluid
1317  // if N is the outer unit normal onto the fluid; here we're
1318  // expecting N to point into the fluid so we're getting the
1319  // traction onto the adjacent wall instead!
1320  get_traction(s, N, load);
1321  }
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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.cc:1373
@ N
Definition: constructor.cpp:22

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

◆ get_pressure_and_velocity_mass_matrix_diagonal()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

Reimplemented in oomph::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >.

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

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

739  {
740  // Reference value
741  double source = get_source_nst(time, ipt, x);
742 
743  // Get the finite-difference step size
745 
746  // The source function value computed at the perturbed coordinates
747  double source_pls = 0.0;
748 
749  // Copy the (Eulerian) coordinate vector, x
750  Vector<double> x_pls(x);
751 
752  // Loop over the coordinate directions
753  for (unsigned i = 0; i < DIM; i++)
754  {
755  // Update the i-th entry
756  x_pls[i] += eps_fd;
757 
758  // Get the body force at the current time
759  source_pls = get_source_nst(time, ipt, x_pls);
760 
761  // Loop over the coordinate directions
762  for (unsigned j = 0; j < DIM; j++)
763  {
764  // Finite-difference the source function gradient
765  gradient[i] = (source_pls - source) / eps_fd;
766  }
767 
768  // Reset the i-th entry
769  x_pls[i] = x[i];
770  }
771  } // End of get_source_gradient_nst

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

◆ get_source_nst()

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

714  {
715  // If the function pointer is null
716  if (Source_fct_pt == 0)
717  {
718  // Set the source function value to zero
719  return 0;
720  }
721  // Otherwise call the function pointer
722  else
723  {
724  // Return the appropriate value
725  return (*Source_fct_pt)(time, x);
726  }
727  } // End of get_source_nst

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

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

◆ get_traction() [1/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

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

◆ get_traction() [2/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ get_vorticity() [1/4]

void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

1614  {
1615  // Create a vector to store the vorticity
1616  Vector<double> vort(1, 0.0);
1617 
1618  // Calculate the vorticity
1619  get_vorticity(s, vort);
1620 
1621  // Assign the vorticity
1622  vorticity = vort[0];
1623  } // 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/4]

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

Compute the vorticity vector at local coordinate s.

◆ get_vorticity() [3/4]

void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

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

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

◆ get_vorticity() [4/4]

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

Compute the vorticity vector at local coordinate s.

◆ interpolated_du_dt_nst()

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

1179  {
1180  // Find number of nodes
1181  unsigned n_node = nnode();
1182 
1183  // Local shape function
1184  Shape psi(n_node);
1185 
1186  // Allocate space for the derivatives of the shape functions
1187  DShape dpsidx(n_node, DIM + 1);
1188 
1189  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
1190  // Find the element dimension
1191  const unsigned el_dim = this->dim();
1192 
1193  // Get the values of the shape functions and their local derivatives;
1194  // temporarily stored in dpsi
1195  dshape_local_u_nst(s, psi, dpsidx);
1196 
1197  // Allocate memory for the inverse jacobian
1198  DenseMatrix<double> inverse_jacobian(el_dim);
1199 
1200  // Now calculate the inverse jacobian
1201  local_to_eulerian_mapping(dpsidx, inverse_jacobian);
1202 
1203  // Now set the values of the derivatives to be dpsidx
1204  transform_derivatives(inverse_jacobian, dpsidx);
1205  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
1206 
1207  // Initialise value of du_i/dt
1208  double interpolated_dudt = 0.0;
1209 
1210  // Find the index at which the variable is stored
1211  unsigned u_nodal_index = u_index_nst(i);
1212 
1213  // Loop over the local nodes and sum
1214  for (unsigned l = 0; l < n_node; l++)
1215  {
1216  // Update the interpolated du_i/dt value
1217  interpolated_dudt += nodal_value(l, u_nodal_index) * dpsidx(l, DIM);
1218  }
1219 
1220  // Return the interpolated du_i/dt value
1221  return interpolated_dudt;
1222  } // End of interpolated_du_dt_nst
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:1508
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: elements.cc:2833
virtual void dshape_local_u_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx) const =0
DRAIG: Fill in later...
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30

References oomph::FiniteElement::dim(), DIM, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::dshape_local_u_nst(), el_dim, i, oomph::FiniteElement::local_to_eulerian_mapping(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::transform_derivatives(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::u_index_nst().

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

◆ interpolated_p_nst() [1/2]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

2090  {
2091  // Find number of nodes
2092  unsigned n_pres = npres_nst();
2093 
2094  // Local shape function
2095  Shape psi(n_pres);
2096 
2097  // Find values of shape function
2098  pshape_nst(s, psi);
2099 
2100  // Initialise value of p
2101  double interpolated_p = 0.0;
2102 
2103  // Loop over the local nodes and sum
2104  for (unsigned l = 0; l < n_pres; l++)
2105  {
2106  interpolated_p += p_nst(t, l) * psi[l];
2107  }
2108 
2109  return (interpolated_p);
2110  }
t
Definition: plotPSD.py:36

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

◆ interpolated_p_nst() [2/2]

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

Return FE interpolated pressure at local coordinate s.

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

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

Referenced by oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::get_interpolated_values(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::point_output_data(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::scalar_value_paraview().

◆ interpolated_u_nst() [1/3]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1985  {
1986  // Create an output stream
1987  std::ostringstream error_message_stream;
1988 
1989  // Create an error message
1990  error_message_stream << "This interface doesn't make sense in "
1991  << "space-time elements!" << std::endl;
1992 
1993  // Throw an error
1994  throw OomphLibError(error_message_stream.str(),
1997  } // End of interpolated_u_nst

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ interpolated_u_nst() [2/3]

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

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

1952  {
1953  // Find the number of nodes
1954  unsigned n_node = nnode();
1955 
1956  // Local shape function
1957  Shape psi(n_node);
1958 
1959  // Find values of shape function
1960  shape_u_nst(s, psi);
1961 
1962  // Get nodal index at which i-th velocity is stored
1963  unsigned u_nodal_index = u_index_nst(i);
1964 
1965  // Initialise value of u
1966  double interpolated_u = 0.0;
1967 
1968  // Loop over the local nodes and sum
1969  for (unsigned l = 0; l < n_node; l++)
1970  {
1971  // Update the i-th velocity component approximation
1972  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
1973  }
1974 
1975  // Return the calculated approximation to the i-th velocity component
1976  return interpolated_u;
1977  } // End of interpolated_u_nst

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

◆ interpolated_u_nst() [3/3]

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

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

1921  {
1922  // Find the number of nodes
1923  unsigned n_node = nnode();
1924 
1925  // Local shape function
1926  Shape psi(n_node);
1927 
1928  // Find values of shape function
1929  shape_u_nst(s, psi);
1930 
1931  // Loop over the velocity components
1932  for (unsigned i = 0; i < DIM; i++)
1933  {
1934  // Index at which the nodal value is stored
1935  unsigned u_nodal_index = u_index_nst(i);
1936 
1937  // Initialise the i-th value of the velocity vector
1938  velocity[i] = 0.0;
1939 
1940  // Loop over the local nodes and sum
1941  for (unsigned l = 0; l < n_node; l++)
1942  {
1943  // Update the i-th velocity component approximation
1944  velocity[i] += nodal_value(l, u_nodal_index) * psi[l];
1945  }
1946  } // for (unsigned i=0;i<DIM;i++)
1947  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::shape_u_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::u_index_nst(), and Jeffery_Solution::velocity().

Referenced by oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::get_interpolated_values(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::point_output_data(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::scalar_value_paraview().

◆ is_reynolds_strouhal_stored_as_external_data()

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

Are we storing the Strouhal number as external data?

893  {
894  // Return the flags value
896  } // End of is_reynolds_strouhal_stored_as_external_data

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

◆ kin_energy()

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ n_u_nst()

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

Return the number of velocity components (used in FluidInterfaceElements)

1143  {
1144  // Return the number of equations to solve
1145  return DIM;
1146  } // End of n_u_nst

References DIM.

◆ npres_nst()

template<unsigned DIM>
virtual unsigned oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::npres_nst ( ) const
pure virtual

◆ nscalar_paraview()

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

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

Reimplemented from oomph::FiniteElement.

1335  {
1336  // The number of velocity components plus the pressure field
1337  return DIM + 1;
1338  }

References DIM.

◆ output() [1/4]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

1517  {
1518  // Set the number of plot points in each direction
1519  unsigned n_plot = 5;
1520 
1521  // Forward the call to the appropriate output function
1522  output(file_pt, n_plot);
1523  } // End of output
void output(std::ostream &outfile)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1499

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

◆ output() [2/4]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

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

References DIM, i, and s.

◆ output() [3/4]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

1500  {
1501  // Set the number of plot points in each direction
1502  unsigned n_plot = 5;
1503 
1504  // Forward the call to the appropriate output function
1505  output(outfile, n_plot);
1506  } // End of output

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::output(), and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::output().

◆ output() [4/4]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >.

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

References DIM, i, and s.

◆ output_fct() [1/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ output_fct() [2/2]

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

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

◆ output_pressure_advection_diffusion_robin_elements()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

1863  {
1864  unsigned nel = Pressure_advection_diffusion_robin_element_pt.size();
1865  for (unsigned e = 0; e < nel; e++)
1866  {
1867  FaceElement* face_el_pt =
1869  outfile << "ZONE" << std::endl;
1870  Vector<double> unit_normal(DIM);
1871  Vector<double> x(DIM + 1);
1872  Vector<double> s(DIM);
1873  unsigned n = face_el_pt->integral_pt()->nweight();
1874  for (unsigned ipt = 0; ipt < n; ipt++)
1875  {
1876  for (unsigned i = 0; i < DIM; i++)
1877  {
1878  s[i] = face_el_pt->integral_pt()->knot(ipt, i);
1879  }
1880  face_el_pt->interpolated_x(s, x);
1881  face_el_pt->outer_unit_normal(ipt, unit_normal);
1882  for (unsigned i = 0; i < DIM + 1; i++)
1883  {
1884  outfile << x[i] << " ";
1885  }
1886  for (unsigned i = 0; i < DIM; i++)
1887  {
1888  outfile << unit_normal[i] << " ";
1889  }
1890  outfile << std::endl;
1891  }
1892  }
1893  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Pressure_advection_diffusion_robin_element_pt, s, and plotDoE::x.

◆ output_veloc()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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!

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

References DIM, i, and s.

◆ output_vorticity()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

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

◆ p_nodal_index_nst()

template<unsigned DIM>
virtual int oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

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

1257  {
1259  }
static int Pressure_not_stored_at_node
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:490

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

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

◆ p_nst() [1/2]

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

Pressure at local pressure "node" n_p Uses suitably interpolated value for hanging nodes.

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

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::interpolated_p_nst().

◆ p_nst() [2/2]

template<unsigned DIM>
virtual double oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::p_nst ( const unsigned t,
const unsigned n_p 
) const
pure virtual

Pressure at local pressure "node" n_p at time level t.

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

◆ pin_all_non_pressure_dofs()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

1770  {
1771  // Loop over internal data and pin the values (having established that
1772  // pressure dofs aren't amongst those)
1773  unsigned nint = this->ninternal_data();
1774  for (unsigned j = 0; j < nint; j++)
1775  {
1776  Data* data_pt = this->internal_data_pt(j);
1777  if (eqn_number_backup[data_pt].size() == 0)
1778  {
1779  unsigned nvalue = data_pt->nvalue();
1780  eqn_number_backup[data_pt].resize(nvalue);
1781  for (unsigned i = 0; i < nvalue; i++)
1782  {
1783  // Backup
1784  eqn_number_backup[data_pt][i] = data_pt->eqn_number(i);
1785 
1786  // Pin everything
1787  data_pt->pin(i);
1788  }
1789  }
1790  }
1791 
1792  // Now deal with nodal values
1793  unsigned nnod = this->nnode();
1794  for (unsigned j = 0; j < nnod; j++)
1795  {
1796  Node* nod_pt = this->node_pt(j);
1797  if (eqn_number_backup[nod_pt].size() == 0)
1798  {
1799  unsigned nvalue = nod_pt->nvalue();
1800  eqn_number_backup[nod_pt].resize(nvalue);
1801  for (unsigned i = 0; i < nvalue; i++)
1802  {
1803  // Pin everything apart from the nodal pressure
1804  // value
1805  if (int(i) != this->p_nodal_index_nst())
1806  {
1807  // Backup
1808  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1809 
1810  // Pin
1811  nod_pt->pin(i);
1812  }
1813  // Else it's a pressure value
1814  else
1815  {
1816  // Exclude non-nodal pressure based elements
1817  if (this->p_nodal_index_nst() >= 0)
1818  {
1819  // Backup
1820  eqn_number_backup[nod_pt][i] = nod_pt->eqn_number(i);
1821  }
1822  }
1823  }
1824 
1825 
1826  // If it's a solid node deal with its positional data too
1827  SolidNode* solid_nod_pt = dynamic_cast<SolidNode*>(nod_pt);
1828  if (solid_nod_pt != 0)
1829  {
1830  Data* solid_posn_data_pt = solid_nod_pt->variable_position_pt();
1831  if (eqn_number_backup[solid_posn_data_pt].size() == 0)
1832  {
1833  unsigned nvalue = solid_posn_data_pt->nvalue();
1834  eqn_number_backup[solid_posn_data_pt].resize(nvalue);
1835  for (unsigned i = 0; i < nvalue; i++)
1836  {
1837  // Backup
1838  eqn_number_backup[solid_posn_data_pt][i] =
1839  solid_posn_data_pt->eqn_number(i);
1840 
1841  // Pin
1842  solid_posn_data_pt->pin(i);
1843  }
1844  }
1845  }
1846  }
1847  }
1848  } // 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: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1256

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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::p_nodal_index_nst(), oomph::Data::pin(), oomph::FiniteElement::size(), and oomph::SolidNode::variable_position_pt().

◆ pinned_fp_pressure_eqn()

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

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

Implements oomph::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

1063  {
1064  // Return the appropriate equation number
1065  return Pinned_fp_pressure_eqn;
1066  }

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

◆ point_output_data()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

2116  {
2117  // Resize data for values
2118  data.resize(2 * DIM + 2);
2119 
2120  // Write values in the vector
2121  for (unsigned i = 0; i < DIM + 1; i++)
2122  {
2123  // Output the i-th (Eulerian) coordinate at these local coordinates
2124  data[i] = interpolated_x(s, i);
2125  }
2126 
2127  // Write values in the vector
2128  for (unsigned i = 0; i < DIM; i++)
2129  {
2130  // Output the i-th velocity component at these local coordinates
2131  data[i + (DIM + 1)] = this->interpolated_u_nst(s, i);
2132  }
2133 
2134  // Output the pressure field value at these local coordinates
2135  data[2 * DIM + 1] = this->interpolated_p_nst(s);
2136  } // End of point_output_data
int data[]
Definition: Map_placement_new.cpp:1

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

◆ pressure_integral()

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

Integral of pressure over element.

Return pressure integrated over the element.

1778  {
1779  // Initialise
1780  double press_int = 0;
1781 
1782  // Set the value of n_intpt
1783  unsigned n_intpt = integral_pt()->nweight();
1784 
1785  // Set the Vector to hold local coordinates
1786  Vector<double> s(DIM + 1, 0.0);
1787 
1788  // Loop over the integration points
1789  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1790  {
1791  // Assign values of s
1792  for (unsigned i = 0; i < DIM + 1; i++)
1793  {
1794  s[i] = integral_pt()->knot(ipt, i);
1795  }
1796 
1797  // Get the integral weight
1798  double w = integral_pt()->weight(ipt);
1799 
1800  // Get Jacobian of mapping
1801  double J = J_eulerian(s);
1802 
1803  // Premultiply the weights and the Jacobian
1804  double W = w * J;
1805 
1806  // Get pressure
1807  double press = interpolated_p_nst(s);
1808 
1809  // Add
1810  press_int += press * W;
1811  }
1812 
1813  return press_int;
1814  }

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

◆ pshape_nst() [1/2]

◆ pshape_nst() [2/2]

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

Compute the pressure shape and test functions at local coordinate s

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

◆ re()

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

Reynolds number.

901  {
902  // Use the Reynolds number pointer to get the Reynolds value
903  return *Re_pt;
904  } // End of re

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

◆ re_invfr()

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_invfr ( ) const
inline

Global inverse Froude number.

999  {
1000  return *ReInvFr_pt;
1001  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReInvFr_pt.

◆ re_invfr_pt()

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_invfr_pt ( )
inline

Pointer to global inverse Froude number.

1005  {
1006  return ReInvFr_pt;
1007  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReInvFr_pt.

◆ re_pt()

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_pt ( )
inline

Pointer to Reynolds number.

909  {
910  // Return the Reynolds number pointer
911  return Re_pt;
912  } // End of re_pt

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

◆ re_st()

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_st ( ) const
inline

ReSt parameter (const. version)

917  {
918  // If the st is stored as external data
920  {
921  // The index of the external data (which contains the st)
922  unsigned data_index = 0;
923 
924  // The index of the value at which the ReynoldsStrouhal number is stored
925  unsigned re_st_index = 0;
926 
927  // Return the value of the st in the external data
928  return *(this->external_data_pt(data_index)->value_pt(re_st_index));
929  }
930  // Otherwise the st is just stored as a pointer
931  else
932  {
933  // Return the value of St
934  return *ReSt_pt;
935  }
936  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReSt_pt, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ re_st_pt() [1/2]

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_st_pt ( )
inline

Pointer to ReSt number (can only assign to private member data)

965  {
966  // Return the ReSt number pointer
967  return ReSt_pt;
968  } // End of st_pt

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReSt_pt.

◆ re_st_pt() [2/2]

template<unsigned DIM>
double* oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_st_pt ( ) const
inline

Pointer to Strouhal parameter (const. version)

941  {
942  // If the strouhal is stored as external data
944  {
945  // The index of the external data (which contains the strouhal)
946  unsigned data_index = 0;
947 
948  // The index of the value at which the ReynoldsStrouhal number is stored
949  unsigned re_st_index = 0;
950 
951  // Return the value of the st in the external data
952  return this->external_data_pt(data_index)->value_pt(re_st_index);
953  }
954  // Otherwise the strouhal is just stored as a pointer
955  else
956  {
957  // Return the value of Strouhal
958  return ReSt_pt;
959  }
960  } // End of re_st_pt

References oomph::GeneralisedElement::external_data_pt(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReSt_pt, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data, and oomph::Data::value_pt().

◆ scalar_name_paraview()

template<unsigned DIM>
std::string oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1464  {
1465  // Velocities
1466  if (i < DIM)
1467  {
1468  // Return the appropriate string for the i-th velocity component
1469  return "Velocity " + StringConversion::to_string(i);
1470  }
1471  // Pressure
1472  else if (i == DIM)
1473  {
1474  // Return the name for the pressure
1475  return "Pressure";
1476  }
1477  // Never get here
1478  else
1479  {
1480  // Create an output stream
1481  std::stringstream error_stream;
1482 
1483  // Create the error message
1484  error_stream << "These Navier Stokes elements only store " << DIM + 1
1485  << " fields,\nbut i is currently " << i << std::endl;
1486 
1487  // Throw the error message
1488  throw OomphLibError(
1489  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1490 
1491  // Dummy return so the compiler doesn't complain
1492  return " ";
1493  }
1494  } // 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_value_fct_paraview()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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_field-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

1400  {
1401 #ifdef PARANOID
1402  if (i > DIM)
1403  {
1404  // Create an output stream
1405  std::stringstream error_stream;
1406 
1407  // Create the error message
1408  error_stream << "These Navier Stokes elements only store " << DIM + 1
1409  << " fields, but i is currently " << i << std::endl;
1410 
1411  // Throw the error message
1412  throw OomphLibError(
1413  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1414  }
1415 #endif
1416 
1417  // Vector of local coordinates
1418  Vector<double> s(DIM + 1, 0.0);
1419 
1420  // Storage for the time value
1421  double interpolated_t = 0.0;
1422 
1423  // Storage for the spatial coordinates
1424  Vector<double> spatial_coordinates(DIM, 0.0);
1425 
1426  // How many plot points do we have in total?
1427  unsigned num_plot_points = nplot_points_paraview(nplot);
1428 
1429  // Loop over plot points
1430  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1431  {
1432  // Get the local coordinates of the iplot-th plot point
1433  get_s_plot(iplot, nplot, s);
1434 
1435  // Loop over the spatial coordinates
1436  for (unsigned j = 0; j < DIM; j++)
1437  {
1438  // Assign the i-th spatial coordinate
1439  spatial_coordinates[j] = interpolated_x(s, j);
1440  }
1441 
1442  // Get the time value
1443  interpolated_t = interpolated_x(s, DIM);
1444 
1445  // ------ DRAIG: REMOVE ----------------------------------------
1446  // Exact solution vector (here it's simply a scalar)
1447  Vector<double> exact_soln(DIM + 1, 0.0);
1448  // DRAIG: Needs to be changed to a Vector of size DIM
1449  // ------ DRAIG: REMOVE ----------------------------------------
1450 
1451  // Get the exact solution at this point
1452  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
1453 
1454  // Output the interpolated solution value
1455  file_out << exact_soln[i] << std::endl;
1456  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1457  } // 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(), j, oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_paraview()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1345  {
1346  // Vector of local coordinates
1347  Vector<double> s(DIM + 1, 0.0);
1348 
1349  // How many plot points do we have in total?
1350  unsigned num_plot_points = nplot_points_paraview(nplot);
1351 
1352  // Loop over plot points
1353  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1354  {
1355  // Get the local coordinates of the iplot-th plot point
1356  get_s_plot(iplot, nplot, s);
1357 
1358  // Velocities
1359  if (i < DIM)
1360  {
1361  // Output the i-th velocity component
1362  file_out << interpolated_u_nst(s, i) << std::endl;
1363  }
1364  // Pressure
1365  else if (i == DIM)
1366  {
1367  // Output the pressure at this point
1368  file_out << interpolated_p_nst(s) << std::endl;
1369  }
1370  // Never get here
1371  else
1372  {
1373 #ifdef PARANOID
1374  // Create an output stream
1375  std::stringstream error_stream;
1376 
1377  // Create the error message
1378  error_stream << "These Navier Stokes elements only store " << DIM + 1
1379  << " fields, "
1380  << "but i is currently " << i << std::endl;
1381 
1382  // Throw the error message
1383  throw OomphLibError(error_stream.str(),
1386 #endif
1387  }
1388  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1389  } // End of scalar_value_paraview

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::interpolated_p_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ shape_u_nst()

◆ source_fct_for_pressure_adv_diff() [1/2]

template<unsigned DIM>
NavierStokesMixedOrderPressureAdvDiffSourceFctPt& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::source_fct_for_pressure_adv_diff ( )
inline

Access function for the source-function pointer for pressure advection diffusion (used for validation only).

1048  {
1050  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_for_pressure_adv_diff() [2/2]

template<unsigned DIM>
NavierStokesMixedOrderPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1056  {
1058  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Press_adv_diff_source_fct_pt.

◆ source_fct_pt() [1/2]

template<unsigned DIM>
NavierStokesMixedOrderSourceFctPt& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::source_fct_pt ( )
inline

Access function for the source-function pointer.

1035  {
1036  return Source_fct_pt;
1037  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Source_fct_pt.

◆ source_fct_pt() [2/2]

template<unsigned DIM>
NavierStokesMixedOrderSourceFctPt oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::source_fct_pt ( ) const
inline

Access function for the source-function pointer. Const version.

1041  {
1042  return Source_fct_pt;
1043  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Source_fct_pt.

◆ store_reynolds_strouhal_as_external_data()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::store_reynolds_strouhal_as_external_data ( Data reynolds_strouhal_data_pt)
inline

Function that tells us whether the period is stored as external data.

859  {
860 #ifdef PARANOID
861  // Sanity check; make sure it's not a null pointer
862  if (reynolds_strouhal_data_pt == 0)
863  {
864  // Create an output stream
865  std::ostringstream error_message_stream;
866 
867  // Create an error message
868  error_message_stream
869  << "User supplied the Reynolds x Strouhal number as "
870  << "external data\nbut the pointer provided is a "
871  << "null pointer!" << std::endl;
872 
873  // Throw an error
874  throw OomphLibError(error_message_stream.str(),
877  }
878 #endif
879 
880  // Set the Strouhal value pointer (the Strouhal number is stored as the
881  // only piece of internal data in the phase condition element)
882  this->add_external_data(reynolds_strouhal_data_pt);
883 
884  // Indicate that the Strouhal number is store as external data
886  } // 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::ReynoldsStrouhal_is_stored_as_external_data.

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

◆ strain_rate()

template<unsigned DIM>
void oomph::SpaceTimeNavierStokesMixedOrderEquations< 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)

1477  {
1478 #ifdef PARANOID
1479  if ((strainrate.ncol() != DIM) || (strainrate.nrow() != DIM))
1480  {
1481  std::ostringstream error_message;
1482  error_message << "The strain rate has incorrect dimensions "
1483  << strainrate.ncol() << " x " << strainrate.nrow()
1484  << " not " << DIM << std::endl;
1485  throw OomphLibError(
1486  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1487  }
1488 #endif
1489 
1490  // Velocity gradient matrix
1491  DenseMatrix<double> dudx(DIM);
1492 
1493  // Find out how many nodes there are in the element
1494  unsigned n_node = nnode();
1495 
1496  // Set up memory for the shape and test functions
1497  Shape psi(n_node);
1498 
1499  // Set up memory for the shape and test function derivatives
1500  DShape dpsidx(n_node, DIM + 1);
1501 
1502  // Evaluate the shape functions and shape function derivatives at this point
1503  dshape_eulerian(s, psi, dpsidx);
1504 
1505  // Initialise to zero
1506  dudx.initialise(0.0);
1507 
1508  // Loop over velocity components
1509  for (unsigned i = 0; i < DIM; i++)
1510  {
1511  // Get the index at which the i-th velocity is stored
1512  unsigned u_nodal_index = u_index_nst(i);
1513 
1514  // Loop over derivative directions
1515  for (unsigned j = 0; j < DIM; j++)
1516  {
1517  // Loop over nodes
1518  for (unsigned l = 0; l < n_node; l++)
1519  {
1520  // Update the value of du_i/dx_j
1521  dudx(i, j) += nodal_value(l, u_nodal_index) * dpsidx(l, j);
1522  }
1523  } // for (unsigned j=0;j<DIM;j++)
1524  } // for (unsigned i=0;i<DIM;i++)
1525 
1526  // Loop over velocity components
1527  for (unsigned i = 0; i < DIM; i++)
1528  {
1529  // Loop over derivative directions
1530  for (unsigned j = 0; j < DIM; j++)
1531  {
1532  // Calculate the (i,j)-th strain rate entry
1533  strainrate(i, j) = 0.5 * (dudx(i, j) + dudx(j, i));
1534  }
1535  } // for (unsigned i=0;i<DIM;i++)
1536  } // 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::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >::get_Z2_flux().

◆ u_index_nst()

template<unsigned DIM>
virtual unsigned oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1116  {
1117 #ifdef PARANOID
1118  if (i > DIM - 1)
1119  {
1120  // Create an output stream
1121  std::ostringstream error_message_stream;
1122 
1123  // Create an error message
1124  error_message_stream << "Input index " << i << " does not correspond "
1125  << "to a velocity component when DIM=" << DIM
1126  << "!" << std::endl;
1127 
1128  // Throw an error
1129  throw OomphLibError(error_message_stream.str(),
1132  }
1133 #endif
1134 
1135  // Return the appropriate entry
1136  return i;
1137  } // End of u_index_nst

References DIM, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >::get_Z2_flux(), oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::identify_load_data(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::interpolated_du_dt_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::interpolated_u_nst(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::u_nst().

◆ u_nst() [1/2]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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

1086  {
1087  return nodal_value(n, u_index_nst(i));
1088  }

References i, n, oomph::FiniteElement::nodal_value(), and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::u_index_nst().

◆ u_nst() [2/2]

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< 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.

1093  {
1094 #ifdef PARANOID
1095  // Since we're using space-time elements, this only makes sense if t=0
1096  if (t != 0)
1097  {
1098  // Throw an error
1099  throw OomphLibError("Space-time elements cannot have history values!",
1102  }
1103 #endif
1104 
1105  // Return the appropriate nodal value (noting that t=0 here)
1106  return nodal_value(t, n, u_index_nst(i));
1107  } // End of u_nst

References i, n, oomph::FiniteElement::nodal_value(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, plotPSD::t, and oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::u_index_nst().

◆ viscosity_ratio()

template<unsigned DIM>
const double& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::viscosity_ratio ( ) const
inline

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

974  {
975  return *Viscosity_Ratio_pt;
976  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Viscosity_Ratio_pt.

◆ viscosity_ratio_pt()

template<unsigned DIM>
double*& oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::viscosity_ratio_pt ( )
inline

Pointer to Viscosity Ratio.

980  {
981  return Viscosity_Ratio_pt;
982  }

References oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Viscosity_Ratio_pt.

Member Data Documentation

◆ ALE_is_disabled

template<unsigned DIM>
bool oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::disable_ALE(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::enable_ALE(), and oomph::RefineableSpaceTimeNavierStokesMixedOrderEquations< DIM >::further_build().

◆ Body_force_fct_pt

◆ Default_Gravity_vector

template<unsigned DIM>
Vector< double > oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Default_Gravity_vector
staticprivate

Static default value for the gravity vector.

Navier-Stokes equations default gravity vector.

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::SpaceTimeNavierStokesMixedOrderEquations().

◆ Default_Physical_Constant_Value

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Default_Physical_Constant_Value = 0.0
staticprivate

Navier-Stokes equations static data.

Static default value for the physical constants (all initialised to zero)

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::SpaceTimeNavierStokesMixedOrderEquations().

◆ Default_Physical_Ratio_Value

template<unsigned DIM>
double oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Default_Physical_Ratio_Value = 1.0
staticprivate

Navier-Stokes equations static data.

Static default value for the physical ratios (all are initialised to one)

Referenced by oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::SpaceTimeNavierStokesMixedOrderEquations().

◆ Density_Ratio_pt

◆ G_pt

◆ Gamma

template<unsigned DIM>
Vector< double > oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::SpaceTimeNavierStokesMixedOrderEquations< 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::pinned_fp_pressure_eqn().

◆ Press_adv_diff_source_fct_pt

template<unsigned DIM>
NavierStokesMixedOrderPressureAdvDiffSourceFctPt oomph::SpaceTimeNavierStokesMixedOrderEquations< 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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::source_fct_for_pressure_adv_diff().

◆ Pressure_advection_diffusion_robin_element_pt

◆ Pressure_not_stored_at_node

template<unsigned DIM>
int oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::Pressure_not_stored_at_node
staticprivate
Initial value:
=
-100

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::SpaceTimeNavierStokesMixedOrderEquations< DIM >::p_nodal_index_nst().

◆ Re_pt

◆ ReInvFr_pt

◆ ReSt_pt

◆ ReynoldsStrouhal_is_stored_as_external_data

◆ Source_fct_pt

◆ Viscosity_Ratio_pt


The documentation for this class was generated from the following files: