oomph::QHermiteElement< DIM > Class Template Reference

#include <hermite_elements.h>

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

Public Member Functions

 QHermiteElement ()
 Constructor. More...
 
 QHermiteElement (const QHermiteElement &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const QHermiteElement &)=delete
 Broken assignment operator. More...
 
bool local_coord_is_valid (const Vector< double > &s)
 Check whether the local coordinate are valid or not. More...
 
void move_local_coord_back_into_element (Vector< double > &s) const
 
void shape (const Vector< double > &s, Shape &psi) const
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
double s_min () const
 Min. value of local coordinate. More...
 
double s_max () const
 Max. value of local coordinate. More...
 
void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 Get local coordinates of node j in the element; vector sets its own size. More...
 
void local_fraction_of_node (const unsigned &j, Vector< double > &s_fraction)
 Get local fraction of node j in the element; vector sets its own size. More...
 
double local_one_d_fraction_of_node (const unsigned &n1d, const unsigned &i)
 
unsigned nnode_1d () const
 Return number of nodes along each element edge. More...
 
void output (std::ostream &outfile)
 Output. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Output at n_plot points. More...
 
void output (FILE *file_pt)
 C-style output. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 C_style output at n_plot points. More...
 
void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
 
std::string tecplot_zone_string (const unsigned &nplot) const
 
unsigned nplot_points (const unsigned &nplot) const
 
void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
void shape (const Vector< double > &s, Shape &psi) const
 Shape function for specific QHermiteElement<1> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific QHermiteElement<1> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
void output (std::ostream &outfile)
 The output function for general 1D QHermiteElements. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 The output function for n_plot points in each coordinate direction. More...
 
void output (FILE *file_pt)
 The C-style output function for general 1D QHermiteElements. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 The C-style output function for n_plot points in each coordinate direction. More...
 
void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
void shape (const Vector< double > &s, Shape &psi) const
 Shape function for specific QHermiteElement<2> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific QHermiteElement<2> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
void output (std::ostream &outfile)
 The output function for QHermiteElement<2,ORDER> More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 The output function for n_plot points in each coordinate direction. More...
 
void output (FILE *file_pt)
 The C-style output function for QHermiteElement<2,ORDER> More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 The C-style output function for n_plot points in each coordinate direction. More...
 
void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points) const
 
std::string tecplot_zone_string (const unsigned &nplot) const
 
unsigned nplot_points (const unsigned &nplot) const
 
void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points) const
 
std::string tecplot_zone_string (const unsigned &nplot) const
 
unsigned nplot_points (const unsigned &nplot) const
 
- Public Member Functions inherited from oomph::QHermiteElementBase
 QHermiteElementBase ()
 Empty default constructor. More...
 
 QHermiteElementBase (const QHermiteElementBase &)=delete
 Broken copy constructor. More...
 
void operator= (const QHermiteElementBase &)=delete
 Broken assignment operator. More...
 
- Public Member Functions inherited from oomph::QElementGeometricBase
 QElementGeometricBase ()
 Empty default constructor. More...
 
 QElementGeometricBase (const QElementGeometricBase &)=delete
 Broken copy constructor. 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...
 
void get_centre_of_gravity_and_max_radius_in_terms_of_zeta (Vector< double > &cog, double &max_radius) const
 
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_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) 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...
 
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 void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
virtual void disable_ALE ()
 
virtual void enable_ALE ()
 
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)
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
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 unsigned nscalar_paraview () const
 
virtual void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) 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 scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
virtual std::string scalar_name_paraview (const unsigned &i) 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, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output an exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output a time-dependent exact solution over the element. More...
 
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 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 void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
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, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, 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 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 (Vector< double > &norm)
 
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
 

Static Private Attributes

static Gauss< DIM, 3 > Default_integration_scheme
 Assign the static Default_integration_scheme. More...
 

Additional Inherited Members

- 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::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 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 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
 
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)
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
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)
 
virtual void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
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_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual 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)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
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 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 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::QHermiteElement< DIM >

/////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// General QHermiteElement class. Local coordinates are not assumed to be aligned with the global coordinates so the Jacobian of the mapping between local and global coordinates is a full matrix. For cases where the coordinates are aligned, you should use the derived class, DiagQHermiteElement, which uses a simplified mapping that makes the evaluation of derivatives of the shape functions much cheaper.

Constructor & Destructor Documentation

◆ QHermiteElement() [1/2]

template<unsigned DIM>
oomph::QHermiteElement< DIM >::QHermiteElement ( )
inline

Constructor.

99  {
100  // Calculate the number of nodes
101  unsigned n_node = static_cast<unsigned>(pow(2.0, static_cast<int>(DIM)));
102  // Set the number of nodes
103  this->set_n_node(n_node);
104  // Set the elemental and nodal dimensions
105  this->set_dimension(DIM);
106  // Set the number of interpolated position types (always n_node)
107  this->set_nnodal_position_type(n_node);
108  // Assign pointer to default integration scheme
110  }
void set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
Definition: elements.h:1396
void set_dimension(const unsigned &dim)
Definition: elements.h:1380
void set_n_node(const unsigned &n)
Definition: elements.h:1404
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3210
static Gauss< DIM, 3 > Default_integration_scheme
Assign the static Default_integration_scheme.
Definition: hermite_elements.h:94
#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

References DIM, Eigen::bfloat16_impl::pow(), oomph::FiniteElement::set_dimension(), oomph::FiniteElement::set_integration_scheme(), oomph::FiniteElement::set_n_node(), and oomph::FiniteElement::set_nnodal_position_type().

◆ QHermiteElement() [2/2]

template<unsigned DIM>
oomph::QHermiteElement< DIM >::QHermiteElement ( const QHermiteElement< DIM > &  dummy)
delete

Broken copy constructor.

Member Function Documentation

◆ build_face_element() [1/3]

void oomph::QHermiteElement< 1 >::build_face_element ( const int face_index,
FaceElement face_element_pt 
)
virtual

Function to setup geometrical information for lower-dimensional FaceElements (single node elements)

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

280  {
281  // Set the nodal dimension from the "bulk"
282  face_element_pt->set_nodal_dimension(node_pt(0)->ndim());
283 
284  // Set the pointer to the "bulk" element
285  face_element_pt->bulk_element_pt() = this;
286 
287 #ifdef OOMPH_HAS_MPI
288  // Pass on non-halo ID
289  face_element_pt->set_halo(Non_halo_proc_ID);
290 #endif
291 
292  // Resize the storage for the original number of values at the (one and
293  // only) node of the face element.
294  face_element_pt->nbulk_value_resize(1);
295 
296  // Resize the storage for the bulk node number corresponding to the (one
297  // and only) node of the face element
298  face_element_pt->bulk_node_number_resize(1);
299 
300  // Set the face index in the face element
301  face_element_pt->face_index() = face_index;
302 
303  // Now set up the node pointer
304  // The convention is that the "normal", the coordinate, should always point
305  // out of the element
306  switch (face_index)
307  {
308  // Bottom, normal sign is negative (coordinate points into element)
309  case (-1):
310  face_element_pt->node_pt(0) = node_pt(0);
311  face_element_pt->bulk_node_number(0) = 0;
312  face_element_pt->normal_sign() = -1;
313 
314  // Set the pointer to the function that determines the bulk coordinates
315  // in the face element
316  face_element_pt->face_to_bulk_coordinate_fct_pt() =
318 
319  // Set the pointer to the function that determines the mapping of
320  // derivatives
321  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
323 
324  // Set the number of values stored when the node is part of the "bulk"
325  // element.
326  face_element_pt->nbulk_value(0) = required_nvalue(0);
327  break;
328 
329  // Top, normal sign is positive (coordinate points out of element)
330  case (1):
331  face_element_pt->node_pt(0) = node_pt(1);
332  face_element_pt->bulk_node_number(0) = 1;
333  face_element_pt->normal_sign() = +1;
334 
335  // Set the pointer to the function that determines the bulk coordinates
336  // in the face element
337  face_element_pt->face_to_bulk_coordinate_fct_pt() =
339 
340  // Set the pointer to the function that determines the mapping of
341  // derivatives
342  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
344 
345  // Set the number of values stored when the node is part of the "bulk"
346  // element.
347  face_element_pt->nbulk_value(0) = required_nvalue(1);
348  break;
349 
350  // Other cases
351  default:
352  std::ostringstream error_message;
353  error_message << "Face_index should only take "
354  << "the values +/-1, not " << face_index << std::endl;
355 
356  throw OomphLibError(error_message.str(),
359  }
360  }
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual unsigned required_nvalue(const unsigned &n) const
Definition: elements.h:2455
unsigned ndim() const
Access function to # of Eulerian coordinates.
Definition: geom_objects.h:177
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
Definition: Qelement_face_coordinate_translation_schemes.cc:59
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
Definition: Qelement_face_coordinate_translation_schemes.cc:44
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
Definition: Qelement_face_coordinate_translation_schemes.cc:38
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::FaceElement::bulk_coordinate_derivatives_fct_pt(), oomph::FaceElement::bulk_element_pt(), oomph::FaceElement::bulk_node_number(), oomph::FaceElement::bulk_node_number_resize(), oomph::QElement1FaceToBulkCoordinates::face0(), oomph::QElement1FaceToBulkCoordinates::face1(), oomph::FaceElement::face_index(), oomph::FaceElement::face_to_bulk_coordinate_fct_pt(), oomph::QElement1BulkCoordinateDerivatives::faces0(), oomph::FaceElement::nbulk_value(), oomph::FaceElement::nbulk_value_resize(), oomph::FiniteElement::node_pt(), oomph::FaceElement::normal_sign(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::FiniteElement::set_nodal_dimension().

◆ build_face_element() [2/3]

void oomph::QHermiteElement< 2 >::build_face_element ( const int face_index,
FaceElement face_element_pt 
)
virtual

Function to setup geometrical information for lower-dimensional FaceElements (of type QHermiteElement<1>).

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

915  {
916  // Set the nodal dimension from the "bulk"
917  face_element_pt->set_nodal_dimension(node_pt(0)->ndim());
918 
919  // Set the pointer to the "bulk" element
920  face_element_pt->bulk_element_pt() = this;
921 
922 #ifdef OOMPH_HAS_MPI
923  // Pass on non-halo proc ID
924  face_element_pt->set_halo(Non_halo_proc_ID);
925 #endif
926 
927  // Resize the bulk_position_type translation scheme to the number of
928  // position types in the 1D element: 2 (position and slope)
929  face_element_pt->bulk_position_type_resize(2);
930 
931  // Resize the storage for the original number of values at
932  // the two nodes of the FaceElement
933  face_element_pt->nbulk_value_resize(2);
934 
935  // Resize the storage for the bulk node numbers coressponding to the
936  // two nodes of the FaceElement
937  face_element_pt->bulk_node_number_resize(2);
938 
939  // Set the face index in the face element
940  // The faces are
941  // +1 East
942  // -1 West
943  // +2 North
944  // -2 South
945 
946  // Set the face index in the face element
947  face_element_pt->face_index() = face_index;
948 
949  // Now set up the node pointers
950  // The convention here is that interior_tangent X tangent X tangent
951  // is the OUTWARD normal
952  // IMPORTANT NOTE: Need to ensure that numbering is consistent here
953  // i.e. node numbers increase in positive x and y directions as they should
954  // If not, normals will be inward.
955  switch (face_index)
956  {
957  unsigned bulk_number;
958  // West face, normal sign is positive
959  case (-1):
960  // Set the pointer to the bulk coordinate translation scheme
961  face_element_pt->face_to_bulk_coordinate_fct_pt() =
963 
964  // Set the pointer to the derivative mappings
965  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
967 
968  for (unsigned i = 0; i < 2; i++)
969  {
970  bulk_number = i * 2;
971  face_element_pt->node_pt(i) = node_pt(bulk_number);
972  face_element_pt->bulk_node_number(i) = bulk_number;
973  face_element_pt->normal_sign() = 1;
974  // Set the number of values originally stored at this node
975  face_element_pt->nbulk_value(i) = required_nvalue(bulk_number);
976  // Set the position type for the slope, which is in the s[1]
977  // direction, so is position_type 2 in the "bulk" element
978  face_element_pt->bulk_position_type(1) = 2;
979  }
980  break;
981  // South face, normal sign is positive
982  case (-2):
983  // Set the pointer to the bulk coordinate translation scheme
984  face_element_pt->face_to_bulk_coordinate_fct_pt() =
986 
987  // Set the pointer to the derivative mappings
988  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
990 
991  for (unsigned i = 0; i < 2; i++)
992  {
993  bulk_number = i;
994  face_element_pt->node_pt(i) = node_pt(bulk_number);
995  face_element_pt->bulk_node_number(i) = bulk_number;
996  face_element_pt->normal_sign() = 1;
997  // Set the number of values originally stored at this node
998  face_element_pt->nbulk_value(i) = required_nvalue(bulk_number);
999  // Set the position type for the slope, which is in the s[0]
1000  // direction, so is position_type 1 in "bulk" element
1001  face_element_pt->bulk_position_type(1) = 1;
1002  }
1003  break;
1004  // East face, normal sign is negative
1005  case (1):
1006  // Set the pointer to the bulk coordinate translation scheme
1007  face_element_pt->face_to_bulk_coordinate_fct_pt() =
1009 
1010  // Set the pointer to the derivative mappings
1011  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
1013 
1014  for (unsigned i = 0; i < 2; i++)
1015  {
1016  bulk_number = 2 * i + 1;
1017  face_element_pt->node_pt(i) = node_pt(bulk_number);
1018  face_element_pt->bulk_node_number(i) = bulk_number;
1019  face_element_pt->normal_sign() = -1;
1020  // Set the number of values originally stored at this node
1021  face_element_pt->nbulk_value(i) = required_nvalue(bulk_number);
1022  // Set the position type for the slope, which is in the s[1]
1023  // direction, so is position_type 2 in the bulk element
1024  face_element_pt->bulk_position_type(1) = 2;
1025  }
1026  break;
1027  // North face, normal sign is negative
1028  case (2):
1029  // Set the pointer to the bulk coordinate translation scheme
1030  face_element_pt->face_to_bulk_coordinate_fct_pt() =
1032 
1033  // Set the pointer to the derivative mappings
1034  face_element_pt->bulk_coordinate_derivatives_fct_pt() =
1036 
1037  for (unsigned i = 0; i < 2; i++)
1038  {
1039  bulk_number = 2 + i;
1040  face_element_pt->node_pt(i) = node_pt(bulk_number);
1041  face_element_pt->bulk_node_number(i) = bulk_number;
1042  face_element_pt->normal_sign() = -1;
1043  // Set the number of values originally stored at this node
1044  face_element_pt->nbulk_value(i) = required_nvalue(bulk_number);
1045  // Set the position type for the slope, which is in the s[0]
1046  // direction, so is position_type 1 in the "bulk" element
1047  face_element_pt->bulk_position_type(1) = 1;
1048  }
1049  break;
1050 
1051  // Now cover the other cases
1052  default:
1053  std::ostringstream error_message;
1054  error_message
1055  << "Face index should only take the values +/- 1 or +/- 2,"
1056  << " not " << face_index << std::endl;
1057  throw OomphLibError(error_message.str(),
1060  }
1061  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the north and south faces, along which s1 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:131
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the east and west faces, along which s0 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:116
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:93
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the south face (s1 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:86
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the west face (s0 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:79
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:100

References oomph::FaceElement::bulk_coordinate_derivatives_fct_pt(), oomph::FaceElement::bulk_element_pt(), oomph::FaceElement::bulk_node_number(), oomph::FaceElement::bulk_node_number_resize(), oomph::FaceElement::bulk_position_type(), oomph::FaceElement::bulk_position_type_resize(), oomph::QElement2FaceToBulkCoordinates::face0(), oomph::QElement2FaceToBulkCoordinates::face1(), oomph::QElement2FaceToBulkCoordinates::face2(), oomph::QElement2FaceToBulkCoordinates::face3(), oomph::FaceElement::face_index(), oomph::FaceElement::face_to_bulk_coordinate_fct_pt(), oomph::QElement2BulkCoordinateDerivatives::faces0(), oomph::QElement2BulkCoordinateDerivatives::faces1(), i, oomph::FaceElement::nbulk_value(), oomph::FaceElement::nbulk_value_resize(), oomph::FiniteElement::node_pt(), oomph::FaceElement::normal_sign(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::FiniteElement::set_nodal_dimension().

◆ build_face_element() [3/3]

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::build_face_element ( const int face_index,
FaceElement face_element_pt 
)
virtual

Build the lower-dimensional FaceElement of the type QHermiteElement<DIM-1>. The face index takes a value that correponds to the possible faces:

In 1D: -1 (Left) s[0] = -1.0 +1 (Right) s[0] = 1.0

In 2D: -1 (West) s[0] = -1.0 +1 (East) s[0] = 1.0 -2 (South) s[1] = -1.0 +2 (North) s[1] = 1.0

In 3D: -1 (Left) s[0] = -1.0 +1 (Right) s[0] = 1.0 -2 (Down) s[1] = -1.0 +2 (Up) s[1] = 1.0 -3 (Back) s[2] = -1.0 +3 (Front) s[2] = 1.0

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

◆ d2shape_local() [1/3]

void oomph::QHermiteElement< 1 >::d2shape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
virtual

Derivatives and second derivatives of shape functions for specific QHermiteElement<1> d2psids(i,0) = \( d^2 \psi_j / d s^2 \)

Reimplemented from oomph::FiniteElement.

102  {
103  // Local storage
104  double Psi[2][2], DPsi[2][2], D2Psi[2][2];
105  // Call the OneDimensional Shape functions
106  OneDimHermite::shape(s[0], Psi);
107  OneDimHermite::dshape(s[0], DPsi);
108  OneDimHermite::d2shape(s[0], D2Psi);
109 
110  // Loop over number of nodes
111  for (unsigned l = 0; l < 2; l++)
112  {
113  // Loop over number of dofs
114  for (unsigned k = 0; k < 2; k++)
115  {
116  psi(l, k) = Psi[l][k];
117  dpsids(l, k, 0) = DPsi[l][k];
118  d2psids(l, k, 0) = D2Psi[l][k];
119  }
120  }
121  }
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
void dshape(const double &s, double DPsi[2][2])
Derivatives of 1D Hermite shape functions.
Definition: shape.h:1206
void d2shape(const double &s, double DPsi[2][2])
Second derivatives of the Hermite shape functions.
Definition: shape.h:1217
void shape(const double &s, double Psi[2][2])
Constructor sets the values of the shape functions at the position s.
Definition: shape.h:1194

References oomph::OneDimHermite::d2shape(), oomph::OneDimHermite::dshape(), k, s, and oomph::OneDimHermite::shape().

◆ d2shape_local() [2/3]

void oomph::QHermiteElement< 2 >::d2shape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
virtual

Second derivatives of the shape functions wrt local coordinates. d2psids(i,0) = \( \partial^2 \psi_j / \partial s_0^2 \) d2psids(i,1) = \( \partial^2 \psi_j / \partial s_1^2 \) d2psids(i,2) = \( \partial^2 \psi_j / \partial s_0 \partial s_1 \)

Reimplemented from oomph::FiniteElement.

547  {
548  // Local storage
549  double Psi[2][2][2];
550  double DPsi[2][2][2];
551  double D2Psi[2][2][2];
552 
553  // Call the OneDimensional Shape functions
554  OneDimHermite::shape(s[0], Psi[0]);
555  OneDimHermite::shape(s[1], Psi[1]);
556  OneDimHermite::dshape(s[0], DPsi[0]);
557  OneDimHermite::dshape(s[1], DPsi[1]);
558  OneDimHermite::d2shape(s[0], D2Psi[0]);
559  OneDimHermite::d2shape(s[1], D2Psi[1]);
560 
561  // Set up the two dimensional shape functions
562  // Set up the functions at corner 0
563  // psi_0 = 1 when s1 = 0, s2 = 0
564  psi(0, 0) = Psi[0][0][0] * Psi[1][0][0];
565  // dpsi_0/ds1 = 1 when s1 = 0, s2 = 0
566  psi(0, 1) = Psi[0][0][1] * Psi[1][0][0];
567  // dpsi_0/ds2 = 1 when s1 = 0, s2 = 0
568  psi(0, 2) = Psi[0][0][0] * Psi[1][0][1];
569  // dpsi_0/ds2ds1 = 1 when s1 = 0, s2 = 0
570  psi(0, 3) = Psi[0][0][1] * Psi[1][0][1];
571 
572  // Set up the functions at corner 1
573  // psi_1 = 1 when s1 = 1, s2 = 0
574  psi(1, 0) = Psi[0][1][0] * Psi[1][0][0];
575  // dpsi_1/ds1 = 1 when s1 = 1, s2 = 0
576  psi(1, 1) = Psi[0][1][1] * Psi[1][0][0];
577  // dpsi_1/ds2 = 1 when s1 = 1, s2 = 0
578  psi(1, 2) = Psi[0][1][0] * Psi[1][0][1];
579  // dpsi_1/ds1ds2 = 1 when s1 = 1, s2 = 0
580  psi(1, 3) = Psi[0][1][1] * Psi[1][0][1];
581 
582  // Set up the functions at the corner 2
583  // psi_2 = 1 when s1 = 0, s2 = 1
584  psi(2, 0) = Psi[0][0][0] * Psi[1][1][0];
585  // dpsi_2/ds1 = 1 when s1 = 0, s2 = 1
586  psi(2, 1) = Psi[0][0][1] * Psi[1][1][0];
587  // dpsi_2/ds2 = 1 when s1 = 0, s2 = 1
588  psi(2, 2) = Psi[0][0][0] * Psi[1][1][1];
589  // dpsi_2/ds2ds1 = 1 when s1 = 0, s2 = 1
590  psi(2, 3) = Psi[0][0][1] * Psi[1][1][1];
591 
592  // Set up the functions at corner 3
593  // psi_3 = 1 when s1 = 1, s2 = 1
594  psi(3, 0) = Psi[0][1][0] * Psi[1][1][0];
595  // dpsi_3/ds1 = 1 when s1 = 1, s2 = 1
596  psi(3, 1) = Psi[0][1][1] * Psi[1][1][0];
597  // dpsi_3/ds2 = 1 when s1 = 1, s2 = 1
598  psi(3, 2) = Psi[0][1][0] * Psi[1][1][1];
599  // dpsi_3/ds1ds2 = 1 when s1 = 1, s2 = 1
600  psi(3, 3) = Psi[0][1][1] * Psi[1][1][1];
601 
602  // FIRST DERIVATIVES
603 
604  // D/Ds[0]
605 
606  // Set up the functions at corner 0
607  dpsids(0, 0, 0) = DPsi[0][0][0] * Psi[1][0][0];
608  dpsids(0, 1, 0) = DPsi[0][0][1] * Psi[1][0][0];
609  dpsids(0, 2, 0) = DPsi[0][0][0] * Psi[1][0][1];
610  dpsids(0, 3, 0) = DPsi[0][0][1] * Psi[1][0][1];
611 
612  // Set up the functions at corner 1
613  dpsids(1, 0, 0) = DPsi[0][1][0] * Psi[1][0][0];
614  dpsids(1, 1, 0) = DPsi[0][1][1] * Psi[1][0][0];
615  dpsids(1, 2, 0) = DPsi[0][1][0] * Psi[1][0][1];
616  dpsids(1, 3, 0) = DPsi[0][1][1] * Psi[1][0][1];
617 
618  // Set up the functions at the corner 2
619  dpsids(2, 0, 0) = DPsi[0][0][0] * Psi[1][1][0];
620  dpsids(2, 1, 0) = DPsi[0][0][1] * Psi[1][1][0];
621  dpsids(2, 2, 0) = DPsi[0][0][0] * Psi[1][1][1];
622  dpsids(2, 3, 0) = DPsi[0][0][1] * Psi[1][1][1];
623 
624  // Set up the functions at corner 3
625  dpsids(3, 0, 0) = DPsi[0][1][0] * Psi[1][1][0];
626  dpsids(3, 1, 0) = DPsi[0][1][1] * Psi[1][1][0];
627  dpsids(3, 2, 0) = DPsi[0][1][0] * Psi[1][1][1];
628  dpsids(3, 3, 0) = DPsi[0][1][1] * Psi[1][1][1];
629 
630  // D/Ds[1]
631 
632  // Set up the functions at corner 0
633  dpsids(0, 0, 1) = Psi[0][0][0] * DPsi[1][0][0];
634  dpsids(0, 1, 1) = Psi[0][0][1] * DPsi[1][0][0];
635  dpsids(0, 2, 1) = Psi[0][0][0] * DPsi[1][0][1];
636  dpsids(0, 3, 1) = Psi[0][0][1] * DPsi[1][0][1];
637 
638  // Set up the functions at corner 1
639  dpsids(1, 0, 1) = Psi[0][1][0] * DPsi[1][0][0];
640  dpsids(1, 1, 1) = Psi[0][1][1] * DPsi[1][0][0];
641  dpsids(1, 2, 1) = Psi[0][1][0] * DPsi[1][0][1];
642  dpsids(1, 3, 1) = Psi[0][1][1] * DPsi[1][0][1];
643 
644  // Set up the functions at the corner 2
645  dpsids(2, 0, 1) = Psi[0][0][0] * DPsi[1][1][0];
646  dpsids(2, 1, 1) = Psi[0][0][1] * DPsi[1][1][0];
647  dpsids(2, 2, 1) = Psi[0][0][0] * DPsi[1][1][1];
648  dpsids(2, 3, 1) = Psi[0][0][1] * DPsi[1][1][1];
649 
650  // Set up the functions at corner 3
651  dpsids(3, 0, 1) = Psi[0][1][0] * DPsi[1][1][0];
652  dpsids(3, 1, 1) = Psi[0][1][1] * DPsi[1][1][0];
653  dpsids(3, 2, 1) = Psi[0][1][0] * DPsi[1][1][1];
654  dpsids(3, 3, 1) = Psi[0][1][1] * DPsi[1][1][1];
655 
656  // SECOND DERIVATIVES
657  // Convention: index 0 is d^2/ds[0]^2,
658  // index 1 is d^2/ds[1]^2,
659  // index 2 is the mixed derivative
660 
661  // D^2/Ds[0]^2
662 
663  // Set up the functions at corner 0
664  d2psids(0, 0, 0) = D2Psi[0][0][0] * Psi[1][0][0];
665  d2psids(0, 1, 0) = D2Psi[0][0][1] * Psi[1][0][0];
666  d2psids(0, 2, 0) = D2Psi[0][0][0] * Psi[1][0][1];
667  d2psids(0, 3, 0) = D2Psi[0][0][1] * Psi[1][0][1];
668 
669  // Set up the functions at corner 1
670  d2psids(1, 0, 0) = D2Psi[0][1][0] * Psi[1][0][0];
671  d2psids(1, 1, 0) = D2Psi[0][1][1] * Psi[1][0][0];
672  d2psids(1, 2, 0) = D2Psi[0][1][0] * Psi[1][0][1];
673  d2psids(1, 3, 0) = D2Psi[0][1][1] * Psi[1][0][1];
674 
675  // Set up the functions at the corner 2
676  d2psids(2, 0, 0) = D2Psi[0][0][0] * Psi[1][1][0];
677  d2psids(2, 1, 0) = D2Psi[0][0][1] * Psi[1][1][0];
678  d2psids(2, 2, 0) = D2Psi[0][0][0] * Psi[1][1][1];
679  d2psids(2, 3, 0) = D2Psi[0][0][1] * Psi[1][1][1];
680 
681  // Set up the functions at corner 3
682  d2psids(3, 0, 0) = D2Psi[0][1][0] * Psi[1][1][0];
683  d2psids(3, 1, 0) = D2Psi[0][1][1] * Psi[1][1][0];
684  d2psids(3, 2, 0) = D2Psi[0][1][0] * Psi[1][1][1];
685  d2psids(3, 3, 0) = D2Psi[0][1][1] * Psi[1][1][1];
686 
687  // D^2/Ds[1]^2
688 
689  // Set up the functions at corner 0
690  d2psids(0, 0, 1) = Psi[0][0][0] * D2Psi[1][0][0];
691  d2psids(0, 1, 1) = Psi[0][0][1] * D2Psi[1][0][0];
692  d2psids(0, 2, 1) = Psi[0][0][0] * D2Psi[1][0][1];
693  d2psids(0, 3, 1) = Psi[0][0][1] * D2Psi[1][0][1];
694 
695  // Set up the functions at corner 1
696  d2psids(1, 0, 1) = Psi[0][1][0] * D2Psi[1][0][0];
697  d2psids(1, 1, 1) = Psi[0][1][1] * D2Psi[1][0][0];
698  d2psids(1, 2, 1) = Psi[0][1][0] * D2Psi[1][0][1];
699  d2psids(1, 3, 1) = Psi[0][1][1] * D2Psi[1][0][1];
700 
701  // Set up the functions at the corner 2
702  d2psids(2, 0, 1) = Psi[0][0][0] * D2Psi[1][1][0];
703  d2psids(2, 1, 1) = Psi[0][0][1] * D2Psi[1][1][0];
704  d2psids(2, 2, 1) = Psi[0][0][0] * D2Psi[1][1][1];
705  d2psids(2, 3, 1) = Psi[0][0][1] * D2Psi[1][1][1];
706 
707  // Set up the functions at corner 3
708  d2psids(3, 0, 1) = Psi[0][1][0] * D2Psi[1][1][0];
709  d2psids(3, 1, 1) = Psi[0][1][1] * D2Psi[1][1][0];
710  d2psids(3, 2, 1) = Psi[0][1][0] * D2Psi[1][1][1];
711  d2psids(3, 3, 1) = Psi[0][1][1] * D2Psi[1][1][1];
712 
713  // D^2/Ds[0]Ds[1]
714 
715  // Set up the functions at corner 0
716  d2psids(0, 0, 2) = DPsi[0][0][0] * DPsi[1][0][0];
717  d2psids(0, 1, 2) = DPsi[0][0][1] * DPsi[1][0][0];
718  d2psids(0, 2, 2) = DPsi[0][0][0] * DPsi[1][0][1];
719  d2psids(0, 3, 2) = DPsi[0][0][1] * DPsi[1][0][1];
720 
721  // Set up the functions at corner 1
722  d2psids(1, 0, 2) = DPsi[0][1][0] * DPsi[1][0][0];
723  d2psids(1, 1, 2) = DPsi[0][1][1] * DPsi[1][0][0];
724  d2psids(1, 2, 2) = DPsi[0][1][0] * DPsi[1][0][1];
725  d2psids(1, 3, 2) = DPsi[0][1][1] * DPsi[1][0][1];
726 
727  // Set up the functions at the corner 2
728  d2psids(2, 0, 2) = DPsi[0][0][0] * DPsi[1][1][0];
729  d2psids(2, 1, 2) = DPsi[0][0][1] * DPsi[1][1][0];
730  d2psids(2, 2, 2) = DPsi[0][0][0] * DPsi[1][1][1];
731  d2psids(2, 3, 2) = DPsi[0][0][1] * DPsi[1][1][1];
732 
733  // Set up the functions at corner 3
734  d2psids(3, 0, 2) = DPsi[0][1][0] * DPsi[1][1][0];
735  d2psids(3, 1, 2) = DPsi[0][1][1] * DPsi[1][1][0];
736  d2psids(3, 2, 2) = DPsi[0][1][0] * DPsi[1][1][1];
737  d2psids(3, 3, 2) = DPsi[0][1][1] * DPsi[1][1][1];
738  }

References s, and oomph::OneDimHermite::shape().

◆ d2shape_local() [3/3]

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::d2shape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
virtual

Function to compute the geometric shape functions and also first and second derivatives wrt local coordinates at local coordinate s. Numbering: 1D: d2psids(i,0) = \( d^2 \psi_j / d s^2 \) 2D: d2psids(i,0) = \( \partial^2 \psi_j / \partial s_0^2 \) d2psids(i,1) = \( \partial^2 \psi_j / \partial s_1^2 \) d2psids(i,2) = \( \partial^2 \psi_j / \partial s_0 \partial s_1 \) 3D: d2psids(i,0) = \( \partial^2 \psi_j / \partial s_0^2 \) d2psids(i,1) = \( \partial^2 \psi_j / \partial s_1^2 \) d2psids(i,2) = \( \partial^2 \psi_j / \partial s_2^2 \) d2psids(i,3) = \( \partial^2 \psi_j / \partial s_0 \partial s_1 \) d2psids(i,4) = \( \partial^2 \psi_j / \partial s_0 \partial s_2 \) d2psids(i,5) = \( \partial^2 \psi_j / \partial s_1 \partial s_2 \)

Reimplemented from oomph::FiniteElement.

◆ dshape_local() [1/3]

void oomph::QHermiteElement< 1 >::dshape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids 
) const
virtual

Derivatives of shape functions for specific QHermiteElement<1>

Reimplemented from oomph::FiniteElement.

73  {
74  // Local storage
75  double Psi[2][2], DPsi[2][2];
76  // Call the OneDimensional Shape functions
77  OneDimHermite::shape(s[0], Psi);
78  OneDimHermite::dshape(s[0], DPsi);
79 
80  // Loop over number of nodes
81  for (unsigned l = 0; l < 2; l++)
82  {
83  // Loop over number of dofs
84  for (unsigned k = 0; k < 2; k++)
85  {
86  psi(l, k) = Psi[l][k];
87  dpsids(l, k, 0) = DPsi[l][k];
88  }
89  }
90  }

References oomph::OneDimHermite::dshape(), k, s, and oomph::OneDimHermite::shape().

◆ dshape_local() [2/3]

void oomph::QHermiteElement< 2 >::dshape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids 
) const
virtual

Derivatives of shape functions for specific QHermiteElement<2>

Reimplemented from oomph::FiniteElement.

429  {
430  // Local storage
431  double Psi[2][2][2];
432  double DPsi[2][2][2];
433  // Call the OneDimensional Shape functions
434  OneDimHermite::shape(s[0], Psi[0]);
435  OneDimHermite::shape(s[1], Psi[1]);
436  OneDimHermite::dshape(s[0], DPsi[0]);
437  OneDimHermite::dshape(s[1], DPsi[1]);
438 
439 
440  // Set up the two dimensional shape functions
441  // Set up the functions at corner 0
442  // psi_0 = 1 when s1 = 0, s2 = 0
443  psi(0, 0) = Psi[0][0][0] * Psi[1][0][0];
444  // dpsi_0/ds1 = 1 when s1 = 0, s2 = 0
445  psi(0, 1) = Psi[0][0][1] * Psi[1][0][0];
446  // dpsi_0/ds2 = 1 when s1 = 0, s2 = 0
447  psi(0, 2) = Psi[0][0][0] * Psi[1][0][1];
448  // dpsi_0/ds2ds1 = 1 when s1 = 0, s2 = 0
449  psi(0, 3) = Psi[0][0][1] * Psi[1][0][1];
450 
451  // Set up the functions at corner 1
452  // psi_1 = 1 when s1 = 1, s2 = 0
453  psi(1, 0) = Psi[0][1][0] * Psi[1][0][0];
454  // dpsi_1/ds1 = 1 when s1 = 1, s2 = 0
455  psi(1, 1) = Psi[0][1][1] * Psi[1][0][0];
456  // dpsi_1/ds2 = 1 when s1 = 1, s2 = 0
457  psi(1, 2) = Psi[0][1][0] * Psi[1][0][1];
458  // dpsi_1/ds1ds2 = 1 when s1 = 1, s2 = 0
459  psi(1, 3) = Psi[0][1][1] * Psi[1][0][1];
460 
461  // Set up the functions at the corner 2
462  // psi_2 = 1 when s1 = 0, s2 = 1
463  psi(2, 0) = Psi[0][0][0] * Psi[1][1][0];
464  // dpsi_2/ds1 = 1 when s1 = 0, s2 = 1
465  psi(2, 1) = Psi[0][0][1] * Psi[1][1][0];
466  // dpsi_2/ds2 = 1 when s1 = 0, s2 = 1
467  psi(2, 2) = Psi[0][0][0] * Psi[1][1][1];
468  // dpsi_2/ds2ds1 = 1 when s1 = 0, s2 = 1
469  psi(2, 3) = Psi[0][0][1] * Psi[1][1][1];
470 
471  // Set up the functions at corner 3
472  // psi_3 = 1 when s1 = 1, s2 = 1
473  psi(3, 0) = Psi[0][1][0] * Psi[1][1][0];
474  // dpsi_3/ds1 = 1 when s1 = 1, s2 = 1
475  psi(3, 1) = Psi[0][1][1] * Psi[1][1][0];
476  // dpsi_3/ds2 = 1 when s1 = 1, s2 = 1
477  psi(3, 2) = Psi[0][1][0] * Psi[1][1][1];
478  // dpsi_3/ds1ds2 = 1 when s1 = 1, s2 = 1
479  psi(3, 3) = Psi[0][1][1] * Psi[1][1][1];
480 
481  // FIRST DERIVATIVES
482 
483  // D/Ds[0]
484 
485  // Set up the functions at corner 0
486  dpsids(0, 0, 0) = DPsi[0][0][0] * Psi[1][0][0];
487  dpsids(0, 1, 0) = DPsi[0][0][1] * Psi[1][0][0];
488  dpsids(0, 2, 0) = DPsi[0][0][0] * Psi[1][0][1];
489  dpsids(0, 3, 0) = DPsi[0][0][1] * Psi[1][0][1];
490 
491  // Set up the functions at corner 1
492  dpsids(1, 0, 0) = DPsi[0][1][0] * Psi[1][0][0];
493  dpsids(1, 1, 0) = DPsi[0][1][1] * Psi[1][0][0];
494  dpsids(1, 2, 0) = DPsi[0][1][0] * Psi[1][0][1];
495  dpsids(1, 3, 0) = DPsi[0][1][1] * Psi[1][0][1];
496 
497  // Set up the functions at the corner 2
498  dpsids(2, 0, 0) = DPsi[0][0][0] * Psi[1][1][0];
499  dpsids(2, 1, 0) = DPsi[0][0][1] * Psi[1][1][0];
500  dpsids(2, 2, 0) = DPsi[0][0][0] * Psi[1][1][1];
501  dpsids(2, 3, 0) = DPsi[0][0][1] * Psi[1][1][1];
502 
503  // Set up the functions at corner 3
504  dpsids(3, 0, 0) = DPsi[0][1][0] * Psi[1][1][0];
505  dpsids(3, 1, 0) = DPsi[0][1][1] * Psi[1][1][0];
506  dpsids(3, 2, 0) = DPsi[0][1][0] * Psi[1][1][1];
507  dpsids(3, 3, 0) = DPsi[0][1][1] * Psi[1][1][1];
508 
509  // D/Ds[1]
510 
511  // Set up the functions at corner 0
512  dpsids(0, 0, 1) = Psi[0][0][0] * DPsi[1][0][0];
513  dpsids(0, 1, 1) = Psi[0][0][1] * DPsi[1][0][0];
514  dpsids(0, 2, 1) = Psi[0][0][0] * DPsi[1][0][1];
515  dpsids(0, 3, 1) = Psi[0][0][1] * DPsi[1][0][1];
516 
517  // Set up the functions at corner 1
518  dpsids(1, 0, 1) = Psi[0][1][0] * DPsi[1][0][0];
519  dpsids(1, 1, 1) = Psi[0][1][1] * DPsi[1][0][0];
520  dpsids(1, 2, 1) = Psi[0][1][0] * DPsi[1][0][1];
521  dpsids(1, 3, 1) = Psi[0][1][1] * DPsi[1][0][1];
522 
523  // Set up the functions at the corner 2
524  dpsids(2, 0, 1) = Psi[0][0][0] * DPsi[1][1][0];
525  dpsids(2, 1, 1) = Psi[0][0][1] * DPsi[1][1][0];
526  dpsids(2, 2, 1) = Psi[0][0][0] * DPsi[1][1][1];
527  dpsids(2, 3, 1) = Psi[0][0][1] * DPsi[1][1][1];
528 
529  // Set up the functions at corner 3
530  dpsids(3, 0, 1) = Psi[0][1][0] * DPsi[1][1][0];
531  dpsids(3, 1, 1) = Psi[0][1][1] * DPsi[1][1][0];
532  dpsids(3, 2, 1) = Psi[0][1][0] * DPsi[1][1][1];
533  dpsids(3, 3, 1) = Psi[0][1][1] * DPsi[1][1][1];
534  }

References oomph::OneDimHermite::dshape(), s, and oomph::OneDimHermite::shape().

◆ dshape_local() [3/3]

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::dshape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids 
) const
virtual

Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local coordinate s

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::ClampedHermiteShellBoundaryConditionElement.

◆ get_s_plot() [1/3]

void oomph::QHermiteElement< 1 >::get_s_plot ( const unsigned i,
const unsigned nplot,
Vector< double > &  s,
const bool use_equally_spaced_interior_sample_points 
) const
inlinevirtual

Get cector of local coordinates of plot point i (when plotting nplot points in each coordinate direction).

Reimplemented from oomph::FiniteElement.

327  {
328  if (nplot > 1)
329  {
330  s[0] = -1.0 + 2.0 * double(i) / double(nplot - 1);
331  if (use_equally_spaced_interior_sample_points)
332  {
333  double range = 2.0;
334  double dx_new = range / double(nplot);
335  double range_new = double(nplot - 1) * dx_new;
336  s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[0]) / range;
337  }
338  }
339  else
340  {
341  s[0] = 0.0;
342  }
343  }

References i, and s.

◆ get_s_plot() [2/3]

void oomph::QHermiteElement< 2 >::get_s_plot ( const unsigned i,
const unsigned nplot,
Vector< double > &  s,
const bool use_equally_spaced_interior_sample_points 
) const
inlinevirtual

Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direction).

Reimplemented from oomph::FiniteElement.

379  {
380  if (nplot > 1)
381  {
382  unsigned i0 = i % nplot;
383  unsigned i1 = (i - i0) / nplot;
384 
385  s[0] = -1.0 + 2.0 * double(i0) / double(nplot - 1);
386  s[1] = -1.0 + 2.0 * double(i1) / double(nplot - 1);
387 
388  if (use_equally_spaced_interior_sample_points)
389  {
390  double range = 2.0;
391  double dx_new = range / double(nplot);
392  double range_new = double(nplot - 1) * dx_new;
393  s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[0]) / range;
394  s[1] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[1]) / range;
395  }
396  }
397  else
398  {
399  s[0] = 0.0;
400  s[1] = 0.0;
401  }
402  }

References i, and s.

◆ get_s_plot() [3/3]

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::get_s_plot ( const unsigned i,
const unsigned nplot,
Vector< double > &  s,
const bool use_equally_spaced_interior_sample_points = false 
) const
virtual

Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direction).

Reimplemented from oomph::FiniteElement.

◆ invert_jacobian_mapping()

template<unsigned DIM>
double oomph::QHermiteElement< DIM >::invert_jacobian_mapping ( const DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  inverse_jacobian 
) const
inlinevirtual

Overload the template-free interface for the calculation of the inverse jacobian. The element dimension must be passed to the function

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::DiagQHermiteElement< DIM >.

185  {
186  return invert_jacobian<DIM>(jacobian, inverse_jacobian);
187  }

◆ local_coord_is_valid()

template<unsigned DIM>
bool oomph::QHermiteElement< DIM >::local_coord_is_valid ( const Vector< double > &  s)
inlinevirtual

Check whether the local coordinate are valid or not.

Reimplemented from oomph::FiniteElement.

121  {
122  unsigned ncoord = dim();
123  for (unsigned i = 0; i < ncoord; i++)
124  {
125  // We're outside
126  if ((s[i] - s_max() > 0.0) || (s_min() - s[i] > 0.0))
127  {
128  return false;
129  }
130  }
131  return true;
132  }
unsigned dim() const
Definition: elements.h:2611
double s_min() const
Min. value of local coordinate.
Definition: hermite_elements.h:204
double s_max() const
Max. value of local coordinate.
Definition: hermite_elements.h:210

References oomph::FiniteElement::dim(), i, s, oomph::QHermiteElement< DIM >::s_max(), and oomph::QHermiteElement< DIM >::s_min().

◆ local_coordinate_of_node()

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::local_coordinate_of_node ( const unsigned j,
Vector< double > &  s 
) const
inlinevirtual

Get local coordinates of node j in the element; vector sets its own size.

Reimplemented from oomph::FiniteElement.

218  {
219  s.resize(DIM);
220  Vector<unsigned> j_sub(DIM);
221  unsigned j_copy = j;
222  unsigned NNODE_1D = 2;
223  const double S_min = this->s_min();
224  const double S_range = this->s_max() - S_min;
225  for (unsigned i = 0; i < DIM; i++)
226  {
227  j_sub[i] = j_copy % NNODE_1D;
228  j_copy = (j_copy - j_sub[i]) / NNODE_1D;
229  s[i] = S_min + double(j_sub[i]) / (double)(NNODE_1D - 1) * S_range;
230  }
231  }
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References DIM, i, j, s, oomph::QHermiteElement< DIM >::s_max(), and oomph::QHermiteElement< DIM >::s_min().

◆ local_fraction_of_node()

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::local_fraction_of_node ( const unsigned j,
Vector< double > &  s_fraction 
)
inlinevirtual

Get local fraction of node j in the element; vector sets its own size.

Reimplemented from oomph::FiniteElement.

235  {
236  s_fraction.resize(DIM);
237  Vector<unsigned> j_sub(DIM);
238  unsigned j_copy = j;
239  unsigned NNODE_1D = 2;
240  for (unsigned i = 0; i < DIM; i++)
241  {
242  j_sub[i] = j_copy % NNODE_1D;
243  j_copy = (j_copy - j_sub[i]) / NNODE_1D;
244  s_fraction[i] = j_sub[i];
245  }
246  }

References DIM, i, and j.

◆ local_one_d_fraction_of_node()

template<unsigned DIM>
double oomph::QHermiteElement< DIM >::local_one_d_fraction_of_node ( const unsigned n1d,
const unsigned i 
)
inlinevirtual

Get the local fraction of any node in the n-th position in a one dimensional expansion along the i-th local coordinate

Reimplemented from oomph::FiniteElement.

251  {
252  // The spacing is just the node number because there are only two
253  // nodes
254  return n1d;
255  }

◆ move_local_coord_back_into_element()

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::move_local_coord_back_into_element ( Vector< double > &  s) const
inlinevirtual

Adjust local coordinates so that they're located inside the element

Reimplemented from oomph::FiniteElement.

137  {
138  unsigned ncoord = dim();
139  for (unsigned i = 0; i < ncoord; i++)
140  {
141  // Adjust to move it onto the boundary
142  if (s[i] > s_max()) s[i] = s_max();
143  if (s[i] < s_min()) s[i] = s_min();
144  }
145  }

References oomph::FiniteElement::dim(), i, s, oomph::QHermiteElement< DIM >::s_max(), and oomph::QHermiteElement< DIM >::s_min().

◆ nnode_1d()

template<unsigned DIM>
unsigned oomph::QHermiteElement< DIM >::nnode_1d ( ) const
inlinevirtual

Return number of nodes along each element edge.

Reimplemented from oomph::FiniteElement.

259  {
260  return 2;
261  }

◆ nplot_points() [1/3]

template<unsigned DIM>
unsigned oomph::QHermiteElement< DIM >::nplot_points ( const unsigned nplot) const
virtual

Return total number of plot points (when plotting nplot points in each "coordinate direction)

Reimplemented from oomph::FiniteElement.

◆ nplot_points() [2/3]

unsigned oomph::QHermiteElement< 1 >::nplot_points ( const unsigned nplot) const
inlinevirtual

Return total number of plot points (when plotting nplot points in each coordinate direction)

Reimplemented from oomph::FiniteElement.

364  {
365  return nplot;
366  }

◆ nplot_points() [3/3]

unsigned oomph::QHermiteElement< 2 >::nplot_points ( const unsigned nplot) const
inlinevirtual

Return total number of plot points (when plotting nplot points in each coordinate direction)

Reimplemented from oomph::FiniteElement.

423  {
424  return nplot * nplot;
425  }

◆ operator=()

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::operator= ( const QHermiteElement< DIM > &  )
delete

Broken assignment operator.

◆ output() [1/12]

void oomph::QHermiteElement< 1 >::output ( FILE *  file_pt)
virtual

The C-style output function for general 1D QHermiteElements.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

204  {
205  // Tecplot header info
206  fprintf(file_pt, "ZONE I=2\n");
207 
208  // Find the dimension of the nodes
209  unsigned n_dim = this->nodal_dimension();
210 
211  // Loop over element nodes
212  for (unsigned l = 0; l < 2; l++)
213  {
214  // Loop over the dimensions and output the position
215  for (unsigned i = 0; i < n_dim; i++)
216  {
217  fprintf(file_pt, "%g ", node_pt(l)->x(i));
218  }
219 
220  // Find the number of types of dof stored at each node
221  unsigned n_position_type = node_pt(l)->nposition_type();
222  // Loop over the additional positional dofs
223  for (unsigned k = 1; k < n_position_type; k++)
224  {
225  for (unsigned i = 0; i < n_dim; i++)
226  {
227  fprintf(file_pt, "%g ", node_pt(l)->x_gen(k, i));
228  }
229  }
230 
231  // Find out how many data values at the node
232  unsigned initial_nvalue = node_pt(l)->nvalue();
233  // Lopp over the data and output whether pinned or not
234  for (unsigned i = 0; i < initial_nvalue; i++)
235  {
236  fprintf(file_pt, "%i ", node_pt(l)->is_pinned(i));
237  }
238  fprintf(file_pt, "\n");
239  }
240  fprintf(file_pt, "\n");
241  }
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
unsigned nposition_type() const
Definition: nodes.h:1016
list x
Definition: plotDoE.py:28

References i, k, and plotDoE::x.

◆ output() [2/12]

void oomph::QHermiteElement< 2 >::output ( FILE *  file_pt)
virtual

The C-style output function for QHermiteElement<2,ORDER>

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

830  {
831  // Tecplot header info
832  fprintf(file_pt, "ZONE I=2, J=2");
833 
834  // Find the dimension of the node
835  unsigned n_dim = this->nodal_dimension();
836 
837  // Loop over element nodes
838  for (unsigned l2 = 0; l2 < 2; l2++)
839  {
840  for (unsigned l1 = 0; l1 < 2; l1++)
841  {
842  unsigned l = l2 * 2 + l1;
843 
844  // Loop over the dimensions and output the position
845  for (unsigned i = 0; i < n_dim; i++)
846  {
847  fprintf(file_pt, "%g ", node_pt(l)->x(i));
848  }
849 
850  // Find out number of types of dof stored at each node
851  unsigned n_position_type = node_pt(l)->nposition_type();
852  // Loop over the additional positional dofs
853  for (unsigned k = 1; k < n_position_type; k++)
854  {
855  for (unsigned i = 0; i < n_dim; i++)
856  {
857  fprintf(file_pt, "%g ", node_pt(l)->x_gen(k, i));
858  }
859  }
860 
861  // Find out how many data values at the node
862  unsigned initial_nvalue = node_pt(l)->nvalue();
863  // Loop over the data and output whether pinned or not
864  for (unsigned i = 0; i < initial_nvalue; i++)
865  {
866  fprintf(file_pt, "%i ", node_pt(l)->is_pinned(i));
867  }
868  fprintf(file_pt, "\n");
869  }
870  }
871  fprintf(file_pt, "\n");
872  }

References i, k, and plotDoE::x.

◆ output() [3/12]

◆ output() [4/12]

void oomph::QHermiteElement< 1 >::output ( FILE *  file_pt,
const unsigned n_plot 
)
virtual

The C-style output function for n_plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

249  {
250  // Local variables
251  Vector<double> s(1);
252 
253  // Tecplot header info
254  fprintf(file_pt, "ZONE I=%i \n", n_plot);
255 
256  // Find the dimension of the first node
257  unsigned n_dim = this->nodal_dimension();
258 
259  // Loop over element nodes
260  for (unsigned l = 0; l < n_plot; l++)
261  {
262  s[0] = -1.0 + l * 2.0 / (n_plot - 1);
263  // Output the coordinates
264  for (unsigned i = 0; i < n_dim; i++)
265  {
266  fprintf(file_pt, "%g ", interpolated_x(s, i));
267  }
268  fprintf(file_pt, "\n");
269  }
270  }
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

References i, and s.

◆ output() [5/12]

void oomph::QHermiteElement< 2 >::output ( FILE *  file_pt,
const unsigned n_plot 
)
virtual

The C-style output function for n_plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

879  {
880  // Local variables
881  Vector<double> s(2);
882 
883  // Tecplot header info
884  fprintf(file_pt, "ZONE I=%i, J=%i \n", n_plot, n_plot);
885 
886  // Find the dimension of the nodes
887  unsigned n_dim = this->nodal_dimension();
888 
889  // Loop over plot points
890  for (unsigned l2 = 0; l2 < n_plot; l2++)
891  {
892  s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
893  for (unsigned l1 = 0; l1 < n_plot; l1++)
894  {
895  s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
896 
897  // Output the coordinates
898  for (unsigned i = 0; i < n_dim; i++)
899  {
900  fprintf(file_pt, "%g ", interpolated_x(s, i));
901  }
902  }
903  }
904  fprintf(file_pt, "\n");
905  }

References i, and s.

◆ output() [6/12]

◆ output() [7/12]

void oomph::QHermiteElement< 1 >::output ( std::ostream &  outfile)
virtual

The output function for general 1D QHermiteElements.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

129  {
130  // Tecplot header info
131  outfile << "ZONE I=" << 2 << std::endl;
132 
133  // Find the dimension of the node
134  unsigned n_dim = this->nodal_dimension();
135 
136  // Loop over element nodes
137  for (unsigned l = 0; l < 2; l++)
138  {
139  // Loop over the dimensions and output the position
140  for (unsigned i = 0; i < n_dim; i++)
141  {
142  outfile << node_pt(l)->x(i) << " ";
143  }
144 
145  // Find the number of types of dof stored at each node
146  unsigned n_position_type = node_pt(l)->nposition_type();
147  // Loop over the additional positional dofs
148  for (unsigned k = 1; k < n_position_type; k++)
149  {
150  for (unsigned i = 0; i < n_dim; i++)
151  {
152  outfile << node_pt(l)->x_gen(k, i) << " ";
153  }
154  }
155 
156  // Find out how many data values at the node
157  unsigned initial_nvalue = node_pt(l)->nvalue();
158  // Lopp over the data and output whether pinned or not
159  for (unsigned i = 0; i < initial_nvalue; i++)
160  {
161  outfile << node_pt(l)->is_pinned(i) << " ";
162  }
163  outfile << std::endl;
164  }
165  outfile << std::endl;
166  }
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
Definition: nodes.h:417
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double & x_gen(const unsigned &k, const unsigned &i)
Definition: nodes.h:1126

References i, and k.

◆ output() [8/12]

void oomph::QHermiteElement< 2 >::output ( std::ostream &  outfile)
virtual

The output function for QHermiteElement<2,ORDER>

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

746  {
747  // Tecplot header info
748  outfile << "ZONE I=" << 2 << ", J=" << 2 << std::endl;
749 
750  // Find the dimension of the node
751  unsigned n_dim = this->nodal_dimension();
752 
753  // Loop over element nodes
754  for (unsigned l2 = 0; l2 < 2; l2++)
755  {
756  for (unsigned l1 = 0; l1 < 2; l1++)
757  {
758  unsigned l = l2 * 2 + l1;
759 
760  // Loop over the dimensions and output the position
761  for (unsigned i = 0; i < n_dim; i++)
762  {
763  outfile << node_pt(l)->x(i) << " ";
764  }
765 
766  // Find out number of types of dof stored at each node
767  unsigned n_position_type = node_pt(l)->nposition_type();
768  // Loop over the additional positional dofs
769  for (unsigned k = 1; k < n_position_type; k++)
770  {
771  for (unsigned i = 0; i < n_dim; i++)
772  {
773  outfile << node_pt(l)->x_gen(k, i) << " ";
774  }
775  }
776 
777  // Find out how many data values at the node
778  unsigned initial_nvalue = node_pt(l)->nvalue();
779  // Loop over the data and output whether pinned or not
780  for (unsigned i = 0; i < initial_nvalue; i++)
781  {
782  outfile << node_pt(l)->is_pinned(i) << " ";
783  }
784  outfile << std::endl;
785  }
786  }
787  outfile << std::endl;
788  }

References i, and k.

◆ output() [9/12]

◆ output() [10/12]

void oomph::QHermiteElement< 1 >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
virtual

The output function for n_plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

173  {
174  // Local variables
175  Vector<double> s(1);
176 
177  // Tecplot header info
178  outfile << "ZONE I=" << n_plot << std::endl;
179 
180  // Find the dimension of the first node
181  unsigned n_dim = this->nodal_dimension();
182 
183  // Loop over plot points
184  for (unsigned l = 0; l < n_plot; l++)
185  {
186  s[0] = -1.0 + l * 2.0 / (n_plot - 1);
187 
188  // Output the coordinates
189  for (unsigned i = 0; i < n_dim; i++)
190  {
191  outfile << interpolated_x(s, i) << " ";
192  }
193  outfile << std::endl;
194  }
195  outfile << std::endl;
196  }

References i, and s.

◆ output() [11/12]

void oomph::QHermiteElement< 2 >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
virtual

The output function for n_plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, oomph::SolidQHermiteElement< 2 >, oomph::SolidQHermiteElement< DIM >, oomph::SolidQHermiteElement< 1 >, and oomph::SolidQHermiteElement< 2 >.

795  {
796  // Local variables
797  Vector<double> s(2);
798 
799  // Tecplot header info
800  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
801 
802  // Find the dimension of the first node
803  unsigned n_dim = this->nodal_dimension();
804 
805  // Loop over plot points
806  for (unsigned l2 = 0; l2 < n_plot; l2++)
807  {
808  s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
809 
810  for (unsigned l1 = 0; l1 < n_plot; l1++)
811  {
812  s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
813 
814  // Output the coordinates
815  for (unsigned i = 0; i < n_dim; i++)
816  {
817  outfile << interpolated_x(s, i) << " ";
818  }
819  }
820  }
821  outfile << std::endl;
822  }

References i, and s.

◆ output() [12/12]

◆ s_max()

template<unsigned DIM>
double oomph::QHermiteElement< DIM >::s_max ( ) const
inlinevirtual

◆ s_min()

template<unsigned DIM>
double oomph::QHermiteElement< DIM >::s_min ( ) const
inlinevirtual

◆ shape() [1/3]

void oomph::QHermiteElement< 1 >::shape ( const Vector< double > &  s,
Shape psi 
) const
virtual

Shape function for specific QHermiteElement<1>

Implements oomph::FiniteElement.

49  {
50  // Local storage
51  double Psi[2][2];
52  // Call the OneDimensional Shape functions
53  OneDimHermite::shape(s[0], Psi);
54 
55  // Loop over the number of nodes
56  for (unsigned l = 0; l < 2; l++)
57  {
58  // Loop over the number of dofs
59  for (unsigned k = 0; k < 2; k++)
60  {
61  psi(l, k) = Psi[l][k];
62  }
63  }
64  }

References k, s, and oomph::OneDimHermite::shape().

◆ shape() [2/3]

void oomph::QHermiteElement< 2 >::shape ( const Vector< double > &  s,
Shape psi 
) const
virtual

Shape function for specific QHermiteElement<2>

Implements oomph::FiniteElement.

372  {
373  // Local storage
374  double Psi[2][2][2];
375 
376  // Call the OneDimensional Shape functions
377  OneDimHermite::shape(s[0], Psi[0]);
378  OneDimHermite::shape(s[1], Psi[1]);
379 
380  // Set up the two dimensional shape functions
381  // Set up the functions at corner 0
382  // psi_0 = 1 when s1 = 0, s2 = 0
383  psi(0, 0) = Psi[0][0][0] * Psi[1][0][0];
384  // dpsi_0/ds1 = 1 when s1 = 0, s2 = 0
385  psi(0, 1) = Psi[0][0][1] * Psi[1][0][0];
386  // dpsi_0/ds2 = 1 when s1 = 0, s2 = 0
387  psi(0, 2) = Psi[0][0][0] * Psi[1][0][1];
388  // dpsi_0/ds2ds1 = 1 when s1 = 0, s2 = 0
389  psi(0, 3) = Psi[0][0][1] * Psi[1][0][1];
390 
391  // Set up the functions at corner 1
392  // psi_1 = 1 when s1 = 1, s2 = 0
393  psi(1, 0) = Psi[0][1][0] * Psi[1][0][0];
394  // dpsi_1/ds1 = 1 when s1 = 1, s2 = 0
395  psi(1, 1) = Psi[0][1][1] * Psi[1][0][0];
396  // dpsi_1/ds2 = 1 when s1 = 1, s2 = 0
397  psi(1, 2) = Psi[0][1][0] * Psi[1][0][1];
398  // dpsi_1/ds1ds2 = 1 when s1 = 1, s2 = 0
399  psi(1, 3) = Psi[0][1][1] * Psi[1][0][1];
400 
401  // Set up the functions at the corner 2
402  // psi_2 = 1 when s1 = 0, s2 = 1
403  psi(2, 0) = Psi[0][0][0] * Psi[1][1][0];
404  // dpsi_2/ds1 = 1 when s1 = 0, s2 = 1
405  psi(2, 1) = Psi[0][0][1] * Psi[1][1][0];
406  // dpsi_2/ds2 = 1 when s1 = 0, s2 = 1
407  psi(2, 2) = Psi[0][0][0] * Psi[1][1][1];
408  // dpsi_2/ds2ds1 = 1 when s1 = 0, s2 = 1
409  psi(2, 3) = Psi[0][0][1] * Psi[1][1][1];
410 
411  // Set up the functions at corner 3
412  // psi_3 = 1 when s1 = 1, s2 = 1
413  psi(3, 0) = Psi[0][1][0] * Psi[1][1][0];
414  // dpsi_3/ds1 = 1 when s1 = 1, s2 = 1
415  psi(3, 1) = Psi[0][1][1] * Psi[1][1][0];
416  // dpsi_3/ds2 = 1 when s1 = 1, s2 = 1
417  psi(3, 2) = Psi[0][1][0] * Psi[1][1][1];
418  // dpsi_3/ds1ds2 = 1 when s1 = 1, s2 = 1
419  psi(3, 3) = Psi[0][1][1] * Psi[1][1][1];
420  }

References s, and oomph::OneDimHermite::shape().

◆ shape() [3/3]

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::shape ( const Vector< double > &  s,
Shape psi 
) const
virtual

Function to calculate the geometric shape functions at local coordinate s

Implements oomph::FiniteElement.

Reimplemented in oomph::ClampedHermiteShellBoundaryConditionElement.

Referenced by oomph::HermiteBeamElement::output().

◆ tecplot_zone_string() [1/3]

template<unsigned DIM>
std::string oomph::QHermiteElement< DIM >::tecplot_zone_string ( const unsigned nplot) const
virtual

Return string for tecplot zone header (when plotting nplot points in each "coordinate direction)

Reimplemented from oomph::FiniteElement.

◆ tecplot_zone_string() [2/3]

std::string oomph::QHermiteElement< 1 >::tecplot_zone_string ( const unsigned nplot) const
inlinevirtual

Return string for tecplot zone header (when plotting nplot points in each coordinate direction)

Reimplemented from oomph::FiniteElement.

352  {
353  std::ostringstream header;
354  header << "ZONE I=" << nplot << "\n";
355  return header.str();
356  }

◆ tecplot_zone_string() [3/3]

std::string oomph::QHermiteElement< 2 >::tecplot_zone_string ( const unsigned nplot) const
inlinevirtual

Return string for tecplot zone header (when plotting nplot points in each coordinate direction)

Reimplemented from oomph::FiniteElement.

411  {
412  std::ostringstream header;
413  header << "ZONE I=" << nplot << ", J=" << nplot << "\n";
414  return header.str();
415  }

◆ transform_second_derivatives()

template<unsigned DIM>
void oomph::QHermiteElement< DIM >::transform_second_derivatives ( const DenseMatrix< double > &  jacobian,
const DenseMatrix< double > &  inverse_jacobian,
const DenseMatrix< double > &  jacobian2,
DShape dbasis,
DShape d2basis 
) const
inlinevirtual

Overload the template-free interface for the calculation of transformation of second derivatives. The element dimension should be passed as a template paremeter, for "optimum" efficiency.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::DiagQHermiteElement< DIM >.

198  {
199  transform_second_derivatives_template<DIM>(
200  jacobian, inverse_jacobian, jacobian2, dbasis, d2basis);
201  }

Member Data Documentation

◆ Default_integration_scheme

template<unsigned DIM>
Gauss< DIM, 3 > oomph::QHermiteElement< DIM >::Default_integration_scheme
staticprivate

Assign the static Default_integration_scheme.

Default integration rule: Gaussian integration of same 'order' as the element


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