oomph::SolidFiniteElement Class Reference

#include <elements.h>

+ Inheritance diagram for oomph::SolidFiniteElement:

Public Types

typedef double(* MultiplierFctPt) (const Vector< double > &xi)
 
- 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 Member Functions

void set_lagrangian_dimension (const unsigned &lagrangian_dimension)
 
virtual bool has_internal_solid_data ()
 
 SolidFiniteElement ()
 Constructor: Set defaults. More...
 
virtual ~SolidFiniteElement ()
 Destructor to clean up any allocated memory. More...
 
 SolidFiniteElement (const SolidFiniteElement &)=delete
 Broken copy constructor. More...
 
unsigned ngeom_data () const
 Broken assignment operator. More...
 
Datageom_data_pt (const unsigned &j)
 
void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual void get_x_and_xi (const Vector< double > &s, Vector< double > &x_fe, Vector< double > &x, Vector< double > &xi_fe, Vector< double > &xi) const
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
 
void set_undeformed_macro_elem_pt (MacroElement *undeformed_macro_elem_pt)
 
MacroElementundeformed_macro_elem_pt ()
 Access function to pointer to "undeformed" macro element. More...
 
double dshape_lagrangian (const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
 
virtual double dshape_lagrangian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidxi) const
 
double d2shape_lagrangian (const Vector< double > &s, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
 
virtual double d2shape_lagrangian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
 
unsigned lagrangian_dimension () const
 
unsigned nnodal_lagrangian_type () const
 
Nodeconstruct_node (const unsigned &n)
 Construct the local node n and return a pointer to it. More...
 
Nodeconstruct_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
Nodeconstruct_boundary_node (const unsigned &n)
 
Nodeconstruct_boundary_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
double raw_lagrangian_position (const unsigned &n, const unsigned &i) const
 
double raw_lagrangian_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double lagrangian_position (const unsigned &n, const unsigned &i) const
 Return i-th Lagrangian coordinate at local node n. More...
 
double lagrangian_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual double interpolated_xi (const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_xi (const Vector< double > &s, Vector< double > &xi) const
 
virtual void interpolated_dxids (const Vector< double > &s, DenseMatrix< double > &dxids) const
 
virtual void J_lagrangian (const Vector< double > &s) const
 
virtual double J_lagrangian_at_knot (const unsigned &ipt) const
 
SolidInitialCondition *& solid_ic_pt ()
 Pointer to object that describes the initial condition. More...
 
void enable_solve_for_consistent_newmark_accel ()
 
void disable_solve_for_consistent_newmark_accel ()
 Set to reset the problem being solved to be the standard problem. More...
 
MultiplierFctPtmultiplier_fct_pt ()
 
MultiplierFctPt multiplier_fct_pt () const
 
virtual void get_residuals_for_solid_ic (Vector< double > &residuals)
 
void fill_in_residuals_for_solid_ic (Vector< double > &residuals)
 
void fill_in_jacobian_for_solid_ic (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_for_newmark_accel (DenseMatrix< double > &jacobian)
 
void compute_norm (double &el_norm)
 
int position_local_eqn (const unsigned &n, const unsigned &k, const unsigned &j) const
 
- 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)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 Set the spatial integration scheme. More...
 
Integral *const & integral_pt () const
 Return the pointer to the integration scheme (const version) More...
 
virtual void shape (const Vector< double > &s, Shape &psi) const =0
 
virtual void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual double J_eulerian (const Vector< double > &s) const
 
virtual double J_eulerian_at_knot (const unsigned &ipt) const
 
void check_J_eulerian_at_knots (bool &passed) const
 
void check_jacobian (const double &jacobian) const
 
double dshape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsi, DenseMatrix< double > &djacobian_dX, RankFourTensor< double > &d_dpsidx_dX) const
 
double d2shape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
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
 
int get_node_number (Node *const &node_pt) const
 
virtual Nodeget_node_at_local_coordinate (const Vector< double > &s) const
 
double raw_nodal_value (const unsigned &n, const unsigned &i) const
 
double raw_nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
unsigned dim () const
 
virtual ElementGeometry::ElementGeometry element_geometry () const
 Return the geometry type of the element (either Q or T usually). More...
 
virtual double interpolated_x (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated coordinate x[i] at local coordinate s. More...
 
virtual double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 Return FE interpolated position x[] at local coordinate s as Vector. More...
 
virtual void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
virtual double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
virtual void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
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 double s_min () const
 Min value of local coordinate. More...
 
virtual double s_max () const
 Max. value of local coordinate. More...
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual unsigned nscalar_paraview () const
 
virtual void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
virtual std::string scalar_name_paraview (const unsigned &i) const
 
virtual void output (std::ostream &outfile)
 
virtual void output (std::ostream &outfile, const unsigned &n_plot)
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output (FILE *file_pt)
 
virtual void output (FILE *file_pt, const unsigned &n_plot)
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output an exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output a time-dependent exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
 
virtual std::string tecplot_zone_string (const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (std::ostream &outfile, const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (FILE *file_pt, const unsigned &nplot) const
 
virtual unsigned nplot_points (const unsigned &nplot) const
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_abs_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
 
void integrate_fct (FiniteElement::SteadyExactSolutionFctPt integrand_fct_pt, Vector< double > &integral)
 Integrate Vector-valued function over element. More...
 
void integrate_fct (FiniteElement::UnsteadyExactSolutionFctPt integrand_fct_pt, const double &time, Vector< double > &integral)
 Integrate Vector-valued time-dep function over element. More...
 
virtual void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
virtual unsigned self_test ()
 
virtual unsigned get_bulk_node_number (const int &face_index, const unsigned &i) const
 
virtual int face_outer_unit_normal_sign (const int &face_index) const
 Get the sign of the outer unit normal on the face given by face_index. More...
 
virtual unsigned nnode_on_face () const
 
void face_node_number_error_check (const unsigned &i) const
 Range check for face node numbers. More...
 
virtual CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt (const int &face_index) const
 
virtual BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt (const int &face_index) const
 
- Public Member Functions inherited from oomph::GeneralisedElement
 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 

Protected Member Functions

void fill_in_generic_jacobian_for_solid_ic (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
void set_nnodal_lagrangian_type (const unsigned &nlagrangian_type)
 
virtual double local_to_lagrangian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_lagrangian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_lagrangian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void assign_solid_local_eqn_numbers (const bool &store_local_dof)
 Assign local equation numbers for the solid equations in the element. More...
 
void describe_solid_local_dofs (std::ostream &out, const std::string &current_string) const
 Classifies dofs locally for solid specific aspects. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void fill_in_jacobian_from_solid_position_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_solid_position_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_solid_position_fd ()
 
virtual void reset_after_solid_position_fd ()
 
virtual void update_in_solid_position_fd (const unsigned &i)
 
virtual void reset_in_solid_position_fd (const unsigned &i)
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
virtual void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Protected Attributes

MacroElementUndeformed_macro_elem_pt
 Pointer to the element's "undeformed" macro element (NULL by default) More...
 
SolidInitialConditionSolid_ic_pt
 Pointer to object that specifies the initial condition. More...
 
bool Solve_for_consistent_newmark_accel_flag
 
- Protected Attributes inherited from oomph::FiniteElement
MacroElementMacro_elem_pt
 Pointer to the element's macro element (NULL by default) More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Private Member Functions

virtual void assemble_local_to_lagrangian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_lagrangian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
double multiplier (const Vector< double > &xi)
 

Private Attributes

MultiplierFctPt Multiplier_fct_pt
 
intPosition_local_eqn
 
unsigned Lagrangian_dimension
 
unsigned Nnodal_lagrangian_type
 

Additional Inherited Members

- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// SolidFiniteElement class.

Solid elements are elements whose nodal positions are unknowns in the problem – their nodes are SolidNodes. In such elements, the nodes not only have a variable (Eulerian) but also a fixed (Lagrangian) position. The positional variables have their own local equation numbering scheme which is set up with

virtual void assign_solid_local_eqn_numbers(const bool &store_local_dof)
Assign local equation numbers for the solid equations in the element.
Definition: elements.cc:6898

The derivatives of the ‘solid equations’ (i.e. the equations that determine the nodal positions) with respect to the nodal positions, required in the Jacobian matrix, are determined by finite differencing.

In the present form, the SolidFiniteElement represents a fully functional base class for ‘proper’ solid mechanics elements, but it can also be combined (via inheritance) with elements that solve additional equations. This is particularly useful in cases where the solid equations are merely used to update the nodal positions in a moving mesh problem, although this can prove costly in practice.

Member Typedef Documentation

◆ MultiplierFctPt

typedef double(* oomph::SolidFiniteElement::MultiplierFctPt) (const Vector< double > &xi)

Pointer to function that computes the "multiplier" for the inertia terms in the consistent determination of the initial conditions for Newmark timestepping.

Constructor & Destructor Documentation

◆ SolidFiniteElement() [1/2]

oomph::SolidFiniteElement::SolidFiniteElement ( )
inline

Constructor: Set defaults.

3586  : FiniteElement(),
3588  Solid_ic_pt(0),
3589  Multiplier_fct_pt(0),
3590  Position_local_eqn(0),
3594  {
3595  }
FiniteElement()
Constructor.
Definition: elements.h:1782
int * Position_local_eqn
Definition: elements.h:4281
unsigned Lagrangian_dimension
Definition: elements.h:4285
bool Solve_for_consistent_newmark_accel_flag
Definition: elements.h:4302
MacroElement * Undeformed_macro_elem_pt
Pointer to the element's "undeformed" macro element (NULL by default)
Definition: elements.h:4076
SolidInitialCondition * Solid_ic_pt
Pointer to object that specifies the initial condition.
Definition: elements.h:4131
unsigned Nnodal_lagrangian_type
Definition: elements.h:4293
MultiplierFctPt Multiplier_fct_pt
Definition: elements.h:4276

◆ ~SolidFiniteElement()

oomph::SolidFiniteElement::~SolidFiniteElement ( )
virtual

Destructor to clean up any allocated memory.

Destructor for SolidFiniteElement:

6630  {
6631  // Delete the storage allocated for the positional local equations
6632  delete[] Position_local_eqn;
6633  }

References Position_local_eqn.

◆ SolidFiniteElement() [2/2]

oomph::SolidFiniteElement::SolidFiniteElement ( const SolidFiniteElement )
delete

Broken copy constructor.

Member Function Documentation

◆ assemble_local_to_lagrangian_jacobian()

void oomph::SolidFiniteElement::assemble_local_to_lagrangian_jacobian ( const DShape dpsids,
DenseMatrix< double > &  jacobian 
) const
privatevirtual

Assemble the jacobian matrix for the mapping from local to lagrangian coordinates, given the derivatives of the shape function

Internal function that is used to assemble the jacobian of the mapping from local coordinates (s) to the lagrangian coordinates (xi), given the derivatives of the shape functions.

Reimplemented in oomph::RefineableSolidElement.

6530  {
6531  // Find the the dimension of the element
6532  const unsigned el_dim = dim();
6533  // Find the number of shape functions and shape functions types
6534  // We shall ASSUME (ENFORCE) that Lagrangian coordinates must
6535  // be interpolated through the nodes
6536  const unsigned n_shape = nnode();
6537  const unsigned n_shape_type = nnodal_lagrangian_type();
6538 
6539 #ifdef PARANOID
6540  // Check for dimensional compatibility
6542  {
6543  std::ostringstream error_message;
6544  error_message << "Dimension mismatch" << std::endl;
6545  error_message << "The elemental dimension: " << el_dim
6546  << " must equal the nodal Lagrangian dimension: "
6548  << " for the jacobian of the mapping to be well-defined"
6549  << std::endl;
6550  throw OomphLibError(
6551  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
6552  }
6553 #endif
6554 
6555  // Loop over the rows of the jacobian
6556  for (unsigned i = 0; i < el_dim; i++)
6557  {
6558  // Loop over the columns of the jacobian
6559  for (unsigned j = 0; j < el_dim; j++)
6560  {
6561  // Zero the entry
6562  jacobian(i, j) = 0.0;
6563  // Loop over the shape functions
6564  for (unsigned l = 0; l < n_shape; l++)
6565  {
6566  for (unsigned k = 0; k < n_shape_type; k++)
6567  {
6568  // Jacobian is dx_j/ds_i, which is represented by the sum
6569  // over the dpsi/ds_i of the nodal points X j
6570  // Call the Non-hanging version of positions
6571  // This is overloaded in refineable elements
6572  jacobian(i, j) +=
6573  raw_lagrangian_position_gen(l, k, j) * dpsids(l, k, i);
6574  }
6575  }
6576  }
6577  }
6578  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
double raw_lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:3897
unsigned nnodal_lagrangian_type() const
Definition: elements.h:3785
char char char int int * k
Definition: level2_impl.h:374
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::FiniteElement::dim(), el_dim, i, j, k, Lagrangian_dimension, nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and raw_lagrangian_position_gen().

Referenced by local_to_lagrangian_mapping().

◆ assemble_local_to_lagrangian_jacobian2()

void oomph::SolidFiniteElement::assemble_local_to_lagrangian_jacobian2 ( const DShape d2psids,
DenseMatrix< double > &  jacobian2 
) const
privatevirtual

Assemble the the "jacobian" matrix of second derivatives, given the second derivatives of the shape functions w.r.t. local coordinates

Internal function that is used to assemble the jacobian of second derivatives of the the mapping from local coordinates (s) to the lagrangian coordinates (xi), given the second derivatives of the shape functions.

Reimplemented in oomph::RefineableSolidElement.

6588  {
6589  // Find the the dimension of the element
6590  const unsigned el_dim = dim();
6591  // Find the number of shape functions and shape functions types
6592  // We ENFORCE that Lagrangian coordinates must be interpolated through
6593  // the nodes
6594  const unsigned n_shape = nnode();
6595  const unsigned n_shape_type = nnodal_lagrangian_type();
6596  // Find the number of second derivatives
6597  const unsigned n_row = N2deriv[el_dim];
6598 
6599  // Assemble the "jacobian" (d^2 x_j/ds_i^2) for second derivatives of
6600  // shape functions
6601  // Loop over the rows (number of second derivatives)
6602  for (unsigned i = 0; i < n_row; i++)
6603  {
6604  // Loop over the columns (element dimension
6605  for (unsigned j = 0; j < el_dim; j++)
6606  {
6607  // Zero the entry
6608  jacobian2(i, j) = 0.0;
6609  // Loop over the shape functions
6610  for (unsigned l = 0; l < n_shape; l++)
6611  {
6612  // Loop over the shape function types
6613  for (unsigned k = 0; k < n_shape_type; k++)
6614  {
6615  // Add the terms to the jacobian entry
6616  // Call the Non-hanging version of positions
6617  // This is overloaded in refineable elements
6618  jacobian2(i, j) +=
6619  raw_lagrangian_position_gen(l, k, j) * d2psids(l, k, i);
6620  }
6621  }
6622  }
6623  }
6624  }
static const unsigned N2deriv[]
Definition: elements.h:1483

References oomph::FiniteElement::dim(), el_dim, i, j, k, oomph::FiniteElement::N2deriv, nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), and raw_lagrangian_position_gen().

Referenced by d2shape_lagrangian(), and d2shape_lagrangian_at_knot().

◆ assign_all_generic_local_eqn_numbers()

virtual void oomph::SolidFiniteElement::assign_all_generic_local_eqn_numbers ( const bool store_local_dof_pt)
inlinevirtual

Overload assign_all_generic_local_equation numbers to include the data associated with solid dofs. It remains virtual so that it can be overloaded by RefineableSolidElements. If the boolean argument is true then the degrees of freedom are stored in Dof_pt

Reimplemented from oomph::FiniteElement.

3869  {
3870  // Call the standard finite element equation numbering
3871  //(internal, external and nodal data).
3873  // Assign the numbering for the solid dofs
3874  assign_solid_local_eqn_numbers(store_local_dof_pt);
3875  }
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Definition: elements.h:2164

References oomph::FiniteElement::assign_all_generic_local_eqn_numbers(), and assign_solid_local_eqn_numbers().

◆ assign_solid_local_eqn_numbers()

void oomph::SolidFiniteElement::assign_solid_local_eqn_numbers ( const bool store_local_dof_pt)
protectedvirtual

Assign local equation numbers for the solid equations in the element.

Assigns local equation numbers for the generic solid local equation numbering schemes. If the boolean flag is true the the degrees of freedom are stored in Dof_pt

If the boolean argument is true then pointers to the dofs will be stored in Dof_pt.

Reimplemented in oomph::RefineableSolidElement.

6900  {
6901  // Find the number of nodes
6902  const unsigned n_node = nnode();
6903 
6904  // Check there are nodes!
6905  if (n_node > 0)
6906  {
6907  // Find the number of position types and dimensions of the nodes
6908  // Local caching
6909  const unsigned n_position_type = nnodal_position_type();
6910  const unsigned nodal_dim = nodal_dimension();
6911 
6912  // Delete the existing storage
6913  delete[] Position_local_eqn;
6914  // Resize the storage for the positional equation numbers
6915  Position_local_eqn = new int[n_node * n_position_type * nodal_dim];
6916 
6917  // A local queue to store the global equation numbers
6918  std::deque<unsigned long> global_eqn_number_queue;
6919 
6920  // Get the number of dofs so far, this must be outside both loops
6921  // so that both can use it
6922  unsigned local_eqn_number = ndof();
6923 
6924  // Loop over the nodes
6925  for (unsigned n = 0; n < n_node; n++)
6926  {
6927  // Cast to a solid node
6928  SolidNode* cast_node_pt = static_cast<SolidNode*>(node_pt(n));
6929 
6930  // Loop over the number of position dofs
6931  for (unsigned j = 0; j < n_position_type; j++)
6932  {
6933  // Loop over the dimension of each node
6934  for (unsigned k = 0; k < nodal_dim; k++)
6935  {
6936  // Get equation number
6937  // Note eqn_number is long !
6938  long eqn_number = cast_node_pt->position_eqn_number(j, k);
6939  // If equation_number positive add to array
6940  if (eqn_number >= 0)
6941  {
6942  // Add to global array
6943  global_eqn_number_queue.push_back(eqn_number);
6944  // Add pointer to the dof to the queue if required
6945  if (store_local_dof_pt)
6946  {
6948  &(cast_node_pt->x_gen(j, k)));
6949  }
6950 
6951  // Add to look-up scheme
6952  Position_local_eqn[(n * n_position_type + j) * nodal_dim + k] =
6954  // Increment the local equation number
6955  local_eqn_number++;
6956  }
6957  else
6958  {
6959  Position_local_eqn[(n * n_position_type + j) * nodal_dim + k] =
6961  }
6962  }
6963  }
6964  } // End of loop over nodes
6965 
6966  // Now add our global equations numbers to the internal element storage
6967  add_global_eqn_numbers(global_eqn_number_queue,
6969  // Clear the memory used in the deque
6970  if (store_local_dof_pt)
6971  {
6972  std::deque<double*>().swap(GeneralisedElement::Dof_pt_deque);
6973  }
6974 
6975  } // End of the case when there are nodes
6976  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
static long Is_pinned
Static "Magic number" to indicate pinned values.
Definition: nodes.h:183
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
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
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
static std::deque< double * > Dof_pt_deque
Definition: elements.h:231
int local_eqn_number(const unsigned long &ieqn_global) const
Definition: elements.h:726
void add_global_eqn_numbers(std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
Definition: elements.cc:156

References oomph::GeneralisedElement::add_global_eqn_numbers(), oomph::GeneralisedElement::Dof_pt_deque, oomph::GeneralisedElement::eqn_number(), oomph::Data::Is_pinned, j, k, oomph::GeneralisedElement::local_eqn_number(), n, oomph::GeneralisedElement::ndof(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), oomph::SolidNode::position_eqn_number(), Position_local_eqn, and oomph::Node::x_gen().

Referenced by assign_all_generic_local_eqn_numbers(), and oomph::RefineableSolidElement::assign_solid_local_eqn_numbers().

◆ compute_norm()

void oomph::SolidFiniteElement::compute_norm ( double el_norm)
virtual

Calculate the L2 norm of the displacement u=R-r to overload the compute_norm function in the GeneralisedElement base class

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// Calculate the L2 norm of the displacement u=R-r to overload the compute_norm function in the GeneralisedElement base class

Reimplemented from oomph::GeneralisedElement.

Reimplemented in oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, and oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >.

6443  {
6444  // Initialise el_norm to 0.0
6445  el_norm = 0.0;
6446 
6447  unsigned n_dim = dim();
6448 
6449  // Vector of local coordinates
6450  Vector<double> s(n_dim);
6451 
6452  // Displacement vector, Lagrangian coordinate vector and Eulerian
6453  // coordinate vector respectively
6454  Vector<double> disp(n_dim, 0.0);
6455  Vector<double> xi(n_dim, 0.0);
6456  Vector<double> x(n_dim, 0.0);
6457 
6458  // Find out how many nodes there are in the element
6459  unsigned n_node = this->nnode();
6460 
6461  // Construct a shape function
6462  Shape psi(n_node);
6463 
6464  // Get the number of integration points
6465  unsigned n_intpt = this->integral_pt()->nweight();
6466 
6467  // Loop over the integration points
6468  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
6469  {
6470  // Assign values of s
6471  for (unsigned i = 0; i < n_dim; i++)
6472  {
6473  s[i] = this->integral_pt()->knot(ipt, i);
6474  }
6475 
6476  // Get the integral weight
6477  double w = this->integral_pt()->weight(ipt);
6478 
6479  // Get jacobian of mapping
6480  double J = this->J_eulerian(s);
6481 
6482  // Premultiply the weights and the Jacobian
6483  double W = w * J;
6484 
6485  // Get the Lagrangian and Eulerian coordinate at this point, respectively
6486  this->interpolated_xi(s, xi);
6487  this->interpolated_x(s, x);
6488 
6489  // Calculate the displacement vector, u=R-r=x-xi
6490  for (unsigned idim = 0; idim < n_dim; idim++)
6491  {
6492  disp[idim] = x[idim] - xi[idim];
6493  }
6494 
6495  // Add to norm
6496  for (unsigned ii = 0; ii < n_dim; ii++)
6497  {
6498  el_norm += (disp[ii] * disp[ii]) * W;
6499  }
6500  }
6501  } // End of compute_norm(...)
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:4103
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.
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Definition: elements.cc:7104
RealScalar s
Definition: level1_cplx_impl.h:130
@ W
Definition: quadtree.h:63
list x
Definition: plotDoE.py:28

References oomph::FiniteElement::dim(), i, oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), interpolated_xi(), J, oomph::FiniteElement::J_eulerian(), oomph::Integral::knot(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), s, w, oomph::QuadTreeNames::W, oomph::Integral::weight(), and plotDoE::x.

◆ construct_boundary_node() [1/2]

Node* oomph::SolidFiniteElement::construct_boundary_node ( const unsigned n)
inlinevirtual

Construct the local node n and return a pointer to it. in the case when it is a boundary node; that is it MAY be located on a Mesh boundary

Reimplemented from oomph::FiniteElement.

3828  {
3829  // Construct a solid node and assign it to the local node pointer vector.
3830  // The dimension and number of values are taken from internal element data
3831  // The number of solid pressure dofs are also taken from internal data
3832  // The number of timesteps to be stored comes from the problem!
3833  node_pt(n) = new BoundaryNode<SolidNode>(lagrangian_dimension(),
3835  nodal_dimension(),
3837  required_nvalue(n));
3838  // Now return a pointer to the node, so that the mesh can find it
3839  return node_pt(n);
3840  }
virtual unsigned required_nvalue(const unsigned &n) const
Definition: elements.h:2455
unsigned lagrangian_dimension() const
Definition: elements.h:3774

References lagrangian_dimension(), n, nnodal_lagrangian_type(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), and oomph::FiniteElement::required_nvalue().

◆ construct_boundary_node() [2/2]

Node* oomph::SolidFiniteElement::construct_boundary_node ( const unsigned n,
TimeStepper *const &  time_stepper_pt 
)
inlinevirtual

Construct the local node n and return a pointer to it, in the case when the node MAY be located on a boundary. Additionally, create storage for ‘history’ values as required by timestepper

Reimplemented from oomph::FiniteElement.

3848  {
3849  // Construct a solid node and assign it to the local node pointer vector
3850  // The dimension and number of values are taken from internal element data
3851  // The number of solid pressure dofs are also taken from internal data
3852  node_pt(n) = new BoundaryNode<SolidNode>(time_stepper_pt,
3855  nodal_dimension(),
3857  required_nvalue(n));
3858  // Now return a pointer to the node, so that the mesh can find it
3859  return node_pt(n);
3860  }
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192

References lagrangian_dimension(), n, nnodal_lagrangian_type(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), oomph::FiniteElement::required_nvalue(), and oomph::GeomObject::time_stepper_pt().

◆ construct_node() [1/2]

Node* oomph::SolidFiniteElement::construct_node ( const unsigned n)
inlinevirtual

Construct the local node n and return a pointer to it.

Reimplemented from oomph::FiniteElement.

3792  {
3793  // Construct a solid node and assign it to the local node pointer vector.
3794  // The dimension and number of values are taken from internal element data
3795  // The number of solid pressure dofs are also taken from internal data
3796  // The number of timesteps to be stored comes from the problem!
3797  node_pt(n) = new SolidNode(lagrangian_dimension(),
3799  nodal_dimension(),
3801  required_nvalue(n));
3802  // Now return a pointer to the node, so that the mesh can find it
3803  return node_pt(n);
3804  }

References lagrangian_dimension(), n, nnodal_lagrangian_type(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), and oomph::FiniteElement::required_nvalue().

◆ construct_node() [2/2]

Node* oomph::SolidFiniteElement::construct_node ( const unsigned n,
TimeStepper *const &  time_stepper_pt 
)
inlinevirtual

Construct the local node n and return a pointer to it. Additionally, create storage for ‘history’ values as required by timestepper

Reimplemented from oomph::FiniteElement.

3810  {
3811  // Construct a solid node and assign it to the local node pointer vector
3812  // The dimension and number of values are taken from internal element data
3813  // The number of solid pressure dofs are also taken from internal data
3814  node_pt(n) = new SolidNode(time_stepper_pt,
3817  nodal_dimension(),
3819  required_nvalue(n));
3820  // Now return a pointer to the node, so that the mesh can find it
3821  return node_pt(n);
3822  }

References lagrangian_dimension(), n, nnodal_lagrangian_type(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), oomph::FiniteElement::required_nvalue(), and oomph::GeomObject::time_stepper_pt().

◆ d2shape_lagrangian()

double oomph::SolidFiniteElement::d2shape_lagrangian ( const Vector< double > &  s,
Shape psi,
DShape dpsi,
DShape d2psi 
) const

Compute the geometric shape functions and also first and second derivatives w.r.t. Lagrangian coordinates at local coordinate s; Returns Jacobian of mapping from Lagrangian to local coordinates. Numbering: 1D: d2pidxi(i,0) = \( d^2 \psi_j / d \xi^2 \) 2D: d2psidxi(i,0) = \( \partial^2 \psi_j / \partial \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j / \partial \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j / \partial \xi_0 \partial \xi_1 \) 3D: d2psidxi(i,0) = \( \partial^2 \psi_j / \partial \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j / \partial \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j / \partial \xi_2^2 \) d2psidxi(i,3) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \) d2psidxi(i,4) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_2 \) d2psidxi(i,5) = \( \partial^2 \psi_j/\partial \xi_1 \partial \xi_2 \)

6785  {
6786  // Find the element dimension
6787  const unsigned el_dim = dim();
6788  // Find the number of second derivatives required
6789  const unsigned n_deriv = N2deriv[el_dim];
6790 
6791  // Get the values of the shape function and local derivatives
6792  d2shape_local(s, psi, dpsi, d2psi);
6793 
6794  // Allocate memory for the jacobian and inverse jacobian
6795  DenseMatrix<double> jacobian(el_dim), inverse_jacobian(el_dim);
6796  // Calculate the jacobian and inverse jacobian
6797  const double det =
6798  local_to_lagrangian_mapping(dpsi, jacobian, inverse_jacobian);
6799 
6800  // Allocate memory for the jacobian of second derivatives
6801  DenseMatrix<double> jacobian2(n_deriv, el_dim);
6802  // Assemble the jacobian of second derivatives
6803  assemble_local_to_lagrangian_jacobian2(d2psi, jacobian2);
6804 
6805  // Now set the value of the derivatives
6807  jacobian, inverse_jacobian, jacobian2, dpsi, d2psi);
6808  // Return the determinant of the mapping
6809  return det;
6810  }
virtual void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Definition: elements.h:2016
virtual void transform_second_derivatives(const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
Definition: elements.cc:3125
virtual void assemble_local_to_lagrangian_jacobian2(const DShape &d2psids, DenseMatrix< double > &jacobian2) const
Definition: elements.cc:6586
virtual double local_to_lagrangian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:4082

References assemble_local_to_lagrangian_jacobian2(), oomph::FiniteElement::d2shape_local(), oomph::FiniteElement::dim(), el_dim, local_to_lagrangian_mapping(), oomph::FiniteElement::N2deriv, s, and oomph::FiniteElement::transform_second_derivatives().

Referenced by oomph::KirchhoffLoveShellEquations::get_strain_and_bend().

◆ d2shape_lagrangian_at_knot()

double oomph::SolidFiniteElement::d2shape_lagrangian_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsi,
DShape d2psi 
) const
virtual

Return the geometric shape functions and also first and second derivatives w.r.t. Lagrangian coordinates at the ipt-th integration point. Returns Jacobian of mapping from Lagrangian to local coordinates. Numbering: 1D: d2pidxi(i,0) = \( d^2 \psi_j / d^2 \xi^2 \) 2D: d2psidxi(i,0) = \( \partial^2 \psi_j/\partial^2 \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j/\partial^2 \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \) 3D: d2psidxi(i,0) = \( \partial^2 \psi_j / \partial^2 \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j / \partial^2 \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j / \partial^2 \xi_2^2 \) d2psidxi(i,3) = \( \partial^2 \psi_j / \partial \xi_0 \partial \xi_1 \) d2psidxi(i,4) = \( \partial^2 \psi_j / \partial \xi_0 \partial \xi_2 \) d2psidxi(i,5) = \( \partial^2 \psi_j / \partial \xi_1 \partial \xi_2 \)

Compute the geometric shape functions and also first and second derivatives w.r.t. Lagrangian coordinates at the ipt-th integration point Returns Jacobian of mapping from Lagrangian to local coordinates. Numbering: 1D: d2pidxi(i,0) = \( d^2 \psi_j / d \xi^2 \) 2D: d2psidxi(i,0) = \( \partial^2 \psi_j / \partial \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j / \partial \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \) 3D: d2psidxi(i,0) = \( \partial^2 \psi_j / \partial \xi_0^2 \) d2psidxi(i,1) = \( \partial^2 \psi_j / \partial \xi_1^2 \) d2psidxi(i,2) = \( \partial^2 \psi_j / \partial \xi_2^2 \) d2psidxi(i,3) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \) d2psidxi(i,4) = \( \partial^2 \psi_j/\partial \xi_0 \partial \xi_2 \) d2psidxi(i,5) = \( \partial^2 \psi_j/\partial \xi_1 \partial \xi_2 \)

Reimplemented in oomph::StorableShapeSolidElementBase.

6836  {
6837  // Find the values of the indices of the shape functions
6838  // Find the element dimension
6839  const unsigned el_dim = dim();
6840  // Find the number of second derivatives required
6841  const unsigned n_deriv = N2deriv[el_dim];
6842 
6843  // Get the values of the shape function and local derivatives
6844  d2shape_local_at_knot(ipt, psi, dpsi, d2psi);
6845 
6846  // Allocate memory for the jacobian and inverse jacobian
6847  DenseMatrix<double> jacobian(el_dim), inverse_jacobian(el_dim);
6848  // Calculate the jacobian and inverse jacobian
6849  const double det =
6850  local_to_lagrangian_mapping(dpsi, jacobian, inverse_jacobian);
6851 
6852  // Allocate memory for the jacobian of second derivatives
6853  DenseMatrix<double> jacobian2(n_deriv, el_dim);
6854  // Assemble the jacobian of second derivatives
6855  assemble_local_to_lagrangian_jacobian2(d2psi, jacobian2);
6856 
6857  // Now set the value of the derivatives
6859  jacobian, inverse_jacobian, jacobian2, dpsi, d2psi);
6860  // Return the determinant of the mapping
6861  return det;
6862  }
virtual void d2shape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
Definition: elements.cc:3274

References assemble_local_to_lagrangian_jacobian2(), oomph::FiniteElement::d2shape_local_at_knot(), oomph::FiniteElement::dim(), el_dim, local_to_lagrangian_mapping(), oomph::FiniteElement::N2deriv, and oomph::FiniteElement::transform_second_derivatives().

Referenced by oomph::StorableShapeSolidElementBase::d2shape_lagrangian_at_knot(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_residuals_beam(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_residuals_shell(), oomph::KirchhoffLoveShellEquations::get_energy(), oomph::KirchhoffLoveBeamEquations::get_energy(), and oomph::StorableShapeSolidElementBase::pre_compute_d2shape_lagrangian_at_knots().

◆ describe_local_dofs()

void oomph::SolidFiniteElement::describe_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
virtual

Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, and oomph::FSIWallElement.

6516  {
6517  // Call the standard finite element description.
6518  FiniteElement::describe_local_dofs(out, current_string);
6519  describe_solid_local_dofs(out, current_string);
6520  }
virtual void describe_local_dofs(std::ostream &out, const std::string &current_string) const
Definition: elements.cc:1709
void describe_solid_local_dofs(std::ostream &out, const std::string &current_string) const
Classifies dofs locally for solid specific aspects.
Definition: elements.cc:6874
std::ofstream out("Result.txt")

References oomph::FiniteElement::describe_local_dofs(), describe_solid_local_dofs(), and out().

◆ describe_solid_local_dofs()

void oomph::SolidFiniteElement::describe_solid_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
protected

Classifies dofs locally for solid specific aspects.

Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

6876  {
6877  // Find the number of nodes
6878  const unsigned n_node = nnode();
6879  // Loop over the nodes
6880  for (unsigned n = 0; n < n_node; n++)
6881  {
6882  // Cast to a solid node
6883  SolidNode* cast_node_pt = static_cast<SolidNode*>(node_pt(n));
6884  std::stringstream conversion;
6885  conversion << " of Solid Node " << n << current_string;
6886  std::string in(conversion.str());
6887  cast_node_pt->describe_dofs(out, in);
6888  }
6889  }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References oomph::SolidNode::describe_dofs(), n, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), out(), and oomph::Global_string_for_annotation::string().

Referenced by describe_local_dofs(), and oomph::FSIWallElement::describe_local_dofs().

◆ disable_solve_for_consistent_newmark_accel()

void oomph::SolidFiniteElement::disable_solve_for_consistent_newmark_accel ( )
inline

Set to reset the problem being solved to be the standard problem.

3973  {
3975  }

References Solve_for_consistent_newmark_accel_flag.

◆ dshape_lagrangian()

double oomph::SolidFiniteElement::dshape_lagrangian ( const Vector< double > &  s,
Shape psi,
DShape dpsi 
) const

Calculate shape functions and derivatives w.r.t. Lagrangian coordinates at local coordinate s. Returns the Jacobian of the mapping from Lagrangian to local coordinates.

Calculate shape functions and derivatives w.r.t. Lagrangian coordinates at local coordinate s. Returns the Jacobian of the mapping from Lagrangian to local coordinates. General case, may be overloaded

6713  {
6714  // Find the element dimension
6715  const unsigned el_dim = dim();
6716 
6717  // Get the values of the shape function and local derivatives
6718  // Temporarily stored in dpsi
6719  dshape_local(s, psi, dpsi);
6720 
6721  // Allocate memory for the inverse jacobian
6722  DenseMatrix<double> inverse_jacobian(el_dim);
6723  // Now calculate the inverse jacobian
6724  const double det = local_to_lagrangian_mapping(dpsi, inverse_jacobian);
6725 
6726  // Now set the values of the derivatives to be dpsidxi
6727  transform_derivatives(inverse_jacobian, dpsi);
6728  // Return the determinant of the jacobian
6729  return det;
6730  }
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: elements.cc:2833
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Definition: elements.h:1981

References oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local(), el_dim, local_to_lagrangian_mapping(), s, and oomph::FiniteElement::transform_derivatives().

Referenced by oomph::FSIHermiteBeamElement::dposition_dlagrangian_at_local_coordinate(), oomph::FSIDiagHermiteShellElement::dposition_dlagrangian_at_local_coordinate(), fill_in_jacobian_for_newmark_accel(), oomph::KirchhoffLoveShellEquations::get_normal(), oomph::KirchhoffLoveBeamEquations::get_normal(), and oomph::KirchhoffLoveShellEquations::load_rate_of_work().

◆ dshape_lagrangian_at_knot()

double oomph::SolidFiniteElement::dshape_lagrangian_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsi 
) const
virtual

Return the geometric shape functions and also first derivatives w.r.t. Lagrangian coordinates at ipt-th integration point.

Compute the geometric shape functions and also first derivatives w.r.t. Lagrangian coordinates at integration point ipt. Most general form of function, but may be over-loaded if desired

Reimplemented in oomph::StorableShapeSolidElementBase.

6740  {
6741  // Find the element dimension
6742  const unsigned el_dim = dim();
6743 
6744  // Shape function for the local derivatives
6745  // Again we ASSUME (insist) that the lagrangian coordinates
6746  // are interpolated through the nodes
6747  // Get the values of the shape function and local derivatives
6748  dshape_local_at_knot(ipt, psi, dpsi);
6749 
6750  // Allocate memory for the inverse jacobian
6751  DenseMatrix<double> inverse_jacobian(el_dim);
6752  // Now calculate the inverse jacobian
6753  const double det = local_to_lagrangian_mapping(dpsi, inverse_jacobian);
6754 
6755  // Now set the values of the derivatives
6756  transform_derivatives(inverse_jacobian, dpsi);
6757  // Return the determinant of the jacobian
6758  return det;
6759  }
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Definition: elements.cc:3239

References oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local_at_knot(), el_dim, local_to_lagrangian_mapping(), and oomph::FiniteElement::transform_derivatives().

Referenced by oomph::AxisymmetricPVDEquations::compute_physical_size(), oomph::AxisymmetricPVDEquationsWithPressure::compute_physical_size(), oomph::StorableShapeSolidElementBase::dshape_lagrangian_at_knot(), oomph::AxisymmetricPVDEquations::fill_in_contribution_to_residuals_axisym_pvd(), oomph::RefineableQDPVDElement< DIM, NNODE_1D >::fill_in_generic_contribution_to_residuals_pvd(), oomph::AxisymmetricPVDEquationsWithPressure::fill_in_generic_residual_contribution_axisym_pvd_with_pressure(), and oomph::StorableShapeSolidElementBase::pre_compute_dshape_lagrangian_at_knots().

◆ enable_solve_for_consistent_newmark_accel()

void oomph::SolidFiniteElement::enable_solve_for_consistent_newmark_accel ( )
inline

Set to alter the problem being solved when assigning the initial conditions for time-dependent problems: solve for the history value that corresponds to the acceleration in the Newmark scheme by demanding that the PDE is satisifed at the initial time. In this case the Jacobian is replaced by the mass matrix.

3967  {
3969  }

References Solve_for_consistent_newmark_accel_flag.

Referenced by oomph::SolidICProblem::set_newmark_initial_condition_consistently().

◆ fill_in_contribution_to_jacobian()

void oomph::SolidFiniteElement::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlineprotectedvirtual

Overload the fill_in_contribution_to_jacobian() function to use finite differences to calculate the solid residuals by default

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableFSISolidTractionElement< ELEMENT, DIM >, oomph::FSISolidTractionElement< ELEMENT, DIM >, oomph::RefineableSolidTractionElement< ELEMENT >, oomph::SolidTractionElement< ELEMENT >, oomph::PVDEquationsWithPressure< DIM >, oomph::PVDEquations< DIM >, oomph::FSIDiagHermiteShellElement, oomph::KirchhoffLoveShellEquations, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, and oomph::FSIWallElement.

4187  {
4188  // Add the contribution to the residuals
4190 
4191  // Solve for the consistent acceleration in Newmark scheme?
4193  {
4195  return;
4196  }
4197 
4198  // Allocate storage for the full residuals (residuals of entire element)
4199  unsigned n_dof = ndof();
4200  Vector<double> full_residuals(n_dof);
4201  // Get the residuals for the entire element
4202  get_residuals(full_residuals);
4203  // Get the solid entries in the jacobian using finite differences
4204  fill_in_jacobian_from_solid_position_by_fd(full_residuals, jacobian);
4205  // There could be internal data
4206  //(finite-difference the lot by default)
4207  fill_in_jacobian_from_internal_by_fd(full_residuals, jacobian, true);
4208  // There could also be external data
4209  //(finite-difference the lot by default)
4210  fill_in_jacobian_from_external_by_fd(full_residuals, jacobian, true);
4211  // There could also be nodal data
4212  fill_in_jacobian_from_nodal_by_fd(full_residuals, jacobian);
4213  }
virtual void fill_in_jacobian_from_nodal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:3660
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: elements.h:357
virtual void get_residuals(Vector< double > &residuals)
Definition: elements.h:980
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1199
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1102
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:6985
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Definition: elements.cc:7227

References oomph::GeneralisedElement::fill_in_contribution_to_residuals(), fill_in_jacobian_for_newmark_accel(), oomph::GeneralisedElement::fill_in_jacobian_from_external_by_fd(), oomph::GeneralisedElement::fill_in_jacobian_from_internal_by_fd(), oomph::FiniteElement::fill_in_jacobian_from_nodal_by_fd(), fill_in_jacobian_from_solid_position_by_fd(), oomph::GeneralisedElement::get_residuals(), oomph::GeneralisedElement::ndof(), and Solve_for_consistent_newmark_accel_flag.

Referenced by QThermalPVDElement< DIM >::fill_in_contribution_to_jacobian().

◆ fill_in_generic_jacobian_for_solid_ic()

void oomph::SolidFiniteElement::fill_in_generic_jacobian_for_solid_ic ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned flag 
)
protected

Helper function to fill in the residuals and (if flag==1) the Jacobian for the setup of an initial condition. The global equations are:

\[ 0 = \int \left( \sum_{j=1}^N \sum_{k=1}^K X_{ijk} \psi_{jk}(\xi_n) - \frac{\partial^D R^{(IC)}_i(\xi_n)}{\partial t^D} \right) \psi_{lm}(\xi_n) \ dv \mbox{ \ \ \ \ for \ \ \ $l=1,...,N, \ \ m=1,...,K$} \]

where \( N \) is the number of nodes in the mesh and \( K \) the number of generalised nodal coordinates. The initial shape of the solid body, \( {\bf R}^{(IC)},\) and its time-derivatives are specified via the GeomObject that is stored in the SolidFiniteElement::SolidInitialCondition object. The latter also stores the order of the time-derivative \( D \) to be assigned.

7380  {
7381  // Find the number of nodes and position types
7382  const unsigned n_node = nnode();
7383  const unsigned n_position_type = nnodal_position_type();
7384 
7385  // Set the dimension of the global coordinates
7386  const unsigned nodal_dim = nodal_dimension();
7387 
7388  // Find the number of lagragian types from the first node
7389  const unsigned n_lagrangian_type = nnodal_lagrangian_type();
7390 
7391  // Set the number of lagrangian coordinates
7392  const unsigned n_lagrangian = dim();
7393 
7394  // Integer storage for local equation number
7395  int local_eqn = 0;
7396  int local_unknown = 0;
7397 
7398  // # of nodes, # of positional dofs
7399  Shape psi(n_node, n_position_type);
7400 
7401  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
7402  // not needed but they come for free when we compute the Jacobian
7403  // DShape dpsidxi(n_node,n_position_type,n_lagrangian);
7404 
7405  // Set # of integration points
7406  const unsigned n_intpt = integral_pt()->nweight();
7407 
7408  // Set the Vector to hold local coordinates
7409  Vector<double> s(n_lagrangian);
7410 
7411  // Loop over the integration points
7412  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
7413  {
7414  // Assign values of s
7415  for (unsigned i = 0; i < n_lagrangian; i++)
7416  {
7417  s[i] = integral_pt()->knot(ipt, i);
7418  }
7419 
7420  // Get the integral weight
7421  double w = integral_pt()->weight(ipt);
7422 
7423  // Shape fcts
7424  shape(s, psi);
7425 
7426  // Get Lagrangian coordinate
7427  Vector<double> xi(n_lagrangian, 0.0);
7428 
7429  // Loop over the number of lagrangian coordinates
7430  for (unsigned i = 0; i < n_lagrangian; i++)
7431  {
7432  // Loop over the local nodes
7433  for (unsigned l = 0; l < n_node; l++)
7434  {
7435  // Loop over the number of dofs
7436  for (unsigned k = 0; k < n_lagrangian_type; k++)
7437  {
7438  xi[i] += lagrangian_position_gen(l, k, i) * psi(l, k);
7439  }
7440  }
7441  }
7442 
7443  // Get initial condition
7444  Vector<double> drdt_ic(nodal_dim);
7446  xi, Solid_ic_pt->ic_time_deriv(), drdt_ic);
7447 
7448  // Weak form of assignment of initial guess
7449 
7450  // Loop over the number of node
7451  for (unsigned l = 0; l < n_node; l++)
7452  {
7453  // Loop over the type of degree of freedom
7454  for (unsigned k = 0; k < n_position_type; k++)
7455  {
7456  // Loop over the coordinate directions
7457  for (unsigned i = 0; i < nodal_dim; i++)
7458  {
7459  local_eqn = position_local_eqn(l, k, i);
7460 
7461  // If it's not a boundary condition
7462  if (local_eqn >= 0)
7463  {
7464  // Note we're ignoring the mapping between local and
7465  // global Lagrangian coords -- doesn't matter here;
7466  // we're just enforcing a slightly different
7467  // weak form.
7468  residuals[local_eqn] +=
7469  (interpolated_x(s, i) - drdt_ic[i]) * psi(l, k) * w;
7470 
7471 
7472  // Do Jacobian too?
7473  if (flag == 1)
7474  {
7475  // Loop over the number of node
7476  for (unsigned ll = 0; ll < n_node; ll++)
7477  {
7478  // Loop over the type of degree of freedom
7479  for (unsigned kk = 0; kk < n_position_type; kk++)
7480  {
7481  // Only diagonal term
7482  unsigned ii = i;
7483 
7484  local_unknown = position_local_eqn(ll, kk, ii);
7485 
7486  // If it's not a boundary condition
7487  if (local_unknown >= 0)
7488  {
7489  // Note we're ignoring the mapping between local and
7490  // global Lagrangian coords -- doesn't matter here;
7491  // we're just enforcing a slightly different
7492  // weak form.
7493  jacobian(local_eqn, local_unknown) +=
7494  psi(ll, kk) * psi(l, k) * w;
7495  }
7496  else
7497  {
7498  oomph_info
7499  << "WARNING: You should really free all Data"
7500  << std::endl
7501  << " before setup of initial guess" << std::endl
7502  << "ll, kk, ii " << ll << " " << kk << " " << ii
7503  << std::endl;
7504  }
7505  }
7506  }
7507  }
7508  }
7509  else
7510  {
7511  oomph_info << "WARNING: You should really free all Data"
7512  << std::endl
7513  << " before setup of initial guess"
7514  << std::endl
7515  << "l, k, i " << l << " " << k << " " << i
7516  << std::endl;
7517  }
7518  }
7519  }
7520  }
7521 
7522  } // End of loop over the integration points
7523  }
virtual void shape(const Vector< double > &s, Shape &psi) const =0
virtual void dposition_dt(const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
Definition: geom_objects.h:292
double lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:3912
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Definition: elements.h:4137
GeomObject *& geom_object_pt()
Definition: elements.h:3511
unsigned & ic_time_deriv()
Which time derivative are we currently assigning?
Definition: elements.h:3517
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References oomph::FiniteElement::dim(), oomph::GeomObject::dposition_dt(), oomph::SolidInitialCondition::geom_object_pt(), i, oomph::SolidInitialCondition::ic_time_deriv(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), k, oomph::Integral::knot(), lagrangian_position_gen(), nnodal_lagrangian_type(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::Integral::nweight(), oomph::oomph_info, position_local_eqn(), s, oomph::FiniteElement::shape(), Solid_ic_pt, w, and oomph::Integral::weight().

Referenced by fill_in_jacobian_for_solid_ic(), and fill_in_residuals_for_solid_ic().

◆ fill_in_jacobian_for_newmark_accel()

void oomph::SolidFiniteElement::fill_in_jacobian_for_newmark_accel ( DenseMatrix< double > &  jacobian)

Fill in the contributions of the Jacobian matrix for the consistent assignment of the initial "accelerations" in Newmark scheme. In this case the Jacobian is the mass matrix.

Add jacobian and residuals for consistent assignment of initial "accelerations" in Newmark scheme. Jacobian is the mass matrix.

7229  {
7230 #ifdef PARANOID
7231  // Check that we're computing the real residuals, not the
7232  // ones corresponding to the assignement of a prescribed displacement
7234  {
7235  std::ostringstream error_stream;
7236  error_stream << "Can only call fill_in_jacobian_for_newmark_accel()\n"
7237  << "With Solve_for_consistent_newmark_accel_flag:"
7239  error_stream << "Solid_ic_pt: " << Solid_ic_pt << std::endl;
7240 
7241  throw OomphLibError(
7242  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
7243  }
7244 #endif
7245 
7246  // Find the number of nodes
7247  const unsigned n_node = nnode();
7248  const unsigned n_position_type = nnodal_position_type();
7249  const unsigned nodal_dim = nodal_dimension();
7250 
7251  // Set the number of Lagrangian coordinates
7252  const unsigned n_lagrangian = dim();
7253 
7254  // Integer storage for local equation and unknown
7255  int local_eqn = 0, local_unknown = 0;
7256 
7257  // Set up memory for the shape functions:
7258  // # of nodes, # of positional dofs
7259  Shape psi(n_node, n_position_type);
7260 
7261  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
7262  // Not needed but they come for free when compute the Jacobian.
7263  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
7264 
7265  // Set # of integration points
7266  const unsigned n_intpt = integral_pt()->nweight();
7267 
7268  // Set the Vector to hold local coordinates
7269  Vector<double> s(n_lagrangian);
7270 
7271  // Get positional timestepper from first nodal point
7272  TimeStepper* timestepper_pt = node_pt(0)->position_time_stepper_pt();
7273 
7274 #ifdef PARANOID
7275  // Of course all this only works if we're actually using a
7276  // Newmark timestepper!
7277  if (timestepper_pt->type() != "Newmark")
7278  {
7279  std::ostringstream error_stream;
7280  error_stream
7281  << "Assignment of Newmark accelerations obviously only works\n"
7282  << "for Newmark timesteppers. You've called me with "
7283  << timestepper_pt->type() << std::endl;
7284 
7285  throw OomphLibError(
7286  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
7287  }
7288 #endif
7289 
7290  // "Acceleration" is the last history value:
7291  const unsigned ntstorage = timestepper_pt->ntstorage();
7292  const double accel_weight = timestepper_pt->weight(2, ntstorage - 1);
7293 
7294  // Loop over the integration points
7295  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
7296  {
7297  // Assign values of s
7298  for (unsigned i = 0; i < n_lagrangian; i++)
7299  {
7300  s[i] = integral_pt()->knot(ipt, i);
7301  }
7302 
7303  // Get the integral weight
7304  double w = integral_pt()->weight(ipt);
7305 
7306  // Jacobian of mapping between local and Lagrangian coords and shape
7307  // functions
7308  double J = dshape_lagrangian(s, psi, dpsidxi);
7309 
7310  // Get Lagrangian coordinate
7311  Vector<double> xi(n_lagrangian);
7312  interpolated_xi(s, xi);
7313 
7314  // Get multiplier for inertia terms
7315  double factor = multiplier(xi);
7316 
7317  // Premultiply the weights and the Jacobian
7318  double W = w * J;
7319 
7320  // Loop over the nodes
7321  for (unsigned l0 = 0; l0 < n_node; l0++)
7322  {
7323  // Loop over the positional dofs: 'Type': 0: displacement; 1: deriv
7324  for (unsigned k0 = 0; k0 < n_position_type; k0++)
7325  {
7326  // Loop over Eulerian directions
7327  for (unsigned i0 = 0; i0 < nodal_dim; i0++)
7328  {
7329  local_eqn = position_local_eqn(l0, k0, i0);
7330  // If it's a degree of freedom, add contribution
7331  if (local_eqn >= 0)
7332  {
7333  // Loop over the nodes
7334  for (unsigned l1 = 0; l1 < n_node; l1++)
7335  {
7336  // Loop over the positional dofs: 'Type': 0: displacement;
7337  // 1: deriv
7338  for (unsigned k1 = 0; k1 < n_position_type; k1++)
7339  {
7340  // Loop over Eulerian directions
7341  unsigned i1 = i0;
7342  {
7343  local_unknown = position_local_eqn(l1, k1, i1);
7344  // If it's a degree of freedom, add contribution
7345  if (local_unknown >= 0)
7346  {
7347  // Add contribution: Mass matrix, multiplied by
7348  // weight for "acceleration" in Newmark scheme
7349  // and general multiplier
7350  jacobian(local_eqn, local_unknown) +=
7351  factor * accel_weight * psi(l0, k0) * psi(l1, k1) * W;
7352  }
7353  }
7354  }
7355  }
7356  }
7357  }
7358  }
7359  }
7360 
7361  } // End of loop over the integration points
7362  }
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
double dshape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
Definition: elements.cc:6710
double multiplier(const Vector< double > &xi)
Definition: elements.h:4308
std::string type() const
Definition: timesteppers.h:490

References oomph::FiniteElement::dim(), dshape_lagrangian(), i, oomph::FiniteElement::integral_pt(), interpolated_xi(), J, oomph::Integral::knot(), multiplier(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), oomph::TimeStepper::ntstorage(), oomph::Integral::nweight(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, position_local_eqn(), oomph::Node::position_time_stepper_pt(), s, Solid_ic_pt, Solve_for_consistent_newmark_accel_flag, oomph::TimeStepper::type(), w, oomph::QuadTreeNames::W, oomph::Integral::weight(), and oomph::TimeStepper::weight().

Referenced by oomph::AxisymmetricPVDEquations::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian(), and oomph::PVDEquations< DIM >::fill_in_contribution_to_jacobian().

◆ fill_in_jacobian_for_solid_ic()

void oomph::SolidFiniteElement::fill_in_jacobian_for_solid_ic ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Fill in the residuals and Jacobian for the setup of an initial condition. The global equations are:

\[ 0 = \int \left( \sum_{j=1}^N \sum_{k=1}^K X_{ijk} \psi_{jk}(\xi_n) - \frac{\partial^D R^{(IC)}_i(\xi_n)}{\partial t^D} \right) \psi_{lm}(\xi_n) \ dv \mbox{ \ \ \ \ for \ \ \ $l=1,...,N, \ \ m=1,...,K$} \]

where \( N \) is the number of nodes in the mesh and \( K \) the number of generalised nodal coordinates. The initial shape of the solid body, \( {\bf R}^{(IC)},\) and its time-derivatives are specified via the GeomObject that is stored in the SolidFiniteElement::SolidInitialCondition object. The latter also stores the order of the time-derivative \( D \) to be assigned.

4037  {
4038  // Call the generic routine with the flag set to 1
4039  fill_in_generic_jacobian_for_solid_ic(residuals, jacobian, 1);
4040  }
void fill_in_generic_jacobian_for_solid_ic(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: elements.cc:7376

References fill_in_generic_jacobian_for_solid_ic().

Referenced by oomph::PVDEquations< DIM >::fill_in_contribution_to_jacobian().

◆ fill_in_jacobian_from_solid_position_by_fd() [1/2]

void oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd ( DenseMatrix< double > &  jacobian)
inlineprotected

Use finite differences to calculate the Jacobian entries corresponding to the solid positions.

4227  {
4228  // Allocate storage for a residuals vector and initialise to zero
4229  unsigned n_dof = ndof();
4230  Vector<double> residuals(n_dof, 0.0);
4231  // Get the residuals for the entire element
4232  get_residuals(residuals);
4233  // Call the jacobian calculation
4234  fill_in_jacobian_from_solid_position_by_fd(residuals, jacobian);
4235  }

References fill_in_jacobian_from_solid_position_by_fd(), oomph::GeneralisedElement::get_residuals(), and oomph::GeneralisedElement::ndof().

◆ fill_in_jacobian_from_solid_position_by_fd() [2/2]

void oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
protectedvirtual

Use finite differences to calculate the Jacobian entries corresponding to the solid positions. This version assumes that the residuals vector has already been computed

This function calculates the entries of Jacobian matrix, used in the Newton method, associated with the elastic problem in which the nodal position is a variable. It does this using finite differences, rather than an analytical formulation, so can be done in total generality.

Reimplemented in oomph::RefineableSolidElement.

6987  {
6988  // Flag to indicate if we use first or second order FD
6989  // bool use_first_order_fd=false;
6990 
6991  // Find the number of nodes
6992  const unsigned n_node = nnode();
6993 
6994  // If there aren't any nodes, then return straight away
6995  if (n_node == 0)
6996  {
6997  return;
6998  }
6999 
7000  // Call the update function to ensure that the element is in
7001  // a consistent state before finite differencing starts
7003 
7004  // Get the number of position dofs and dimensions at the node
7005  const unsigned n_position_type = nnodal_position_type();
7006  const unsigned nodal_dim = nodal_dimension();
7007 
7008  // Find the number of dofs in the element
7009  const unsigned n_dof = this->ndof();
7010 
7011  // Create newres vectors
7012  Vector<double> newres(n_dof);
7013  // Vector<double> newres_minus(n_dof);
7014 
7015  // Integer storage for local unknown
7016  int local_unknown = 0;
7017 
7018  // Should probably give this a more global scope
7019  const double fd_step = Default_fd_jacobian_step;
7020 
7021  // Loop over the nodes
7022  for (unsigned n = 0; n < n_node; n++)
7023  {
7024  // Loop over position dofs
7025  for (unsigned k = 0; k < n_position_type; k++)
7026  {
7027  // Loop over dimension
7028  for (unsigned i = 0; i < nodal_dim; i++)
7029  {
7030  // If the variable is free
7031  local_unknown = position_local_eqn(n, k, i);
7032  if (local_unknown >= 0)
7033  {
7034  // Store a pointer to the (generalised) Eulerian nodal position
7035  double* const value_pt = &(node_pt(n)->x_gen(k, i));
7036 
7037  // Save the old value of the (generalised) Eulerian nodal position
7038  const double old_var = *value_pt;
7039 
7040  // Increment the (generalised) Eulerian nodal position
7041  *value_pt += fd_step;
7042 
7043  // Perform any auxialiary node updates
7045 
7046  // Update any other dependent variables
7048 
7049  // Calculate the new residuals
7050  get_residuals(newres);
7051 
7052  // if (use_first_order_fd)
7053  {
7054  // Do forward finite differences
7055  for (unsigned m = 0; m < n_dof; m++)
7056  {
7057  // Stick the entry into the Jacobian matrix
7058  jacobian(m, local_unknown) =
7059  (newres[m] - residuals[m]) / fd_step;
7060  }
7061  }
7062  // else
7063  // {
7064  // //Take backwards step for the (generalised) Eulerian
7065  // nodal
7066  // // position
7067  // node_pt(n)->x_gen(k,i) = old_var-fd_step;
7068 
7069  // //Calculate the new residuals at backward position
7070  // get_residuals(newres_minus);
7071 
7072  // //Do central finite differences
7073  // for(unsigned m=0;m<n_dof;m++)
7074  // {
7075  // //Stick the entry into the Jacobian matrix
7076  // jacobian(m,local_unknown) =
7077  // (newres[m] - newres_minus[m])/(2.0*fd_step);
7078  // }
7079  // }
7080 
7081  // Reset the (generalised) Eulerian nodal position
7082  *value_pt = old_var;
7083 
7084 
7085  // Perform any auxialiary node updates
7087 
7088  // Reset any other dependent variables
7090  }
7091  }
7092  }
7093  }
7094 
7095  // End of finite difference loop
7096  // Final reset of any dependent data
7098  }
static double Default_fd_jacobian_step
Definition: elements.h:1198
double & x_gen(const unsigned &k, const unsigned &i)
Definition: nodes.h:1126
void perform_auxiliary_node_update_fct()
Definition: nodes.h:1615
virtual void update_before_solid_position_fd()
Definition: elements.h:4240
virtual void update_in_solid_position_fd(const unsigned &i)
Definition: elements.h:4250
virtual void reset_in_solid_position_fd(const unsigned &i)
Definition: elements.h:4255
virtual void reset_after_solid_position_fd()
Definition: elements.h:4245
int * m
Definition: level2_cplx_impl.h:294

References oomph::GeneralisedElement::Default_fd_jacobian_step, oomph::GeneralisedElement::get_residuals(), i, k, m, n, oomph::GeneralisedElement::ndof(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::FiniteElement::node_pt(), oomph::Node::perform_auxiliary_node_update_fct(), position_local_eqn(), reset_after_solid_position_fd(), reset_in_solid_position_fd(), update_before_solid_position_fd(), update_in_solid_position_fd(), and oomph::Node::x_gen().

Referenced by oomph::AxisymmetricPVDEquations::fill_in_contribution_to_jacobian(), oomph::AxisymmetricPVDEquationsWithPressure::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_jacobian(), oomph::ElasticPointFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ElasticLineFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian(), oomph::PVDEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian(), oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), and fill_in_jacobian_from_solid_position_by_fd().

◆ fill_in_residuals_for_solid_ic()

void oomph::SolidFiniteElement::fill_in_residuals_for_solid_ic ( Vector< double > &  residuals)
inline

Fill in the residuals for the setup of an initial condition. The global equations are:

\[ 0 = \int \left( \sum_{j=1}^N \sum_{k=1}^K X_{ijk} \psi_{jk}(\xi_n) - \frac{\partial^D R^{(IC)}_i(\xi_n)}{\partial t^D} \right) \psi_{lm}(\xi_n) \ dv \mbox{ \ \ \ \ for \ \ \ $l=1,...,N, \ \ m=1,...,K$} \]

where \( N \) is the number of nodes in the mesh and \( K \) the number of generalised nodal coordinates. The initial shape of the solid body, \( {\bf R}^{(IC)},\) and its time-derivatives are specified via the GeomObject that is stored in the SolidFiniteElement::SolidInitialCondition object. The latter also stores the order of the time-derivative \( D \) to be assigned.

4019  {
4020  // Call the generic residuals function with flag set to 0
4021  // using a dummy matrix argument
4023  residuals, GeneralisedElement::Dummy_matrix, 0);
4024  }
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227

References oomph::GeneralisedElement::Dummy_matrix, and fill_in_generic_jacobian_for_solid_ic().

Referenced by oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_residuals_beam(), and get_residuals_for_solid_ic().

◆ geom_data_pt()

Data* oomph::SolidFiniteElement::geom_data_pt ( const unsigned j)
inlinevirtual

Return pointer to the j-th Data item that the object's shape depends on. (Redirects to the nodes' positional Data).

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSolidElement.

3616  {
3617  return static_cast<SolidNode*>(node_pt(j))->variable_position_pt();
3618  }

References j, and oomph::FiniteElement::node_pt().

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

◆ get_residuals_for_solid_ic()

virtual void oomph::SolidFiniteElement::get_residuals_for_solid_ic ( Vector< double > &  residuals)
inlinevirtual

Compute the residuals for the setup of an initial condition. The global equations are:

\[ 0 = \int \left( \sum_{j=1}^N \sum_{k=1}^K X_{ijk} \psi_{jk}(\xi_n) - \frac{\partial^D R^{(IC)}_i(\xi_n)}{\partial t^D} \right) \psi_{lm}(\xi_n) \ dv \mbox{ \ \ \ \ for \ \ \ $l=1,...,N, \ \ m=1,...,K$} \]

where \( N \) is the number of nodes in the mesh and \( K \) the number of generalised nodal coordinates. The initial shape of the solid body, \( {\bf R}^{(IC)},\) and its time-derivatives are specified via the GeomObject that is stored in the SolidFiniteElement::SolidInitialCondition object. The latter also stores the order of the time-derivative \( D \) to be assigned.

4004  {
4005  residuals.initialise(0.0);
4006  fill_in_residuals_for_solid_ic(residuals);
4007  }
void fill_in_residuals_for_solid_ic(Vector< double > &residuals)
Definition: elements.h:4018
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167

References fill_in_residuals_for_solid_ic(), and oomph::Vector< _Tp >::initialise().

Referenced by oomph::RefineableQDPVDElement< DIM, NNODE_1D >::fill_in_generic_contribution_to_residuals_pvd().

◆ get_x_and_xi()

virtual void oomph::SolidFiniteElement::get_x_and_xi ( const Vector< double > &  s,
Vector< double > &  x_fe,
Vector< double > &  x,
Vector< double > &  xi_fe,
Vector< double > &  xi 
) const
inlinevirtual

Eulerian and Lagrangian coordinates as function of the local coordinates: The Eulerian position is returned in FE-interpolated form (x_fe) and then in the form obtained from the "current" MacroElement representation (if it exists – if not, x is the same as x_fe). This allows the Domain/MacroElement- based representation to be used to apply displacement boundary conditions exactly. Ditto for the Lagrangian coordinates returned in xi_fe and xi. (Broken virtual – overload in specific geometric element class if you want to use this functionality.)

Reimplemented in oomph::QSolidElementBase.

3664  {
3665  throw OomphLibError(
3666  "get_x_and_xi(...) is not implemented for this element\n",
3669  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

◆ has_internal_solid_data()

virtual bool oomph::SolidFiniteElement::has_internal_solid_data ( )
inlinevirtual

Return whether there is internal solid data (e.g. discontinuous solid pressure). At present, this is used to report an error in setting initial conditions for ElasticProblems which can't handle such cases. The default is false.

Reimplemented in oomph::QPVDElementWithPressure< DIM >, and oomph::AxisymQPVDElementWithPressure.

3575  {
3576  return false;
3577  }

Referenced by oomph::SolidICProblem::backup_original_state(), oomph::SolidICProblem::reset_original_state(), and oomph::SolidICProblem::setup_problem().

◆ identify_geometric_data()

void oomph::SolidFiniteElement::identify_geometric_data ( std::set< Data * > &  geometric_data_pt)
inlinevirtual

Specify Data that affects the geometry of the element by adding the position Data to the set that's passed in. (This functionality is required in FSI problems; set is used to avoid double counting).

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSolidElement, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, and oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >.

3625  {
3626  // Loop over the node update data and add to the set
3627  const unsigned n_node = this->nnode();
3628  for (unsigned n = 0; n < n_node; n++)
3629  {
3630  geometric_data_pt.insert(
3631  dynamic_cast<SolidNode*>(this->node_pt(n))->variable_position_pt());
3632  }
3633  }

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

◆ interpolated_dxids()

void oomph::SolidFiniteElement::interpolated_dxids ( const Vector< double > &  s,
DenseMatrix< double > &  dxids 
) const
virtual

Compute derivatives of FE-interpolated Lagrangian coordinates xi with respect to local coordinates: dxids[i][j]=dxi_i/ds_j.

Compute derivatives of FE-interpolated Lagrangian coordinates xi with respect to local coordinates: dxids[i][j]=dxi_i/ds_j

7182  {
7183  // Find the number of nodes
7184  const unsigned n_node = nnode();
7185 
7186  // Find the number of lagrangian types from the first node
7187  const unsigned n_lagrangian_type = nnodal_lagrangian_type();
7188 
7189  // Dimension of the element = number of local coordinates
7190  unsigned el_dim = dim();
7191 
7192  // Assign storage for the local shape function
7193  Shape psi(n_node, n_lagrangian_type);
7194  DShape dpsi(n_node, n_lagrangian_type, el_dim);
7195 
7196  // Find the values of shape function and its derivs w.r.t. to local coords
7197  dshape_local(s, psi, dpsi);
7198 
7199  // Read out the number of lagrangian coordinates from the node
7200  const unsigned n_lagrangian = lagrangian_dimension();
7201 
7202  // Loop over the number of lagrangian and local coordinates
7203  for (unsigned i = 0; i < n_lagrangian; i++)
7204  {
7205  for (unsigned j = 0; j < el_dim; j++)
7206  {
7207  // Initialise component to zero
7208  dxids(i, j) = 0.0;
7209 
7210  // Loop over the local nodes
7211  for (unsigned l = 0; l < n_node; l++)
7212  {
7213  // Loop over the number of dofs
7214  for (unsigned k = 0; k < n_lagrangian_type; k++)
7215  {
7216  dxids(i, j) += lagrangian_position_gen(l, k, i) * dpsi(l, k, j);
7217  }
7218  }
7219  }
7220  }
7221  }

References oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local(), el_dim, i, j, k, lagrangian_dimension(), lagrangian_position_gen(), nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), and s.

◆ interpolated_xi() [1/2]

double oomph::SolidFiniteElement::interpolated_xi ( const Vector< double > &  s,
const unsigned i 
) const
virtual

Return i-th FE-interpolated Lagrangian coordinate xi[i] at local coordinate s.

Return i-th FE-interpolated Lagrangian coordinate at local coordinate s.

Reimplemented in oomph::SolidFaceElement.

7106  {
7107  // Find the number of nodes
7108  const unsigned n_node = nnode();
7109 
7110  // Find the number of lagrangian types from the first node
7111  const unsigned n_lagrangian_type = nnodal_lagrangian_type();
7112 
7113  // Assign storage for the local shape function
7114  Shape psi(n_node, n_lagrangian_type);
7115 
7116  // Find the values of shape function
7117  shape(s, psi);
7118 
7119  // Initialise value of xi
7120  double interpolated_xi = 0.0;
7121 
7122  // Loop over the local nodes
7123  for (unsigned l = 0; l < n_node; l++)
7124  {
7125  // Loop over the number of dofs
7126  for (unsigned k = 0; k < n_lagrangian_type; k++)
7127  {
7128  interpolated_xi += lagrangian_position_gen(l, k, i) * psi(l, k);
7129  }
7130  }
7131 
7132  return (interpolated_xi);
7133  }

References i, k, lagrangian_position_gen(), nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), s, and oomph::FiniteElement::shape().

Referenced by compute_norm(), oomph::AxisymmetricPVDEquations::compute_physical_size(), oomph::AxisymmetricPVDEquationsWithPressure::compute_physical_size(), AirwayReopeningProblem< ELEMENT >::connect_walls(), DiskShockWaveProblem< ELEMENT, TIMESTEPPER >::doc_solution(), CantileverProblem< ELEMENT >::doc_solution(), DiskOscillationProblem< ELEMENT >::doc_solution(), FSIChannelWithLeafletProblem< ELEMENT >::doc_solution(), oomph::AxisymmetricPVDEquations::fill_in_contribution_to_residuals_axisym_pvd(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_residuals_beam(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_residuals_shell(), oomph::RefineableQDPVDElement< DIM, NNODE_1D >::fill_in_generic_contribution_to_residuals_pvd(), oomph::AxisymmetricPVDEquationsWithPressure::fill_in_generic_residual_contribution_axisym_pvd_with_pressure(), fill_in_jacobian_for_newmark_accel(), FSICollapsibleChannelProblem< ELEMENT >::FSICollapsibleChannelProblem(), oomph::KirchhoffLoveShellEquations::get_energy(), oomph::KirchhoffLoveBeamEquations::get_energy(), oomph::KirchhoffLoveShellEquations::get_strain_and_bend(), oomph::QSolidElementBase::get_x_and_xi(), oomph::AxisymmetricPVDEquations::output(), oomph::AxisymDiagHermitePVDElement::output(), oomph::AxisymmetricPVDEquationsWithPressure::output(), oomph::HermiteBeamElement::output(), oomph::HermiteShellElement::output(), oomph::ClampedHermiteShellBoundaryConditionElement::output(), PlateProblem< ELEMENT >::PlateProblem(), and ShellProblem< ELEMENT >::ShellProblem().

◆ interpolated_xi() [2/2]

void oomph::SolidFiniteElement::interpolated_xi ( const Vector< double > &  s,
Vector< double > &  xi 
) const
virtual

Compute FE interpolated Lagrangian coordinate vector xi[] at local coordinate s as Vector

Compute FE-interpolated Lagrangian coordinate vector xi[] at local coordinate s.

Reimplemented in oomph::SolidFaceElement.

7141  {
7142  // Find the number of nodes
7143  const unsigned n_node = nnode();
7144 
7145  // Find the number of lagrangian types from the first node
7146  const unsigned n_lagrangian_type = nnodal_lagrangian_type();
7147 
7148  // Assign storage for the local shape function
7149  Shape psi(n_node, n_lagrangian_type);
7150 
7151  // Find the values of shape function
7152  shape(s, psi);
7153 
7154  // Read out the number of lagrangian coordinates from the node
7155  const unsigned n_lagrangian = lagrangian_dimension();
7156 
7157  // Loop over the number of lagrangian coordinates
7158  for (unsigned i = 0; i < n_lagrangian; i++)
7159  {
7160  // Initialise component to zero
7161  xi[i] = 0.0;
7162 
7163  // Loop over the local nodes
7164  for (unsigned l = 0; l < n_node; l++)
7165  {
7166  // Loop over the number of dofs
7167  for (unsigned k = 0; k < n_lagrangian_type; k++)
7168  {
7169  xi[i] += lagrangian_position_gen(l, k, i) * psi(l, k);
7170  }
7171  }
7172  }
7173  }

References i, k, lagrangian_dimension(), lagrangian_position_gen(), nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), s, and oomph::FiniteElement::shape().

◆ J_lagrangian()

virtual void oomph::SolidFiniteElement::J_lagrangian ( const Vector< double > &  s) const
inlinevirtual

Return the Jacobian of mapping from local to Lagrangian coordinates at local position s. NOT YET IMPLEMENTED

3937  {
3938  // Must be implemented and overloaded in FaceElements
3939  throw OomphLibError("Function not implemented yet",
3942  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ J_lagrangian_at_knot()

virtual double oomph::SolidFiniteElement::J_lagrangian_at_knot ( const unsigned ipt) const
inlinevirtual

Return the Jacobian of the mapping from local to Lagrangian coordinates at the ipt-th integration point. NOT YET IMPLEMENTED

3947  {
3948  // Must be implemented and overloaded in FaceElements
3949  throw OomphLibError("Function not implemented yet",
3952  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ lagrangian_dimension()

unsigned oomph::SolidFiniteElement::lagrangian_dimension ( ) const
inline

Return the number of Lagrangian coordinates that the element requires at all nodes. This is by default the elemental dimension. If we ever need any other case, it can be implemented.

3775  {
3776  return Lagrangian_dimension;
3777  }

References Lagrangian_dimension.

Referenced by construct_boundary_node(), construct_node(), interpolated_dxids(), interpolated_xi(), and set_lagrangian_dimension().

◆ lagrangian_position()

◆ lagrangian_position_gen()

◆ local_to_lagrangian_mapping() [1/2]

double oomph::SolidFiniteElement::local_to_lagrangian_mapping ( const DShape dpsids,
DenseMatrix< double > &  inverse_jacobian 
) const
inlineprotected

Calculate the mapping from local to lagrangian coordinates, given the derivatives of the shape functions w.r.t. local coordinates, Return only the determinant of the jacobian and the inverse of the mapping (ds/dx)

4099  {
4100  // Find the dimension of the element
4101  unsigned el_dim = dim();
4102  // Assign memory for the jacobian
4103  DenseMatrix<double> jacobian(el_dim);
4104  // Calculate the jacobian and inverse
4105  return local_to_lagrangian_mapping(dpsids, jacobian, inverse_jacobian);
4106  }

References oomph::FiniteElement::dim(), el_dim, and local_to_lagrangian_mapping().

◆ local_to_lagrangian_mapping() [2/2]

virtual double oomph::SolidFiniteElement::local_to_lagrangian_mapping ( const DShape dpsids,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  inverse_jacobian 
) const
inlineprotectedvirtual

Calculate the mapping from local to lagrangian coordinates, given the derivatives of the shape functions w.r.t. local coorindates. Return the determinant of the jacobian, the jacobian and inverse jacobian

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

4086  {
4087  // Assemble the jacobian
4088  assemble_local_to_lagrangian_jacobian(dpsids, jacobian);
4089  // Invert the jacobian
4090  return invert_jacobian_mapping(jacobian, inverse_jacobian);
4091  }
virtual double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.cc:2166
virtual void assemble_local_to_lagrangian_jacobian(const DShape &dpsids, DenseMatrix< double > &jacobian) const
Definition: elements.cc:6528

References assemble_local_to_lagrangian_jacobian(), and oomph::FiniteElement::invert_jacobian_mapping().

Referenced by d2shape_lagrangian(), d2shape_lagrangian_at_knot(), dshape_lagrangian(), dshape_lagrangian_at_knot(), and local_to_lagrangian_mapping().

◆ local_to_lagrangian_mapping_diagonal()

double oomph::SolidFiniteElement::local_to_lagrangian_mapping_diagonal ( const DShape dpsids,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  inverse_jacobian 
) const
protectedvirtual

Calculate the mapping from local to Lagrangian coordinates given the derivatives of the shape functions w.r.t the local coorindates. assuming that the coordinates are aligned in the direction of the local coordinates, i.e. there are no cross terms and the jacobian is diagonal. This function returns the determinant of the jacobian, the jacobian and the inverse jacobian.

Calculate the mapping from local to lagrangian coordinates assuming that the coordinates are aligned in the direction of the local coordinates, i.e. there are no cross terms and the jacobian is diagonal. The local derivatives are passed as dpsids and the jacobian and inverse jacobian are returned.

Reimplemented in oomph::RefineableSolidElement.

6647  {
6648  // Find the dimension of the element
6649  const unsigned el_dim = dim();
6650  // Find the number of shape functions and shape functions types
6651  // We shall ASSUME (ENFORCE) that Lagrangian coordinates must
6652  // be interpolated through the nodes
6653  const unsigned n_shape = nnode();
6654  const unsigned n_shape_type = nnodal_lagrangian_type();
6655 
6656  // In this case we assume that there are no cross terms, that is
6657  // global coordinate 0 is always in the direction of local coordinate 0
6658 
6659  // Loop over the coordinates
6660  for (unsigned i = 0; i < el_dim; i++)
6661  {
6662  // Zero the jacobian and inverse jacobian entries
6663  for (unsigned j = 0; j < el_dim; j++)
6664  {
6665  jacobian(i, j) = 0.0;
6666  inverse_jacobian(i, j) = 0.0;
6667  }
6668 
6669  // Loop over the shape functions
6670  for (unsigned l = 0; l < n_shape; l++)
6671  {
6672  // Loop over the types of dof
6673  for (unsigned k = 0; k < n_shape_type; k++)
6674  {
6675  // Derivatives are always dx_{i}/ds_{i}
6676  jacobian(i, i) +=
6677  raw_lagrangian_position_gen(l, k, i) * dpsids(l, k, i);
6678  }
6679  }
6680  }
6681 
6682  // Now calculate the determinant of the matrix
6683  double det = 1.0;
6684  for (unsigned i = 0; i < el_dim; i++)
6685  {
6686  det *= jacobian(i, i);
6687  }
6688 
6689 // Report if Matrix is singular, or negative
6690 #ifdef PARANOID
6691  check_jacobian(det);
6692 #endif
6693 
6694  // Calculate the inverse mapping (trivial in this case)
6695  for (unsigned i = 0; i < el_dim; i++)
6696  {
6697  inverse_jacobian(i, i) = 1.0 / jacobian(i, i);
6698  }
6699 
6700  // Return the value of the Jacobian
6701  return (det);
6702  }
void check_jacobian(const double &jacobian) const
Definition: elements.cc:1750

References oomph::FiniteElement::check_jacobian(), oomph::FiniteElement::dim(), el_dim, i, j, k, nnodal_lagrangian_type(), oomph::FiniteElement::nnode(), and raw_lagrangian_position_gen().

Referenced by oomph::SolidDiagQHermiteElement< DIM >::local_to_lagrangian_mapping().

◆ multiplier()

double oomph::SolidFiniteElement::multiplier ( const Vector< double > &  xi)
inlineprivate

Access to the "multiplier" for the inertia terms in the consistent determination of the initial conditions for Newmark timestepping.

4309  {
4310  // If no function has been set, return 1
4311  if (Multiplier_fct_pt == 0)
4312  {
4313  return 1.0;
4314  }
4315  else
4316  {
4317  // Evaluate function pointer
4318  return (*Multiplier_fct_pt)(xi);
4319  }
4320  }

References Multiplier_fct_pt.

Referenced by fill_in_jacobian_for_newmark_accel().

◆ multiplier_fct_pt() [1/2]

MultiplierFctPt& oomph::SolidFiniteElement::multiplier_fct_pt ( )
inline

Access function: Pointer to multiplicator function for assignment of consistent assignement of initial conditions for Newmark scheme

3980  {
3981  return Multiplier_fct_pt;
3982  }

References Multiplier_fct_pt.

Referenced by oomph::SolidICProblem::set_newmark_initial_condition_consistently().

◆ multiplier_fct_pt() [2/2]

MultiplierFctPt oomph::SolidFiniteElement::multiplier_fct_pt ( ) const
inline

Access function: Pointer to multiplicator function for assignment of consistent assignement of initial conditions for Newmark scheme (const version)

3989  {
3990  return Multiplier_fct_pt;
3991  }

References Multiplier_fct_pt.

◆ ngeom_data()

unsigned oomph::SolidFiniteElement::ngeom_data ( ) const
inlinevirtual

Broken assignment operator.

The number of geometric data affecting a SolidFiniteElemnet is the same as the number of nodes (one variable position data per node)

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSolidElement.

3609  {
3610  return nnode();
3611  }

References oomph::FiniteElement::nnode().

◆ nnodal_lagrangian_type()

unsigned oomph::SolidFiniteElement::nnodal_lagrangian_type ( ) const
inline

Return the number of types of (generalised) nodal Lagrangian coordinates required to interpolate the Lagrangian coordinates in the element. (E.g. 1 for Lagrange-type elements; 2 for Hermite beam elements; 4 for Hermite shell elements). Default value is 1. Needs to be overloaded for any other element.

3786  {
3787  return Nnodal_lagrangian_type;
3788  }

References Nnodal_lagrangian_type.

Referenced by assemble_local_to_lagrangian_jacobian(), oomph::RefineableSolidElement::assemble_local_to_lagrangian_jacobian(), assemble_local_to_lagrangian_jacobian2(), oomph::RefineableSolidElement::assemble_local_to_lagrangian_jacobian2(), construct_boundary_node(), construct_node(), fill_in_generic_jacobian_for_solid_ic(), interpolated_dxids(), interpolated_xi(), local_to_lagrangian_mapping_diagonal(), and oomph::RefineableSolidElement::local_to_lagrangian_mapping_diagonal().

◆ position_local_eqn()

int oomph::SolidFiniteElement::position_local_eqn ( const unsigned n,
const unsigned k,
const unsigned j 
) const
inline

Access function that returns the local equation number that corresponds to the j-th coordinate of the k-th position-type at the n-th local node.

4140  {
4141 #ifdef RANGE_CHECKING
4142  std::ostringstream error_message;
4143  bool error = false;
4144  if (n >= nnode())
4145  {
4146  error = true;
4147  error_message << "Range Error: Nodal number " << n
4148  << " is not in the range (0," << nnode() << ")";
4149  }
4150 
4151  if (k >= nnodal_position_type())
4152  {
4153  error = true;
4154  error_message << "Range Error: Position type " << k
4155  << " is not in the range (0," << nnodal_position_type()
4156  << ")";
4157  }
4158 
4159  if (j >= nodal_dimension())
4160  {
4161  error = true;
4162  error_message << "Range Error: Nodal coordinate " << j
4163  << " is not in the range (0," << nodal_dimension() << ")";
4164  }
4165 
4166  if (error)
4167  {
4168  // Throw the error
4169  throw OomphLibError(error_message.str(),
4172  }
4173 #endif
4174 
4175  // Return the value
4176  return Position_local_eqn[(n * nnodal_position_type() + k) *
4177  nodal_dimension() +
4178  j];
4179  }
int error
Definition: calibrate.py:297

References calibrate::error, j, k, n, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and Position_local_eqn.

Referenced by oomph::RefineableSolidElement::assign_solid_hanging_local_eqn_numbers(), oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), oomph::AxisymmetricPVDEquations::fill_in_contribution_to_residuals_axisym_pvd(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_residuals_beam(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_residuals_shell(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_generic_contribution_to_residuals_displ_lagr_multiplier(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_generic_contribution_to_residuals_fsi_displ_lagr_multiplier(), oomph::RefineableQDPVDElement< DIM, NNODE_1D >::fill_in_generic_contribution_to_residuals_pvd(), fill_in_generic_jacobian_for_solid_ic(), oomph::AxisymmetricPVDEquationsWithPressure::fill_in_generic_residual_contribution_axisym_pvd_with_pressure(), fill_in_jacobian_for_newmark_accel(), fill_in_jacobian_from_solid_position_by_fd(), oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::FSIHermiteBeamElement::get_dof_numbers_for_unknowns(), oomph::FSIDiagHermiteShellElement::get_dof_numbers_for_unknowns(), oomph::ClampedHermiteShellBoundaryConditionElement::get_dof_numbers_for_unknowns(), oomph::PVDEquationsBase< DIM >::get_dof_numbers_for_unknowns(), oomph::PVDEquationsWithPressure< DIM >::get_dof_numbers_for_unknowns(), oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::refineable_fill_in_generic_contribution_to_residuals_displ_lagr_multiplier(), oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::refineable_fill_in_generic_contribution_to_residuals_fsi_displ_lagr_multiplier(), oomph::ProjectableAxisymmetricPoroelasticityElement< AXISYMMETRIC_POROELASTICITY_ELEMENT >::residual_for_projection(), oomph::ProjectableDarcyElement< DARCY_ELEMENT >::residual_for_projection(), and oomph::ProjectableElement< ELEMENT >::residual_for_projection().

◆ raw_lagrangian_position()

double oomph::SolidFiniteElement::raw_lagrangian_position ( const unsigned n,
const unsigned i 
) const
inline

Return i-th Lagrangian coordinate at local node n without using the hanging representation

3891  {
3892  return static_cast<SolidNode*>(node_pt(n))->xi(i);
3893  }

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

Referenced by oomph::FSIHermiteBeamElement::locate_zeta().

◆ raw_lagrangian_position_gen()

double oomph::SolidFiniteElement::raw_lagrangian_position_gen ( const unsigned n,
const unsigned k,
const unsigned i 
) const
inline

◆ reset_after_solid_position_fd()

virtual void oomph::SolidFiniteElement::reset_after_solid_position_fd ( )
inlineprotectedvirtual

Function that is call after the finite differencing of the solid position data. This may be overloaded to reset any dependent variables that may have changed during the finite differencing.

Reimplemented in oomph::FSIWallElement.

4245 {}

Referenced by fill_in_jacobian_from_solid_position_by_fd(), and oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd().

◆ reset_in_solid_position_fd()

virtual void oomph::SolidFiniteElement::reset_in_solid_position_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for solid position data after the values in the i-th node are reset. The default behaviour is to call the update function.

Reimplemented in oomph::FSIWallElement.

4256  {
4258  }

References i, and update_in_solid_position_fd().

Referenced by fill_in_jacobian_from_solid_position_by_fd(), and oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd().

◆ set_lagrangian_dimension()

void oomph::SolidFiniteElement::set_lagrangian_dimension ( const unsigned lagrangian_dimension)
inline

Set the lagrangian dimension of the element — the number of lagrangian coordinates stored at the nodes in the element.

3566  {
3568  }

References lagrangian_dimension(), and Lagrangian_dimension.

Referenced by oomph::SolidQHermiteElement< DIM >::SolidQHermiteElement().

◆ set_macro_elem_pt() [1/2]

virtual void oomph::SolidFiniteElement::set_macro_elem_pt ( MacroElement macro_elem_pt)
inlinevirtual

Set pointer to MacroElement – overloads generic version and uses the MacroElement also as the default for the "undeformed" configuration. This assignment must be overwritten with set_undeformed_macro_elem_pt(...) if the deformation of the solid body is driven by a deformation of the "current" Domain/MacroElement representation of it's boundary. Can be overloaded in derived classes to perform additional tasks

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableSolidQElement< 2 >, oomph::RefineableSolidQElement< 1 >, oomph::RefineableSolidQElement< 3 >, and oomph::QSolidElementBase.

3681  {
3684  }
MacroElement * Macro_elem_pt
Pointer to the element's macro element (NULL by default)
Definition: elements.h:1683
MacroElement * macro_elem_pt()
Access function to pointer to macro element.
Definition: elements.h:1878

References oomph::FiniteElement::Macro_elem_pt, oomph::FiniteElement::macro_elem_pt(), and Undeformed_macro_elem_pt.

◆ set_macro_elem_pt() [2/2]

virtual void oomph::SolidFiniteElement::set_macro_elem_pt ( MacroElement macro_elem_pt,
MacroElement undeformed_macro_elem_pt 
)
inlinevirtual

Set pointers to "current" and "undeformed" MacroElements. Can be overloaded in derived classes to perform additional tasks

Reimplemented in oomph::RefineableSolidQElement< 2 >, oomph::RefineableSolidQElement< 1 >, oomph::RefineableSolidQElement< 3 >, and oomph::QSolidElementBase.

3691  {
3694  }
MacroElement * undeformed_macro_elem_pt()
Access function to pointer to "undeformed" macro element.
Definition: elements.h:3706

References oomph::FiniteElement::Macro_elem_pt, oomph::FiniteElement::macro_elem_pt(), undeformed_macro_elem_pt(), and Undeformed_macro_elem_pt.

◆ set_nnodal_lagrangian_type()

void oomph::SolidFiniteElement::set_nnodal_lagrangian_type ( const unsigned nlagrangian_type)
inlineprotected

Set the number of types required to interpolate the Lagrangian coordinates

4071  {
4072  Nnodal_lagrangian_type = nlagrangian_type;
4073  }

References Nnodal_lagrangian_type.

Referenced by oomph::SolidQHermiteElement< DIM >::SolidQHermiteElement().

◆ set_undeformed_macro_elem_pt()

void oomph::SolidFiniteElement::set_undeformed_macro_elem_pt ( MacroElement undeformed_macro_elem_pt)
inline

Set pointer to "undeformed" macro element. Can be overloaded in derived classes to perform additional tasks.

References undeformed_macro_elem_pt(), and Undeformed_macro_elem_pt.

Referenced by oomph::QSolidElementBase::set_macro_elem_pt().

◆ solid_ic_pt()

SolidInitialCondition*& oomph::SolidFiniteElement::solid_ic_pt ( )
inline

Pointer to object that describes the initial condition.

3956  {
3957  return Solid_ic_pt;
3958  }

References Solid_ic_pt.

Referenced by oomph::SolidICProblem::set_newmark_initial_condition_consistently(), and oomph::SolidICProblem::setup_problem().

◆ undeformed_macro_elem_pt()

MacroElement* oomph::SolidFiniteElement::undeformed_macro_elem_pt ( )
inline

◆ update_before_solid_position_fd()

virtual void oomph::SolidFiniteElement::update_before_solid_position_fd ( )
inlineprotectedvirtual

Function that is called before the finite differencing of any solid position data. This may be overloaded to update any dependent data before finite differencing takes place.

4240 {}

Referenced by fill_in_jacobian_from_solid_position_by_fd(), and oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd().

◆ update_in_solid_position_fd()

virtual void oomph::SolidFiniteElement::update_in_solid_position_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for the solid position dat after a change in any values in the n-th node.

Reimplemented in oomph::FSIWallElement.

4250 {}

Referenced by fill_in_jacobian_from_solid_position_by_fd(), oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd(), and reset_in_solid_position_fd().

◆ zeta_nodal()

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

In a SolidFiniteElement, the "global" intrinsic coordinate of the element when viewed as part of a compound geometric object (a Mesh) is, by default, the Lagrangian coordinate Note the assumption here is that we are always using isoparameteric elements in which the lagrangian coordinate is interpolated by the same shape functions as the eulerian coordinate.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::SolidFaceElement.

3645  {
3646  return lagrangian_position_gen(n, k, i);
3647  }

References i, k, lagrangian_position_gen(), and n.

Member Data Documentation

◆ Lagrangian_dimension

unsigned oomph::SolidFiniteElement::Lagrangian_dimension
private

The Lagrangian dimension of the nodes stored in the element, / i.e. the number of Lagrangian coordinates

Referenced by assemble_local_to_lagrangian_jacobian(), lagrangian_dimension(), and set_lagrangian_dimension().

◆ Multiplier_fct_pt

MultiplierFctPt oomph::SolidFiniteElement::Multiplier_fct_pt
private

Pointer to function that computes the "multiplier" for the inertia terms in the consistent determination of the initial conditions for Newmark timestepping.

Referenced by multiplier(), and multiplier_fct_pt().

◆ Nnodal_lagrangian_type

unsigned oomph::SolidFiniteElement::Nnodal_lagrangian_type
private

The number of coordinate types requried to intepolate the Lagrangian coordinates in the element. For Lagrange elements it is 1 (the default). It must be over-ridden by using the set_nlagrangian_type() function in the constructors of elements that use generalised coordinate, e.g. for 1D Hermite elements Nnodal_position_types =2.

Referenced by nnodal_lagrangian_type(), and set_nnodal_lagrangian_type().

◆ Position_local_eqn

int* oomph::SolidFiniteElement::Position_local_eqn
private

Array to hold the local equation number information for the solid equations, whatever they may be.

Referenced by assign_solid_local_eqn_numbers(), position_local_eqn(), and ~SolidFiniteElement().

◆ Solid_ic_pt

◆ Solve_for_consistent_newmark_accel_flag

bool oomph::SolidFiniteElement::Solve_for_consistent_newmark_accel_flag
protected

◆ Undeformed_macro_elem_pt

MacroElement* oomph::SolidFiniteElement::Undeformed_macro_elem_pt
protected

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