oomph::FaceElement Class Reference

#include <elements.h>

+ Inheritance diagram for oomph::FaceElement:

Public Member Functions

 FaceElement ()
 Constructor: Initialise all appropriate member data. More...
 
virtual ~FaceElement ()
 Empty virtual destructor. More...
 
 FaceElement (const FaceElement &)=delete
 Broken copy constructor. More...
 
const unsignedboundary_number_in_bulk_mesh () const
 Broken assignment operator. More...
 
void set_boundary_number_in_bulk_mesh (const unsigned &b)
 Set function for the boundary number in bulk mesh. More...
 
double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double J_eulerian (const Vector< double > &s) const
 
double J_eulerian_at_knot (const unsigned &ipt) const
 
void check_J_eulerian_at_knots (bool &passed) const
 
double interpolated_x (const Vector< double > &s, const unsigned &i) const
 
double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 
void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
intnormal_sign ()
 
int normal_sign () const
 
intface_index ()
 
int face_index () const
 
const Vector< double > * tangent_direction_pt () const
 Public access function for the tangent direction pointer. More...
 
void set_tangent_direction (Vector< double > *tangent_direction_pt)
 Set the tangent direction vector. More...
 
void turn_on_warning_for_discontinuous_tangent ()
 
void turn_off_warning_for_discontinuous_tangent ()
 
void continuous_tangent_and_outer_unit_normal (const Vector< double > &s, Vector< Vector< double >> &tang_vec, Vector< double > &unit_normal) const
 
void continuous_tangent_and_outer_unit_normal (const unsigned &ipt, Vector< Vector< double >> &tang_vec, Vector< double > &unit_normal) const
 
void outer_unit_normal (const Vector< double > &s, Vector< double > &unit_normal) const
 Compute outer unit normal at the specified local coordinate. More...
 
void outer_unit_normal (const unsigned &ipt, Vector< double > &unit_normal) const
 Compute outer unit normal at ipt-th integration point. More...
 
FiniteElement *& bulk_element_pt ()
 Pointer to higher-dimensional "bulk" element. More...
 
FiniteElementbulk_element_pt () const
 Pointer to higher-dimensional "bulk" element (const version) More...
 
CoordinateMappingFctPtface_to_bulk_coordinate_fct_pt ()
 
CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt () const
 
BulkCoordinateDerivativesFctPtbulk_coordinate_derivatives_fct_pt ()
 
BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt () const
 
Vector< doublelocal_coordinate_in_bulk (const Vector< double > &s) const
 
void get_local_coordinate_in_bulk (const Vector< double > &s, Vector< double > &s_bulk) const
 
void get_ds_bulk_ds_face (const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction) const
 
unsignedbulk_position_type (const unsigned &i)
 
const unsignedbulk_position_type (const unsigned &i) const
 
void bulk_node_number_resize (const unsigned &i)
 Resize the storage for the bulk node numbers. More...
 
unsignedbulk_node_number (const unsigned &n)
 
const unsignedbulk_node_number (const unsigned &n) const
 
void bulk_position_type_resize (const unsigned &i)
 Resize the storage for bulk_position_type to i entries. More...
 
unsignednbulk_value (const unsigned &n)
 
unsigned nbulk_value (const unsigned &n) const
 
void nbulk_value_resize (const unsigned &i)
 
void resize_nodes (Vector< unsigned > &nadditional_data_values)
 
void output_zeta (std::ostream &outfile, const unsigned &nplot)
 Output boundary coordinate zeta. 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
 
void check_J_eulerian_at_knots (bool &passed) const
 
void check_jacobian (const double &jacobian) const
 
double dshape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsi, DenseMatrix< double > &djacobian_dX, RankFourTensor< double > &d_dpsidx_dX) const
 
double d2shape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
Node *& node_pt (const unsigned &n)
 Return a pointer to the local node n. More...
 
Node *const & node_pt (const unsigned &n) const
 Return a pointer to the local node n (const version) More...
 
unsigned nnode () const
 Return the number of nodes. More...
 
virtual unsigned nnode_1d () const
 
double raw_nodal_position (const unsigned &n, const unsigned &i) const
 
double raw_nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position (const unsigned &n, const unsigned &i) const
 
double nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double dnodal_position_dt (const unsigned &n, const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt at local node n. More...
 
double dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual 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...
 
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)
 
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
 
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 (std::ostream &outfile)
 
virtual void output (std::ostream &outfile, const unsigned &n_plot)
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output (FILE *file_pt)
 
virtual void output (FILE *file_pt, const unsigned &n_plot)
 
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 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, 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 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 (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
 

Protected Member Functions

void add_additional_values (const Vector< unsigned > &nadditional_values, const unsigned &id)
 
- 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)
 
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

unsigned Boundary_number_in_bulk_mesh
 The boundary number in the bulk mesh to which this element is attached. More...
 
FiniteElementBulk_element_pt
 Pointer to the associated higher-dimensional "bulk" element. More...
 
Vector< unsignedBulk_node_number
 
Vector< unsignedNbulk_value
 
Vector< double > * Tangent_direction_pt
 
- 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
 

Private Types

typedef void(* CoordinateMappingFctPt) (const Vector< double > &s, Vector< double > &s_bulk)
 
typedef void(* BulkCoordinateDerivativesFctPt) (const Vector< double > &s, DenseMatrix< double > &ds_bulk_dsface, unsigned &interior_direction)
 

Private Attributes

CoordinateMappingFctPt Face_to_bulk_coordinate_fct_pt
 
BulkCoordinateDerivativesFctPt Bulk_coordinate_derivatives_fct_pt
 
Vector< unsignedBulk_position_type
 
int Normal_sign
 
int Face_index
 Index of the face. More...
 

Static Private Attributes

static bool Ignore_discontinuous_tangent_warning = false
 

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

FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements. They are used on boundaries where additional non-trivial boundary conditions need to be applied. Examples include free surfaces, and applied traction conditions. In many cases, FaceElements need to evaluate to quantities in the associated bulk elements. For instance, the evaluation of a shear stresses on 2D FaceElement requires the evaluation of velocity derivatives in the associated 3D volume element etc. Therefore we store a pointer to the associated bulk element, and information about the relation between the local coordinates in the face and bulk elements.

Member Typedef Documentation

◆ BulkCoordinateDerivativesFctPt

typedef void(* oomph::FaceElement::BulkCoordinateDerivativesFctPt) (const Vector< double > &s, DenseMatrix< double > &ds_bulk_dsface, unsigned &interior_direction)
private

Typedef for the function that returns the partial derivative of the local coordinates in the bulk element with respect to the coordinates along the face. In addition this function returns an index of one of the bulk local coordinates that varies away from the edge

◆ CoordinateMappingFctPt

typedef void(* oomph::FaceElement::CoordinateMappingFctPt) (const Vector< double > &s, Vector< double > &s_bulk)
private

Typedef for the function that translates the face coordinate to the coordinate in the bulk element

Constructor & Destructor Documentation

◆ FaceElement() [1/2]

oomph::FaceElement::FaceElement ( )
inline

Constructor: Initialise all appropriate member data.

4449  Normal_sign(0),
4450  Face_index(0),
4452  Bulk_element_pt(0),
4454  {
4455  // Check whether things have been set
4456 #ifdef PARANOID
4457  Boundary_number_in_bulk_mesh_has_been_set = false;
4458 #endif
4459 
4460  // Bulk_position_type[0] is always 0 (the position)
4461  Bulk_position_type.push_back(0);
4462  }
unsigned Boundary_number_in_bulk_mesh
The boundary number in the bulk mesh to which this element is attached.
Definition: elements.h:4388
FiniteElement * Bulk_element_pt
Pointer to the associated higher-dimensional "bulk" element.
Definition: elements.h:4399
int Face_index
Index of the face.
Definition: elements.h:4377
int Normal_sign
Definition: elements.h:4374
BulkCoordinateDerivativesFctPt Bulk_coordinate_derivatives_fct_pt
Definition: elements.h:4361
Vector< double > * Tangent_direction_pt
Definition: elements.h:4420
Vector< unsigned > Bulk_position_type
Definition: elements.h:4370
CoordinateMappingFctPt Face_to_bulk_coordinate_fct_pt
Definition: elements.h:4357

References Bulk_position_type.

◆ ~FaceElement()

virtual oomph::FaceElement::~FaceElement ( )
inlinevirtual

Empty virtual destructor.

4465 {}

◆ FaceElement() [2/2]

oomph::FaceElement::FaceElement ( const FaceElement )
delete

Broken copy constructor.

Member Function Documentation

◆ add_additional_values()

void oomph::FaceElement::add_additional_values ( const Vector< unsigned > &  nadditional_values,
const unsigned id 
)
inlineprotected

Helper function adding additional values for the unknowns associated with the FaceElement. This function also sets the map containing the position of the first entry of this face element's additional values.The inputs are the number of additional values and the face element's ID. Note the same number of additonal values are allocated at ALL nodes.

4430  {
4431  // How many nodes?
4432  const unsigned n_node = nnode();
4433 
4434  // loop over the nodes
4435  for (unsigned n = 0; n < n_node; n++)
4436  {
4437  // Assign the required number of additional nodes to the node
4438  dynamic_cast<BoundaryNodeBase*>(this->node_pt(n))
4439  ->assign_additional_values_with_face_id(nadditional_values[n], id);
4440  }
4441  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210

References n, oomph::FiniteElement::nnode(), and oomph::FiniteElement::node_pt().

Referenced by oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::FSIImposeDisplacementByLagrangeMultiplierElement(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::ImposeDisplacementByLagrangeMultiplierElement(), oomph::ImposeImpenetrabilityElement< ELEMENT >::ImposeImpenetrabilityElement(), oomph::ImposeParallelOutflowElement< ELEMENT >::ImposeParallelOutflowElement(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::LinearisedAxisymPoroelasticBJS_FSIElement(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::LinearisedFSIAxisymmetricNStNoSlipBCElementElement(), oomph::SurfaceContactElementBase< ELEMENT >::SurfaceContactElementBase(), oomph::SurfaceMeltElement< ELEMENT >::SurfaceMeltElement(), and oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::UnsteadyHeatFluxPseudoMeltElement().

◆ boundary_number_in_bulk_mesh()

const unsigned& oomph::FaceElement::boundary_number_in_bulk_mesh ( ) const
inline

Broken assignment operator.

Access function for the boundary number in bulk mesh

4476  {
4478  }

References Boundary_number_in_bulk_mesh.

Referenced by oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::set_boundary_shape_geom_object_pt().

◆ bulk_coordinate_derivatives_fct_pt() [1/2]

◆ bulk_coordinate_derivatives_fct_pt() [2/2]

BulkCoordinateDerivativesFctPt oomph::FaceElement::bulk_coordinate_derivatives_fct_pt ( ) const
inline

Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face coordinates (const version)

4778  {
4780  }

References Bulk_coordinate_derivatives_fct_pt.

◆ bulk_element_pt() [1/2]

FiniteElement*& oomph::FaceElement::bulk_element_pt ( )
inline

Pointer to higher-dimensional "bulk" element.

4736  {
4737  return Bulk_element_pt;
4738  }

References Bulk_element_pt.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_distribute(), oomph::DGFaceElement::add_flux_contributions(), oomph::FiniteElement::build_face_element(), oomph::QHermiteElement< DIM >::build_face_element(), oomph::QSpectralElement< 1, NNODE_1D >::build_face_element(), oomph::QSpectralElement< 2, NNODE_1D >::build_face_element(), oomph::QSpectralElement< 3, NNODE_1D >::build_face_element(), oomph::TElement< 1, NNODE_1D >::build_face_element(), oomph::TElement< 2, NNODE_1D >::build_face_element(), oomph::TElement< 3, NNODE_1D >::build_face_element(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::contribution_to_total_porous_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_total_porous_flux(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_volume_flux(), RefineableYoungLaplaceProblem< ELEMENT >::doc_solution(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::drag_force(), oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::ImposeImpenetrabilityElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::ImposeParallelOutflowElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::HelmholtzAbsorbingBCElement< ELEMENT >::fill_in_generic_residual_contribution_helmholtz_abc(), oomph::PointFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_kinetic_energy_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work_components(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::get_volume_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_volume_flux(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_flux_contribution(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_solid(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::HelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::global_power_contribution(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_power_contribution(), interpolated_dxdt(), interpolated_x(), oomph::SolidFaceElement::interpolated_xi(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::lagrangian_eulerian_translation_factor(), TwoDDGProblem< ELEMENT >::limit(), oomph::Multi_domain_functions::locate_zeta_for_local_coordinates(), oomph::RefineableNavierStokesTractionElement< ELEMENT >::ncont_interpolated_values(), oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::ncont_interpolated_values(), oomph::RefineableSolidTractionElement< ELEMENT >::ncont_interpolated_values(), oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >::ncont_interpolated_values(), oomph::RefineableNavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::ncont_interpolated_values(), oomph::DGEulerFaceElement< ELEMENT >::numerical_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::output(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::output(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::output(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::output(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), oomph::PerturbedSpineLinearisedAxisymmetricFluidInterfaceElement< ELEMENT >::PerturbedSpineLinearisedAxisymmetricFluidInterfaceElement(), oomph::Problem::read(), oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::refineable_fill_in_generic_residual_contribution_fluid_traction(), oomph::FluidInterfaceBoundingElement::reset_after_external_fd(), oomph::FluidInterfaceBoundingElement::set_contact_angle(), oomph::FluidInterfaceAdditionalValues< SolubleSurfactantTransportInterfaceElement >::setup_equation_indices(), oomph::FourierDecomposedHelmholtzDtNMesh< ELEMENT >::setup_gamma(), oomph::HelmholtzDtNMesh< ELEMENT >::setup_gamma(), oomph::DGFaceElement::setup_neighbour_info(), oomph::DGElement::slope_limit(), and oomph::FluidInterfaceBoundingElement::update_in_external_fd().

◆ bulk_element_pt() [2/2]

FiniteElement* oomph::FaceElement::bulk_element_pt ( ) const
inline

Pointer to higher-dimensional "bulk" element (const version)

4743  {
4744  return Bulk_element_pt;
4745  }

References Bulk_element_pt.

◆ bulk_node_number() [1/2]

◆ bulk_node_number() [2/2]

const unsigned& oomph::FaceElement::bulk_node_number ( const unsigned n) const
inline

Return the bulk node number that corresponds to the n-th local node number (const version)

4833  {
4834  return Bulk_node_number[n];
4835  }

References Bulk_node_number, and n.

◆ bulk_node_number_resize()

◆ bulk_position_type() [1/2]

unsigned& oomph::FaceElement::bulk_position_type ( const unsigned i)
inline

◆ bulk_position_type() [2/2]

const unsigned& oomph::FaceElement::bulk_position_type ( const unsigned i) const
inline

Return the position type in the "bulk" element that corresponds to the position type i on the FaceElement. Const version

4813  {
4814  return Bulk_position_type[i];
4815  }

References Bulk_position_type, and i.

◆ bulk_position_type_resize()

void oomph::FaceElement::bulk_position_type_resize ( const unsigned i)
inline

Resize the storage for bulk_position_type to i entries.

4839  {
4840  Bulk_position_type.resize(i);
4841  }

References Bulk_position_type, and i.

Referenced by oomph::QHermiteElement< DIM >::build_face_element(), and oomph::ClampedHermiteShellBoundaryConditionElement::ClampedHermiteShellBoundaryConditionElement().

◆ check_J_eulerian_at_knots()

void oomph::FaceElement::check_J_eulerian_at_knots ( bool passed) const

Check that Jacobian of mapping between local and Eulerian coordinates at all integration points is positive.

5411  {
5412  // Let's be optimistic...
5413  passed = true;
5414 
5415  // Find the number of nodes
5416  const unsigned n_node = nnode();
5417 
5418  // Find the number of position types
5419  const unsigned n_position_type = nnodal_position_type();
5420 
5421  // Find the dimension of the node and element
5422  const unsigned n_dim = nodal_dimension();
5423  const unsigned n_dim_el = dim();
5424 
5425  // Set up dummy memory for the shape functions
5426  Shape psi(n_node, n_position_type);
5427  DShape dpsids(n_node, n_position_type, n_dim_el);
5428 
5429 
5430  unsigned nintpt = integral_pt()->nweight();
5431  for (unsigned ipt = 0; ipt < nintpt; ipt++)
5432  {
5433  // Get the shape functions and local derivatives at the knot
5434  // This call may use the stored versions, which is why this entire
5435  // function doesn't just call J_eulerian(s), after reading out s from
5436  // the knots.
5437  dshape_local_at_knot(ipt, psi, dpsids);
5438 
5439  // Also calculate the surface Vectors (derivatives wrt local coordinates)
5440  DenseMatrix<double> interpolated_A(n_dim_el, n_dim, 0.0);
5441 
5442  // Calculate positions and derivatives
5443  for (unsigned l = 0; l < n_node; l++)
5444  {
5445  // Loop over positional dofs
5446  for (unsigned k = 0; k < n_position_type; k++)
5447  {
5448  // Loop over coordinates
5449  for (unsigned i = 0; i < n_dim; i++)
5450  {
5451  // Loop over LOCAL derivative directions, to calculate the
5452  // tangent(s)
5453  for (unsigned j = 0; j < n_dim_el; j++)
5454  {
5455  interpolated_A(j, i) +=
5457  dpsids(l, k, j);
5458  }
5459  }
5460  }
5461  }
5462 
5463  // Now find the local deformed metric tensor from the tangent Vectors
5464  DenseMatrix<double> A(n_dim_el, n_dim_el, 0.0);
5465  for (unsigned i = 0; i < n_dim_el; i++)
5466  {
5467  for (unsigned j = 0; j < n_dim_el; j++)
5468  {
5469  // Take the dot product
5470  for (unsigned k = 0; k < n_dim; k++)
5471  {
5472  A(i, j) += interpolated_A(i, k) * interpolated_A(j, k);
5473  }
5474  }
5475  }
5476 
5477  // Find the determinant of the metric tensor
5478  double Adet = 0.0;
5479  switch (n_dim_el)
5480  {
5481  case 1:
5482  Adet = A(0, 0);
5483  break;
5484  case 2:
5485  Adet = A(0, 0) * A(1, 1) - A(0, 1) * A(1, 0);
5486  break;
5487  default:
5488  throw OomphLibError("Wrong dimension in FaceElement",
5489  "FaceElement::J_eulerian_at_knot()",
5491  }
5492 
5493 
5494  // Are we dead yet?
5495  if (Adet <= 0.0)
5496  {
5497  passed = false;
5498  return;
5499  }
5500  }
5501  }
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
unsigned & bulk_position_type(const unsigned &i)
Definition: elements.h:4805
unsigned nnodal_position_type() const
Definition: elements.h:2463
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Definition: elements.cc:3239
unsigned dim() const
Definition: elements.h:2611
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2349
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
char char char int int * k
Definition: level2_impl.h:374
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References bulk_position_type(), oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local_at_knot(), i, oomph::FiniteElement::integral_pt(), j, k, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_position_gen(), oomph::Integral::nweight(), and OOMPH_EXCEPTION_LOCATION.

◆ continuous_tangent_and_outer_unit_normal() [1/2]

void oomph::FaceElement::continuous_tangent_and_outer_unit_normal ( const unsigned ipt,
Vector< Vector< double >> &  tang_vec,
Vector< double > &  unit_normal 
) const

Compute the tangent vector(s) and the outer unit normal vector at the ipt-th integration point. This is a wrapper around continuous_tangent_and_outer_unit_normal(...) with the integration points converted into local coordinates.

5990  {
5991  // Find the dimension of the element
5992  const unsigned element_dim = dim();
5993  // Find the local coordinates of the ipt-th integration point
5994  Vector<double> s(element_dim);
5995  for (unsigned i = 0; i < element_dim; i++)
5996  {
5997  s[i] = integral_pt()->knot(ipt, i);
5998  }
5999  // Call the outer unit normal function
6000  continuous_tangent_and_outer_unit_normal(s, tang_vec, unit_normal);
6001  }
void continuous_tangent_and_outer_unit_normal(const Vector< double > &s, Vector< Vector< double >> &tang_vec, Vector< double > &unit_normal) const
Definition: elements.cc:5512
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
RealScalar s
Definition: level1_cplx_impl.h:130

References continuous_tangent_and_outer_unit_normal(), oomph::FiniteElement::dim(), i, oomph::FiniteElement::integral_pt(), oomph::Integral::knot(), and s.

◆ continuous_tangent_and_outer_unit_normal() [2/2]

void oomph::FaceElement::continuous_tangent_and_outer_unit_normal ( const Vector< double > &  s,
Vector< Vector< double >> &  tang_vec,
Vector< double > &  unit_normal 
) const

Compute the tangent vector(s) and the outer unit normal vector at the specified local coordinate. In two spatial dimensions, a "tangent direction" is not required. In three spatial dimensions, a tangent direction is required (set via set_tangent_direction(...)), and we project the tanent direction on to the surface. The second tangent vector is taken to be the cross product of the projection and the unit normal.

5516  {
5517  // Find the spatial dimension of the FaceElement
5518  const unsigned element_dim = dim();
5519 
5520  // Find the overall dimension of the problem
5521  //(assume that it's the same for all nodes)
5522  const unsigned spatial_dim = nodal_dimension();
5523 
5524 #ifdef PARANOID
5525  // Check the number of local coordinates passed
5526  if (s.size() != element_dim)
5527  {
5528  std::ostringstream error_stream;
5529  error_stream
5530  << "Local coordinate s passed to outer_unit_normal() has dimension "
5531  << s.size() << std::endl
5532  << "but element dimension is " << element_dim << std::endl;
5533 
5534  throw OomphLibError(
5535  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5536  }
5537 
5538  // Check that if the Tangent_direction_pt is set, then
5539  // it is the same length as the spatial dimension.
5540  if (Tangent_direction_pt != 0 &&
5541  Tangent_direction_pt->size() != spatial_dim)
5542  {
5543  std::ostringstream error_stream;
5544  error_stream << "Tangent direction vector has dimension "
5545  << Tangent_direction_pt->size() << std::endl
5546  << "but spatial dimension is " << spatial_dim << std::endl;
5547 
5548  throw OomphLibError(
5549  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5550  }
5551 
5552  // Check the dimension of the normal vector
5553  if (unit_normal.size() != spatial_dim)
5554  {
5555  std::ostringstream error_stream;
5556  error_stream << "Unit normal passed to outer_unit_normal() has dimension "
5557  << unit_normal.size() << std::endl
5558  << "but spatial dimension is " << spatial_dim << std::endl;
5559 
5560  throw OomphLibError(
5561  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5562  }
5563 
5564 
5565  // The number of tangent vectors.
5566  unsigned ntangent_vec = tang_vec.size();
5567 
5568  // For the tangent vector,
5569  // if element_dim = 2, tang_vec is a 2D Vector of length 3.
5570  // if element_dim = 1, tang_vec is a 1D Vector of length 2.
5571  // if element_dim = 0, tang_vec is a 1D Vector of length 1.
5572  switch (element_dim)
5573  {
5574  // Point element, derived from a 1D element.
5575  case 0:
5576  {
5577  // Check that tang_vec is a 1D vector.
5578  if (ntangent_vec != 1)
5579  {
5580  std::ostringstream error_stream;
5581  error_stream
5582  << "This is a 0D FaceElement, we need one tangent vector.\n"
5583  << "You have given me " << tang_vec.size() << " vector(s).\n";
5584  throw OomphLibError(error_stream.str(),
5587  }
5588  }
5589  break;
5590 
5591  // Line element, derived from a 2D element.
5592  case 1:
5593  {
5594  // Check that tang_vec is a 1D vector.
5595  if (ntangent_vec != 1)
5596  {
5597  std::ostringstream error_stream;
5598  error_stream
5599  << "This is a 1D FaceElement, we need one tangent vector.\n"
5600  << "You have given me " << tang_vec.size() << " vector(s).\n";
5601  throw OomphLibError(error_stream.str(),
5604  }
5605  }
5606  break;
5607 
5608  // Plane element, derived from 3D element.
5609  case 2:
5610  {
5611  // Check that tang_vec is a 2D vector.
5612  if (ntangent_vec != 2)
5613  {
5614  std::ostringstream error_stream;
5615  error_stream
5616  << "This is a 2D FaceElement, we need two tangent vectors.\n"
5617  << "You have given me " << tang_vec.size() << " vector(s).\n";
5618  throw OomphLibError(error_stream.str(),
5621  }
5622  }
5623  break;
5624  // There are no other elements!
5625  default:
5626 
5627  throw OomphLibError(
5628  "Cannot have a FaceElement with dimension higher than 2",
5631  break;
5632  }
5633 
5634  // Check the lengths of each sub vectors.
5635  for (unsigned vec_i = 0; vec_i < ntangent_vec; vec_i++)
5636  {
5637  if (tang_vec[vec_i].size() != spatial_dim)
5638  {
5639  std::ostringstream error_stream;
5640  error_stream << "This problem has " << spatial_dim
5641  << " spatial dimensions.\n"
5642  << "But the " << vec_i << " tangent vector has size "
5643  << tang_vec[vec_i].size() << std::endl;
5644  throw OomphLibError(
5645  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5646  }
5647  }
5648 
5649 #endif
5650 
5651 
5652  // Now let's consider the different element dimensions
5653  switch (element_dim)
5654  {
5655  // Point element, derived from a 1D element.
5656  case 0:
5657  {
5658  std::ostringstream error_stream;
5659  error_stream
5660  << "It is unclear how to calculate a tangent and normal vectors for "
5661  << "a point element.\n";
5662  throw OomphLibError(
5663  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5664  }
5665  break;
5666 
5667  // Line element, derived from a 2D element, in this case
5668  // the normal is a mess of cross products
5669  // We need an interior direction, so we must find the local
5670  // derivatives in the BULK element
5671  case 1:
5672  {
5673  // Find the number of nodes in the bulk element
5674  const unsigned n_node_bulk = Bulk_element_pt->nnode();
5675  // Find the number of position types in the bulk element
5676  const unsigned n_position_type_bulk =
5678 
5679  // Construct the local coordinate in the bulk element
5680  Vector<double> s_bulk(2);
5681  // Get the local coordinates in the bulk element
5683 
5684  // Allocate storage for the shape functions and their derivatives wrt
5685  // local coordinates
5686  Shape psi(n_node_bulk, n_position_type_bulk);
5687  DShape dpsids(n_node_bulk, n_position_type_bulk, 2);
5688  // Get the value of the shape functions at the given local coordinate
5689  Bulk_element_pt->dshape_local(s_bulk, psi, dpsids);
5690 
5691  // Calculate all derivatives of the spatial coordinates
5692  // wrt local coordinates
5693  DenseMatrix<double> interpolated_dxds(2, spatial_dim, 0.0);
5694 
5695  // Loop over all parent nodes
5696  for (unsigned l = 0; l < n_node_bulk; l++)
5697  {
5698  // Loop over all position types in the bulk
5699  for (unsigned k = 0; k < n_position_type_bulk; k++)
5700  {
5701  // Loop over derivative direction
5702  for (unsigned j = 0; j < 2; j++)
5703  {
5704  // Loop over coordinate directions
5705  for (unsigned i = 0; i < spatial_dim; i++)
5706  {
5707  // Compute the spatial derivative
5708  interpolated_dxds(j, i) +=
5710  dpsids(l, k, j);
5711  }
5712  }
5713  }
5714  }
5715 
5716  // Initialise the tangent, interior tangent and normal vectors to zero
5717  // The idea is that even if the element is in a two-dimensional space,
5718  // the normal cannot be calculated without embedding the element in
5719  // three dimensions, in which case, the tangent and interior tangent
5720  // will have zero z-components.
5721  Vector<double> tangent(3, 0.0), interior_tangent(3, 0.0),
5722  normal(3, 0.0);
5723 
5724  // We must get the relationship between the coordinate along the face
5725  // and the local coordinates in the bulk element
5726  // We must also find an interior direction
5727  DenseMatrix<double> dsbulk_dsface(2, 1, 0.0);
5728  unsigned interior_direction = 0;
5729  get_ds_bulk_ds_face(s, dsbulk_dsface, interior_direction);
5730  // Load in the values for the tangents
5731  for (unsigned i = 0; i < spatial_dim; i++)
5732  {
5733  // Tangent to the face is the derivative wrt to the face coordinate
5734  // which is calculated using dsbulk_dsface and the chain rule
5735  tangent[i] = interpolated_dxds(0, i) * dsbulk_dsface(0, 0) +
5736  interpolated_dxds(1, i) * dsbulk_dsface(1, 0);
5737  // Interior tangent to the face is the derivative in the interior
5738  // direction
5739  interior_tangent[i] = interpolated_dxds(interior_direction, i);
5740  }
5741 
5742  // Now the (3D) normal to the element is the interior tangent
5743  // crossed with the tangent
5744  VectorHelpers::cross(interior_tangent, tangent, normal);
5745 
5746  // We find the line normal by crossing the element normal with the
5747  // tangent
5748  Vector<double> full_normal(3);
5749  VectorHelpers::cross(normal, tangent, full_normal);
5750 
5751  // Copy the appropriate entries into the unit normal
5752  // Two or Three depending upon the spatial dimension of the system
5753  for (unsigned i = 0; i < spatial_dim; i++)
5754  {
5755  unit_normal[i] = full_normal[i];
5756  }
5757 
5758  // Finally normalise unit normal and multiply by the Normal_sign
5759  double length = VectorHelpers::magnitude(unit_normal);
5760  for (unsigned i = 0; i < spatial_dim; i++)
5761  {
5762  unit_normal[i] *= Normal_sign / length;
5763  }
5764 
5765  // Create the tangent vector
5766  tang_vec[0][0] = -unit_normal[1];
5767  tang_vec[0][1] = unit_normal[0];
5768  }
5769  break;
5770 
5771  // Plane element, derived from 3D element, in this case the normal
5772  // is just the cross product of the two surface tangents
5773  // We assume, therefore, that we have three spatial coordinates
5774  // and two surface coordinates
5775  // Then we need only to get the derivatives wrt the local coordinates
5776  // in this face element
5777  case 2:
5778  {
5779 #ifdef PARANOID
5780  // Check that we actually have three spatial dimensions
5781  if (spatial_dim != 3)
5782  {
5783  std::ostringstream error_stream;
5784  error_stream << "There are only " << spatial_dim
5785  << "coordinates at the nodes of this 2D FaceElement,\n"
5786  << "which must have come from a 3D Bulk element\n";
5787  throw OomphLibError(error_stream.str(),
5790  }
5791 #endif
5792 
5793  // Find the number of nodes in the element
5794  const unsigned n_node = this->nnode();
5795  // Find the number of position types
5796  const unsigned n_position_type = this->nnodal_position_type();
5797 
5798  // Allocate storage for the shape functions and their derivatives wrt
5799  // local coordinates
5800  Shape psi(n_node, n_position_type);
5801  DShape dpsids(n_node, n_position_type, 2);
5802  // Get the value of the shape functions at the given local coordinate
5803  this->dshape_local(s, psi, dpsids);
5804 
5805  // Calculate all derivatives of the spatial coordinates
5806  // wrt local coordinates
5807  Vector<Vector<double>> interpolated_dxds(2, Vector<double>(3, 0));
5808 
5809  // Loop over all nodes
5810  for (unsigned l = 0; l < n_node; l++)
5811  {
5812  // Loop over all position types
5813  for (unsigned k = 0; k < n_position_type; k++)
5814  {
5815  // Loop over derivative directions
5816  for (unsigned j = 0; j < 2; j++)
5817  {
5818  // Loop over coordinate directions
5819  for (unsigned i = 0; i < 3; i++)
5820  {
5821  // Compute the spatial derivative
5822  // Remember that we need to translate the position type
5823  // to its location in the bulk node
5824  interpolated_dxds[j][i] +=
5826  dpsids(l, k, j);
5827  }
5828  }
5829  }
5830  }
5831 
5832  // We now take the cross product of the two normal vectors
5834  interpolated_dxds[0], interpolated_dxds[1], unit_normal);
5835 
5836  // Finally normalise unit normal
5837  double normal_length = VectorHelpers::magnitude(unit_normal);
5838 
5839  for (unsigned i = 0; i < spatial_dim; i++)
5840  {
5841  unit_normal[i] *= Normal_sign / normal_length;
5842  }
5843 
5844  // Next we create the continuous tangent vectors!
5845  if (Tangent_direction_pt != 0)
5846  // There is a general direction that the first tangent vector should
5847  // follow.
5848  {
5849  // Project the Tangent direction vector onto the surface.
5850  // Project Tangent_direction_pt D onto the plane P defined by
5851  // T1 and T2:
5852  // proj_P(D) = proj_T1(D) + proj_T2(D), where D is
5853  // Tangent_direction_pt, recall that proj_u(v) = (u.v)/(u.u) * u
5854 
5855  // Get the direction vector. The vector is NOT copied! :)
5856  Vector<double>& direction_vector = *Tangent_direction_pt;
5857 
5858 #ifdef PARANOID
5859  // Check that the angle between the direction vector and the normal
5860  // is not less than 10 degrees
5861  if (VectorHelpers::angle(direction_vector, unit_normal) <
5862  (10.0 * MathematicalConstants::Pi / 180.0))
5863  {
5864  std::ostringstream err_stream;
5865  err_stream << "The angle between the unit normal and the \n"
5866  << "direction vector is less than 10 degrees.";
5867  throw OomphLibError(err_stream.str(),
5870  }
5871 #endif
5872 
5873  // Calculate the two scalings, (u.v) / (u.u)
5874  double t1_scaling =
5875  VectorHelpers::dot(interpolated_dxds[0], direction_vector) /
5876  VectorHelpers::dot(interpolated_dxds[0], interpolated_dxds[0]);
5877 
5878  double t2_scaling =
5879  VectorHelpers::dot(interpolated_dxds[1], direction_vector) /
5880  VectorHelpers::dot(interpolated_dxds[1], interpolated_dxds[1]);
5881 
5882  // Finish off the projection.
5883  tang_vec[0][0] = t1_scaling * interpolated_dxds[0][0] +
5884  t2_scaling * interpolated_dxds[1][0];
5885  tang_vec[0][1] = t1_scaling * interpolated_dxds[0][1] +
5886  t2_scaling * interpolated_dxds[1][1];
5887  tang_vec[0][2] = t1_scaling * interpolated_dxds[0][2] +
5888  t2_scaling * interpolated_dxds[1][2];
5889 
5890  // The second tangent vector is the cross product of
5891  // tang_vec[0] and the normal vector N.
5892  VectorHelpers::cross(tang_vec[0], unit_normal, tang_vec[1]);
5893 
5894  // Normalise the tangent vectors
5895  for (unsigned vec_i = 0; vec_i < 2; vec_i++)
5896  {
5897  // Get the length...
5898  double tang_length = VectorHelpers::magnitude(tang_vec[vec_i]);
5899 
5900  for (unsigned dim_i = 0; dim_i < spatial_dim; dim_i++)
5901  {
5902  tang_vec[vec_i][dim_i] /= tang_length;
5903  }
5904  }
5905  }
5906  else
5907  // A direction for the first tangent vector is not supplied, we do our
5908  // best to keep it continuous. But if the normal vector is aligned with
5909  // the z axis, then the tangent vector may "flip", even within elements.
5910  // This is because we check this by comparing doubles.
5911  // The code is copied from impose_parallel_outflow_element.h,
5912  // NO modification is done except for a few variable name changes.
5913  {
5914  double a, b, c;
5915  a = unit_normal[0];
5916  b = unit_normal[1];
5917  c = unit_normal[2];
5918 
5919  if (a != 0.0 || b != 0.0)
5920  {
5921  double a_sq = a * a;
5922  double b_sq = b * b;
5923  double c_sq = c * c;
5924 
5925  tang_vec[0][0] = -b / sqrt(a_sq + b_sq);
5926  tang_vec[0][1] = a / sqrt(a_sq + b_sq);
5927  tang_vec[0][2] = 0;
5928 
5929  double z = (a_sq + b_sq) / sqrt(a_sq * c_sq + b_sq * c_sq +
5930  (a_sq + b_sq) * (a_sq + b_sq));
5931 
5932  tang_vec[1][0] = -(a * c * z) / (a_sq + b_sq);
5933  tang_vec[1][1] = -(b * c * z) / (a_sq + b_sq);
5934  tang_vec[1][2] = z;
5935  // NB : we didn't use the fact that N is normalized,
5936  // that's why we have these unsimplified formulas
5937  }
5938  else if (c != 0.0)
5939  {
5941  {
5942  std::ostringstream warn_stream;
5943  warn_stream
5944  << "I have detected that your normal vector is [0,0,1].\n"
5945  << "Since this function compares against 0.0, you may\n"
5946  << "get discontinuous tangent vectors.";
5947  OomphLibWarning(warn_stream.str(),
5950  }
5951 
5952  tang_vec[0][0] = 1.0;
5953  tang_vec[0][1] = 0.0;
5954  tang_vec[0][2] = 0.0;
5955 
5956  tang_vec[1][0] = 0.0;
5957  tang_vec[1][1] = 1.0;
5958  tang_vec[1][2] = 0.0;
5959  }
5960  else
5961  {
5962  throw OomphLibError("You have a zero normal vector!! ",
5965  }
5966  }
5967  }
5968  break;
5969 
5970  default:
5971 
5972  throw OomphLibError(
5973  "Cannot have a FaceElement with dimension higher than 2",
5976  break;
5977  }
5978  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Scalar * b
Definition: benchVecAdd.cpp:17
static bool Ignore_discontinuous_tangent_warning
Definition: elements.h:4384
void get_ds_bulk_ds_face(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction) const
Definition: elements.cc:6409
void get_local_coordinate_in_bulk(const Vector< double > &s, Vector< double > &s_bulk) const
Definition: elements.cc:6384
double size() const
Definition: elements.cc:4290
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Definition: elements.h:1981
const Scalar * a
Definition: level2_cplx_impl.h:32
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65
int c
Definition: calibrate.py:100
const double Pi
50 digits from maple
Definition: oomph_utilities.h:157
double dot(const Vector< double > &a, const Vector< double > &b)
Definition: oomph-lib/src/generic/Vector.h:291
void cross(const Vector< double > &A, const Vector< double > &B, Vector< double > &C)
Definition: oomph-lib/src/generic/Vector.h:319
double angle(const Vector< double > &a, const Vector< double > &b)
Get the angle between two vector.
Definition: oomph-lib/src/generic/Vector.h:309
double magnitude(const Vector< double > &a)
Get the magnitude of a vector.
Definition: oomph-lib/src/generic/Vector.h:303
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References a, oomph::VectorHelpers::angle(), b, Bulk_element_pt, bulk_position_type(), calibrate::c, oomph::VectorHelpers::cross(), oomph::FiniteElement::dim(), oomph::VectorHelpers::dot(), oomph::FiniteElement::dshape_local(), get_ds_bulk_ds_face(), get_local_coordinate_in_bulk(), i, Ignore_discontinuous_tangent_warning, j, k, oomph::VectorHelpers::magnitude(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_position_gen(), WallFunction::normal(), Normal_sign, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::MathematicalConstants::Pi, s, oomph::FiniteElement::size(), sqrt(), and Tangent_direction_pt.

Referenced by continuous_tangent_and_outer_unit_normal(), and oomph::ImposeParallelOutflowElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier().

◆ face_index() [1/2]

int& oomph::FaceElement::face_index ( )
inline

Index of the face (a number that uniquely identifies the face in the element)

4627  {
4628  return Face_index;
4629  }

References Face_index.

Referenced by oomph::AdvectionDiffusionFluxElement< ELEMENT >::AdvectionDiffusionFluxElement(), oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >::AxisymmetricLinearElasticityTractionElement(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::AxisymmetricNavierStokesTractionElement(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::AxisymmetricPoroelasticityTractionElement(), oomph::AxisymmetricSolidTractionElement< ELEMENT >::AxisymmetricSolidTractionElement(), oomph::BiharmonicFluxElement< DIM >::BiharmonicFluxElement(), oomph::FiniteElement::build_face_element(), oomph::QHermiteElement< DIM >::build_face_element(), oomph::QSpectralElement< 1, NNODE_1D >::build_face_element(), oomph::QSpectralElement< 2, NNODE_1D >::build_face_element(), oomph::QSpectralElement< 3, NNODE_1D >::build_face_element(), oomph::TElement< 1, NNODE_1D >::build_face_element(), oomph::TElement< 2, NNODE_1D >::build_face_element(), oomph::TElement< 3, NNODE_1D >::build_face_element(), oomph::ClampedHermiteShellBoundaryConditionElement::ClampedHermiteShellBoundaryConditionElement(), oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::ClampedSlidingHermiteBeamBoundaryConditionElement(), oomph::DarcyFaceElement< ELEMENT >::DarcyFaceElement(), oomph::DGEulerFaceElement< ELEMENT >::DGEulerFaceElement(), oomph::DGEulerFaceReflectionElement< ELEMENT >::DGEulerFaceReflectionElement(), oomph::DGScalarAdvectionFaceElement< ELEMENT >::DGScalarAdvectionFaceElement(), oomph::DummyFaceElement< ELEMENT >::DummyFaceElement(), oomph::ElasticAxisymmetricVolumeConstraintBoundingElement< ELEMENT >::ElasticAxisymmetricVolumeConstraintBoundingElement(), oomph::ElasticLineVolumeConstraintBoundingElement< ELEMENT >::ElasticLineVolumeConstraintBoundingElement(), oomph::ElasticSurfaceVolumeConstraintBoundingElement< ELEMENT >::ElasticSurfaceVolumeConstraintBoundingElement(), oomph::FaceElementAsGeomObject< ELEMENT >::FaceElementAsGeomObject(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::FourierDecomposedHelmholtzBCElementBase(), oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >::FourierDecomposedHelmholtzFluxElement(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement(), oomph::FourierDecomposedTimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::FourierDecomposedTimeHarmonicLinElastLoadedByHelmholtzPressureBCElement(), oomph::FpPressureAdvDiffRobinBCElement< ELEMENT >::FpPressureAdvDiffRobinBCElement(), oomph::FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElement< ELEMENT >::FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElement(), oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >::FpPressureAdvDiffRobinBCSpaceTimeElement(), oomph::FSIAxisymmetricLinearElasticityTractionElement< ELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::FSIAxisymmetricLinearElasticityTractionElement(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::FSIImposeDisplacementByLagrangeMultiplierElement(), oomph::HeatedPenetratorFluxElement< ELEMENT >::HeatedPenetratorFluxElement(), oomph::HelmholtzBCElementBase< ELEMENT >::HelmholtzBCElementBase(), oomph::HelmholtzFluxElement< ELEMENT >::HelmholtzFluxElement(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::HelmholtzFluxFromNormalDisplacementBCElement(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::ImposeDisplacementByLagrangeMultiplierElement(), oomph::ImposeImpenetrabilityElement< ELEMENT >::ImposeImpenetrabilityElement(), oomph::ImposeParallelOutflowElement< ELEMENT >::ImposeParallelOutflowElement(), TwoDDGProblem< ELEMENT >::limit(), oomph::LinearElasticityTractionElement< ELEMENT >::LinearElasticityTractionElement(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::LinearisedAxisymPoroelasticBJS_FSIElement(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::LinearisedFSIAxisymmetricNStNoSlipBCElementElement(), oomph::LinearWaveFluxElement< ELEMENT >::LinearWaveFluxElement(), oomph::NavierStokesFluxControlElement< ELEMENT >::NavierStokesFluxControlElement(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::NavierStokesImpedanceTractionElement(), oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::NavierStokesMixedOrderSpaceTimeTractionElement(), oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >::NavierStokesSpaceTimeTractionElement(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::NavierStokesSurfaceDragTorqueElement(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::NavierStokesSurfacePowerElement(), oomph::NavierStokesTractionElement< ELEMENT >::NavierStokesTractionElement(), oomph::PerturbedSpineLinearisedAxisymmetricFluidInterfaceElement< ELEMENT >::PerturbedSpineLinearisedAxisymmetricFluidInterfaceElement(), oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >::PMLFourierDecomposedHelmholtzFluxElement(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::PMLFourierDecomposedHelmholtzPowerMonitorElement(), oomph::PMLHelmholtzFluxElement< ELEMENT >::PMLHelmholtzFluxElement(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::PMLHelmholtzFluxFromNormalDisplacementBCElement(), oomph::PMLHelmholtzPowerElement< ELEMENT >::PMLHelmholtzPowerElement(), oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >::PMLTimeHarmonicLinearElasticityTractionElement(), oomph::PoissonFluxElement< ELEMENT >::PoissonFluxElement(), oomph::PolarNavierStokesTractionElement< ELEMENT >::PolarNavierStokesTractionElement(), oomph::PolarStreamfunctionTractionElement< ELEMENT >::PolarStreamfunctionTractionElement(), oomph::PolarStressIntegralElement< ELEMENT >::PolarStressIntegralElement(), oomph::PoroelasticityFaceElement< ELEMENT >::PoroelasticityFaceElement(), oomph::DGFaceElement::setup_neighbour_info(), oomph::SolidTractionElement< ELEMENT >::SolidTractionElement(), oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >::SphericalAdvectionDiffusionFluxElement(), oomph::SpineAxisymmetricVolumeConstraintBoundingElement< ELEMENT >::SpineAxisymmetricVolumeConstraintBoundingElement(), oomph::SpineLineVolumeConstraintBoundingElement< ELEMENT >::SpineLineVolumeConstraintBoundingElement(), oomph::SpineSurfaceVolumeConstraintBoundingElement< ELEMENT >::SpineSurfaceVolumeConstraintBoundingElement(), oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >::SteadyAxisymAdvectionDiffusionFluxElement(), oomph::SurfaceContactElementBase< ELEMENT >::SurfaceContactElementBase(), oomph::TimeHarmonicFourierDecomposedLinearElasticityTractionElement< ELEMENT >::TimeHarmonicFourierDecomposedLinearElasticityTractionElement(), oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >::TimeHarmonicLinearElasticityTractionElement(), oomph::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement(), oomph::UnsteadyHeatBaseFaceElement< ELEMENT >::UnsteadyHeatBaseFaceElement(), oomph::UnsteadyHeatFluxElement< ELEMENT >::UnsteadyHeatFluxElement(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::UnsteadyHeatFluxPseudoMeltElement(), and oomph::YoungLaplaceContactAngleElement< ELEMENT >::YoungLaplaceContactAngleElement().

◆ face_index() [2/2]

int oomph::FaceElement::face_index ( ) const
inline

Index of the face (a number that uniquely identifies the face in the element) (const version)

4634  {
4635  return Face_index;
4636  }

References Face_index.

◆ face_to_bulk_coordinate_fct_pt() [1/2]

◆ face_to_bulk_coordinate_fct_pt() [2/2]

CoordinateMappingFctPt oomph::FaceElement::face_to_bulk_coordinate_fct_pt ( ) const
inline

Return the pointer to the function that maps the face coordinate to the bulk coordinate (const version)

4763  {
4765  }

References Face_to_bulk_coordinate_fct_pt.

◆ get_ds_bulk_ds_face()

void oomph::FaceElement::get_ds_bulk_ds_face ( const Vector< double > &  s,
DenseMatrix< double > &  dsbulk_dsface,
unsigned interior_direction 
) const

Calculate the derivatives of the local coordinates in the bulk element with respect to the local coordinates in this FaceElement. In addition return the index of a bulk local coordinate that varies away from the face.

6412  {
6413  // Use the function pointer if it is set
6415  {
6416  // Call the translation function
6417  (*Bulk_coordinate_derivatives_fct_pt)(
6418  s, dsbulk_dsface, interior_direction);
6419  }
6420  // Otherwise throw an error
6421  else
6422  {
6423  throw OomphLibError(
6424  "No function for derivatives of bulk coords wrt face coords set",
6427  }
6428  }

References Bulk_coordinate_derivatives_fct_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by continuous_tangent_and_outer_unit_normal(), and outer_unit_normal().

◆ get_local_coordinate_in_bulk()

void oomph::FaceElement::get_local_coordinate_in_bulk ( const Vector< double > &  s,
Vector< double > &  s_bulk 
) const

Calculate the vector of local coordinate in the bulk element given the local coordinates in this FaceElement

Calculate the vector of local coordinates in bulk element, given the local coordinates in this FaceElement

6386  {
6387  // Use the function pointer if it is set
6389  {
6390  // Call the translation function
6391  (*Face_to_bulk_coordinate_fct_pt)(s, s_bulk);
6392  }
6393  // Otherwise use the existing (not general) interface
6394  else
6395  {
6396  throw OomphLibError("Face_to_bulk_coordinate mapping not set",
6399  }
6400  }

References Face_to_bulk_coordinate_fct_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by continuous_tangent_and_outer_unit_normal(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::drag_force(), oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::PointFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_kinetic_energy_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work_components(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::get_volume_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_volume_flux(), SCoupling< M, O >::getSCoupledElements(), TwoDDGProblem< ELEMENT >::limit(), oomph::Multi_domain_functions::locate_zeta_for_local_coordinates(), outer_unit_normal(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::output(), oomph::DGFaceElement::setup_neighbour_info(), and TFaceTestProblem< ELEMENT >::TFaceTestProblem().

◆ interpolated_dxdt() [1/2]

double oomph::FaceElement::interpolated_dxdt ( const Vector< double > &  s,
const unsigned i,
const unsigned t 
)
inlinevirtual

Return t-th time-derivative of the i-th FE-interpolated Eulerian coordinate at local coordinate s. Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4586  {
4587  // Local coordinates in bulk element
4588  Vector<double> s_bulk(dim() + 1);
4589  s_bulk = local_coordinate_in_bulk(s);
4590 
4591  // Return Eulerian coordinate as computed by bulk
4592  return bulk_element_pt()->interpolated_dxdt(s_bulk, i, t);
4593  }
Vector< double > local_coordinate_in_bulk(const Vector< double > &s) const
Definition: elements.cc:6353
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Definition: elements.h:4735
virtual double interpolated_dxdt(const Vector< double > &s, const unsigned &i, const unsigned &t)
Definition: elements.cc:4596
t
Definition: plotPSD.py:36

References bulk_element_pt(), oomph::FiniteElement::dim(), i, oomph::FiniteElement::interpolated_dxdt(), local_coordinate_in_bulk(), s, and plotPSD::t.

◆ interpolated_dxdt() [2/2]

void oomph::FaceElement::interpolated_dxdt ( const Vector< double > &  s,
const unsigned t,
Vector< double > &  dxdt 
)
inlinevirtual

Compte t-th time-derivative of the FE-interpolated Eulerian coordinate vector at local coordinate s. Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4601  {
4602  // Local coordinates in bulk element
4603  Vector<double> s_bulk(dim() + 1);
4604  s_bulk = local_coordinate_in_bulk(s);
4605 
4606  // Get Eulerian position vector
4607  bulk_element_pt()->interpolated_dxdt(s_bulk, t, dxdt);
4608  }

References bulk_element_pt(), oomph::FiniteElement::dim(), oomph::FiniteElement::interpolated_dxdt(), local_coordinate_in_bulk(), s, and plotPSD::t.

◆ interpolated_x() [1/4]

double oomph::FaceElement::interpolated_x ( const unsigned t,
const Vector< double > &  s,
const unsigned i 
) const
inlinevirtual

Return FE interpolated coordinate x[i] at local coordinate s at previous timestep t (t=0: present; t>0: previous timestep). Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4544  {
4545  // Local coordinates in bulk element
4546  Vector<double> s_bulk(dim() + 1);
4547  s_bulk = local_coordinate_in_bulk(s);
4548 
4549  // Return Eulerian coordinate as computed by bulk
4550  return bulk_element_pt()->interpolated_x(t, s_bulk, i);
4551  }
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 bulk_element_pt(), oomph::FiniteElement::dim(), i, oomph::FiniteElement::interpolated_x(), local_coordinate_in_bulk(), s, and plotPSD::t.

◆ interpolated_x() [2/4]

void oomph::FaceElement::interpolated_x ( const unsigned t,
const Vector< double > &  s,
Vector< double > &  x 
) const
inlinevirtual

Return FE interpolated position x[] at local coordinate s at previous timestep t as Vector (t=0: present; t>0: previous timestep). Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4571  {
4572  // Local coordinates in bulk element
4573  Vector<double> s_bulk(dim() + 1);
4574  s_bulk = local_coordinate_in_bulk(s);
4575 
4576  // Get Eulerian position vector
4577  bulk_element_pt()->interpolated_x(t, s_bulk, x);
4578  }
list x
Definition: plotDoE.py:28

References bulk_element_pt(), oomph::FiniteElement::dim(), oomph::FiniteElement::interpolated_x(), local_coordinate_in_bulk(), s, plotPSD::t, and plotDoE::x.

◆ interpolated_x() [3/4]

double oomph::FaceElement::interpolated_x ( const Vector< double > &  s,
const unsigned i 
) const
inlinevirtual

Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4529  {
4530  // Local coordinates in bulk element
4531  Vector<double> s_bulk(dim() + 1);
4532  s_bulk = local_coordinate_in_bulk(s);
4533 
4534  // Return Eulerian coordinate as computed by bulk
4535  return bulk_element_pt()->interpolated_x(s_bulk, i);
4536  }

References bulk_element_pt(), oomph::FiniteElement::dim(), i, oomph::FiniteElement::interpolated_x(), local_coordinate_in_bulk(), and s.

Referenced by oomph::SolubleSurfactantTransportInterfaceElement::add_additional_residual_contributions_interface(), oomph::BrickFromTetMesh< ELEMENT >::build_mesh(), FourierDecomposedHelmholtzProblem< ELEMENT >::check_gamma(), DarcyProblem< ELEMENT >::complete_problem_setup(), oomph::HelmholtzBCElementBase< ELEMENT >::compute_contribution_to_fourier_components(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_enclosed_volume(), oomph::LineVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::contribution_to_total_porous_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_total_porous_flux(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_volume_flux(), UnstructuredFluidProblem< ELEMENT >::doc_boundary_coordinates(), oomph::Mesh::doc_boundary_coordinates(), DarcyProblem< ELEMENT >::doc_shape_functions(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::doc_solid_boundary_coordinates(), UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::doc_solid_boundary_coordinates(), ContactProblem< ELEMENT >::doc_solution(), StefanBoltzmannProblem< ELEMENT >::doc_solution(), DiskShockWaveProblem< ELEMENT, TIMESTEPPER >::doc_solution(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::drag_force(), oomph::NavierStokesFluxControlElement< ELEMENT >::fill_in_generic_residual_contribution_fluid_traction(), oomph::FluidInterfaceElement::fill_in_generic_residual_contribution_interface(), oomph::PointFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::AxisymmetricVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::SurfaceVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_kinetic_energy_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work_components(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::get_volume_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_volume_flux(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_flux_contribution(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_helmholtz(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_solid(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::HelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::global_power_contribution(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_power_contribution(), oomph::SurfactantTransportInterfaceElement::integrate_c(), oomph::SolubleSurfactantTransportInterfaceElement::l2_norm_of_height(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::lagrangian_eulerian_translation_factor(), TwoDDGProblem< ELEMENT >::limit(), oomph::LinearisedAxisymmetricFluidInterfaceElement::output(), oomph::NonlinearSurfaceContactElement< ELEMENT >::output(), oomph::LinearSurfaceContactElement< ELEMENT >::output(), oomph::UnsteadyHeatBaseFaceElement< ELEMENT >::output(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::output(), oomph::SolubleSurfactantTransportInterfaceElement::output(), oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >::output(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::output(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::output(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::output(), oomph::FluidInterfaceElement::output(), oomph::SurfactantTransportInterfaceElement::output(), oomph::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::output(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::output(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::output(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::output(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), oomph::SolidTractionElement< ELEMENT >::output(), oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >::output(), oomph::PoissonFluxElement< ELEMENT >::output(), oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >::output(), oomph::SurfaceMeltElement< ELEMENT >::output_melt(), oomph::NavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::SpaceTimeNavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::output_stefan_boltzmann_radiation(), output_zeta(), oomph::DGFaceElement::report_info(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::scalar_value_paraview(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::set_boundary_values(), oomph::Multi_domain_functions::setup_bulk_elements_adjacent_to_face_mesh(), oomph::FourierDecomposedHelmholtzDtNMesh< ELEMENT >::setup_gamma(), oomph::HelmholtzDtNMesh< ELEMENT >::setup_gamma(), TFaceTestProblem< ELEMENT >::TFaceTestProblem(), and oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh().

◆ interpolated_x() [4/4]

void oomph::FaceElement::interpolated_x ( const Vector< double > &  s,
Vector< double > &  x 
) const
inlinevirtual

Return FE interpolated position x[] at local coordinate s as Vector Overloaded to get information from bulk.

Reimplemented from oomph::FiniteElement.

4556  {
4557  // Local coordinates in bulk element
4558  Vector<double> s_bulk(dim() + 1);
4559  s_bulk = local_coordinate_in_bulk(s);
4560 
4561  // Get Eulerian position vector
4562  bulk_element_pt()->interpolated_x(s_bulk, x);
4563  }

References bulk_element_pt(), oomph::FiniteElement::dim(), oomph::FiniteElement::interpolated_x(), local_coordinate_in_bulk(), s, and plotDoE::x.

◆ J_eulerian()

double oomph::FaceElement::J_eulerian ( const Vector< double > &  s) const
virtual

Return the Jacobian of mapping from local to global coordinates at local position s. Overloaded from FiniteElement.

Calculate the determinant of the Jacobian of the mapping between local and global coordinates at the position s. Overloaded from FiniteElement.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicFluxElement< DIM >.

5243  {
5244  // Find out the sptial dimension of the element
5245  unsigned n_dim_el = this->dim();
5246 
5247  // Bail out if we're in a point element -- not sure what
5248  // J_eulerian actually is, but this is harmless
5249  if (n_dim_el == 0) return 1.0;
5250 
5251  // Find out how many nodes there are
5252  unsigned n_node = nnode();
5253 
5254  // Find out how many positional dofs there are
5255  unsigned n_position_type = this->nnodal_position_type();
5256 
5257  // Find out the dimension of the node
5258  unsigned n_dim = this->nodal_dimension();
5259 
5260  // Set up memory for the shape functions
5261  Shape psi(n_node, n_position_type);
5262  DShape dpsids(n_node, n_position_type, n_dim_el);
5263 
5264  // Only need to call the local derivatives
5265  dshape_local(s, psi, dpsids);
5266 
5267  // Also calculate the surface Vectors (derivatives wrt local coordinates)
5268  DenseMatrix<double> interpolated_A(n_dim_el, n_dim, 0.0);
5269 
5270  // Calculate positions and derivatives
5271  for (unsigned l = 0; l < n_node; l++)
5272  {
5273  // Loop over positional dofs
5274  for (unsigned k = 0; k < n_position_type; k++)
5275  {
5276  // Loop over coordinates
5277  for (unsigned i = 0; i < n_dim; i++)
5278  {
5279  // Loop over LOCAL derivative directions, to calculate the tangent(s)
5280  for (unsigned j = 0; j < n_dim_el; j++)
5281  {
5282  interpolated_A(j, i) +=
5283  nodal_position_gen(l, bulk_position_type(k), i) * dpsids(l, k, j);
5284  }
5285  }
5286  }
5287  }
5288  // Now find the local deformed metric tensor from the tangent Vectors
5289  DenseMatrix<double> A(n_dim_el, n_dim_el, 0.0);
5290  for (unsigned i = 0; i < n_dim_el; i++)
5291  {
5292  for (unsigned j = 0; j < n_dim_el; j++)
5293  {
5294  // Take the dot product
5295  for (unsigned k = 0; k < n_dim; k++)
5296  {
5297  A(i, j) += interpolated_A(i, k) * interpolated_A(j, k);
5298  }
5299  }
5300  }
5301 
5302  // Find the determinant of the metric tensor
5303  double Adet = 0.0;
5304  switch (n_dim_el)
5305  {
5306  case 1:
5307  Adet = A(0, 0);
5308  break;
5309  case 2:
5310  Adet = A(0, 0) * A(1, 1) - A(0, 1) * A(1, 0);
5311  break;
5312  default:
5313  throw OomphLibError("Wrong dimension in FaceElement",
5314  "FaceElement::J_eulerian()",
5316  }
5317 
5318  // Return
5319  return sqrt(Adet);
5320  }

References bulk_position_type(), oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local(), i, j, k, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_position_gen(), OOMPH_EXCEPTION_LOCATION, s, and sqrt().

Referenced by oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::add_element_contribution_to_aux_integral(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::d_shape_and_test_local(), oomph::HelmholtzBCElementBase< ELEMENT >::d_shape_and_test_local(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::d_shape_and_test_local(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::drag_force(), oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_kinetic_energy_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work_components(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::get_volume_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_volume_flux(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_flux_contribution(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_helmholtz(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_solid(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::HelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::global_power_contribution(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_power_contribution(), oomph::SolubleSurfactantTransportInterfaceElement::integrated_C(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), oomph::UnsteadyHeatBaseFaceElement< ELEMENT >::shape_and_test(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::shape_and_test(), oomph::AdvectionDiffusionFluxElement< ELEMENT >::shape_and_test(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::shape_and_test(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::shape_and_test(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::shape_and_test(), oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >::shape_and_test(), oomph::HelmholtzFluxElement< ELEMENT >::shape_and_test(), oomph::LinearWaveFluxElement< ELEMENT >::shape_and_test(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test(), oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >::shape_and_test(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::shape_and_test(), oomph::PMLHelmholtzFluxElement< ELEMENT >::shape_and_test(), oomph::PoissonFluxElement< ELEMENT >::shape_and_test(), oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >::shape_and_test(), oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >::shape_and_test(), oomph::UnsteadyHeatFluxElement< ELEMENT >::shape_and_test(), and oomph::HelmholtzBCElementBase< ELEMENT >::test_only().

◆ J_eulerian_at_knot()

double oomph::FaceElement::J_eulerian_at_knot ( const unsigned ipt) const
virtual

Return the Jacobian of the mapping from local to global coordinates at the ipt-th integration point Overloaded from FiniteElement.

Compute the Jacobian of the mapping between the local and global coordinates at the ipt-th integration point. Overloaded from FiniteElement.

Reimplemented from oomph::FiniteElement.

5329  {
5330  // Find the number of nodes
5331  const unsigned n_node = nnode();
5332 
5333  // Find the number of position types
5334  const unsigned n_position_type = nnodal_position_type();
5335 
5336  // Find the dimension of the node and element
5337  const unsigned n_dim = nodal_dimension();
5338  const unsigned n_dim_el = dim();
5339 
5340  // Set up dummy memory for the shape functions
5341  Shape psi(n_node, n_position_type);
5342  DShape dpsids(n_node, n_position_type, n_dim_el);
5343 
5344  // Get the shape functions and local derivatives at the knot
5345  // This call may use the stored versions, which is why this entire
5346  // function doesn't just call J_eulerian(s), after reading out s from
5347  // the knots.
5348  dshape_local_at_knot(ipt, psi, dpsids);
5349 
5350  // Also calculate the surface Vectors (derivatives wrt local coordinates)
5351  DenseMatrix<double> interpolated_A(n_dim_el, n_dim, 0.0);
5352 
5353  // Calculate positions and derivatives
5354  for (unsigned l = 0; l < n_node; l++)
5355  {
5356  // Loop over positional dofs
5357  for (unsigned k = 0; k < n_position_type; k++)
5358  {
5359  // Loop over coordinates
5360  for (unsigned i = 0; i < n_dim; i++)
5361  {
5362  // Loop over LOCAL derivative directions, to calculate the tangent(s)
5363  for (unsigned j = 0; j < n_dim_el; j++)
5364  {
5365  interpolated_A(j, i) +=
5366  nodal_position_gen(l, bulk_position_type(k), i) * dpsids(l, k, j);
5367  }
5368  }
5369  }
5370  }
5371 
5372  // Now find the local deformed metric tensor from the tangent Vectors
5373  DenseMatrix<double> A(n_dim_el, n_dim_el, 0.0);
5374  for (unsigned i = 0; i < n_dim_el; i++)
5375  {
5376  for (unsigned j = 0; j < n_dim_el; j++)
5377  {
5378  // Take the dot product
5379  for (unsigned k = 0; k < n_dim; k++)
5380  {
5381  A(i, j) += interpolated_A(i, k) * interpolated_A(j, k);
5382  }
5383  }
5384  }
5385 
5386  // Find the determinant of the metric tensor
5387  double Adet = 0.0;
5388  switch (n_dim_el)
5389  {
5390  case 1:
5391  Adet = A(0, 0);
5392  break;
5393  case 2:
5394  Adet = A(0, 0) * A(1, 1) - A(0, 1) * A(1, 0);
5395  break;
5396  default:
5397  throw OomphLibError("Wrong dimension in FaceElement",
5398  "FaceElement::J_eulerian_at_knot()",
5400  }
5401 
5402  // Return
5403  return sqrt(Adet);
5404  }

References bulk_position_type(), oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local_at_knot(), i, j, k, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_position_gen(), OOMPH_EXCEPTION_LOCATION, and sqrt().

Referenced by oomph::DGFaceElement::add_flux_contributions(), oomph::ImposeImpenetrabilityElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::ImposeParallelOutflowElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), oomph::PolarStreamfunctionTractionElement< ELEMENT >::shape_and_test_at_knot(), oomph::NavierStokesFluxControlElement< ELEMENT >::shape_and_test_at_knot(), oomph::AdvectionDiffusionFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::shape_and_test_at_knot(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::shape_and_test_at_knot(), oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::HelmholtzFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test_at_knot(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test_at_knot(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::shape_and_test_at_knot(), oomph::NavierStokesTractionElement< ELEMENT >::shape_and_test_at_knot(), oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::PMLHelmholtzFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::PoissonFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::PolarNavierStokesTractionElement< ELEMENT >::shape_and_test_at_knot(), oomph::PolarStressIntegralElement< ELEMENT >::shape_and_test_at_knot(), oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >::shape_and_test_at_knot(), oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::shape_and_test_at_knot(), oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >::shape_and_test_at_knot(), oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >::shape_and_test_at_knot(), and oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::shape_and_test_at_knot().

◆ local_coordinate_in_bulk()

Vector< double > oomph::FaceElement::local_coordinate_in_bulk ( const Vector< double > &  s) const

Return vector of local coordinates in bulk element, given the local coordinates in this FaceElement

6355  {
6356  // Find the dimension of the bulk element
6357  unsigned dim_bulk = Bulk_element_pt->dim();
6358 
6359  // Vector of local coordinates in bulk element
6360  Vector<double> s_bulk(dim_bulk);
6361 
6362  // Use the function pointer if it is set
6364  {
6365  // Call the translation function
6366  (*Face_to_bulk_coordinate_fct_pt)(s, s_bulk);
6367  }
6368  else
6369  {
6370  throw OomphLibError("Face_to_bulk_coordinate mapping not set",
6373  }
6374 
6375  // Return it
6376  return s_bulk;
6377  }

References Bulk_element_pt, oomph::FiniteElement::dim(), Face_to_bulk_coordinate_fct_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::contribution_to_total_porous_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_total_porous_flux(), RefineableYoungLaplaceProblem< ELEMENT >::doc_solution(), oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_flux_contribution(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_helmholtz(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_solid(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::HelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::global_power_contribution(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_power_contribution(), interpolated_dxdt(), interpolated_x(), oomph::SolidFaceElement::interpolated_xi(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::lagrangian_eulerian_translation_factor(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::output(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::output(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::output(), and oomph::ClampedHermiteShellBoundaryConditionElement::output().

◆ nbulk_value() [1/2]

unsigned& oomph::FaceElement::nbulk_value ( const unsigned n)
inline

Return the number of values originally stored at local node n (before the FaceElement added additional values to it (if it did))

4846  {
4847  return Nbulk_value[n];
4848  }
Vector< unsigned > Nbulk_value
Definition: elements.h:4413

References n, and Nbulk_value.

Referenced by oomph::FiniteElement::build_face_element(), oomph::QHermiteElement< DIM >::build_face_element(), oomph::QSpectralElement< 1, NNODE_1D >::build_face_element(), oomph::QSpectralElement< 2, NNODE_1D >::build_face_element(), oomph::TBubbleEnrichedElement< DIM, NNODE_1D >::build_face_element(), oomph::TElement< 1, NNODE_1D >::build_face_element(), oomph::TElement< 2, NNODE_1D >::build_face_element(), oomph::TElement< 3, NNODE_1D >::build_face_element(), ContactProblem< ELEMENT >::create_displ_imposition_elements(), UnstructuredTorusProblem< ELEMENT >::create_lagrange_multiplier_elements(), FSICollapsibleChannelProblem< ELEMENT >::create_lagrange_multiplier_elements(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_lagrange_multiplier_elements(), FSIChannelWithLeafletProblem< ELEMENT >::create_lagrange_multiplier_elements(), UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_lagrange_multiplier_elements(), PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements(), UnstructuredImmersedEllipseProblem< ELEMENT >::create_lagrange_multiplier_elements(), UnstructuredFluidProblem< ELEMENT >::create_lagrange_multiplier_elements(), CollapsibleChannelProblem< ELEMENT >::create_lagrange_multiplier_elements(), TiltedCavityProblem< ELEMENT >::create_parall_outflow_lagrange_elements(), and oomph::FixedVolumeSpineLineMarangoniFluidInterfaceElement< ELEMENT >::make_bounding_element().

◆ nbulk_value() [2/2]

unsigned oomph::FaceElement::nbulk_value ( const unsigned n) const
inline

Return the number of values originally stored at local node n (before the FaceElement added additional values to it (if it did)) (const version)

4854  {
4855  return Nbulk_value[n];
4856  }

References n, and Nbulk_value.

◆ nbulk_value_resize()

◆ normal_sign() [1/2]

◆ normal_sign() [2/2]

int oomph::FaceElement::normal_sign ( ) const
inline

Return sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" element. (const version)

4620  {
4621  return Normal_sign;
4622  }

References Normal_sign.

◆ outer_unit_normal() [1/2]

void oomph::FaceElement::outer_unit_normal ( const unsigned ipt,
Vector< double > &  unit_normal 
) const

Compute outer unit normal at ipt-th integration point.

Compute the outer unit normal at the ipt-th integration point.

6335  {
6336  // Find the dimension of the element
6337  const unsigned element_dim = dim();
6338  // Find the local coordiantes of the ipt-th integration point
6339  Vector<double> s(element_dim);
6340  for (unsigned i = 0; i < element_dim; i++)
6341  {
6342  s[i] = integral_pt()->knot(ipt, i);
6343  }
6344  // Call the outer unit normal function
6345  outer_unit_normal(s, unit_normal);
6346  }
void outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
Definition: elements.cc:6006

References oomph::FiniteElement::dim(), i, oomph::FiniteElement::integral_pt(), oomph::Integral::knot(), outer_unit_normal(), and s.

◆ outer_unit_normal() [2/2]

void oomph::FaceElement::outer_unit_normal ( const Vector< double > &  s,
Vector< double > &  unit_normal 
) const

Compute outer unit normal at the specified local coordinate.

Compute the outer unit normal at the specified local coordinate.

6008  {
6009  // Find the spatial dimension of the FaceElement
6010  const unsigned element_dim = dim();
6011 
6012  // Find the overall dimension of the problem
6013  //(assume that it's the same for all nodes)
6014  const unsigned spatial_dim = nodal_dimension();
6015 
6016 #ifdef PARANOID
6017  // Check the number of local coordinates passed
6018  if (s.size() != element_dim)
6019  {
6020  std::ostringstream error_stream;
6021  error_stream
6022  << "Local coordinate s passed to outer_unit_normal() has dimension "
6023  << s.size() << std::endl
6024  << "but element dimension is " << element_dim << std::endl;
6025 
6026  throw OomphLibError(
6027  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
6028  }
6029 
6030  // Check the dimension of the normal vector
6031  if (unit_normal.size() != spatial_dim)
6032  {
6033  std::ostringstream error_stream;
6034  error_stream << "Unit normal passed to outer_unit_normal() has dimension "
6035  << unit_normal.size() << std::endl
6036  << "but spatial dimension is " << spatial_dim << std::endl;
6037 
6038  throw OomphLibError(
6039  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
6040  }
6041 #endif
6042 
6043  /* //The spatial dimension of the bulk element will be element_dim+1
6044  const unsigned bulk_dim = element_dim + 1;
6045 
6046  //Find the number of nodes in the bulk element
6047  const unsigned n_node_bulk = Bulk_element_pt->nnode();
6048  //Find the number of position types in the bulk element
6049  const unsigned n_position_type_bulk =
6050  Bulk_element_pt->nnodal_position_type();
6051 
6052  //Construct the local coordinate in the bulk element
6053  Vector<double> s_bulk(bulk_dim);
6054  //Set the value of the bulk coordinate that is fixed on the face
6055  //s_bulk[s_fixed_index()] = s_fixed_value();
6056 
6057  //Set the other bulk coordinates
6058  //for(unsigned i=0;i<element_dim;i++) {s_bulk[bulk_s_index(i)] = s[i];}
6059 
6060  get_local_coordinate_in_bulk(s,s_bulk);
6061 
6062  //Allocate storage for the shape functions and their derivatives wrt
6063  //local coordinates
6064  Shape psi(n_node_bulk,n_position_type_bulk);
6065  DShape dpsids(n_node_bulk,n_position_type_bulk,bulk_dim);
6066  //Get the value of the shape functions at the given local coordinate
6067  Bulk_element_pt->dshape_local(s_bulk,psi,dpsids);
6068 
6069  //Calculate all derivatives of the spatial coordinates wrt local
6070  coordinates DenseMatrix<double> interpolated_dxds(bulk_dim,spatial_dim);
6071  //Initialise to zero
6072  for(unsigned j=0;j<bulk_dim;j++)
6073  {for(unsigned i=0;i<spatial_dim;i++) {interpolated_dxds(j,i) = 0.0;}}
6074 
6075  //Loop over all parent nodes
6076  for(unsigned l=0;l<n_node_bulk;l++)
6077  {
6078  //Loop over all position types in the bulk
6079  for(unsigned k=0;k<n_position_type_bulk;k++)
6080  {
6081  //Loop over derivative direction
6082  for(unsigned j=0;j<bulk_dim;j++)
6083  {
6084  //Loop over coordinate directions
6085  for(unsigned i=0;i<spatial_dim;i++)
6086  {
6087  //Compute the spatial derivative
6088  interpolated_dxds(j,i) +=
6089  Bulk_element_pt->nodal_position_gen(l,k,i)*dpsids(l,k,j);
6090  }
6091  }
6092  }
6093  }*/
6094 
6095  // Now let's consider the different element dimensions
6096  switch (element_dim)
6097  {
6098  // Point element, derived from a 1D element, in this case
6099  // the normal is merely the tangent to the bulk element
6100  // and there is only one free coordinate in the bulk element
6101  // Hence we will need to calculate the derivatives wrt the
6102  // local coordinates in the BULK element.
6103  case 0:
6104  {
6105  // Find the number of nodes in the bulk element
6106  const unsigned n_node_bulk = Bulk_element_pt->nnode();
6107  // Find the number of position types in the bulk element
6108  const unsigned n_position_type_bulk =
6110 
6111  // Construct the local coordinate in the bulk element
6112  Vector<double> s_bulk(1);
6113 
6114  // Get the local coordinates in the bulk element
6116 
6117  // Allocate storage for the shape functions and their derivatives wrt
6118  // local coordinates
6119  Shape psi(n_node_bulk, n_position_type_bulk);
6120  DShape dpsids(n_node_bulk, n_position_type_bulk, 1);
6121  // Get the value of the shape functions at the given local coordinate
6122  Bulk_element_pt->dshape_local(s_bulk, psi, dpsids);
6123 
6124  // Calculate all derivatives of the spatial coordinates wrt
6125  // local coordinates
6126  DenseMatrix<double> interpolated_dxds(1, spatial_dim, 0.0);
6127 
6128  // Loop over all parent nodes
6129  for (unsigned l = 0; l < n_node_bulk; l++)
6130  {
6131  // Loop over all position types in the bulk
6132  for (unsigned k = 0; k < n_position_type_bulk; k++)
6133  {
6134  // Loop over coordinate directions
6135  for (unsigned i = 0; i < spatial_dim; i++)
6136  {
6137  // Compute the spatial derivative
6138  interpolated_dxds(0, i) +=
6139  Bulk_element_pt->nodal_position_gen(l, k, i) * dpsids(l, k, 0);
6140  }
6141  }
6142  }
6143 
6144  // Now the unit normal is just the derivative of the position vector
6145  // with respect to the single coordinate
6146  for (unsigned i = 0; i < spatial_dim; i++)
6147  {
6148  unit_normal[i] = interpolated_dxds(0, i);
6149  }
6150  }
6151  break;
6152 
6153  // Line element, derived from a 2D element, in this case
6154  // the normal is a mess of cross products
6155  // We need an interior direction, so we must find the local
6156  // derivatives in the BULK element
6157  case 1:
6158  {
6159  // Find the number of nodes in the bulk element
6160  const unsigned n_node_bulk = Bulk_element_pt->nnode();
6161  // Find the number of position types in the bulk element
6162  const unsigned n_position_type_bulk =
6164 
6165  // Construct the local coordinate in the bulk element
6166  Vector<double> s_bulk(2);
6167  // Get the local coordinates in the bulk element
6169 
6170  // Allocate storage for the shape functions and their derivatives wrt
6171  // local coordinates
6172  Shape psi(n_node_bulk, n_position_type_bulk);
6173  DShape dpsids(n_node_bulk, n_position_type_bulk, 2);
6174  // Get the value of the shape functions at the given local coordinate
6175  Bulk_element_pt->dshape_local(s_bulk, psi, dpsids);
6176 
6177  // Calculate all derivatives of the spatial coordinates
6178  // wrt local coordinates
6179  DenseMatrix<double> interpolated_dxds(2, spatial_dim, 0.0);
6180 
6181  // Loop over all parent nodes
6182  for (unsigned l = 0; l < n_node_bulk; l++)
6183  {
6184  // Loop over all position types in the bulk
6185  for (unsigned k = 0; k < n_position_type_bulk; k++)
6186  {
6187  // Loop over derivative direction
6188  for (unsigned j = 0; j < 2; j++)
6189  {
6190  // Loop over coordinate directions
6191  for (unsigned i = 0; i < spatial_dim; i++)
6192  {
6193  // Compute the spatial derivative
6194  interpolated_dxds(j, i) +=
6196  dpsids(l, k, j);
6197  }
6198  }
6199  }
6200  }
6201 
6202  // Initialise the tangent, interior tangent and normal vectors to zero
6203  // The idea is that even if the element is in a two-dimensional space,
6204  // the normal cannot be calculated without embedding the element in
6205  // three dimensions, in which case, the tangent and interior tangent
6206  // will have zero z-components.
6207  Vector<double> tangent(3, 0.0), interior_tangent(3, 0.0),
6208  normal(3, 0.0);
6209 
6210  // We must get the relationship between the coordinate along the face
6211  // and the local coordinates in the bulk element
6212  // We must also find an interior direction
6213  DenseMatrix<double> dsbulk_dsface(2, 1, 0.0);
6214  unsigned interior_direction = 0;
6215  get_ds_bulk_ds_face(s, dsbulk_dsface, interior_direction);
6216  // Load in the values for the tangents
6217  for (unsigned i = 0; i < spatial_dim; i++)
6218  {
6219  // Tangent to the face is the derivative wrt to the face coordinate
6220  // which is calculated using dsbulk_dsface and the chain rule
6221  tangent[i] = interpolated_dxds(0, i) * dsbulk_dsface(0, 0) +
6222  interpolated_dxds(1, i) * dsbulk_dsface(1, 0);
6223  // Interior tangent to the face is the derivative in the interior
6224  // direction
6225  interior_tangent[i] = interpolated_dxds(interior_direction, i);
6226  }
6227 
6228  // Now the (3D) normal to the element is the interior tangent
6229  // crossed with the tangent
6230  VectorHelpers::cross(interior_tangent, tangent, normal);
6231 
6232  // We find the line normal by crossing the element normal with the
6233  // tangent
6234  Vector<double> full_normal(3);
6235  VectorHelpers::cross(normal, tangent, full_normal);
6236 
6237  // Copy the appropriate entries into the unit normal
6238  // Two or Three depending upon the spatial dimension of the system
6239  for (unsigned i = 0; i < spatial_dim; i++)
6240  {
6241  unit_normal[i] = full_normal[i];
6242  }
6243  }
6244  break;
6245 
6246  // Plane element, derived from 3D element, in this case the normal
6247  // is just the cross product of the two surface tangents
6248  // We assume, therefore, that we have three spatial coordinates
6249  // and two surface coordinates
6250  // Then we need only to get the derivatives wrt the local coordinates
6251  // in this face element
6252  case 2:
6253  {
6254 #ifdef PARANOID
6255  // Check that we actually have three spatial dimensions
6256  if (spatial_dim != 3)
6257  {
6258  std::ostringstream error_stream;
6259  error_stream << "There are only " << spatial_dim
6260  << "coordinates at the nodes of this 2D FaceElement,\n"
6261  << "which must have come from a 3D Bulk element\n";
6262  throw OomphLibError(error_stream.str(),
6265  }
6266 #endif
6267 
6268  // Find the number of nodes in the element
6269  const unsigned n_node = this->nnode();
6270  // Find the number of position types
6271  const unsigned n_position_type = this->nnodal_position_type();
6272 
6273  // Allocate storage for the shape functions and their derivatives wrt
6274  // local coordinates
6275  Shape psi(n_node, n_position_type);
6276  DShape dpsids(n_node, n_position_type, 2);
6277  // Get the value of the shape functions at the given local coordinate
6278  this->dshape_local(s, psi, dpsids);
6279 
6280  // Calculate all derivatives of the spatial coordinates
6281  // wrt local coordinates
6282  Vector<Vector<double>> interpolated_dxds(2, Vector<double>(3, 0));
6283 
6284  // Loop over all nodes
6285  for (unsigned l = 0; l < n_node; l++)
6286  {
6287  // Loop over all position types
6288  for (unsigned k = 0; k < n_position_type; k++)
6289  {
6290  // Loop over derivative directions
6291  for (unsigned j = 0; j < 2; j++)
6292  {
6293  // Loop over coordinate directions
6294  for (unsigned i = 0; i < 3; i++)
6295  {
6296  // Compute the spatial derivative
6297  // Remember that we need to translate the position type
6298  // to its location in the bulk node
6299  interpolated_dxds[j][i] +=
6301  dpsids(l, k, j);
6302  }
6303  }
6304  }
6305  }
6306 
6307  // We now take the cross product of the two normal vectors
6309  interpolated_dxds[0], interpolated_dxds[1], unit_normal);
6310  }
6311  break;
6312 
6313  default:
6314 
6315  throw OomphLibError(
6316  "Cannot have a FaceElement with dimension higher than 2",
6319  break;
6320  }
6321 
6322  // Finally normalise unit normal
6323  double length = VectorHelpers::magnitude(unit_normal);
6324  for (unsigned i = 0; i < spatial_dim; i++)
6325  {
6326  unit_normal[i] *= Normal_sign / length;
6327  }
6328  }

References Bulk_element_pt, bulk_position_type(), oomph::VectorHelpers::cross(), oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local(), get_ds_bulk_ds_face(), get_local_coordinate_in_bulk(), i, j, k, oomph::VectorHelpers::magnitude(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_position_gen(), WallFunction::normal(), Normal_sign, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::add_element_contribution_to_aux_integral(), DarcyProblem< ELEMENT >::complete_problem_setup(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_enclosed_volume(), oomph::LineVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::contribution_to_total_porous_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_total_porous_flux(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_volume_flux(), DarcyProblem< ELEMENT >::doc_shape_functions(), StefanBoltzmannProblem< ELEMENT >::doc_solution(), DiskShockWaveProblem< ELEMENT, TIMESTEPPER >::doc_solution(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::drag_force(), oomph::ImposeImpenetrabilityElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::NavierStokesFluxControlElement< ELEMENT >::fill_in_generic_residual_contribution_fluid_traction(), oomph::FluidInterfaceElement::fill_in_generic_residual_contribution_interface(), oomph::PointFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::AxisymmetricVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_kinetic_energy_flux(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::get_pressure(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_rate_of_traction_work_components(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::get_traction(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::get_volume_flux(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::get_volume_flux(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_flux_contribution(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_helmholtz(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::global_flux_contribution_from_solid(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::HelmholtzBCElementBase< ELEMENT >::global_power_contribution(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::global_power_contribution(), oomph::PMLHelmholtzPowerElement< ELEMENT >::global_power_contribution(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::lagrangian_eulerian_translation_factor(), oomph::DGFaceElement::numerical_flux_at_knot(), outer_unit_normal(), oomph::NonlinearSurfaceContactElement< ELEMENT >::output(), oomph::LinearSurfaceContactElement< ELEMENT >::output(), oomph::UnsteadyHeatBaseFaceElement< ELEMENT >::output(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::output(), oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >::output(), oomph::FSIAxisymmetricLinearElasticityTractionElement< ELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::output(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::output(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::output(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::output(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::output(), oomph::SurfactantTransportInterfaceElement::output(), oomph::FourierDecomposedTimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::output(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::output(), oomph::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::output(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::output(), oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >::output(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::output(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::output(), oomph::SolidTractionElement< ELEMENT >::output(), oomph::FSISolidTractionElement< ELEMENT, DIM >::output(), oomph::SolarRadiationBase::output_atmospheric_radiation(), oomph::SolarRadiationBase::output_limiting_angles(), oomph::SurfaceMeltElement< ELEMENT >::output_melt(), oomph::NavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::SpaceTimeNavierStokesEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::output_pressure_advection_diffusion_robin_elements(), oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::output_stefan_boltzmann_radiation(), oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::refineable_fill_in_generic_residual_contribution_fluid_traction(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::scalar_value_paraview(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::set_boundary_values(), oomph::StefanBoltzmannHelper::setup_stefan_boltzmann_visibility(), TFaceTestProblem< ELEMENT >::TFaceTestProblem(), and oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh().

◆ output_zeta()

void oomph::FaceElement::output_zeta ( std::ostream &  outfile,
const unsigned nplot 
)

Output boundary coordinate zeta.

5201  {
5202  // Vector of local coordinates
5203  unsigned n_dim = dim();
5204  Vector<double> s(n_dim);
5205 
5206  // Tecplot header info
5207  outfile << tecplot_zone_string(nplot);
5208 
5209  // Loop over plot points
5210  unsigned num_plot_points = nplot_points(nplot);
5211  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
5212  {
5213  // Get local coordinates of plot point
5214  get_s_plot(iplot, nplot, s);
5215 
5216  // Spatial coordinates are one higher
5217  for (unsigned i = 0; i < n_dim + 1; i++)
5218  {
5219  outfile << interpolated_x(s, i) << " ";
5220  }
5221 
5222  // Boundary coordinate
5223  Vector<double> zeta(n_dim);
5225  for (unsigned i = 0; i < n_dim; i++)
5226  {
5227  outfile << zeta[i] << " ";
5228  }
5229  outfile << std::endl;
5230  }
5231 
5232  // Write tecplot footer (e.g. FE connectivity lists)
5233  write_tecplot_zone_footer(outfile, nplot);
5234  }
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
void interpolated_zeta(const Vector< double > &s, Vector< double > &zeta) const
Definition: elements.cc:4675
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152

References oomph::FiniteElement::dim(), oomph::FiniteElement::get_s_plot(), i, interpolated_x(), oomph::FiniteElement::interpolated_zeta(), oomph::FiniteElement::nplot_points(), s, oomph::FiniteElement::tecplot_zone_string(), oomph::FiniteElement::write_tecplot_zone_footer(), and Eigen::zeta().

◆ resize_nodes()

void oomph::FaceElement::resize_nodes ( Vector< unsigned > &  nadditional_data_values)
inline

Provide additional storage for a specified number of values at the nodes of the FaceElement. (This is needed, for instance, in free-surface elements, if the non-penetration condition is imposed by Lagrange multipliers whose values are only stored at the surface nodes but not in the interior of the bulk element). nadditional_data_values[n] specifies the number of additional values required at node n of the FaceElement. Note: Since this function is executed separately for each FaceElement, nodes that are common to multiple elements might be resized repeatedly. To avoid this, we only allow a single resize operation by comparing the number of values stored at each node to the number of values the node had when it was simply a member of the associated "bulk" element. There are cases where this will break! – e.g. if a node is common to two FaceElements which require additional storage for distinct quantities. Such cases need to be handled by "hand-crafted" face elements.

4883  {
4884  // Locally cache the number of node
4885  unsigned n_node = nnode();
4886  // Resize the storage for values at the nodes:
4887  for (unsigned l = 0; l < n_node; l++)
4888  {
4889  // Find number of values stored at the node
4890  unsigned Initial_Nvalue = node_pt(l)->nvalue();
4891  // Read out the number of additional values
4892  unsigned Nadditional = nadditional_data_values[l];
4893  // If the node has not already been resized, resize it
4894  if ((Initial_Nvalue == Nbulk_value[l]) && (Nadditional > 0))
4895  {
4896  // Resize the node according to the number of additional values
4897  node_pt(l)->resize(Nbulk_value[l] + Nadditional);
4898  }
4899  } // End of loop over nodes
4900  }
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
void resize(const unsigned &n_value)
Resize the number of equations.
Definition: nodes.cc:2167

References Nbulk_value, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), and oomph::Node::resize().

Referenced by oomph::ClampedHermiteShellBoundaryConditionElement::ClampedHermiteShellBoundaryConditionElement(), and oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::ClampedSlidingHermiteBeamBoundaryConditionElement().

◆ set_boundary_number_in_bulk_mesh()

void oomph::FaceElement::set_boundary_number_in_bulk_mesh ( const unsigned b)
inline

Set function for the boundary number in bulk mesh.

4483  {
4485 #ifdef PARANOID
4486  Boundary_number_in_bulk_mesh_has_been_set = true;
4487 #endif
4488  }

References b, and Boundary_number_in_bulk_mesh.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_distribute(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::build_mesh(), oomph::BrickFromTetMesh< ELEMENT >::build_mesh(), PressureWaveFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fluid_traction_elements(), PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements(), AxisymmetricVibratingShellProblem< ELEMENT >::create_free_surface_elements(), VibratingShellProblem< ELEMENT >::create_free_surface_elements(), TwoLayerInterfaceProblem< ELEMENT >::create_free_surface_elements(), RisingBubbleProblem< ELEMENT >::create_free_surface_elements(), BubbleInChannelProblem< ELEMENT >::create_free_surface_elements(), DropInChannelProblem< ELEMENT >::create_free_surface_elements(), CoatedDiskProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_fsi_traction_elements(), CoatedSphereProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_fsi_traction_elements(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements(), UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements(), CoatedDiskProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_helmholtz_fsi_flux_elements(), CoatedSphereProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_helmholtz_fsi_flux_elements(), CoatedDiskProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_solid_traction_elements(), CoatedSphereProblem< ELASTICITY_ELEMENT, HELMHOLTZ_ELEMENT >::create_solid_traction_elements(), PressureWaveFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_solid_traction_elements(), AnnularDiskProblem< ELASTICITY_ELEMENT >::create_traction_elements(), RingWithTRibProblem< ELASTICITY_ELEMENT >::create_traction_elements(), oomph::Mesh::doc_boundary_coordinates(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::generic_actions_after(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::Multi_domain_functions::setup_bulk_elements_adjacent_to_face_mesh(), oomph::RefineableTetgenMesh< ELEMENT >::snap_nodes_onto_boundary(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem(), and oomph::RefineableTetgenMesh< ELEMENT >::update_faceted_surface_using_face_mesh().

◆ set_tangent_direction()

void oomph::FaceElement::set_tangent_direction ( Vector< double > *  tangent_direction_pt)
inline

Set the tangent direction vector.

4646  {
4647 #ifdef PARANOID
4648  // Check that tangent_direction_pt is not null.
4649  if (tangent_direction_pt == 0)
4650  {
4651  std::ostringstream error_message;
4652  error_message << "The pointer tangent_direction_pt is null.\n";
4653  throw OomphLibError(error_message.str(),
4656  }
4657 
4658  // Check that the vector is the correct size.
4659  // The size of the tangent vector.
4660  unsigned tang_dir_size = tangent_direction_pt->size();
4661  unsigned spatial_dimension = this->nodal_dimension();
4662  if (tang_dir_size != spatial_dimension)
4663  {
4664  std::ostringstream error_message;
4665  error_message << "The tangent direction vector has size "
4666  << tang_dir_size << "\n"
4667  << "but this element has spatial dimension "
4668  << spatial_dimension << ".\n";
4669  throw OomphLibError(error_message.str(),
4672  }
4673 
4674  if (tang_dir_size == 2)
4675  {
4676  std::ostringstream warning_message;
4677  warning_message
4678  << "The spatial dimension is " << spatial_dimension << ".\n"
4679  << "I do not need a tangent direction vector to create \n"
4680  << "continuous tangent vectors in two spatial dimensions.";
4681  OomphLibWarning(warning_message.str(),
4684  }
4685 #endif
4686 
4687  // Set the direction vector for the tangent.
4689  }
const Vector< double > * tangent_direction_pt() const
Public access function for the tangent direction pointer.
Definition: elements.h:4639

References oomph::FiniteElement::nodal_dimension(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Tangent_direction_pt, and tangent_direction_pt().

◆ tangent_direction_pt()

const Vector<double>* oomph::FaceElement::tangent_direction_pt ( ) const
inline

Public access function for the tangent direction pointer.

4640  {
4641  return Tangent_direction_pt;
4642  }

References Tangent_direction_pt.

Referenced by set_tangent_direction().

◆ turn_off_warning_for_discontinuous_tangent()

void oomph::FaceElement::turn_off_warning_for_discontinuous_tangent ( )
inline

Turn off warning for when there may be discontinuous tangent vectors from continuous_tangent_and_outer_unit_normal(...)

4701  {
4703  }

References Ignore_discontinuous_tangent_warning.

◆ turn_on_warning_for_discontinuous_tangent()

void oomph::FaceElement::turn_on_warning_for_discontinuous_tangent ( )
inline

Turn on warning for when there may be discontinuous tangent vectors from continuous_tangent_and_outer_unit_normal(...)

4694  {
4696  }

References Ignore_discontinuous_tangent_warning.

◆ zeta_nodal()

double oomph::FaceElement::zeta_nodal ( const unsigned n,
const unsigned k,
const unsigned i 
) const
inlinevirtual

In a FaceElement, the "global" intrinsic coordinate of the element along the boundary, when viewed as part of a compound geometric object is specified using the boundary coordinate defined by the mesh. Note: Boundary coordinates will have been set up when creating the underlying mesh, and their values will have been stored at the nodes.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::YoungLaplaceContactAngleElement< ELEMENT >, oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >, oomph::UnsteadyHeatFluxElement< ELEMENT >, oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::TimeHarmonicFourierDecomposedLinearElasticityTractionElement< ELEMENT >, oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >, oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >, oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::PoroelasticityFaceElement< ELEMENT >, oomph::PoissonFluxElement< ELEMENT >, oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::PMLHelmholtzFluxElement< ELEMENT >, oomph::PMLHelmholtzPowerElement< ELEMENT >, oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >, oomph::NavierStokesSurfacePowerElement< ELEMENT >, oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >, oomph::ImposeParallelOutflowElement< ELEMENT >, oomph::ImposeImpenetrabilityElement< ELEMENT >, oomph::NavierStokesTractionElement< ELEMENT >, oomph::LinearWaveFluxElement< ELEMENT >, oomph::LinearElasticityTractionElement< ELEMENT >, oomph::HelmholtzFluxElement< ELEMENT >, oomph::HelmholtzBCElementBase< ELEMENT >, oomph::FaceElementAsGeomObject< ELEMENT >, oomph::DummyFaceElement< ELEMENT >, oomph::SolidFaceElement, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, SurfaceDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< SurfactantTransportInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< SolubleSurfactantTransportInterfaceElement, LineDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, LineDerivatives, ELEMENT >, and oomph::AxisymmetricPoroelasticityTractionElement< POROELASTICITY_BULK_ELEMENT >.

4500  {
4501  // Vector in which to hold the intrinsic coordinate
4502  Vector<double> zeta(this->dim());
4503 
4504  // Get the k-th generalised boundary coordinate at node n
4507 
4508  // Return the individual coordinate
4509  return zeta[i];
4510  }
virtual void get_coordinates_on_boundary(const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta)
Definition: nodes.cc:2379

References Boundary_number_in_bulk_mesh, oomph::FiniteElement::dim(), oomph::Node::get_coordinates_on_boundary(), i, k, oomph::FiniteElement::node_pt(), and Eigen::zeta().

Referenced by oomph::UnsteadyHeatBaseFaceElement< ELEMENT >::zeta_nodal(), oomph::SurfaceMeltElement< ELEMENT >::zeta_nodal(), StefanBoltzmannMeltElement< ELEMENT >::zeta_nodal(), oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::zeta_nodal(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::zeta_nodal(), oomph::AdvectionDiffusionFluxElement< ELEMENT >::zeta_nodal(), oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::zeta_nodal(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::BiharmonicFluxElement< DIM >::zeta_nodal(), oomph::DarcyFaceElement< ELEMENT >::zeta_nodal(), oomph::ElasticLineVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::SpineLineVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::ElasticAxisymmetricVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::SpineAxisymmetricVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::ElasticSurfaceVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::SpineSurfaceVolumeConstraintBoundingElement< ELEMENT >::zeta_nodal(), oomph::ElasticUpdateFluidInterfaceElement< EQUATION_CLASS, DERIVATIVE_CLASS, ELEMENT >::zeta_nodal(), oomph::ElasticPointFluidInterfaceBoundingElement< ELEMENT >::zeta_nodal(), oomph::ElasticLineFluidInterfaceBoundingElement< ELEMENT >::zeta_nodal(), oomph::DGEulerFaceElement< ELEMENT >::zeta_nodal(), oomph::DGEulerFaceReflectionElement< ELEMENT >::zeta_nodal(), oomph::FourierDecomposedHelmholtzBCElementBase< ELEMENT >::zeta_nodal(), oomph::SolidFaceElement::zeta_nodal(), oomph::DummyFaceElement< ELEMENT >::zeta_nodal(), oomph::FaceElementAsGeomObject< ELEMENT >::zeta_nodal(), oomph::HelmholtzBCElementBase< ELEMENT >::zeta_nodal(), oomph::HelmholtzFluxElement< ELEMENT >::zeta_nodal(), oomph::LinearElasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::LinearWaveFluxElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesTractionElement< ELEMENT >::zeta_nodal(), oomph::ImposeImpenetrabilityElement< ELEMENT >::zeta_nodal(), oomph::ImposeParallelOutflowElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesSurfacePowerElement< ELEMENT >::zeta_nodal(), oomph::PMLFourierDecomposedHelmholtzPowerMonitorElement< ELEMENT >::zeta_nodal(), oomph::PMLHelmholtzPowerElement< ELEMENT >::zeta_nodal(), oomph::PMLHelmholtzFluxElement< ELEMENT >::zeta_nodal(), oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::PoissonFluxElement< ELEMENT >::zeta_nodal(), oomph::PoroelasticityFaceElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::zeta_nodal(), oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >::zeta_nodal(), oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >::zeta_nodal(), oomph::TimeHarmonicFourierDecomposedLinearElasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >::zeta_nodal(), oomph::UnsteadyHeatFluxElement< ELEMENT >::zeta_nodal(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::zeta_nodal(), and oomph::YoungLaplaceContactAngleElement< ELEMENT >::zeta_nodal().

Member Data Documentation

◆ Boundary_number_in_bulk_mesh

unsigned oomph::FaceElement::Boundary_number_in_bulk_mesh
protected

◆ Bulk_coordinate_derivatives_fct_pt

BulkCoordinateDerivativesFctPt oomph::FaceElement::Bulk_coordinate_derivatives_fct_pt
private

Pointer to a function that returns the derivatives of the local "bulk" coordinates with respect to the local face coordinates.

Referenced by bulk_coordinate_derivatives_fct_pt(), and get_ds_bulk_ds_face().

◆ Bulk_element_pt

◆ Bulk_node_number

Vector<unsigned> oomph::FaceElement::Bulk_node_number
protected

◆ Bulk_position_type

Vector<unsigned> oomph::FaceElement::Bulk_position_type
private

Vector holding integers to translate additional position types to those of the "bulk" element; e.g. Bulk_position_type(1) is the position type of the "bulk" element that corresponds to face position type 1. This is required in QHermiteElements, where the slope in the direction of the 1D element is face position type 1, but may be position type 1 or 2 in the "bulk" element, depending upon which face, we are located.

Referenced by bulk_position_type(), bulk_position_type_resize(), and FaceElement().

◆ Face_index

int oomph::FaceElement::Face_index
private

Index of the face.

Referenced by face_index().

◆ Face_to_bulk_coordinate_fct_pt

CoordinateMappingFctPt oomph::FaceElement::Face_to_bulk_coordinate_fct_pt
private

Pointer to a function that translates the face coordinate to the coordinate in the bulk element

Referenced by face_to_bulk_coordinate_fct_pt(), get_local_coordinate_in_bulk(), and local_coordinate_in_bulk().

◆ Ignore_discontinuous_tangent_warning

bool oomph::FaceElement::Ignore_discontinuous_tangent_warning = false
staticprivate

Ignores the warning when the tangent vectors from continuous_tangent_and_outer_unit_normal may not be continuous as a result of the unit normal being aligned with the z axis. This can be avoided by supplying a general direction vector for the tangent vector via set_tangent_direction(...).

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

Referenced by continuous_tangent_and_outer_unit_normal(), turn_off_warning_for_discontinuous_tangent(), and turn_on_warning_for_discontinuous_tangent().

◆ Nbulk_value

Vector<unsigned> oomph::FaceElement::Nbulk_value
protected

A vector that will hold the number of data values at the nodes that are associated with the "bulk" element. i.e. not including any additional degrees of freedom that might be required for extra equations that are being solved by the FaceElement.

Referenced by oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), nbulk_value(), nbulk_value_resize(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), and resize_nodes().

◆ Normal_sign

int oomph::FaceElement::Normal_sign
private

Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" element.

Referenced by continuous_tangent_and_outer_unit_normal(), normal_sign(), and outer_unit_normal().

◆ Tangent_direction_pt

Vector<double>* oomph::FaceElement::Tangent_direction_pt
protected

A general direction pointer for the tangent vectors. This is used in the function continuous_tangent_and_outer_unit_normal() for creating continuous tangent vectors in spatial dimensions. The general direction is projected on to the surface. This technique is not required in two spatial dimensions.

Referenced by continuous_tangent_and_outer_unit_normal(), set_tangent_direction(), and tangent_direction_pt().


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