oomph::LinearSurfaceContactElement< ELEMENT > Class Template Reference

#include <contact_elements.h>

+ Inheritance diagram for oomph::LinearSurfaceContactElement< ELEMENT >:

Public Member Functions

 LinearSurfaceContactElement (FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0, const bool &called_from_refineable_constructor=false)
 
 LinearSurfaceContactElement ()
 Default constructor. More...
 
void fill_in_contribution_to_residuals_surface_contact (Vector< double > &residuals)
 Return the residuals for the SurfaceContactElement equations. More...
 
void output (std::ostream &outfile)
 Output function. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Output function. More...
 
void resulting_contact_force (Vector< double > &contact_force)
 Resulting contact force. More...
 
- Public Member Functions inherited from oomph::SurfaceContactElementBase< ELEMENT >
 SurfaceContactElementBase (FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0, const bool &called_from_refineable_constructor=false)
 value of the index and its limit More...
 
 SurfaceContactElementBase ()
 Default constructor. More...
 
void enable_stick ()
 
double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double s_min () const
 Min value of local coordinate. More...
 
double s_max () const
 Max. value of local coordinate. More...
 
void disable_stick ()
 
bool is_stick_enabled ()
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Return the residuals. More...
 
Penetratorpenetrator_pt () const
 Pointer to penetrator. More...
 
void set_penetrator_pt (Penetrator *penetrator_pt)
 Set pointer to penetrator. More...
 
void output (FILE *file_pt)
 C_style output function. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 C-style output function. More...
 
void shape_p (const Vector< double > &s, Shape &psi) const
 Shape fct for lagrange multiplier. More...
 
void shape_i (const Vector< double > &s, Shape &psi) const
 
- Public Member Functions inherited from oomph::FaceElement
 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)
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual unsigned nscalar_paraview () const
 
virtual void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
virtual std::string scalar_name_paraview (const unsigned &i) const
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output an exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output a time-dependent exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void 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
 
- Public Member Functions inherited from oomph::TemplateFreeContactElementBase
 TemplateFreeContactElementBase ()
 
virtual ~TemplateFreeContactElementBase ()
 Destructor. More...
 
void traction_fct (const Vector< double > &x, Vector< double > &p)
 
bool use_isoparametric_flag () const
 
bool use_collocated_penetration_flag ()
 
bool use_collocated_contact_pressure_flag ()
 
TractionFctPttraction_fct_pt ()
 Access function: Pointer to body force function. More...
 
TractionFctPt traction_fct_pt () const
 Access function: Pointer to body force function (const version) More...
 
bool *& use_isoparametric_flag_pt ()
 Access function: Pointer to flag to use isoparametric. More...
 
booluse_isoparametric_flag_pt () const
 
bool *& use_collocated_penetration_flag_pt ()
 Access function: Pointer to flag to use collocated penetration. More...
 
booluse_collocated_penetration_flag_pt () const
 
bool *& use_collocated_contact_pressure_flag_pt ()
 Access function: Pointer to flag to use collocated contact pressure. More...
 
booluse_collocated_contact_pressure_flag_pt () const
 

Protected Member Functions

void interpolated_u_linear_elasticity (const Vector< double > &s, Vector< double > &disp) const
 Compute vector of FE interpolated displacement u at local coordinate s. More...
 
- Protected Member Functions inherited from oomph::SurfaceContactElementBase< ELEMENT >
double get_interpolated_lagrange_p (const Vector< double > &s)
 
void penetration (const Vector< double > &x, const Vector< double > &n, double &d, bool &intersection) const
 Work out penetration of point. More...
 
- Protected Member Functions inherited from oomph::FaceElement
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)
 
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

Vector< unsignedU_index_linear_elasticity_traction
 Index at which the i-th displacement component is stored. More...
 
- Protected Attributes inherited from oomph::SurfaceContactElementBase< ELEMENT >
PenetratorPenetrator_pt
 Pointer to penetrator. More...
 
unsigned Contact_id
 
bool Enable_stick
 
Vector< intPenetrator_eq_data_type
 
Vector< intPenetrator_eq_data_index
 
Vector< intPenetrator_eq_data_data_index
 
- Protected Attributes inherited from oomph::FaceElement
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
 
- Protected Attributes inherited from oomph::TemplateFreeContactElementBase
TractionFctPt Traction_fct_pt
 
boolUse_isoparametric_flag_pt
 Set whether or not to use isoparametric basis function for pressure. More...
 
boolUse_collocated_penetration_flag_pt
 Set options for basis/test functions for penetration and pressure. More...
 
boolUse_collocated_contact_pressure_flag_pt
 Set options for basis/test functions for penetration and pressure. More...
 

Additional Inherited Members

- Public Types inherited from oomph::FiniteElement
typedef void(* SteadyExactSolutionFctPt) (const Vector< double > &, Vector< double > &)
 
typedef void(* UnsteadyExactSolutionFctPt) (const double &, const Vector< double > &, Vector< double > &)
 
- Public Types inherited from oomph::TemplateFreeContactElementBase
typedef void(* TractionFctPt) (const double &t, const Vector< double > &x, Vector< double > &p)
 
- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Protected Types inherited from oomph::TemplateFreeContactElementBase
enum  { Nodal_data , Nodal_position_data , External_data }
 Enumeration for type of penetrator data. More...
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

template<class ELEMENT>
class oomph::LinearSurfaceContactElement< ELEMENT >

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Class for elements that impose contact boundary conditions either enforcing non-penetration (but "without stick"; default) or permament contact (in which case contact force can be positive or negative. Uses Lagrange-multiplier-like pressure to enforce contact/non-penetration. Almost certainly works only with 2D Penetrator at the moment. Specific implementation for linear elasticity.

Constructor & Destructor Documentation

◆ LinearSurfaceContactElement() [1/2]

template<class ELEMENT >
oomph::LinearSurfaceContactElement< ELEMENT >::LinearSurfaceContactElement ( FiniteElement *const &  element_pt,
const int face_index,
const unsigned id = 0,
const bool called_from_refineable_constructor = false 
)
inline

Constructor, which takes a "bulk" element and the value of the index and its limit

1783  :
1784 // FaceGeometry<ELEMENT>(), FaceElement(),
1785  SurfaceContactElementBase<ELEMENT>(element_pt,
1786  face_index,
1787  id,
1788  called_from_refineable_constructor)
1789  {
1790  //Find the dimension of the problem
1791  unsigned n_dim = element_pt->nodal_dimension();
1792 
1793  //Find the index at which the displacemenet unknowns are stored
1794  ELEMENT* cast_element_pt = dynamic_cast<ELEMENT*>(element_pt);
1795  this->U_index_linear_elasticity_traction.resize(n_dim);
1796  for(unsigned i=0;i<n_dim;i++)
1797  {
1799  cast_element_pt->u_index_linear_elasticity(i);
1800  }
1801  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
int & face_index()
Definition: elements.h:4626
Vector< unsigned > U_index_linear_elasticity_traction
Index at which the i-th displacement component is stored.
Definition: contact_elements.h:1943

References i, oomph::FiniteElement::nodal_dimension(), and oomph::LinearSurfaceContactElement< ELEMENT >::U_index_linear_elasticity_traction.

◆ LinearSurfaceContactElement() [2/2]

template<class ELEMENT >
oomph::LinearSurfaceContactElement< ELEMENT >::LinearSurfaceContactElement ( )
inline

Default constructor.

1804 {}

Member Function Documentation

◆ fill_in_contribution_to_residuals_surface_contact()

template<class ELEMENT >
void oomph::LinearSurfaceContactElement< ELEMENT >::fill_in_contribution_to_residuals_surface_contact ( Vector< double > &  residuals)
virtual

Return the residuals for the SurfaceContactElement equations.

Return the residuals for the LinearSurfaceContactElement equations.

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

Implements oomph::SurfaceContactElementBase< ELEMENT >.

Reimplemented in oomph::HeatedLinearSurfaceContactElement< ELEMENT >.

1959 {
1960 
1961  // Spatial dimension of problem
1962  unsigned n_dim = this->nodal_dimension();
1963 
1964  // Contribution to contact force
1965  Vector<double> contact_force(n_dim,0.0);
1966 
1967  // Create vector of local residuals (start assembling contributions
1968  // from zero -- necessary so we can over-write pseudo-hijacked
1969  // contributions at the end.
1970  unsigned n_dof=this->ndof();
1971  Vector<double> local_residuals(n_dof,0.0);
1972 
1973  {
1974  //Find out how many nodes there are
1975  unsigned n_node = this->nnode();
1976 
1977  //Integer to hold the local equation number
1978  int local_eqn=0;
1979 
1980  //Set up memory for the shape functions
1981  Shape psi(n_node);
1982  DShape dpsids(n_node,n_dim-1);
1983 
1984  // Separate shape functions for Lagrange multiplier
1985  Shape psi_p(n_node);
1986  Vector<double> s(n_dim-1);
1987 
1988  //Seperate shape for top hat function
1989  Shape psi_i(n_node);
1990 
1991  // Contribution to integrated pressure
1992  Vector<double> pressure_integral(n_node,0.0);
1993 
1994  // Contribution to weighted penetration integral
1995  Vector<double> penetration_integral(n_node,0.0);
1996 
1997  // Deformed position
1998  Vector<double> x_def(n_dim,0.0);
1999 
2000  //Set the value of n_intpt
2001  unsigned n_intpt = this->integral_pt()->nweight();
2002 
2003  //Loop over the integration points
2004  for(unsigned ipt=0;ipt<n_intpt;ipt++)
2005  {
2006  //Get the integral weight
2007  double w = this->integral_pt()->weight(ipt);
2008 
2009  //Only need to call the local derivatives
2010  this->dshape_local_at_knot(ipt,psi,dpsids);
2011 
2012  // Separate shape function for Lagrange multiplier
2013  for(unsigned i=0;i<n_dim-1;i++)
2014  {
2015  s[i] = this->integral_pt()->knot(ipt,i);
2016  }
2017  this->shape_p(s,psi_p);
2018 
2019  //If we are using collocation for both, then we don't need to set up the integration shape
2020  if(!(this->use_collocated_penetration_flag()
2022  this->shape_i(s,psi_i);
2023  }
2024 
2025  // Interpolated Lagrange multiplier (pressure acting on solid)
2026  double interpolated_lambda_p=0.0;
2027 
2028  // Displacement
2029  Vector<double> disp(n_dim,0.0);
2030 
2031  //Calculate the coordinates
2032  Vector<double> interpolated_x(n_dim,0.0);
2033 
2034  //Also calculate the surface Vectors (derivatives wrt local coordinates)
2035  DenseMatrix<double> interpolated_A(n_dim-1,n_dim,0.0);
2036 
2037  //Calculate displacements and derivatives
2038  for(unsigned l=0;l<n_node;l++)
2039  {
2040  // Cast to a boundary node
2041  BoundaryNodeBase *bnod_pt =
2042  dynamic_cast<BoundaryNodeBase*>(this->node_pt(l));
2043 
2044  // Get the index of the nodal value associated with
2045  // this FaceElement
2046  unsigned first_index=
2047  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
2048 
2049  // Add to Lagrange multiplier (acting as pressure on solid
2050  // to enforce motion to ensure non-penetration)
2051  interpolated_lambda_p+=this->node_pt(l)->value(first_index)*psi_p[l];
2052 
2053  //Loop over displacement components
2054  for(unsigned i=0;i<n_dim;i++)
2055  {
2056  //Calculate the positions
2057  interpolated_x[i]+=this->nodal_position(l,i)*psi(l);
2058 
2059  //Index at which the displacement nodal value is stored
2060  unsigned u_nodal_index=this->U_index_linear_elasticity_traction[i];
2061  disp[i] += this->nodal_value(l,u_nodal_index)*psi(l);
2062 
2063  // Loop over LOCAL derivative directions, to calculate the
2064  // tangent(s)
2065  for(unsigned j=0;j<n_dim-1;j++)
2066  {
2067  interpolated_A(j,i)+=this->nodal_position(l,i)*dpsids(l,j);
2068  }
2069  }
2070  //std::cout<<interpolated_lambda_p; //test for no contact
2071  }
2072 
2073  //Now find the local deformed metric tensor from the tangent Vectors
2074  DenseMatrix<double> A(n_dim-1);
2075  for(unsigned i=0;i<n_dim-1;i++)
2076  {
2077  for(unsigned j=0;j<n_dim-1;j++)
2078  {
2079  //Initialise surface metric tensor to zero
2080  A(i,j) = 0.0;
2081  //Take the dot product
2082  for(unsigned k=0;k<n_dim;k++)
2083  {
2084  A(i,j) += interpolated_A(i,k)*interpolated_A(j,k);
2085  }
2086  }
2087  }
2088 
2089  //Get the outer unit normal
2090  Vector<double> interpolated_normal(n_dim);
2091  this->outer_unit_normal(ipt,interpolated_normal);
2092 
2093  //Find the determinant of the metric tensor
2094  double Adet =0.0;
2095  switch(n_dim)
2096  {
2097  case 2:
2098  Adet = A(0,0);
2099  break;
2100  case 3:
2101  Adet = A(0,0)*A(1,1) - A(0,1)*A(1,0);
2102  break;
2103  default:
2104  throw OomphLibError(
2105  "Wrong dimension in SurfaceContactElement",
2106  "LinearSurfaceContactElement::fill_in_contribution_to_residuals()",
2108  }
2109 
2110  //Premultiply the weights and the square-root of the determinant of
2111  //the metric tensor
2112  double W = w*sqrt(Adet);
2113 
2114  // Calculate the "load" -- Lagrange multiplier acts as traction to
2115  // to enforce required surface displacement and the
2116  // deformed position
2117  Vector<double> traction(n_dim);
2118  for (unsigned i=0;i<n_dim;i++)
2119  {
2120  traction[i]=-interpolated_lambda_p*interpolated_normal[i];
2121  x_def[i]=interpolated_x[i]+disp[i];
2122  }
2123 
2124 
2125  // Accumulate contribution to total contact force
2126  for(unsigned i=0;i<n_dim;i++)
2127  {
2128  contact_force[i]+=traction[i]*W;
2129  }
2130 
2131  //=====LOAD TERMS FROM PRINCIPLE OF VIRTUAL DISPLACEMENTS AND BOUNDARY CONDITIONS========
2132 
2133  //holder for externally imposed traction
2134  Vector<double> p(n_dim,0.0);
2135 
2136  //Get vector of traction from the function which has been passed in
2137  this->traction_fct(interpolated_x,p);
2138 
2139  //Loop over the test functions, nodes of the element
2140  for(unsigned l=0;l<n_node;l++)
2141  {
2142  //Loop over the displacement components
2143  for(unsigned i=0;i<n_dim;i++)
2144  {
2145  local_eqn = this->nodal_local_eqn(l,i);
2146  /*IF it's not a boundary condition*/
2147  if(local_eqn >= 0)
2148  {
2149 
2150  //Add the loading terms from penetrator and imposed externally to the residuals
2151  local_residuals[local_eqn] -= (traction[i]+p[i])*psi(l)*W;
2152  } //End of if not boundary condition
2153  }
2154  } //End of loop over shape functions
2155 
2156  //=====CONTRIBUTION TO CONTACT PRESSURE/LAGRANGE MULTIPLIER EQNS ========
2157 
2159  {
2160  //Loop over the nodes
2161  for(unsigned l=0;l<n_node;l++)
2162  {
2163  // Contribution to integrated pressure
2164  pressure_integral[l]+=interpolated_lambda_p*psi_i[l]*W;
2165  }
2166  }
2167 
2168  if(!this->use_collocated_penetration_flag())
2169  {
2170  //Get local penetration
2171  double d = 0.0;
2172  bool intersection = false;
2173  this->penetration(x_def,interpolated_normal,d,intersection);
2174  if(!intersection)
2175  {
2176  //if there is no intersection then we set d as -infinity
2177  d = -DBL_MAX;
2178  }
2179 
2180  //Loop over the nodes
2181  for(unsigned l=0;l<n_node;l++)
2182  {
2183  // Contribution to integrated penetration
2184  penetration_integral[l]+=d*psi_i[l]*W;
2185  }
2186  }
2187  } //End of loop over integration points
2188 
2189 
2190  // Determine contact pressure/Lagrange multiplier
2191  //-----------------------------------------------
2192 
2193  // Storage for nodal coordinate
2194  Vector<double> x(n_dim);
2195 
2196  //Loop over the nodes
2197  for(unsigned l=0;l<n_node;l++)
2198  {
2199  // get the node pt
2200  Node* nod_pt = this->node_pt(l);
2201 
2202  // Cast to a boundary node
2203  BoundaryNodeBase *bnod_pt =
2204  dynamic_cast<BoundaryNodeBase*>(nod_pt);
2205 
2206  // Get the index of the first nodal value associated with
2207  // this FaceElement
2208  unsigned first_index=
2209  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
2210 
2211  // Equation for Lagrange multiplier
2212  local_eqn = this->nodal_local_eqn(l,first_index);
2213 
2214  /*IF it's not a boundary condition*/
2215  if(local_eqn >= 0)
2216  {
2217  //Set to integrated discretisations for now
2218  double d=penetration_integral[l];
2219  double contact_pressure=pressure_integral[l];
2220 
2221  //overwrite appropriate measure if using collocation
2224  {//If so, we are gonna need information about the node
2225 
2226  // Nodal position
2227  x[0]=nod_pt->x(0);
2228  x[1]=nod_pt->x(1);
2229 
2230  // Get outer unit normal
2231  Vector<double> s(1);
2232  this->local_coordinate_of_node(l,s);
2233  Vector<double> unit_normal(2);
2234  this->outer_unit_normal(s,unit_normal);
2235 
2236  // Displacement
2237  Vector<double> disp(2);
2238  this->interpolated_u_linear_elasticity(s,disp);
2239 
2240  // Deformed position
2241  Vector<double> x_def(2);
2242  x_def[0]=x[0]+disp[0];
2243  x_def[1]=x[1]+disp[1];
2244 
2246  {
2247  // Get penetration
2248  bool intersection = false;
2249  this->penetration(x_def,unit_normal,d,intersection);
2250 
2251  //If there is no intersection, d = -max, ie the penetrator is infinitely far away
2252  if(!intersection)
2253  {
2254  d = -DBL_MAX;
2255  }
2256  }
2257 
2259  {
2260  contact_pressure=nod_pt->value(first_index);
2261  }
2262  }
2263 
2264  //Now that we have the appropriate discretisations of penetration and contact pressure,
2265  //use the semi-smooth residual scheme
2266 
2267  // Contact/non-penetration residual
2268  if (this->Enable_stick)
2269  {
2270  // Enforce contact
2271  local_residuals[local_eqn]-=d;
2272  }
2273  else
2274  {
2275  // Piecewise linear variation for non-penetration constraint
2276  if (-d>contact_pressure)
2277  {
2278  local_residuals[local_eqn]+=contact_pressure;
2279  }
2280  else
2281  {
2282  local_residuals[local_eqn]-=d;
2283  }
2284  }
2285  }
2286  }
2287  }
2288 
2289 //faire: equilibrium again
2290  // Now deal with the penetrator equilibrium equations (if any!)
2291  unsigned n=this->Penetrator_eq_data_type.size();
2292  for (unsigned i=0;i<n;i++)
2293  {
2294  if (this->Penetrator_eq_data_type[i]>=0)
2295  {
2296  switch(unsigned(this->Penetrator_eq_data_type[i]))
2297  {
2298 
2300  {
2301  int local_eqn=this->external_local_eqn(
2303  this->Penetrator_eq_data_index[i]);
2304  if (local_eqn>=0)
2305  {
2306  local_residuals[local_eqn]+=contact_force[i];
2307  }
2308  }
2309  break;
2310 
2311 
2312 // hierher this case should not arise because the nodal positions
2313  // will not be affected by the force balance.
2314 /* case TemplateFreeContactElementBase::Nodal_position_data: */
2315 /* { */
2316 /* // position type (dummy -- hierher paranoid check) */
2317 /* unsigned k=0; */
2318 /* int local_eqn=position_local_eqn( */
2319 /* this->Penetrator_eq_data_data_index[i],k, */
2320 /* this->Penetrator_eq_data_index[i]); */
2321 /* if (local_eqn>=0) */
2322 /* { */
2323 /* local_residuals[local_eqn]=contact_force[i]; */
2324 /* } */
2325 /* } */
2326 /* break; */
2327 
2329  {
2330  int local_eqn=this->nodal_local_eqn(
2332  this->Penetrator_eq_data_index[i]);
2333  if (local_eqn>=0)
2334  {
2335  local_residuals[local_eqn]+=contact_force[i];
2336  }
2337  }
2338  break;
2339 
2340  default:
2341 
2342 
2343  std::stringstream junk;
2344  junk << "Never get here: "
2345  << "unsigned(Penetrator_eq_data_type[i]) = "
2346  << unsigned(this->Penetrator_eq_data_type[i]);
2347  throw OomphLibError(
2348  junk.str(),
2351 
2352  }
2353  }
2354  }
2355 
2356  // Now add local contribution to existing entries
2357  for (unsigned j=0;j<n_dof;j++)
2358  {
2359  residuals[j]+=local_residuals[j];
2360  }
2361 
2362 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
RowVector3d w
Definition: Matrix_resize_int.cpp:3
float * p
Definition: Tutorial_Map_using.cpp:9
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
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
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Definition: elements.h:1842
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Definition: elements.cc:3239
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void interpolated_u_linear_elasticity(const Vector< double > &s, Vector< double > &disp) const
Compute vector of FE interpolated displacement u at local coordinate s.
Definition: contact_elements.h:1909
double value(const unsigned &i) const
Definition: nodes.cc:2408
Vector< int > Penetrator_eq_data_type
Definition: contact_elements.h:1047
unsigned Contact_id
Definition: contact_elements.h:1035
Vector< int > Penetrator_eq_data_index
Definition: contact_elements.h:1055
void shape_i(const Vector< double > &s, Shape &psi) const
Definition: contact_elements.h:948
void shape_p(const Vector< double > &s, Shape &psi) const
Shape fct for lagrange multiplier.
Definition: contact_elements.h:913
bool Enable_stick
Definition: contact_elements.h:1039
Vector< int > Penetrator_eq_data_data_index
Definition: contact_elements.h:1063
void penetration(const Vector< double > &x, const Vector< double > &n, double &d, bool &intersection) const
Work out penetration of point.
Definition: contact_elements.h:1021
void traction_fct(const Vector< double > &x, Vector< double > &p)
Definition: contact_elements.h:541
bool use_collocated_penetration_flag()
Definition: contact_elements.h:576
bool use_collocated_contact_pressure_flag()
Definition: contact_elements.h:591
@ External_data
Definition: contact_elements.h:638
@ Nodal_data
Definition: contact_elements.h:636
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
@ W
Definition: quadtree.h:63
list x
Definition: plotDoE.py:28
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::TemplateFreeContactElementBase::External_data, i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element(), j, k, n, oomph::TemplateFreeContactElementBase::Nodal_data, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, p, s, sqrt(), oomph::Node::value(), w, oomph::QuadTreeNames::W, plotDoE::x, and oomph::Node::x().

◆ interpolated_u_linear_elasticity()

template<class ELEMENT >
void oomph::LinearSurfaceContactElement< ELEMENT >::interpolated_u_linear_elasticity ( const Vector< double > &  s,
Vector< double > &  disp 
) const
inlineprotected

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

1911  {
1912  //Find the dimension of the problem
1913  unsigned n_dim = this->nodal_dimension();
1914 
1915  //Find number of nodes
1916  unsigned n_node = this->nnode();
1917 
1918  //Local shape function
1919  Shape psi(n_node);
1920 
1921  //Find values of shape function
1922  this->shape(s,psi);
1923 
1924  // Get displacements
1925  for (unsigned i=0;i<n_dim;i++)
1926  {
1927  //Index at which the nodal value is stored
1928  unsigned u_nodal_index = this->U_index_linear_elasticity_traction[i];
1929 
1930  //Initialise value of u
1931  disp[i] = 0.0;
1932 
1933  //Loop over the local nodes and sum
1934  for(unsigned l=0;l<n_node;l++)
1935  {
1936  disp[i] += this->nodal_value(l,u_nodal_index)*psi[l];
1937  }
1938  }
1939  }
virtual void shape(const Vector< double > &s, Shape &psi) const =0

References i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::shape(), and oomph::LinearSurfaceContactElement< ELEMENT >::U_index_linear_elasticity_traction.

Referenced by oomph::LinearSurfaceContactElement< ELEMENT >::output().

◆ output() [1/2]

template<class ELEMENT >
void oomph::LinearSurfaceContactElement< ELEMENT >::output ( std::ostream &  outfile)
inlinevirtual

Output function.

Reimplemented from oomph::SurfaceContactElementBase< ELEMENT >.

1813  {
1814  unsigned n_plot=5;
1815  this->output(outfile,n_plot);
1816  }
void output(std::ostream &outfile)
Output function.
Definition: contact_elements.h:1812

◆ output() [2/2]

template<class ELEMENT >
void oomph::LinearSurfaceContactElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inlinevirtual

Output function.

Reimplemented from oomph::SurfaceContactElementBase< ELEMENT >.

Reimplemented in oomph::HeatedLinearSurfaceContactElement< ELEMENT >.

1820  {
1821  unsigned n_dim = this->nodal_dimension();
1822 
1823  Vector<double> x(n_dim);
1824  Vector<double> disp(n_dim);
1825  Vector<double> x_def(n_dim);
1826  Vector<double> s(n_dim-1);
1827  Vector<double> r_pen(n_dim);
1828  Vector<double> unit_normal(n_dim);
1829 
1830  // Tecplot header info
1831  outfile << this->tecplot_zone_string(n_plot);
1832 
1833  // Loop over plot points
1834  unsigned num_plot_points=this->nplot_points(n_plot);
1835  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1836  {
1837  // Get local coordinates of plot point
1838  this->get_s_plot(iplot,n_plot,s);
1839 
1840  // Get coordinates and outer unit normal
1841  this->interpolated_x(s,x);
1842  this->outer_unit_normal(s,unit_normal);
1843 
1844  // Displacement
1845  this->interpolated_u_linear_elasticity(s,disp);
1846 
1847  // Deformed position
1848  for(unsigned i=0;i<n_dim;i++)
1849  {
1850  x_def[i]=x[i]+disp[i];
1851  }
1852 
1853  // Get penetration based on deformed position
1854  double d= 0.0;
1855  bool intersection = false;
1856  this->penetration(x_def,unit_normal,d,intersection);
1857 
1858  //Output the x,y,..
1859  for(unsigned i=0;i<n_dim;i++)
1860  {outfile << x[i] << " ";} // col 1,2
1861 
1862  // Penetration
1863  outfile << std::max(d,-100.0) << " "; // col 3
1864 
1865  // Lagrange multiplier-like pressure
1866  double p=this->get_interpolated_lagrange_p(s);
1867  outfile << p << " "; // col 4
1868 
1869 
1870  // Plot Lagrange multiplier like pressure
1871  outfile << -unit_normal[0]*p << " "; // col 5
1872  outfile << -unit_normal[1]*p << " "; // col 6
1873 
1874  // Plot vector from current point to boundary of penetrator
1875  double d_tmp=d;
1876  if (!intersection) d_tmp=0.0;
1877  outfile << -d_tmp*unit_normal[0] << " "; // col 7
1878  outfile << -d_tmp*unit_normal[1] << " "; // col 8
1879 
1880  // Output normal
1881  for(unsigned i=0;i<n_dim;i++)
1882  {outfile << unit_normal[i] << " ";} // col 9, 10
1883 
1884  //Output the displacements
1885  for(unsigned i=0;i<n_dim;i++)
1886  {
1887  outfile << disp[i] << " "; // col 11, 12
1888  }
1889 
1890  //Output the deformed position
1891  for(unsigned i=0;i<n_dim;i++)
1892  {
1893  outfile << x_def[i] << " "; // col 13, 14
1894  }
1895  outfile << std::endl;
1896  }
1897 
1898  // Write tecplot footer (e.g. FE connectivity lists)
1899  this->write_tecplot_zone_footer(outfile,n_plot);
1900 
1901  }
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
double get_interpolated_lagrange_p(const Vector< double > &s)
Definition: contact_elements.h:980
#define max(a, b)
Definition: datatypes.h:23

References oomph::SurfaceContactElementBase< ELEMENT >::get_interpolated_lagrange_p(), oomph::FiniteElement::get_s_plot(), i, oomph::LinearSurfaceContactElement< ELEMENT >::interpolated_u_linear_elasticity(), oomph::FaceElement::interpolated_x(), max, oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::nplot_points(), oomph::FaceElement::outer_unit_normal(), p, oomph::SurfaceContactElementBase< ELEMENT >::penetration(), s, oomph::FiniteElement::tecplot_zone_string(), oomph::FiniteElement::write_tecplot_zone_footer(), and plotDoE::x.

◆ resulting_contact_force()

template<class ELEMENT >
void oomph::LinearSurfaceContactElement< ELEMENT >::resulting_contact_force ( Vector< double > &  contact_force)
virtual

Resulting contact force.

Implements oomph::TemplateFreeContactElementBase.

2373 {
2374 
2375  //Find out how many nodes there are
2376  unsigned n_node = this->nnode();
2377 
2378  //Find out the dimension of the node
2379  unsigned n_dim = this->nodal_dimension();
2380 
2381  // Initialise
2382  for (unsigned i=0;i<n_dim;i++)
2383  {
2384  contact_force[i]=0.0;
2385  }
2386 
2387  //Set up memory for the shape functions
2388  Shape psi(n_node);
2389  DShape dpsids(n_node,n_dim-1);
2390 
2391  // Separate shape functions for Lagrange multiplier
2392  Shape psi_p(n_node);
2393  Vector<double> s(n_dim-1);
2394 
2395  //Set the value of n_intpt
2396  unsigned n_intpt = this->integral_pt()->nweight();
2397 
2398  //Loop over the integration points
2399  for(unsigned ipt=0;ipt<n_intpt;ipt++)
2400  {
2401  //Get the integral weight
2402  double w = this->integral_pt()->weight(ipt);
2403 
2404  //Only need to call the local derivatives
2405  this->dshape_local_at_knot(ipt,psi,dpsids);
2406 
2407  // Separate shape function for Lagrange multiplier
2408  for(unsigned i=0;i<n_dim-1;i++)
2409  {
2410  s[i] = this->integral_pt()->knot(ipt,i);
2411  }
2412  this->shape_p(s,psi_p);
2413 
2414  // Interpolated Lagrange multiplier (pressure acting on solid
2415  // to enforce melting)
2416  double interpolated_lambda_p=0.0;
2417 
2418  //Calculate the coordinates
2419  Vector<double> interpolated_x(n_dim,0.0);
2420 
2421  // Displacement
2422  Vector<double> disp(n_dim,0.0);
2423 
2424  //Also calculate the surface Vectors (derivatives wrt local coordinates)
2425  DenseMatrix<double> interpolated_A(n_dim-1,n_dim,0.0);
2426 
2427  //Calculate displacements and derivatives
2428  for(unsigned l=0;l<n_node;l++)
2429  {
2430  // Cast to a boundary node
2431  BoundaryNodeBase *bnod_pt =
2432  dynamic_cast<BoundaryNodeBase*>(this->node_pt(l));
2433 
2434  // Get the index of the nodal value associated with
2435  // this FaceElement
2436  unsigned first_index=
2437  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
2438 
2439  // Add to Lagrange multiplier (acting as pressure on solid
2440  // to enforce motion to ensure non-penetration)
2441  interpolated_lambda_p+=this->node_pt(l)->value(first_index)*psi_p[l];
2442 
2443  //Loop over displacement components
2444  for(unsigned i=0;i<n_dim;i++)
2445  {
2446  //Calculate the positions
2447  interpolated_x[i] += this->nodal_position(l,i)*psi(l);
2448 
2449  //Index at which the displacement nodal value is stored
2450  unsigned u_nodal_index=this->U_index_linear_elasticity_traction[i];
2451  disp[i] += this->nodal_value(l,u_nodal_index)*psi(l);
2452 
2453  //Loop over LOCAL derivative directions, to calculate the tangent(s)
2454  for(unsigned j=0;j<n_dim-1;j++)
2455  {
2456  interpolated_A(j,i) += this->nodal_position(l,i)*dpsids(l,j);
2457  }
2458  }
2459  }
2460 
2461 
2462  //Now find the local deformed metric tensor from the tangent Vectors
2463  DenseMatrix<double> A(n_dim-1);
2464  for(unsigned i=0;i<n_dim-1;i++)
2465  {
2466  for(unsigned j=0;j<n_dim-1;j++)
2467  {
2468  //Initialise surface metric tensor to zero
2469  A(i,j) = 0.0;
2470  //Take the dot product
2471  for(unsigned k=0;k<n_dim;k++)
2472  {
2473  A(i,j) += interpolated_A(i,k)*interpolated_A(j,k);
2474  }
2475  }
2476  }
2477 
2478  //Get the outer unit normal
2479  Vector<double> interpolated_normal(n_dim);
2480  this->outer_unit_normal(ipt,interpolated_normal);
2481 
2482  //Find the determinant of the metric tensor
2483  double Adet =0.0;
2484  switch(n_dim)
2485  {
2486  case 2:
2487  Adet = A(0,0);
2488  break;
2489  case 3:
2490  Adet = A(0,0)*A(1,1) - A(0,1)*A(1,0);
2491  break;
2492  default:
2493  throw OomphLibError(
2494  "Wrong dimension in SurfaceContactElement",
2495  "SurfaceContactElement::contact_force()",
2497  }
2498 
2499  //Premultiply the weights and the square-root of the determinant of
2500  //the metric tensor
2501  double W = w*sqrt(Adet);
2502 
2503  // Calculate the "load" -- Lagrange multiplier acts as traction to
2504  // to enforce required surface displacement
2505  Vector<double> traction(n_dim);
2506  for (unsigned i=0;i<n_dim;i++)
2507  {
2508  traction[i]=-interpolated_lambda_p*interpolated_normal[i];
2509  }
2510 
2511  // Add to resulting force
2512  for (unsigned i=0;i<n_dim;i++)
2513  {
2514  contact_force[i]+=traction[i]*W;
2515  }
2516  }
2517 
2518 }

References i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element(), j, k, OOMPH_EXCEPTION_LOCATION, s, sqrt(), w, and oomph::QuadTreeNames::W.

Referenced by ContactProblem< ELEMENT >::doc_solution().

Member Data Documentation

◆ U_index_linear_elasticity_traction

template<class ELEMENT >
Vector<unsigned> oomph::LinearSurfaceContactElement< ELEMENT >::U_index_linear_elasticity_traction
protected

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