oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM > Class Template Reference

#include <mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h>

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

Public Member Functions

 QTaylorHoodMixedOrderSpaceTimeElement ()
 Constructor, no internal data points. More...
 
 ~QTaylorHoodMixedOrderSpaceTimeElement ()
 
virtual unsigned required_nvalue (const unsigned &n) const
 
Nodepressure_node_pt (const unsigned &n_p)
 Pointer to n_p-th pressure node. More...
 
int element_node_index_to_pressure_node_index (const unsigned &n)
 
bool is_pressure_node (const unsigned &n) const
 
void shape_u_nst (const Vector< double > &s, Shape &psi) const
 DRAIG: Fill in later... More...
 
void pshape_nst (const Vector< double > &s, Shape &psi) const
 Pressure shape functions at local coordinate s. More...
 
void ptest_nst (const Vector< double > &s, Shape &psi) const
 Pressure test functions at local coordinate s. More...
 
void pshape_nst (const Vector< double > &s, Shape &psi, Shape &test) const
 Pressure shape and test functions at local coordinte s. More...
 
virtual int p_nodal_index_nst () const
 Set the value at which the pressure is stored in the nodes. More...
 
int p_local_eqn (const unsigned &n) const
 Return the local equation numbers for the pressure values. More...
 
double p_nst (const unsigned &n_p) const
 
double p_nst (const unsigned &t, const unsigned &n_p) const
 
unsigned npres_nst () const
 Return number of pressure values. More...
 
void fix_pressure (const unsigned &p_dof, const double &p_value)
 Pin p_dof-th pressure dof and set it to value specified by p_value. More...
 
void build_fp_press_adv_diff_robin_bc_element (const unsigned &face_index)
 
void identify_load_data (std::set< std::pair< Data *, unsigned >> &paired_load_data)
 
void identify_pressure_data (std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
 
void output (std::ostream &outfile)
 Redirect output to NavierStokesMixedOrderEquations output. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 Redirect output to NavierStokesMixedOrderEquations output. More...
 
void output (FILE *file_pt)
 Redirect output to NavierStokesMixedOrderEquations output. More...
 
void output (FILE *file_pt, const unsigned &nplot)
 Redirect output to NavierStokesMixedOrderEquations output. More...
 
void shape_u_nst (const Vector< double > &s, Shape &psi) const
 2D (in space): Velocity shape functions More...
 
void pshape_nst (const Vector< double > &s, Shape &psi) const
 2D (in space): Pressure shape functions More...
 
void ptest_nst (const Vector< double > &s, Shape &test) const
 2D (in space): Pressure shape functions More...
 
- Public Member Functions inherited from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >
 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 ()
 
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 ()
 
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 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...
 
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...
 
- 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
 
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...
 
- 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...
 

Protected Member Functions

double dshape_and_dtest_eulerian_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
 
double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
 
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
 
void dshape_local_u_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 DRAIG: Fill in later... More...
 
void dtest_local_u_nst (const Vector< double > &s, Shape &test, DShape &dtestdx) const
 DRAIG: Fill in later... More...
 
double dpshape_eulerian (const Vector< double > &s, Shape &ppsi, DShape &dppsidx) const
 
double dptest_eulerian (const Vector< double > &s, Shape &ptest, DShape &dptestdx) const
 
double dpshape_and_dptest_eulerian_nst (const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
 
const unsigned Pconv [8]
 
void dshape_local_u_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 2D (in space): Velocity shape functions and derivs w.r.t. local coords More...
 
void dtest_local_u_nst (const Vector< double > &s, Shape &test, DShape &dtestdx) const
 2D (in space): Velocity test functions and derivs w.r.t. local coords More...
 
double dpshape_eulerian (const Vector< double > &s, Shape &ppsi, DShape &dppsidx) const
 
double dptest_eulerian (const Vector< double > &s, Shape &ptest, DShape &dptestdx) const
 
double dpshape_and_dptest_eulerian_nst (const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
 
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
 
- Protected Member Functions inherited from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >
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)
 

Static Protected Attributes

static const unsigned Pconv []
 
- 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
 

Private Member Functions

const unsigned Initial_Nvalue [27]
 

Static Private Attributes

static const unsigned Initial_Nvalue []
 Static array of ints to hold number of variables at node. More...
 

Additional Inherited Members

- Public Types inherited from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >
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 > &)
 
- Static Public Attributes inherited from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >
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 Attributes inherited from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >
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
 

Detailed Description

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

/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// Taylor-Hood elements are Navier-Stokes elements with quadratic interpolation for velocities and positions and continuous linear pressure interpolation. They can be used within oomph-lib's block-preconditioning framework.

Constructor & Destructor Documentation

◆ QTaylorHoodMixedOrderSpaceTimeElement()

Constructor, no internal data points.

2238  : QElement<DIM + 1, 3>(), SpaceTimeNavierStokesMixedOrderEquations<DIM>()
2239  {
2240  }

◆ ~QTaylorHoodMixedOrderSpaceTimeElement()

Member Function Documentation

◆ build_fp_press_adv_diff_robin_bc_element()

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::build_fp_press_adv_diff_robin_bc_element ( const unsigned face_index)
inlinevirtual

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

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

Reimplemented in oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >.

2370  {
2371  // Create a new Robic BC element and add it to the storage
2373  new FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElement<
2374  QTaylorHoodMixedOrderSpaceTimeElement<DIM>>(this, face_index));
2375  } // End of build_fp_press_adv_diff_robin_bc_element
Vector< FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElementBase * > Pressure_advection_diffusion_robin_element_pt
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:552

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

◆ dpshape_and_dptest_eulerian_nst() [1/2]

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

Pressure shape and 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.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dpshape_and_dptest_eulerian_nst() [2/2]

double oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::dpshape_and_dptest_eulerian_nst ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx,
Shape ptest,
DShape dptestdx 
) const
inlineprotectedvirtual

2D (in space): Pressure shape and test functions and derivs w.r.t. to Eulerian coordinates. Return Jacobian of mapping between local and global coordinates.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2934  {
2935  // Call the test functions and derivatives
2936  dptest_eulerian(s, ptest, dptestdx);
2937 
2938  // Call the shape functions and derivatives and the Jacobian of the mapping
2939  return this->dpshape_eulerian(s, ppsi, dppsidx);
2940  } // End of dpshape_and_dptest_eulerian_nst
double dpshape_eulerian(const Vector< double > &s, Shape &ppsi, DShape &dppsidx) const
double dptest_eulerian(const Vector< double > &s, Shape &ptest, DShape &dptestdx) const
RealScalar s
Definition: level1_cplx_impl.h:130

References s.

◆ dpshape_eulerian() [1/2]

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

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.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dpshape_eulerian() [2/2]

double oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::dpshape_eulerian ( const Vector< double > &  s,
Shape ppsi,
DShape dppsidx 
) const
inlineprotectedvirtual

2D (in space): Pressure shape and test functions and derivs w.r.t. to Eulerian coordinates. Return Jacobian of mapping between local and global coordinates.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2735  {
2736  // Local storage for the shape function (x-direction)
2737  double psi1[2];
2738 
2739  // Local storage for the shape function (y-direction)
2740  double psi2[2];
2741 
2742  // Local storage for the shape function (z-direction)
2743  double psi3[2];
2744 
2745  // Local storage for the shape function derivatives (x-direction)
2746  double dpsi1[2];
2747 
2748  // Local storage for the test function derivatives (y-direction)
2749  double dpsi2[2];
2750 
2751  // Local storage for the test function derivatives (z-direction)
2752  double dpsi3[2];
2753 
2754  // Call the OneDimensional Shape functions
2755  OneDimLagrange::shape<2>(s[0], psi1);
2756  OneDimLagrange::shape<2>(s[1], psi2);
2757  OneDimLagrange::dshape<2>(s[0], dpsi1);
2758  OneDimLagrange::dshape<2>(s[1], dpsi2);
2759 
2760  // Call the OneDimensional Shape functions
2763 
2764  // Loop over the points in the z-direction
2765  for (unsigned i = 0; i < 2; i++)
2766  {
2767  // Loop over the points in the y-direction
2768  for (unsigned j = 0; j < 2; j++)
2769  {
2770  // Loop over the points in the x-direction
2771  for (unsigned k = 0; k < 2; k++)
2772  {
2773  // Multiply the three 1D functions together to get the 3D function
2774  ppsi[4 * i + 2 * j + k] = psi3[i] * psi2[j] * psi1[k];
2775 
2776  // Multiply the appropriate shape and shape function derivatives
2777  // together
2778  dppsidx(4 * i + 2 * j + k, 0) = psi3[i] * psi2[j] * dpsi1[k];
2779 
2780  // Multiply the appropriate shape and shape function derivatives
2781  // together
2782  dppsidx(4 * i + 2 * j + k, 1) = psi3[i] * dpsi2[j] * psi1[k];
2783 
2784  // Multiply the appropriate shape and shape function derivatives
2785  // together
2786  dppsidx(4 * i + 2 * j + k, 2) = dpsi3[i] * psi2[j] * psi1[k];
2787  }
2788  } // for (unsigned j=0;j<2;j++)
2789  } // for (unsigned i=0;i<2;i++)
2790 
2791  // Allocate space for the geometrical shape functions
2792  Shape psi(27);
2793 
2794  // Allocate space for the geometrical shape function derivatives
2795  DShape dpsi(27, 3);
2796 
2797  // Get the values of the shape functions and their derivatives
2798  dshape_local_u_nst(s, psi, dpsi);
2799 
2800  // Allocate memory for the 3x3 inverse jacobian
2801  DenseMatrix<double> inverse_jacobian(3);
2802 
2803  // Now calculate the inverse jacobian
2804  const double det = local_to_eulerian_mapping(dpsi, inverse_jacobian);
2805 
2806  // Now set the values of the derivatives to be derivatives w.r.t. to
2807  // the Eulerian coordinates
2808  transform_derivatives(inverse_jacobian, dppsidx);
2809 
2810  // Return the determinant of the jacobian
2811  return det;
2812  } // End of dpshape_eulerian
int i
Definition: BiCGSTAB_step_by_step.cpp:9
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
void dshape_local_u_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
DRAIG: Fill in later...
char char char int int * k
Definition: level2_impl.h:374
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:940
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:948
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:616
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:608
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::OneDimLagrange::dshape< 2 >(), i, j, k, s, and oomph::OneDimLagrange::shape< 2 >().

◆ dptest_eulerian() [1/2]

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

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.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dptest_eulerian() [2/2]

double oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::dptest_eulerian ( const Vector< double > &  s,
Shape ptest,
DShape dptestdx 
) const
inlineprotectedvirtual

2D (in space): Pressure shape and test functions and derivs w.r.t. to Eulerian coordinates. Return Jacobian of mapping between local and global coordinates.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2823  {
2824  // Local storage for the shape function (x-direction)
2825  double test1[2];
2826 
2827  // Local storage for the shape function (y-direction)
2828  double test2[2];
2829 
2830  // Local storage for the shape function (z-direction)
2831  double test3[2];
2832 
2833  // Local storage for the shape function derivatives (x-direction)
2834  double dtest1[2];
2835 
2836  // Local storage for the test function derivatives (y-direction)
2837  double dtest2[2];
2838 
2839  // Local storage for the test function derivatives (z-direction)
2840  double dtest3[2];
2841 
2842  // Call the OneDimensional Shape functions
2844 
2845  // Call the OneDimensional Shape functions
2847 
2848  // Call the OneDimensional Shape functions
2850 
2851  // DRAIG: Delete...
2852  // OneDimDiscontinuousGalerkinMixedOrderBasis::shape<2>(s[2],test3);
2853 
2854  // Call the OneDimensional Shape functions
2855  OneDimLagrange::dshape<2>(s[0], dtest1);
2856 
2857  // Call the OneDimensional Shape functions
2858  OneDimLagrange::dshape<2>(s[1], dtest2);
2859 
2860  // Call the OneDimensional Shape functions
2862 
2863  // DRAIG: Delete...
2864  // OneDimDiscontinuousGalerkinMixedOrderBasis::dshape<2>(s[2],dtest3);
2865 
2866  //--------------------------------------------------------------------
2867  // Now let's loop over the nodal points in the element with s1 being
2868  // the "x" coordinate, s2 being the "y" coordinate and s3 being the
2869  // "z" coordinate:
2870  //--------------------------------------------------------------------
2871  // Loop over the points in the z-direction
2872  for (unsigned i = 0; i < 2; i++)
2873  {
2874  // Loop over the points in the y-direction
2875  for (unsigned j = 0; j < 2; j++)
2876  {
2877  // Loop over the points in the x-direction
2878  for (unsigned k = 0; k < 2; k++)
2879  {
2880  // Multiply the three 1D functions together to get the 3D function
2881  ptest[4 * i + 2 * j + k] = test3[i] * test2[j] * test1[k];
2882 
2883  // Multiply the appropriate shape and shape function derivatives
2884  // together
2885  dptestdx(4 * i + 2 * j + k, 0) = test3[i] * test2[j] * dtest1[k];
2886 
2887  // Multiply the appropriate shape and shape function derivatives
2888  // together
2889  dptestdx(4 * i + 2 * j + k, 1) = test3[i] * dtest2[j] * test1[k];
2890 
2891  // Multiply the appropriate shape and shape function derivatives
2892  // together
2893  dptestdx(4 * i + 2 * j + k, 2) = dtest3[i] * test2[j] * test1[k];
2894  }
2895  } // for (unsigned j=0;j<2;j++)
2896  } // for (unsigned i=0;i<2;i++)
2897 
2898  // Allocate space for the geometrical shape functions
2899  Shape psi(27);
2900 
2901  // Allocate space for the geometrical shape function derivatives
2902  DShape dpsi(27, 3);
2903 
2904  // Get the values of the shape functions and their derivatives
2905  dshape_local_u_nst(s, psi, dpsi);
2906 
2907  // Allocate memory for the 3x3 inverse jacobian
2908  DenseMatrix<double> inverse_jacobian(3);
2909 
2910  // Now calculate the inverse jacobian
2911  const double det = local_to_eulerian_mapping(dpsi, inverse_jacobian);
2912 
2913  // Now set the values of the derivatives to be derivatives w.r.t. to
2914  // the Eulerian coordinates
2915  transform_derivatives(inverse_jacobian, dptestdx);
2916 
2917  // Return the determinant of the jacobian
2918  return det;
2919  } // End of dptest_eulerian
void test2()
Definition: QuaternionUnitTest.cpp:65
void test1()
Definition: QuaternionUnitTest.cpp:9
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:1105
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:1097

References oomph::OneDimLagrange::dshape< 2 >(), i, j, k, s, oomph::OneDimLagrange::shape< 2 >(), test1(), and test2().

◆ dshape_and_dtest_eulerian_at_knot_nst() [1/3]

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

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.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dshape_and_dtest_eulerian_at_knot_nst() [2/3]

double oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::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
inlineprotectedvirtual

2D (in space): Define the shape functions (psi) and test functions (test) and their derivatives w.r.t. global coordinates (dpsidx and dtestdx) and return Jacobian of mapping (J). Additionally compute the derivatives of dpsidx, dtestdx and J w.r.t. nodal coordinates.

Galerkin: Test functions = shape functions

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2963  {
2964  // DRAIG: Delete!
2965  throw OomphLibError("Hasn't been implemented properly yet!",
2968  } // End of dshape_and_dtest_eulerian_at_knot_nst
#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.

◆ dshape_and_dtest_eulerian_at_knot_nst() [3/3]

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

Velocity shape and 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.

Derivatives of the shape functions and test functions w.r.t to global (Eulerian) coordinates. Return Jacobian of mapping between local and global coordinates.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2708  {
2709  // Calculate the element dimension
2710  const unsigned el_dim = DIM + 1;
2711 
2712  // Storage for the local coordinates of the integration point
2713  Vector<double> s(el_dim, 0.0);
2714 
2715  // Set the local coordinate
2716  for (unsigned i = 0; i < el_dim; i++)
2717  {
2718  // Calculate the i-th local coordinate at the ipt-th knot point
2719  s[i] = this->integral_pt()->knot(ipt, i);
2720  }
2721 
2722  // Return the Jacobian of the geometrical shape functions and derivatives
2723  return dshape_and_dtest_eulerian_nst(s, psi, dpsidx, test, dtestdx);
2724  } // End of dshape_and_dtest_eulerian_at_knot_nst
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
double dshape_and_dtest_eulerian_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:2640
#define DIM
Definition: linearised_navier_stokes_elements.h:44
Definition: indexed_view.cpp:20
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30

References DIM, el_dim, i, and s.

◆ dshape_and_dtest_eulerian_nst()

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

Velocity shape and 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.

Derivatives of the shape functions and test functions w.r.t to global (Eulerian) coordinates. Return Jacobian of mapping between local and global coordinates.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2645  {
2646  //--------------------------
2647  // Call the shape functions:
2648  //--------------------------
2649  // Find the element dimension
2650  const unsigned el_dim = this->dim();
2651 
2652  // Make sure we're using 3D elements
2653  if (el_dim != 3)
2654  {
2655  // Create an output stream
2656  std::ostringstream error_message_stream;
2657 
2658  // Create an error message
2659  error_message_stream << "Need 3D space-time elements for this to work!"
2660  << std::endl;
2661 
2662  // Throw the error message
2663  throw OomphLibError(error_message_stream.str(),
2666  }
2667 
2668  // Compute the geometric shape functions and also first derivatives
2669  // w.r.t. local coordinates at local coordinate s
2670  dshape_local_u_nst(s, psi, dpsidx);
2671 
2672  // Allocate memory for the inverse jacobian
2673  DenseMatrix<double> inverse_jacobian(el_dim);
2674 
2675  // Now calculate the inverse jacobian
2676  const double det =
2677  this->local_to_eulerian_mapping(dpsidx, inverse_jacobian);
2678 
2679  // Now set the values of the derivatives to be dpsidx
2680  this->transform_derivatives(inverse_jacobian, dpsidx);
2681 
2682  //-------------------------
2683  // Call the test functions:
2684  //-------------------------
2685  // Compute the geometric test functions and also first derivatives
2686  // w.r.t. local coordinates at local coordinate s
2687  dtest_local_u_nst(s, test, dtestdx);
2688 
2689  // Transform derivatives from dtest/ds to dtest/dx
2690  this->transform_derivatives(inverse_jacobian, dtestdx);
2691 
2692  // Return the determinant value
2693  return det;
2694  } // End of dshape_and_dtest_eulerian_nst
unsigned dim() const
Definition: elements.h:2611
void dtest_local_u_nst(const Vector< double > &s, Shape &test, DShape &dtestdx) const
DRAIG: Fill in later...

References el_dim, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ dshape_local_u_nst() [1/2]

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::dshape_local_u_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx 
) const
inlineprotectedvirtual

DRAIG: Fill in later...

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dshape_local_u_nst() [2/2]

void oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::dshape_local_u_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx 
) const
inlineprotectedvirtual

2D (in space): Velocity shape functions and derivs w.r.t. local coords

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2512  {
2513  // Number of dimensions (3D = 2D space + 1D time)
2514  unsigned n_dim = 3;
2515 
2516  // Number of nodes in each direction
2517  unsigned n_node_1d = 3;
2518 
2519  // Local storage for the shape function value
2520  double psi_values[n_dim][n_node_1d];
2521  double dpsi_values[n_dim][n_node_1d];
2522 
2523  // Call the OneDimensional Shape functions
2524  OneDimLagrange::shape<3>(s[0], psi_values[0]);
2525  OneDimLagrange::shape<3>(s[1], psi_values[1]);
2526  OneDimLagrange::dshape<3>(s[0], dpsi_values[0]);
2527  OneDimLagrange::dshape<3>(s[1], dpsi_values[1]);
2528 
2529  // Call the OneDimensional Shape functions
2532 
2533  // Index of the total shape function
2534  unsigned index = 0;
2535 
2536  // Loop over the points in the z-direction
2537  for (unsigned i = 0; i < n_node_1d; i++)
2538  {
2539  // Loop over the points in the y-direction
2540  for (unsigned j = 0; j < n_node_1d; j++)
2541  {
2542  // Loop over the points in the x-direction
2543  for (unsigned k = 0; k < n_node_1d; k++)
2544  {
2545  // Calculate dpsi/ds_0
2546  dpsidx(index, 0) =
2547  dpsi_values[0][k] * psi_values[1][j] * psi_values[2][i];
2548 
2549  // Calculate dpsi/ds_1
2550  dpsidx(index, 1) =
2551  psi_values[0][k] * dpsi_values[1][j] * psi_values[2][i];
2552 
2553  // Calculate dpsi/ds_2
2554  dpsidx(index, 2) =
2555  psi_values[0][k] * psi_values[1][j] * dpsi_values[2][i];
2556 
2557  // Calculate the index-th entry of psi
2558  psi[index] = psi_values[0][k] * psi_values[1][j] * psi_values[2][i];
2559 
2560  // Increment the index
2561  index++;
2562  }
2563  } // for (unsigned j=0;j<n_node_1d;j++)
2564  } // for (unsigned i=0;i<n_node_1d;i++)
2565  } // End of dshape_local_u_nst
void dshape< 3 >(const double &s, double *DPsi)
Definition: shape.h:977
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
Definition: shape.h:967
void dshape< 3 >(const double &s, double *DPsi)
Definition: shape.h:645
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
Definition: shape.h:635

References oomph::OneDimLagrange::dshape< 3 >(), i, j, k, s, and oomph::OneDimLagrange::shape< 3 >().

◆ dtest_local_u_nst() [1/2]

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

DRAIG: Fill in later...

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ dtest_local_u_nst() [2/2]

void oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::dtest_local_u_nst ( const Vector< double > &  s,
Shape test,
DShape dtestdx 
) const
inlineprotectedvirtual

2D (in space): Velocity test functions and derivs w.r.t. local coords

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2574  {
2575  // Number of dimensions (3D = 2D space + 1D time)
2576  unsigned n_dim = 3;
2577 
2578  // Number of nodes in each direction
2579  unsigned n_node_1d = 3;
2580 
2581  // Local storage for the shape function value
2582  double test_values[n_dim][n_node_1d];
2583  double dtest_values[n_dim][n_node_1d];
2584 
2585  // Call the OneDimensional Shape functions
2586  OneDimLagrange::shape<3>(s[0], test_values[0]);
2587  OneDimLagrange::shape<3>(s[1], test_values[1]);
2588  OneDimLagrange::dshape<3>(s[0], dtest_values[0]);
2589  OneDimLagrange::dshape<3>(s[1], dtest_values[1]);
2590 
2591  // Call the OneDimensional Shape functions
2594  // OneDimDiscontinuousGalerkinMixedOrderBasis::shape<3>(s[2],test_values[2]);
2595  // OneDimDiscontinuousGalerkinMixedOrderBasis::dshape<3>(s[2],dtest_values[2]);
2596 
2597  // Index of the total shape function
2598  unsigned index = 0;
2599 
2600  // Loop over the points in the z-direction
2601  for (unsigned i = 0; i < n_node_1d; i++)
2602  {
2603  // Loop over the points in the y-direction
2604  for (unsigned j = 0; j < n_node_1d; j++)
2605  {
2606  // Loop over the points in the x-direction
2607  for (unsigned k = 0; k < n_node_1d; k++)
2608  {
2609  // Calculate dtest/ds_0
2610  dtestdx(index, 0) =
2611  dtest_values[0][k] * test_values[1][j] * test_values[2][i];
2612 
2613  // Calculate dtest/ds_1
2614  dtestdx(index, 1) =
2615  test_values[0][k] * dtest_values[1][j] * test_values[2][i];
2616 
2617  // Calculate dtest/ds_2
2618  dtestdx(index, 2) =
2619  test_values[0][k] * test_values[1][j] * dtest_values[2][i];
2620 
2621  // Calculate the index-th entry of test
2622  test[index] =
2623  test_values[0][k] * test_values[1][j] * test_values[2][i];
2624 
2625  // Increment the index
2626  index++;
2627  }
2628  } // for (unsigned j=0;j<n_node_1d;j++)
2629  } // for (unsigned i=0;i<n_node_1d;i++)
2630  } // End of dtest_local_u_nst
void dshape< 3 >(const double &s, double *DPsi)
Definition: shape.h:1134
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
Definition: shape.h:1124

References oomph::OneDimLagrange::dshape< 3 >(), i, j, k, s, and oomph::OneDimLagrange::shape< 3 >().

◆ element_node_index_to_pressure_node_index()

template<unsigned DIM>
int oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::element_node_index_to_pressure_node_index ( const unsigned n)
inline

Helper function which deduce the pressure node index associated with elemental node n (we're assuming there's a pressure dof stored at this node!)

2264  {
2265  // The number of pressure nodes
2266  unsigned n_p = npres_nst();
2267 
2268  // See if the value n is in the array Pconv
2269  const unsigned* it = std::find(this->Pconv, this->Pconv + n_p, n);
2270 
2271  // If we managed to find the value
2272  if (it != this->Pconv + n_p)
2273  {
2274  // Return the pressure node index associated with n
2275  return (it - (this->Pconv));
2276  }
2277  else
2278  {
2279  // Otherwise return the default value
2280  return -1;
2281  }
2282  } // End of element_node_index_to_pressure_node_index
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
unsigned npres_nst() const
Return number of pressure values.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:2346
static const unsigned Pconv[]
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:2161

References n, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::npres_nst().

◆ fix_pressure()

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::fix_pressure ( const unsigned p_dof,
const double p_value 
)
inlinevirtual

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

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2356  {
2357  // Pin the pressure dof
2358  this->node_pt(Pconv[p_dof])->pin(this->p_nodal_index_nst());
2359 
2360  // Now set its value
2361  this->node_pt(Pconv[p_dof])
2362  ->set_value(this->p_nodal_index_nst(), p_value);
2363  } // End of fix_pressure
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual int p_nodal_index_nst() const
Set the value at which the pressure is stored in the nodes.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:2312

References oomph::FiniteElement::node_pt(), oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nodal_index_nst(), oomph::Data::pin(), and oomph::Data::set_value().

◆ identify_load_data()

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::identify_load_data ( std::set< std::pair< Data *, unsigned >> &  paired_load_data)
virtual

Add to the set paired_load_data pairs containing

  • the pointer to a Data object and
  • the index of the value in that Data object

for all values (pressures, velocities) that affect the load computed in the get_load(...) function.

Implements oomph::FSIFluidElement.

Reimplemented in oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >.

2371  {
2372  // Allocate storage for the indices of the velocity components
2373  unsigned u_index[DIM];
2374 
2375  // Loop over the velocity components
2376  for (unsigned i = 0; i < DIM; i++)
2377  {
2378  // Get the index at which the i-th velocity component is stored
2379  u_index[i] = this->u_index_nst(i);
2380  }
2381 
2382  // Get the number of nodes in this element
2383  unsigned n_node = this->nnode();
2384 
2385  // Loop over the nodes
2386  for (unsigned n = 0; n < n_node; n++)
2387  {
2388  // Loop over the velocity components and add pointer to their data
2389  // and indices to the vectors
2390  for (unsigned i = 0; i < DIM; i++)
2391  {
2392  // Add in the node and equation number pair
2393  paired_load_data.insert(std::make_pair(this->node_pt(n), u_index[i]));
2394  }
2395  } // for (unsigned n=0;n<n_node;n++)
2396 
2397  // Identify the pressure data
2398  this->identify_pressure_data(paired_load_data);
2399  } // End of identify_load_data
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.cc:2411
virtual unsigned u_index_nst(const unsigned &i) const
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:1115

References DIM, and i.

◆ identify_pressure_data()

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::identify_pressure_data ( std::set< std::pair< Data *, unsigned >> &  paired_pressure_data)
virtual

Add to the set paired_pressure_data pairs containing

  • the pointer to a Data object and
  • the index of the value in that Data object

for all pressure values that affect the load computed in the get_load(...) function.

Add to the set paired_pressure_data pairs containing

  • the pointer to a Data object and
  • the index of the value in that Data object

for pressure values that affect the load computed in the get_load(...) function.,

Implements oomph::FSIFluidElement.

2413  {
2414  // Find the index at which the pressure is stored
2415  unsigned p_index = static_cast<unsigned>(this->p_nodal_index_nst());
2416 
2417  // Get the number of pressure degrees of freedom
2418  unsigned n_pres = npres_nst();
2419 
2420  // Loop over the pressure data
2421  for (unsigned l = 0; l < n_pres; l++)
2422  {
2423  // The DIM-th entry in each nodal data is the pressure, which affects
2424  // the traction
2425  paired_pressure_data.insert(
2426  std::make_pair(this->node_pt(Pconv[l]), p_index));
2427  }
2428  } // End of identify_pressure_data

◆ Initial_Nvalue()

const unsigned oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::Initial_Nvalue
private

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////

◆ is_pressure_node()

template<unsigned DIM>
bool oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::is_pressure_node ( const unsigned n) const
inline

Helper function which indicates whether or not the provided node is a pressure node

2287  {
2288  // The number of pressure nodes
2289  unsigned n_p = npres_nst();
2290 
2291  // See if the value n is in the array Pconv
2292  return std::find(this->Pconv, this->Pconv + n_p, n) != this->Pconv + n_p;
2293  } // End of is_pressure_node

References n, and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::npres_nst().

◆ npres_nst()

template<unsigned DIM>
unsigned oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::npres_nst ( ) const
inlinevirtual

Return number of pressure values.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2347  {
2348  // There are 2^{DIM+1} pressure dofs where DIM is the spatial dimension
2349  // (rememebering that these are space-time elements)
2350  return static_cast<unsigned>(pow(2.0, static_cast<int>(DIM + 1)));
2351  } // End of npres_nst
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625

References DIM, and Eigen::bfloat16_impl::pow().

Referenced by oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::element_node_index_to_pressure_node_index(), oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::identify_load_data(), oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::is_pressure_node(), and oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::pin_elemental_redundant_nodal_pressure_dofs().

◆ output() [1/4]

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

Redirect output to NavierStokesMixedOrderEquations output.

Reimplemented from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2419  {
2420  // Call the base class implementation
2422  } // 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::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::output ( FILE *  file_pt,
const unsigned nplot 
)
inlinevirtual

Redirect output to NavierStokesMixedOrderEquations output.

Reimplemented from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2427  {
2428  // Call the base class implementation
2430  } // End of output

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

◆ output() [3/4]

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

Redirect output to NavierStokesMixedOrderEquations output.

Reimplemented from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2403  {
2404  // Call the base class implementation
2406  } // End of output

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

◆ output() [4/4]

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::output ( std::ostream &  outfile,
const unsigned nplot 
)
inlinevirtual

Redirect output to NavierStokesMixedOrderEquations output.

Reimplemented from oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2411  {
2412  // Call the base class implementation
2414  } // End of output

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

◆ p_local_eqn()

template<unsigned DIM>
int oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_local_eqn ( const unsigned n) const
inlinevirtual

Return the local equation numbers for the pressure values.

Implements oomph::TemplateFreeSpaceTimeNavierStokesMixedOrderEquationsBase.

2321  {
2322  // Get the local equation number associated with the n-th pressure dof
2323  return this->nodal_local_eqn(Pconv[n], p_nodal_index_nst());
2324  } // End of p_local_eqn
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432

References n, oomph::FiniteElement::nodal_local_eqn(), and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nodal_index_nst().

◆ p_nodal_index_nst()

◆ p_nst() [1/2]

template<unsigned DIM>
double oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nst ( const unsigned n_p) const
inlinevirtual

Access function for the pressure values at local pressure node n_p (const version)

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2330  {
2331  // Get the nodal value associated with the n_p-th pressure dof
2332  return this->nodal_value(Pconv[n_p], this->p_nodal_index_nst());
2333  } // End of p_nst
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593

References oomph::FiniteElement::nodal_value(), and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nodal_index_nst().

◆ p_nst() [2/2]

template<unsigned DIM>
double oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nst ( const unsigned t,
const unsigned n_p 
) const
inlinevirtual

Access function for the pressure values at local pressure node n_p (const version)

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2339  {
2340  // Return the pressure value of the n_p-th pressure dof at time-level t
2341  return this->nodal_value(t, Pconv[n_p], this->p_nodal_index_nst());
2342  } // End of p_nst

References oomph::FiniteElement::nodal_value(), oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nodal_index_nst(), and oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::Pconv.

◆ Pconv()

◆ pressure_node_pt()

template<unsigned DIM>
Node* oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::pressure_node_pt ( const unsigned n_p)
inline

Pointer to n_p-th pressure node.

2255  {
2256  // Return a pointer to the n_p-th pressure node
2257  return this->node_pt(this->Pconv[n_p]);
2258  } // End of pressure node_pt

References oomph::FiniteElement::node_pt().

◆ pshape_nst() [1/3]

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi 
) const
inlinevirtual

◆ pshape_nst() [2/3]

void oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::pshape_nst ( const Vector< double > &  s,
Shape psi 
) const
inlinevirtual

2D (in space): Pressure shape functions

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2977  {
2978  // Local storage for the shape function value (in the x-direction)
2979  double psi1[2];
2980 
2981  // Local storage for the shape function value (in the y-direction)
2982  double psi2[2];
2983 
2984  // Local storage for the shape function value (in the z-direction)
2985  double psi3[2];
2986 
2987  // Call the OneDimensional Shape functions
2988  OneDimLagrange::shape<2>(s[0], psi1);
2989 
2990  // Call the OneDimensional Shape functions
2991  OneDimLagrange::shape<2>(s[1], psi2);
2992 
2993  // Call the OneDimensional Shape functions
2995 
2996  //--------------------------------------------------------------------
2997  // Now let's loop over the nodal points in the element with s1 being
2998  // the "x" coordinate, s2 being the "y" coordinate and s3 being the
2999  // "z" coordinate:
3000  //--------------------------------------------------------------------
3001  // Loop over the points in the z-direction
3002  for (unsigned i = 0; i < 2; i++)
3003  {
3004  // Loop over the points in the y-direction
3005  for (unsigned j = 0; j < 2; j++)
3006  {
3007  // Loop over the points in the x-direction
3008  for (unsigned k = 0; k < 2; k++)
3009  {
3010  // Multiply the three 1D functions together to get the 3D function
3011  psi[4 * i + 2 * j + k] = psi3[i] * psi2[j] * psi1[k];
3012  }
3013  } // for (unsigned j=0;j<2;j++)
3014  } // for (unsigned i=0;i<2;i++)
3015  } // End of pshape_nst

References i, j, k, s, and oomph::OneDimLagrange::shape< 2 >().

◆ pshape_nst() [3/3]

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

Pressure shape and test functions at local coordinte s.

Pressure shape and test functions.

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

3074  {
3075  // Call the pressure shape functions
3076  pshape_nst(s, psi);
3077 
3078  // Call the pressure test functions
3079  ptest_nst(s, test);
3080  } // End of pshape_nst
void ptest_nst(const Vector< double > &s, Shape &psi) const
Pressure test functions at local coordinate s.
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.

References s.

◆ ptest_nst() [1/2]

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::ptest_nst ( const Vector< double > &  s,
Shape psi 
) const
inline

Pressure test functions at local coordinate s.

◆ ptest_nst() [2/2]

void oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::ptest_nst ( const Vector< double > &  s,
Shape test 
) const
inline

2D (in space): Pressure shape functions

3024  {
3025  // Local storage for the shape function value (in the x-direction)
3026  double test1[2];
3027 
3028  // Local storage for the shape function value (in the y-direction)
3029  double test2[2];
3030 
3031  // Local storage for the shape function value (in the z-direction)
3032  double test3[2];
3033 
3034  // Call the OneDimensional Shape functions
3036 
3037  // Call the OneDimensional Shape functions
3039 
3040  // Call the OneDimensional Shape functions
3042 
3043  // DRAIG: Delete...
3044  // OneDimDiscontinuousGalerkinMixedOrderBasis::shape<2>(s[2],test3);
3045 
3046  //--------------------------------------------------------------------
3047  // Now let's loop over the nodal points in the element with s1 being
3048  // the "x" coordinate, s2 being the "y" coordinate and s3 being the
3049  // "z" coordinate:
3050  //--------------------------------------------------------------------
3051  // Loop over the points in the z-direction
3052  for (unsigned i = 0; i < 2; i++)
3053  {
3054  // Loop over the points in the y-direction
3055  for (unsigned j = 0; j < 2; j++)
3056  {
3057  // Loop over the points in the x-direction
3058  for (unsigned k = 0; k < 2; k++)
3059  {
3060  // Multiply the three 1D functions together to get the 3D function
3061  test[4 * i + 2 * j + k] = test3[i] * test2[j] * test1[k];
3062  }
3063  } // for (unsigned j=0;j<2;j++)
3064  } // for (unsigned i=0;i<2;i++)
3065  } // End of ptest_nst

References i, j, k, s, oomph::OneDimLagrange::shape< 2 >(), test1(), and test2().

◆ required_nvalue()

template<unsigned DIM>
virtual unsigned oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::required_nvalue ( const unsigned n) const
inlinevirtual

Number of values (pinned or dofs) required at node n. Can be overwritten for hanging node version

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >.

2248  {
2249  // Return the appropriate entry from Initial_Nvalue
2250  return Initial_Nvalue[n];
2251  } // End of required_nvalue
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
Definition: mixed_order_petrov_galerkin_space_time_navier_stokes_elements.h:2156

References oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::Initial_Nvalue, and n.

◆ shape_u_nst() [1/2]

template<unsigned DIM>
void oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::shape_u_nst ( const Vector< double > &  s,
Shape psi 
) const
inlinevirtual

DRAIG: Fill in later...

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

◆ shape_u_nst() [2/2]

void oomph::QTaylorHoodMixedOrderSpaceTimeElement< 2 >::shape_u_nst ( const Vector< double > &  s,
Shape psi 
) const
inlinevirtual

2D (in space): Velocity shape functions

Implements oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >.

2466  {
2467  // Number of dimensions (3D = 2D space + 1D time)
2468  unsigned n_dim = 3;
2469 
2470  // Number of nodes in each direction
2471  unsigned n_node_1d = 3;
2472 
2473  // Local storage for the shape function value (3D, NNODE_1D=3)
2474  double psi_values[n_dim][n_node_1d];
2475 
2476  // Call the OneDimensional Shape functions
2477  OneDimLagrange::shape<3>(s[0], psi_values[0]);
2478  OneDimLagrange::shape<3>(s[1], psi_values[1]);
2479 
2480  // Call the OneDimensional Shape functions
2482 
2483  // Index of the total shape function
2484  unsigned index = 0;
2485 
2486  // Loop over the points in the z-direction
2487  for (unsigned i = 0; i < n_node_1d; i++)
2488  {
2489  // Loop over the points in the y-direction
2490  for (unsigned j = 0; j < n_node_1d; j++)
2491  {
2492  // Loop over the points in the x-direction
2493  for (unsigned k = 0; k < n_node_1d; k++)
2494  {
2495  // Calculate the index-th entry of psi
2496  psi[index] = psi_values[0][k] * psi_values[1][j] * psi_values[2][i];
2497 
2498  // Increment the index
2499  index++;
2500  }
2501  } // for (unsigned j=0;j<n_node_1d;j++)
2502  } // for (unsigned i=0;i<n_node_1d;i++)
2503  } // End of shape_u_nst

References i, j, k, s, and oomph::OneDimLagrange::shape< 3 >().

Member Data Documentation

◆ Initial_Nvalue

template<unsigned DIM>
const unsigned oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::Initial_Nvalue[]
staticprivate

Static array of ints to hold number of variables at node.

Referenced by oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::required_nvalue().

◆ Pconv

template<unsigned DIM>
const unsigned oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::Pconv[]
staticprotected

Static array of ints to hold conversion from pressure node numbers to actual node numbers

Referenced by oomph::QTaylorHoodMixedOrderSpaceTimeElement< DIM >::p_nst(), and oomph::RefineableQTaylorHoodMixedOrderSpaceTimeElement< DIM >::pressure_node_pt().


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