oomph::NonlinearSurfaceContactElement< ELEMENT > Class Template Reference

#include <contact_elements.h>

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

Public Member Functions

 NonlinearSurfaceContactElement (FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0, const bool &called_from_refineable_constructor=false)
 
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
 

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...
 
- 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 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...
 
- 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::NonlinearSurfaceContactElement< 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 nonlinear elasticity.

Constructor & Destructor Documentation

◆ NonlinearSurfaceContactElement()

template<class ELEMENT >
oomph::NonlinearSurfaceContactElement< ELEMENT >::NonlinearSurfaceContactElement ( 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

1096  :
1097 // FaceGeometry<ELEMENT>(), FaceElement(),
1098  SurfaceContactElementBase<ELEMENT>(element_pt,
1099  face_index,
1100  id,
1101  called_from_refineable_constructor)
1102  {}
int & face_index()
Definition: elements.h:4626

Member Function Documentation

◆ fill_in_contribution_to_residuals_surface_contact()

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

Return the residuals for the SurfaceContactElement equations.

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

Implements oomph::SurfaceContactElementBase< ELEMENT >.

1203 {
1204 
1205  // Spatial dimension of problem
1206  unsigned n_dim = this->nodal_dimension();
1207 
1208  // Contribution to contact force
1209  Vector<double> contact_force(n_dim,0.0);
1210 
1211  // Create vector of local residuals (start assembling contributions
1212  // from zero -- necessary so we can over-write pseudo-hijacked
1213  // contributions at the end.
1214  unsigned n_dof=this->ndof();
1215  Vector<double> local_residuals(n_dof,0.0);
1216  {
1217 
1218  //Find out how many nodes there are
1219  unsigned n_node = this->nnode();
1220 
1221  //Find out how many positional dofs there are
1222  unsigned n_position_type = this->nnodal_position_type();
1223 
1224  //Integer to hold the local equation number
1225  int local_eqn=0;
1226 
1227  //Set up memory for the shape functions
1228  //Note that in this case, the number of lagrangian coordinates is always
1229  //equal to the dimension of the nodes
1230  Shape psi(n_node,n_position_type);
1231  DShape dpsids(n_node,n_position_type,n_dim-1);
1232 
1233  // Separate shape functions for Lagrange multiplier
1234  Shape psi_p(n_node);
1235  Vector<double> s(n_dim-1);
1236 
1237  //Seperate shape for top hat function
1238  Shape psi_i(n_node);
1239 
1240  // Contribution to integrated pressure
1241  Vector<double> pressure_integral(n_node,0.0);
1242 
1243  // Contribution to weighted penetration integral
1244  Vector<double> penetration_integral(n_node,0.0);
1245 
1246  //Set the value of n_intpt
1247  unsigned n_intpt = this->integral_pt()->nweight();
1248 
1249  //Loop over the integration points
1250  for(unsigned ipt=0;ipt<n_intpt;ipt++)
1251  {
1252  //Get the integral weight
1253  double w = this->integral_pt()->weight(ipt);
1254 
1255  //Only need to call the local derivatives
1256  this->dshape_local_at_knot(ipt,psi,dpsids);
1257 
1258  // Separate shape function for Lagrange multiplier
1259  for(unsigned i=0;i<n_dim-1;i++)
1260  {
1261  s[i] = this->integral_pt()->knot(ipt,i);
1262  }
1263  this->shape_p(s,psi_p);
1264 
1265  //If we are using collocation for both, then we don't need to set up the integration shape
1266  if(!(this->use_collocated_penetration_flag()
1268  {
1269  this->shape_i(s,psi_i);
1270  }
1271 
1272  // Interpolated Lagrange multiplier (pressure acting on solid
1273  // to enforce melting)
1274  double interpolated_lambda_p=0.0;
1275 
1276  //Calculate the Eulerian and Lagrangian coordinates
1277  Vector<double> interpolated_x(n_dim,0.0);
1278 
1279  //Also calculate the surface Vectors (derivatives wrt local coordinates)
1280  DenseMatrix<double> interpolated_A(n_dim-1,n_dim,0.0);
1281 
1282  //Calculate displacements and derivatives
1283  for(unsigned l=0;l<n_node;l++)
1284  {
1285 
1286  // Cast to a boundary node
1287  BoundaryNodeBase *bnod_pt =
1288  dynamic_cast<BoundaryNodeBase*>(this->node_pt(l));
1289 
1290  // Get the index of the nodal value associated with
1291  // this FaceElement
1292  unsigned first_index=
1293  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
1294 
1295  // Add to Lagrange multiplier (acting as pressure on solid
1296  // to enforce motion to ensure non-penetration)
1297  interpolated_lambda_p+=this->node_pt(l)->value(first_index)*psi_p[l];
1298 
1299  //Loop over positional dofs
1300  for(unsigned k=0;k<n_position_type;k++)
1301  {
1302  //Loop over displacement components (deformed position)
1303  for(unsigned i=0;i<n_dim;i++)
1304  {
1305  //Calculate the Eulerian and Lagrangian positions
1306  interpolated_x[i] +=
1307  this->nodal_position_gen(l,this->bulk_position_type(k),i)*psi(l,k);
1308 
1309  //Loop over LOCAL derivative directions, to calculate the tangent(s)
1310  for(unsigned j=0;j<n_dim-1;j++)
1311  {
1312  interpolated_A(j,i) +=
1313  this->nodal_position_gen(l,this->bulk_position_type(k),i)*dpsids(l,k,j);
1314  }
1315  }
1316  }
1317  }
1318 
1319  //Now find the local deformed metric tensor from the tangent Vectors
1320  DenseMatrix<double> A(n_dim-1);
1321  for(unsigned i=0;i<n_dim-1;i++)
1322  {
1323  for(unsigned j=0;j<n_dim-1;j++)
1324  {
1325  //Initialise surface metric tensor to zero
1326  A(i,j) = 0.0;
1327  //Take the dot product
1328  for(unsigned k=0;k<n_dim;k++)
1329  {
1330  A(i,j) += interpolated_A(i,k)*interpolated_A(j,k);
1331  }
1332  }
1333  }
1334 
1335  //Get the outer unit normal
1336  Vector<double> interpolated_normal(n_dim);
1337  this->outer_unit_normal(ipt,interpolated_normal);
1338 
1339  //Find the determinant of the metric tensor
1340  double Adet =0.0;
1341  switch(n_dim)
1342  {
1343  case 2:
1344  Adet = A(0,0);
1345  break;
1346  case 3:
1347  Adet = A(0,0)*A(1,1) - A(0,1)*A(1,0);
1348  break;
1349  default:
1350  throw OomphLibError(
1351  "Wrong dimension in SurfaceContactElement",
1352  "SurfaceContactElement::fill_in_contribution_to_residuals()",
1354  }
1355 
1356  //Premultiply the weights and the square-root of the determinant of
1357  //the metric tensor
1358  double W = w*sqrt(Adet);
1359 
1360  // Calculate the "load" -- Lagrange multiplier acts as traction to
1361  // to enforce required surface displacement
1362  Vector<double> traction(n_dim);
1363  for (unsigned i=0;i<n_dim;i++)
1364  {
1365  traction[i]=-interpolated_lambda_p*interpolated_normal[i];
1366  }
1367 
1368 
1369  // Accumulate contribution to total contact force
1370  for(unsigned i=0;i<n_dim;i++)
1371  {
1372  contact_force[i]+=traction[i]*W;
1373  }
1374 
1375  //=====LOAD TERMS FROM PRINCIPLE OF VIRTUAL DISPLACEMENTS========
1376 
1377  //Loop over the test functions, nodes of the element
1378  for(unsigned l=0;l<n_node;l++)
1379  {
1380  //Loop of types of dofs
1381  for(unsigned k=0;k<n_position_type;k++)
1382  {
1383  //Loop over the displacement components
1384  for(unsigned i=0;i<n_dim;i++)
1385  {
1386  local_eqn = this->position_local_eqn(l,this->bulk_position_type(k),i);
1387  /*IF it's not a boundary condition*/
1388  if(local_eqn >= 0)
1389  {
1390  //Add the loading terms to the residuals
1391  local_residuals[local_eqn] -= traction[i]*psi(l,k)*W;
1392  }
1393  }
1394  } //End of if not boundary condition
1395  } //End of loop over shape functions
1396 //faire!!!!
1397  //=====CONTRIBUTION TO CONTACT PRESSURE/LAGRANGE MULTIPLIER EQNS ========
1398 
1400  {
1401  //Loop over the nodes
1402  for(unsigned l=0;l<n_node;l++)
1403  {
1404  // Contribution to integrated pressure
1405  pressure_integral[l]+=interpolated_lambda_p*psi_i[l]*W;
1406  }
1407  }
1408 
1409  if(!this->use_collocated_penetration_flag())
1410  {
1411  //Get local penetration
1412  double d = 0.0;
1413  bool intersection = false;
1414  this->penetration(interpolated_x,interpolated_normal,d,intersection);
1415  if(!intersection)
1416  {
1417  //if there is no intersection then we set d as -infinity
1418  d = -DBL_MAX;
1419  }
1420 
1421  //Loop over the nodes
1422  for(unsigned l=0;l<n_node;l++)
1423  {
1424  // Contribution to integrated penetration
1425  penetration_integral[l]+=d*psi_i[l]*W;
1426  }
1427  }
1428  } //End of loop over integration points
1429 
1430 
1431 
1432 
1433 
1434  // Determine contact pressure/Lagrange multiplier:
1435  //------------------------------------------------
1436 
1437  // Storage for nodal coordinate
1438  Vector<double> x(n_dim);
1439 
1440  //Loop over the nodes
1441  for(unsigned l=0;l<n_node;l++)
1442  {
1443  // get the node pt
1444  Node* nod_pt = this->node_pt(l);
1445 
1446  // Cast to a boundary node
1447  BoundaryNodeBase *bnod_pt =
1448  dynamic_cast<BoundaryNodeBase*>(nod_pt);
1449 
1450  // Get the index of the first nodal value associated with
1451  // this FaceElement
1452  unsigned first_index=
1453  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
1454 
1455  // Equation for Lagrange multiplier
1456  local_eqn = this->nodal_local_eqn(l,first_index);
1457 
1458  /*IF it's not a boundary condition*/
1459  if(local_eqn >= 0)
1460  {
1461  //Set to integrated discretisations for now
1462  double d=penetration_integral[l];
1463  double contact_pressure=pressure_integral[l];
1464 
1465  //overwrite appropriate measure if using collocation
1468  {//If so, we are gonna need information about the node
1469 
1470  // Nodal position
1471  x[0]=nod_pt->x(0);
1472  x[1]=nod_pt->x(1);
1473 
1474  // Get outer unit normal
1475  Vector<double> s(1);
1476  this->local_coordinate_of_node(l,s);
1477  Vector<double> unit_normal(2);
1478  this->outer_unit_normal(s,unit_normal);
1479 
1481  {
1482  // Get penetration
1483  bool intersection = false;
1484  this->penetration(x,unit_normal,d,intersection);
1485 
1486  //If there is no intersection, d = -max, ie the penetrator is infinitely far away
1487  if(!intersection)
1488  {
1489  d = -DBL_MAX;
1490  }
1491  }
1492 
1494  {
1495  contact_pressure=nod_pt->value(first_index);
1496  }
1497  }
1498 
1499  //Now that we have the appropriate discretisations of penetration and contact pressure,
1500  //use the semi-smooth residual scheme
1501 
1502  // Contact/non-penetration residual
1503  if (this->Enable_stick)
1504  {
1505  // Enforce contact
1506  local_residuals[local_eqn]-=d;
1507  }
1508  else
1509  {
1510  // Piecewise linear variation for non-penetration constraint
1511  if (-d>contact_pressure)
1512  {
1513  local_residuals[local_eqn]+=contact_pressure;
1514  }
1515  else
1516  {
1517  local_residuals[local_eqn]-=d;
1518  }
1519  }
1520  }
1521  }
1522  }
1523 
1524 // faire: we need to go through this
1525  // Now deal with the penetrator equilibrium equations (if any!)
1526  unsigned n=this->Penetrator_eq_data_type.size();
1527  for (unsigned i=0;i<n;i++)
1528  {
1529  if (this->Penetrator_eq_data_type[i]>=0)
1530  {
1531  switch(unsigned(this->Penetrator_eq_data_type[i]))
1532  {
1533 
1535  {
1536  int local_eqn=this->external_local_eqn(
1538  this->Penetrator_eq_data_index[i]);
1539  if (local_eqn>=0)
1540  {
1541  local_residuals[local_eqn]+=contact_force[i];
1542  }
1543  }
1544  break;
1545 
1547  {
1548  // position type (dummy -- hierher paranoid check)
1549  unsigned k=0;
1550  int local_eqn=this->position_local_eqn(
1552  this->Penetrator_eq_data_index[i]);
1553  if (local_eqn>=0)
1554  {
1555  local_residuals[local_eqn]+=contact_force[i];
1556  }
1557  }
1558  break;
1559 
1560 
1562  {
1563  int local_eqn=this->nodal_local_eqn(
1565  this->Penetrator_eq_data_index[i]);
1566  if (local_eqn>=0)
1567  {
1568  local_residuals[local_eqn]+=contact_force[i];
1569  }
1570  }
1571  break;
1572 
1573  default:
1574 
1575 
1576  std::stringstream junk;
1577  junk << "Never get here: "
1578  << "unsigned(Penetrator_eq_data_type[i]) = "
1579  << unsigned(this->Penetrator_eq_data_type[i]);
1580  throw OomphLibError(
1581  junk.str(),
1584 
1585  }
1586  }
1587  }
1588 
1589  // Now add local contribution to existing entries
1590  for (unsigned j=0;j<n_dof;j++)
1591  {
1592  residuals[j]+=local_residuals[j];
1593  }
1594 
1595 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
unsigned & bulk_position_type(const unsigned &i)
Definition: elements.h:4805
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
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
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2349
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
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.
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
bool use_collocated_penetration_flag()
Definition: contact_elements.h:576
bool use_collocated_contact_pressure_flag()
Definition: contact_elements.h:591
@ Nodal_position_data
Definition: contact_elements.h:637
@ 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::TemplateFreeContactElementBase::Nodal_position_data, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, sqrt(), oomph::Node::value(), w, oomph::QuadTreeNames::W, plotDoE::x, and oomph::Node::x().

◆ output() [1/2]

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

Output function.

Reimplemented from oomph::SurfaceContactElementBase< ELEMENT >.

1110  {
1111  unsigned n_plot=5;
1112  this->output(outfile,n_plot);
1113  }
void output(std::ostream &outfile)
Output function.
Definition: contact_elements.h:1109

◆ output() [2/2]

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

Output function.

Reimplemented from oomph::SurfaceContactElementBase< ELEMENT >.

1117  {
1118 
1119  unsigned n_dim = this->nodal_dimension();
1120 
1121  Vector<double> x(n_dim);
1122  Vector<double> xi(n_dim);
1123  Vector<double> s(n_dim-1);
1124  Vector<double> r_pen(n_dim);
1125  Vector<double> unit_normal(n_dim);
1126 
1127  // Tecplot header info
1128  outfile << this->tecplot_zone_string(n_plot);
1129 
1130  // Loop over plot points
1131  unsigned num_plot_points=this->nplot_points(n_plot);
1132  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1133  {
1134  // Get local coordinates of plot point
1135  this->get_s_plot(iplot,n_plot,s);
1136 
1137  // Get Eulerian and Lagrangian coordinates and outer unit normal
1138  this->interpolated_x(s,x);
1139  this->interpolated_xi(s,xi);
1140  this->outer_unit_normal(s,unit_normal);
1141 
1142  // Get penetration
1143  double d=0.0;
1144  bool intersection = false;
1145  this->penetration(x,unit_normal,d,intersection);
1146 
1147  //Output the x,y,..
1148  for(unsigned i=0;i<n_dim;i++)
1149  {outfile << x[i] << " ";}//1,2
1150 
1151  // Penetration
1152  outfile << std::max(d,-100.0) << " ";//3
1153 
1154  // Lagrange multiplier-like pressure
1155  double p=this->get_interpolated_lagrange_p(s);
1156  outfile << p << " "; //4
1157 
1158 
1159  // Plot Lagrange multiplier like pressure
1160  outfile << -unit_normal[0]*p << " ";//5
1161  outfile << -unit_normal[1]*p << " ";//6
1162 
1163  // Plot vector from current point to boundary of penetrator
1164  double d_tmp=d;
1165  if (!intersection) d_tmp=0.0;
1166  outfile << -d_tmp*unit_normal[0] << " ";
1167  outfile << -d_tmp*unit_normal[1] << " ";
1168 
1169  // Output normal
1170  for(unsigned i=0;i<n_dim;i++)
1171  {outfile << unit_normal[i] << " ";}
1172 
1173 
1174  //Output the displacements
1175  for(unsigned i=0;i<n_dim;i++)
1176  {outfile << x[i]-xi[i] << " ";}
1177 
1178  outfile << std::endl;
1179  }
1180 
1181  // Write tecplot footer (e.g. FE connectivity lists)
1182  this->write_tecplot_zone_footer(outfile,n_plot);
1183 
1184  }
float * p
Definition: Tutorial_Map_using.cpp:9
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::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::NonlinearSurfaceContactElement< ELEMENT >::resulting_contact_force ( Vector< double > &  contact_force)
virtual

Resulting contact force.

Implements oomph::TemplateFreeContactElementBase.

1606 {
1607  //Find out how many nodes there are
1608  unsigned n_node = this->nnode();
1609 
1610  //Find out how many positional dofs there are
1611  unsigned n_position_type = this->nnodal_position_type();
1612 
1613  //Find out the dimension of the node
1614  unsigned n_dim = this->nodal_dimension();
1615 
1616  // Initialise
1617  for (unsigned i=0;i<n_dim;i++)
1618  {
1619  contact_force[i]=0.0;
1620  }
1621 
1622  //Set up memory for the shape functions
1623  //Note that in this case, the number of lagrangian coordinates is always
1624  //equal to the dimension of the nodes
1625  Shape psi(n_node,n_position_type);
1626  DShape dpsids(n_node,n_position_type,n_dim-1);
1627 
1628  // Separate shape functions for Lagrange multiplier
1629  Shape psi_p(n_node);
1630  Vector<double> s(n_dim-1);
1631 
1632  //Set the value of n_intpt
1633  unsigned n_intpt = this->integral_pt()->nweight();
1634 
1635  //Loop over the integration points
1636  for(unsigned ipt=0;ipt<n_intpt;ipt++)
1637  {
1638  //Get the integral weight
1639  double w = this->integral_pt()->weight(ipt);
1640 
1641  //Only need to call the local derivatives
1642  this->dshape_local_at_knot(ipt,psi,dpsids);
1643 
1644  // Separate shape function for Lagrange multiplier
1645  for(unsigned i=0;i<n_dim-1;i++)
1646  {
1647  s[i] = this->integral_pt()->knot(ipt,i);
1648  }
1649  this->shape_p(s,psi_p);
1650 
1651  // Interpolated Lagrange multiplier (pressure acting on solid
1652  // to enforce melting)
1653  double interpolated_lambda_p=0.0;
1654 
1655  //Calculate the Eulerian and Lagrangian coordinates
1656  Vector<double> interpolated_x(n_dim,0.0);
1657 
1658  //Also calculate the surface Vectors (derivatives wrt local coordinates)
1659  DenseMatrix<double> interpolated_A(n_dim-1,n_dim,0.0);
1660 
1661  //Calculate displacements and derivatives
1662  for(unsigned l=0;l<n_node;l++)
1663  {
1664  // Cast to a boundary node
1665  BoundaryNodeBase *bnod_pt =
1666  dynamic_cast<BoundaryNodeBase*>(this->node_pt(l));
1667 
1668  // Get the index of the nodal value associated with
1669  // this FaceElement
1670  unsigned first_index=
1671  bnod_pt->index_of_first_value_assigned_by_face_element(this->Contact_id);
1672 
1673  // Add to Lagrange multiplier (acting as pressure on solid
1674  // to enforce motion to ensure non-penetration)
1675  interpolated_lambda_p+=this->node_pt(l)->value(first_index)*psi_p[l];
1676 
1677  //Loop over positional dofs
1678  for(unsigned k=0;k<n_position_type;k++)
1679  {
1680  //Loop over displacement components (deformed position)
1681  for(unsigned i=0;i<n_dim;i++)
1682  {
1683  //Calculate the Eulerian and Lagrangian positions
1684  interpolated_x[i] +=
1685  this->nodal_position_gen(l,this->bulk_position_type(k),i)*psi(l,k);
1686 
1687  //Loop over LOCAL derivative directions, to calculate the tangent(s)
1688  for(unsigned j=0;j<n_dim-1;j++)
1689  {
1690  interpolated_A(j,i) +=
1691  this->nodal_position_gen(l,this->bulk_position_type(k),i)*dpsids(l,k,j);
1692  }
1693  }
1694  }
1695  }
1696 
1697  //Now find the local deformed metric tensor from the tangent Vectors
1698  DenseMatrix<double> A(n_dim-1);
1699  for(unsigned i=0;i<n_dim-1;i++)
1700  {
1701  for(unsigned j=0;j<n_dim-1;j++)
1702  {
1703  //Initialise surface metric tensor to zero
1704  A(i,j) = 0.0;
1705  //Take the dot product
1706  for(unsigned k=0;k<n_dim;k++)
1707  {
1708  A(i,j) += interpolated_A(i,k)*interpolated_A(j,k);
1709  }
1710  }
1711  }
1712 
1713  //Get the outer unit normal
1714  Vector<double> interpolated_normal(n_dim);
1715  this->outer_unit_normal(ipt,interpolated_normal);
1716 
1717  //Find the determinant of the metric tensor
1718  double Adet =0.0;
1719  switch(n_dim)
1720  {
1721  case 2:
1722  Adet = A(0,0);
1723  break;
1724  case 3:
1725  Adet = A(0,0)*A(1,1) - A(0,1)*A(1,0);
1726  break;
1727  default:
1728  throw OomphLibError(
1729  "Wrong dimension in SurfaceContactElement",
1730  "SurfaceContactElement::contact_force()",
1732  }
1733 
1734  //Premultiply the weights and the square-root of the determinant of
1735  //the metric tensor
1736  double W = w*sqrt(Adet);
1737 
1738  // Calculate the "load" -- Lagrange multiplier acts as traction to
1739  // to enforce required surface displacement
1740  Vector<double> traction(n_dim);
1741  for (unsigned i=0;i<n_dim;i++)
1742  {
1743  traction[i]=-interpolated_lambda_p*interpolated_normal[i];
1744  }
1745 
1746  // Add to resulting force
1747  for (unsigned i=0;i<n_dim;i++)
1748  {
1749  contact_force[i]+=traction[i]*W;
1750  }
1751  }
1752 
1753 }

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


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