oomph::StorableShapeElementBase Class Reference

#include <stored_shape_function_elements.h>

+ Inheritance diagram for oomph::StorableShapeElementBase:

Public Member Functions

 StorableShapeElementBase ()
 Constructor, set most storage pointers to NULL. More...
 
virtual ~StorableShapeElementBase ()
 
 StorableShapeElementBase (const StorableShapeElementBase &)=delete
 Broken copy constructor. More...
 
void operator= (const StorableShapeElementBase &)=delete
 Broken assignment operator. More...
 
void delete_all_shape_local_stored ()
 
void delete_shape_local_stored ()
 Delete stored shape functions. More...
 
void delete_dshape_local_stored ()
 
void delete_d2shape_local_stored ()
 
void delete_all_dshape_eulerian_stored ()
 
void delete_dshape_eulerian_stored ()
 Delete stored derivatives w.r.t. Eulerian coordinates. More...
 
void delete_d2shape_eulerian_stored ()
 Delete stored 2nd derivatives w.r.t. Eulerian coordinates. More...
 
void delete_J_eulerian_stored ()
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 
Vector< Shape * > *& shape_stored_pt ()
 
Vector< Shape * > *const & shape_stored_pt () const
 
Shape *& shape_stored_pt (const unsigned &ipt)
 
Shape *const & shape_stored_pt (const unsigned &ipt) const
 
Vector< DShape * > *& dshape_local_stored_pt ()
 
Vector< DShape * > *const & dshape_local_stored_pt () const
 
Vector< DShape * > *& d2shape_local_stored_pt ()
 
Vector< DShape * > *const & d2shape_local_stored_pt () const
 
Vector< DShape * > *& dshape_eulerian_stored_pt ()
 
Vector< DShape * > *const & dshape_eulerian_stored_pt () const
 
Vector< DShape * > *& d2shape_eulerian_stored_pt ()
 
Vector< DShape * > *const & d2shape_eulerian_stored_pt () const
 
Vector< double > *& jacobian_eulerian_stored_pt ()
 
Vector< double > *const & jacobian_eulerian_stored_pt () const
 
void set_shape_local_stored_from_element (StorableShapeElementBase *const &element_pt)
 
void set_dshape_eulerian_stored_from_element (StorableShapeElementBase *const &element_pt)
 
void pre_compute_shape_at_knots ()
 
void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
void pre_compute_dshape_local_at_knots ()
 
void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
void pre_compute_d2shape_local_at_knots ()
 
void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
void pre_compute_J_eulerian_at_knots ()
 
double J_eulerian_at_knot (const unsigned &ipt) const
 
void pre_compute_dshape_eulerian_at_knots ()
 
double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
void pre_compute_d2shape_eulerian_at_knots ()
 
double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) 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)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
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 dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual double J_eulerian (const Vector< double > &s) 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 &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 void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
Node *& node_pt (const unsigned &n)
 Return a pointer to the local node n. More...
 
Node *const & node_pt (const unsigned &n) const
 Return a pointer to the local node n (const version) More...
 
unsigned nnode () const
 Return the number of nodes. More...
 
virtual unsigned nnode_1d () const
 
double raw_nodal_position (const unsigned &n, const unsigned &i) const
 
double raw_nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position (const unsigned &n, const unsigned &i) const
 
double nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double dnodal_position_dt (const unsigned &n, const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt at local node n. More...
 
double dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
virtual void disable_ALE ()
 
virtual void enable_ALE ()
 
virtual unsigned required_nvalue (const unsigned &n) const
 
unsigned nnodal_position_type () const
 
bool has_hanging_nodes () const
 
unsigned nodal_dimension () const
 Return the required Eulerian dimension of the nodes in this element. More...
 
virtual unsigned nvertex_node () const
 
virtual Nodevertex_node_pt (const unsigned &j) const
 
virtual Nodeconstruct_node (const unsigned &n)
 
virtual Nodeconstruct_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
virtual Nodeconstruct_boundary_node (const unsigned &n)
 
virtual Nodeconstruct_boundary_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
int get_node_number (Node *const &node_pt) const
 
virtual Nodeget_node_at_local_coordinate (const Vector< double > &s) const
 
double raw_nodal_value (const unsigned &n, const unsigned &i) const
 
double raw_nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
unsigned dim () const
 
virtual ElementGeometry::ElementGeometry element_geometry () const
 Return the geometry type of the element (either Q or T usually). More...
 
virtual double interpolated_x (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated coordinate x[i] at local coordinate s. More...
 
virtual double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 Return FE interpolated position x[] at local coordinate s as Vector. More...
 
virtual void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
virtual double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
virtual void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
unsigned ngeom_data () const
 
Datageom_data_pt (const unsigned &j)
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 
void dposition_dt (const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
 
virtual double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 
void locate_zeta (const Vector< double > &zeta, GeomObject *&geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void node_update ()
 
virtual void identify_field_data_for_interactions (std::set< std::pair< Data *, unsigned >> &paired_field_data)
 
virtual void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
virtual double s_min () const
 Min value of local coordinate. More...
 
virtual double s_max () const
 Max. value of local coordinate. More...
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual unsigned nscalar_paraview () const
 
virtual void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
virtual std::string scalar_name_paraview (const unsigned &i) const
 
virtual void output (std::ostream &outfile)
 
virtual void output (std::ostream &outfile, const unsigned &n_plot)
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output (FILE *file_pt)
 
virtual void output (FILE *file_pt, const unsigned &n_plot)
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output an exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output a time-dependent exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
 
virtual std::string tecplot_zone_string (const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (std::ostream &outfile, const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (FILE *file_pt, const unsigned &nplot) const
 
virtual unsigned nplot_points (const unsigned &nplot) const
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_abs_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
 
void integrate_fct (FiniteElement::SteadyExactSolutionFctPt integrand_fct_pt, Vector< double > &integral)
 Integrate Vector-valued function over element. More...
 
void integrate_fct (FiniteElement::UnsteadyExactSolutionFctPt integrand_fct_pt, const double &time, Vector< double > &integral)
 Integrate Vector-valued time-dep function over element. More...
 
virtual void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
virtual unsigned self_test ()
 
virtual unsigned get_bulk_node_number (const int &face_index, const unsigned &i) const
 
virtual int face_outer_unit_normal_sign (const int &face_index) const
 Get the sign of the outer unit normal on the face given by face_index. More...
 
virtual unsigned nnode_on_face () const
 
void face_node_number_error_check (const unsigned &i) const
 Range check for face node numbers. More...
 
virtual CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt (const int &face_index) const
 
virtual BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt (const int &face_index) const
 
- Public Member Functions inherited from oomph::GeneralisedElement
 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual void compute_norm (double &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 

Private Attributes

Vector< Shape * > * Shape_stored_pt
 
Vector< DShape * > * DShape_local_stored_pt
 
Vector< DShape * > * D2Shape_local_stored_pt
 
bool Can_delete_shape_local_stored
 
Vector< DShape * > * DShape_eulerian_stored_pt
 
Vector< DShape * > * D2Shape_eulerian_stored_pt
 
Vector< double > * Jacobian_eulerian_stored_pt
 
bool Can_delete_dshape_eulerian_stored
 

Additional Inherited Members

- Public Types inherited from oomph::FiniteElement
typedef void(* SteadyExactSolutionFctPt) (const Vector< double > &, Vector< double > &)
 
typedef void(* UnsteadyExactSolutionFctPt) (const double &, const Vector< double > &, Vector< double > &)
 
- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
virtual void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
- Protected Attributes inherited from oomph::FiniteElement
MacroElementMacro_elem_pt
 Pointer to the element's macro element (NULL by default) More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

Base class for elements that allow storage of precomputed shape functions and their derivatives w.r.t to the local and global (Eulerian) coordinates at the element's integration points.

Constructor & Destructor Documentation

◆ StorableShapeElementBase() [1/2]

oomph::StorableShapeElementBase::StorableShapeElementBase ( )
inline

Constructor, set most storage pointers to NULL.

101  : FiniteElement(),
102  Shape_stored_pt(0),
110  {
111  }
FiniteElement()
Constructor.
Definition: elements.h:1782
Vector< DShape * > * DShape_local_stored_pt
Definition: stored_shape_function_elements.h:70
Vector< DShape * > * D2Shape_local_stored_pt
Definition: stored_shape_function_elements.h:75
Vector< DShape * > * D2Shape_eulerian_stored_pt
Definition: stored_shape_function_elements.h:87
Vector< Shape * > * Shape_stored_pt
Definition: stored_shape_function_elements.h:66
Vector< double > * Jacobian_eulerian_stored_pt
Definition: stored_shape_function_elements.h:91
bool Can_delete_dshape_eulerian_stored
Definition: stored_shape_function_elements.h:95
bool Can_delete_shape_local_stored
Definition: stored_shape_function_elements.h:79
Vector< DShape * > * DShape_eulerian_stored_pt
Definition: stored_shape_function_elements.h:83

◆ ~StorableShapeElementBase()

oomph::StorableShapeElementBase::~StorableShapeElementBase ( )
virtual

The destructor cleans up the static memory allocated for shape function storage. Internal and external data get wiped by the GeneralisedElement destructor; nodes get killed in mesh destructor.

The destructor cleans up the memory allocated for shape function storage.

206  {
207  // Merely need to call the private functions to clean up storages
210  }
void delete_all_dshape_eulerian_stored()
Definition: stored_shape_function_elements.cc:129
void delete_all_shape_local_stored()
Definition: stored_shape_function_elements.cc:46

References delete_all_dshape_eulerian_stored(), and delete_all_shape_local_stored().

◆ StorableShapeElementBase() [2/2]

oomph::StorableShapeElementBase::StorableShapeElementBase ( const StorableShapeElementBase )
delete

Broken copy constructor.

Member Function Documentation

◆ d2shape_eulerian_at_knot()

double oomph::StorableShapeElementBase::d2shape_eulerian_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsidx,
DShape d2psidx 
) const
virtual

Return the geometric shape functions and also first and second derivatives w.r.t. global coordinates at ipt-th integration point. If the values of the shape functions and derivatives have been pre-computred, these will be used

Return the geometric shape functions, first and second derivatives w.r.t eulerian coordinates at the ipt-th integration point. If the values have already been computed, return the stored values.

Reimplemented from oomph::FiniteElement.

767  {
768  // If we are not storing the values return the calculated values
770  {
771  return FiniteElement::d2shape_eulerian_at_knot(ipt, psi, dpsidx, d2psidx);
772  }
773  else
774  {
775  // Set internal pointers in the shape functions
776  psi = (*Shape_stored_pt)[ipt];
777  dpsidx = (*DShape_eulerian_stored_pt)[ipt];
778  d2psidx = (*D2Shape_eulerian_stored_pt)[ipt];
779 
780  // Return the stored value of the jacobian
781  return ((*Jacobian_eulerian_stored_pt)[ipt]);
782  }
783  }
virtual double d2shape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
Definition: elements.cc:3502

References oomph::FiniteElement::d2shape_eulerian_at_knot(), D2Shape_eulerian_stored_pt, and Jacobian_eulerian_stored_pt.

◆ d2shape_eulerian_stored_pt() [1/2]

Vector<DShape*>*& oomph::StorableShapeElementBase::d2shape_eulerian_stored_pt ( )
inline

Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w.r.t the global (eulerian) coordinates

239  {
241  }

References D2Shape_eulerian_stored_pt.

Referenced by set_dshape_eulerian_stored_from_element().

◆ d2shape_eulerian_stored_pt() [2/2]

Vector<DShape*>* const& oomph::StorableShapeElementBase::d2shape_eulerian_stored_pt ( ) const
inline

Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w.r.t the global (eulerian) coordinates (const version)

247  {
249  }

References D2Shape_eulerian_stored_pt.

◆ d2shape_local_at_knot()

void oomph::StorableShapeElementBase::d2shape_local_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
virtual

Return the geometric shape function and its first and second derivatives w.r.t. the local coordinates at the ipt-th integration point. If pre-computed values have been stored, they will be used.

Return the shape function and its first and second derivatives w.r.t. the local coordinates at the ipt-th integration point.

Reimplemented from oomph::FiniteElement.

718  {
719  // If we are not storing the second derivatives, calculate them on the fly
720  if (D2Shape_local_stored_pt == 0)
721  {
722  FiniteElement::d2shape_local_at_knot(ipt, psi, dpsids, d2psids);
723  }
724  else
725  {
726  // Read out the stored shape functions
727  // Set the internal pointers in psi, dpsids, and d2psids
728  psi = (*Shape_stored_pt)[ipt];
729  dpsids = (*DShape_local_stored_pt)[ipt];
730  d2psids = (*D2Shape_local_stored_pt)[ipt];
731  }
732  }
virtual void d2shape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
Definition: elements.cc:3274

References oomph::FiniteElement::d2shape_local_at_knot(), and D2Shape_local_stored_pt.

◆ d2shape_local_stored_pt() [1/2]

Vector<DShape*>*& oomph::StorableShapeElementBase::d2shape_local_stored_pt ( )
inline

Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w.r.t the local coordinates

207  {
209  }

References D2Shape_local_stored_pt.

Referenced by set_shape_local_stored_from_element().

◆ d2shape_local_stored_pt() [2/2]

Vector<DShape*>* const& oomph::StorableShapeElementBase::d2shape_local_stored_pt ( ) const
inline

Return a pointer to the vector of pointers to the stored second derivatives of the shape functions w.r.t the local coordinates (const version)

215  {
217  }

References D2Shape_local_stored_pt.

◆ delete_all_dshape_eulerian_stored()

void oomph::StorableShapeElementBase::delete_all_dshape_eulerian_stored ( )

Delete all storage related to deriatives of shape fcts w.r.t. to global Eulerian coords

Delete all stored quantities related to derivatives of shape fcts w.r.t. to global Eulerian coordinates

130  {
134  }
void delete_d2shape_eulerian_stored()
Delete stored 2nd derivatives w.r.t. Eulerian coordinates.
Definition: stored_shape_function_elements.cc:163
void delete_J_eulerian_stored()
Definition: stored_shape_function_elements.cc:188
void delete_dshape_eulerian_stored()
Delete stored derivatives w.r.t. Eulerian coordinates.
Definition: stored_shape_function_elements.cc:139

References delete_d2shape_eulerian_stored(), delete_dshape_eulerian_stored(), and delete_J_eulerian_stored().

Referenced by set_dshape_eulerian_stored_from_element(), and ~StorableShapeElementBase().

◆ delete_all_shape_local_stored()

void oomph::StorableShapeElementBase::delete_all_shape_local_stored ( )

Delete all the objects stored in the [...]_local_stored_pt vectors and delete the vectors themselves

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// Delete all the objects stored in the vectors: Shape_stored, DShape_local_stored, and D2Shape_local_stored

47  {
51  }
void delete_dshape_local_stored()
Definition: stored_shape_function_elements.cc:83
void delete_shape_local_stored()
Delete stored shape functions.
Definition: stored_shape_function_elements.cc:57
void delete_d2shape_local_stored()
Definition: stored_shape_function_elements.cc:106

References delete_d2shape_local_stored(), delete_dshape_local_stored(), and delete_shape_local_stored().

Referenced by set_shape_local_stored_from_element(), and ~StorableShapeElementBase().

◆ delete_d2shape_eulerian_stored()

void oomph::StorableShapeElementBase::delete_d2shape_eulerian_stored ( )

Delete stored 2nd derivatives w.r.t. Eulerian coordinates.

Delete stored second derivatives of shape functions w.r.t. to global Eulerian coordinates

164  {
165  // If the storage has been allocated
167  {
168  // Find the number of entries in the second vector
169  unsigned n_intpt = D2Shape_eulerian_stored_pt->size();
170  // Loop over the entries in reverse and delete them
171  for (unsigned ipt = n_intpt; ipt > 0; ipt--)
172  {
173  delete (*D2Shape_eulerian_stored_pt)[ipt - 1];
174  (*D2Shape_eulerian_stored_pt)[ipt - 1] = 0;
175  }
176  // Delete the vector itself
178  }
179  // Reset the pointer to zero, even if copied
181  }

References Can_delete_dshape_eulerian_stored, and D2Shape_eulerian_stored_pt.

Referenced by delete_all_dshape_eulerian_stored(), and pre_compute_d2shape_eulerian_at_knots().

◆ delete_d2shape_local_stored()

void oomph::StorableShapeElementBase::delete_d2shape_local_stored ( )

Delete stored 2nd derivatives of shape functions w.r.t. to local coordinates

Delete stored second derivatives of shape functions w.r.t. to local coordinates

107  {
108  // Can this element delete the stored data?
110  {
111  unsigned n_intpt = D2Shape_local_stored_pt->size();
112  for (unsigned ipt = n_intpt; ipt > 0; ipt--)
113  {
114  delete (*D2Shape_local_stored_pt)[ipt - 1];
115  (*D2Shape_local_stored_pt)[ipt - 1] = 0;
116  }
117  // Delete the vector itself
119  }
120  // Reset the pointer to zero, must do it, even if copied
122  }

References Can_delete_shape_local_stored, and D2Shape_local_stored_pt.

Referenced by delete_all_shape_local_stored(), and pre_compute_d2shape_local_at_knots().

◆ delete_dshape_eulerian_stored()

void oomph::StorableShapeElementBase::delete_dshape_eulerian_stored ( )

Delete stored derivatives w.r.t. Eulerian coordinates.

Delete stored deriatives of shape fcts w.r.t. to global Eulerian coords

140  {
141  // If the storage has been allocated and we can delete it
143  {
144  // Find the number of entries in the first vector
145  unsigned n_intpt = DShape_eulerian_stored_pt->size();
146  // Loop over the entries of the vectors, in reverse and delete them
147  for (unsigned ipt = n_intpt; ipt > 0; ipt--)
148  {
149  delete (*DShape_eulerian_stored_pt)[ipt - 1];
150  (*DShape_eulerian_stored_pt)[ipt - 1] = 0;
151  }
152  // Delete the vector itself
154  }
155  // Reset the pointer to zero, even if copied
157  }

References Can_delete_dshape_eulerian_stored, and DShape_eulerian_stored_pt.

Referenced by delete_all_dshape_eulerian_stored(), pre_compute_d2shape_eulerian_at_knots(), and pre_compute_dshape_eulerian_at_knots().

◆ delete_dshape_local_stored()

void oomph::StorableShapeElementBase::delete_dshape_local_stored ( )

Delete stored derivatives of shape functions w.r.t. to local coordinates

84  {
85  // Can this element delete the stored data?
87  {
88  unsigned n_intpt = DShape_local_stored_pt->size();
89  for (unsigned ipt = n_intpt; ipt > 0; ipt--)
90  {
91  delete (*DShape_local_stored_pt)[ipt - 1];
92  (*DShape_local_stored_pt)[ipt - 1] = 0;
93  }
94  // Delete the vector itself
96  }
97  // Reset the pointer to zero, must do this, even if copied
99  }

References Can_delete_shape_local_stored, and DShape_local_stored_pt.

Referenced by delete_all_shape_local_stored(), pre_compute_d2shape_local_at_knots(), and pre_compute_dshape_local_at_knots().

◆ delete_J_eulerian_stored()

void oomph::StorableShapeElementBase::delete_J_eulerian_stored ( )

Delete stored Jacobian of mapping between local and global (Eulerian) coordinates

Delete stored Jacobian of mapping between local and global Eulerian coordinates

189  {
190  // If the element originally allocated the storage, delete it
192  {
193  // Delete the stored Jacobians
195  }
196  // Reset the pointer to zero, even if copied
198  }

References Can_delete_dshape_eulerian_stored, and Jacobian_eulerian_stored_pt.

Referenced by delete_all_dshape_eulerian_stored(), pre_compute_d2shape_eulerian_at_knots(), pre_compute_dshape_eulerian_at_knots(), and pre_compute_J_eulerian_at_knots().

◆ delete_shape_local_stored()

void oomph::StorableShapeElementBase::delete_shape_local_stored ( )

Delete stored shape functions.

58  {
59  // Can this element delete the stored data?
61  {
62  // Find the number of entries in the shape function storage vector
63  // N.B. This *should* be the same for all three vectors
64  unsigned n_intpt = Shape_stored_pt->size();
65  // Loop over the entries of each vector, in reverse and delete them
66  for (unsigned ipt = n_intpt; ipt > 0; ipt--)
67  {
68  delete (*Shape_stored_pt)[ipt - 1];
69  (*Shape_stored_pt)[ipt - 1] = 0;
70  }
71  // Delete the vector itself
72  delete Shape_stored_pt;
73  }
74  // Reset the pointer to zero {Must do this even if copied}
75  Shape_stored_pt = 0;
76  }

References Can_delete_shape_local_stored, and Shape_stored_pt.

Referenced by delete_all_shape_local_stored(), pre_compute_d2shape_local_at_knots(), pre_compute_dshape_local_at_knots(), and pre_compute_shape_at_knots().

◆ dshape_eulerian_at_knot()

double oomph::StorableShapeElementBase::dshape_eulerian_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsidx 
) const
virtual

Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-th integration point. If the values of the shape functions and derivatives have been pre-computed, these will be used

Compute the geometric shape functions, and derivatives w.r.t eulerian coordinates at the ipt-th integration point. If the values have already been computed, return the stored values.

Reimplemented from oomph::FiniteElement.

743  {
744  // If we are not storing the values, return the calculated values
745  if (DShape_eulerian_stored_pt == 0)
746  {
747  return FiniteElement::dshape_eulerian_at_knot(ipt, psi, dpsidx);
748  }
749  else
750  {
751  // Set internal pointers in the shape functions.
752  psi = (*Shape_stored_pt)[ipt];
753  dpsidx = (*DShape_eulerian_stored_pt)[ipt];
754 
755  // Return the stored value of the jacobian
756  return ((*Jacobian_eulerian_stored_pt)[ipt]);
757  }
758  }
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3325

References oomph::FiniteElement::dshape_eulerian_at_knot(), DShape_eulerian_stored_pt, and Jacobian_eulerian_stored_pt.

◆ dshape_eulerian_stored_pt() [1/2]

Vector<DShape*>*& oomph::StorableShapeElementBase::dshape_eulerian_stored_pt ( )
inline

Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w.r.t the global (eulerian) coordinates

223  {
225  }

References DShape_eulerian_stored_pt.

Referenced by set_dshape_eulerian_stored_from_element().

◆ dshape_eulerian_stored_pt() [2/2]

Vector<DShape*>* const& oomph::StorableShapeElementBase::dshape_eulerian_stored_pt ( ) const
inline

Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w.r.t the global (eulerian) coordinates (const version)

231  {
233  }

References DShape_eulerian_stored_pt.

◆ dshape_local_at_knot()

void oomph::StorableShapeElementBase::dshape_local_at_knot ( const unsigned ipt,
Shape psi,
DShape dpsids 
) const
virtual

Return the geometric shape function and its derivative w.r.t. the local coordinates at the ipt-th integration point. If pre-computed values have been stored, they will be used.

Return the shape function and its derivatives w.r.t. the local coordinates at the ipt-th integration point.

Reimplemented from oomph::FiniteElement.

695  {
696  // If we are not storing the first derivatives, calculate them
697  if (DShape_local_stored_pt == 0)
698  {
699  FiniteElement::dshape_local_at_knot(ipt, psi, dpsids);
700  }
701  else
702  {
703  // Read out the stored shape functions
704  // Set the internal pointers in psi and dpsids
705  psi = (*Shape_stored_pt)[ipt];
706  dpsids = (*DShape_local_stored_pt)[ipt];
707  }
708  }
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Definition: elements.cc:3239

References oomph::FiniteElement::dshape_local_at_knot(), and DShape_local_stored_pt.

◆ dshape_local_stored_pt() [1/2]

Vector<DShape*>*& oomph::StorableShapeElementBase::dshape_local_stored_pt ( )
inline

Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w.r.t the local coordinates

192  {
193  return DShape_local_stored_pt;
194  }

References DShape_local_stored_pt.

Referenced by set_shape_local_stored_from_element().

◆ dshape_local_stored_pt() [2/2]

Vector<DShape*>* const& oomph::StorableShapeElementBase::dshape_local_stored_pt ( ) const
inline

Return a pointer to the vector of pointers to the stored first derivatives of the shape functions w.r.t the local coordinates (const version)

200  {
201  return DShape_local_stored_pt;
202  }

References DShape_local_stored_pt.

◆ J_eulerian_at_knot()

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

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

Return the Jacobian of the mapping between the local and global coordinates. If the value has been precomputed return that

Reimplemented from oomph::FiniteElement.

790  {
791  // If we are not storing the values, return the calculated values
793  {
795  }
796  else
797  {
798  // Return the stored value of the jacobian
799  return ((*Jacobian_eulerian_stored_pt)[ipt]);
800  }
801  }
virtual double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:4168

References oomph::FiniteElement::J_eulerian_at_knot(), and Jacobian_eulerian_stored_pt.

◆ jacobian_eulerian_stored_pt() [1/2]

Vector<double>*& oomph::StorableShapeElementBase::jacobian_eulerian_stored_pt ( )
inline

Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) coordinates

254  {
256  }

References Jacobian_eulerian_stored_pt.

Referenced by set_dshape_eulerian_stored_from_element().

◆ jacobian_eulerian_stored_pt() [2/2]

Vector<double>* const& oomph::StorableShapeElementBase::jacobian_eulerian_stored_pt ( ) const
inline

Return a pointer to the vector of Jacobians of the mapping between the local and global (eulerian) coordinates (const version)

262  {
264  }

References Jacobian_eulerian_stored_pt.

◆ operator=()

void oomph::StorableShapeElementBase::operator= ( const StorableShapeElementBase )
delete

Broken assignment operator.

◆ pre_compute_d2shape_eulerian_at_knots()

void oomph::StorableShapeElementBase::pre_compute_d2shape_eulerian_at_knots ( )

Calculate the first and second derivatives of the shape functions w.r.t global coordinates at the integration points and store the results internally.

Calculate the values of the first and second derivatives of the shape functions at the integration points and store in the internal storage of the element

581  {
582  // Pre-compute the basic shape functions
584 
585  // Find the number of nodes
586  unsigned n_node = nnode();
587  // Get the number of position types and the dimension from element
588  unsigned n_position_type = this->nnodal_position_type();
589  unsigned n_dim = this->nodal_dimension();
590 
591  // Find the number of second derivatives required
592  // N.B. We are assuming that the mixed derivatives are symmetric here
593  unsigned n_deriv = 0;
594  switch (n_dim)
595  {
596  case 1:
597  n_deriv = 1;
598  break;
599  case 2:
600  n_deriv = 3;
601  break;
602  case 3:
603  n_deriv = 6;
604  break;
605  default:
606  oomph_info << "Really more than 3 dimensions?" << std::endl;
607  break;
608  }
609 
610  // Delete the existing objects, if there are any
614  // Now we're in change of deletion again
616 
617  // Allocate storage for the stored shape function derivatives
618  DShape_eulerian_stored_pt = new Vector<DShape*>;
619  D2Shape_eulerian_stored_pt = new Vector<DShape*>;
620  Jacobian_eulerian_stored_pt = new Vector<double>;
621 
622  // Assign local variables for the shape function and derivatives
623  Shape psi(n_node, n_position_type);
624  DShape dpsidx(n_node, n_position_type, n_dim);
625  DShape d2psidx(n_node, n_position_type, n_deriv);
626 
627  // Loop over the integration points
628  unsigned n_intpt = integral_pt()->nweight();
629  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
630  {
631  // Get the values of the shape function and derivatives at the
632  // integration point and assign the value of the Jacobian to the
633  // internally stored vector
634  Jacobian_eulerian_stored_pt->push_back(
635  FiniteElement::d2shape_eulerian_at_knot(ipt, psi, dpsidx, d2psidx));
636 
637  // Set up local storage for the shape function derivatives
638  DShape* dpsidx_pt = new DShape(n_node, n_position_type, n_dim);
639  DShape* d2psidx_pt = new DShape(n_node, n_position_type, n_deriv);
640 
641  // Now copy the values over
642  for (unsigned l = 0; l < n_node; l++)
643  {
644  for (unsigned k = 0; k < n_position_type; k++)
645  {
646  // First derivatives
647  for (unsigned i = 0; i < n_dim; i++)
648  {
649  (*dpsidx_pt)(l, k, i) = dpsidx(l, k, i);
650  }
651 
652  // Second derivatives
653  for (unsigned i = 0; i < n_deriv; i++)
654  {
655  (*d2psidx_pt)(l, k, i) = d2psidx(l, k, i);
656  }
657  }
658  }
659 
660  // Add the pointers to the shape function derivatives to the internal
661  // storage
662  DShape_eulerian_stored_pt->push_back(dpsidx_pt);
663  D2Shape_eulerian_stored_pt->push_back(d2psidx_pt);
664  } // End of loop over the shape functions
665  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
unsigned nnodal_position_type() const
Definition: elements.h:2463
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
void pre_compute_shape_at_knots()
Definition: stored_shape_function_elements.cc:262
char char char int int * k
Definition: level2_impl.h:374
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References Can_delete_dshape_eulerian_stored, oomph::FiniteElement::d2shape_eulerian_at_knot(), D2Shape_eulerian_stored_pt, delete_d2shape_eulerian_stored(), delete_dshape_eulerian_stored(), delete_J_eulerian_stored(), DShape_eulerian_stored_pt, i, oomph::FiniteElement::integral_pt(), Jacobian_eulerian_stored_pt, k, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::Integral::nweight(), oomph::oomph_info, and pre_compute_shape_at_knots().

Referenced by set_integration_scheme().

◆ pre_compute_d2shape_local_at_knots()

void oomph::StorableShapeElementBase::pre_compute_d2shape_local_at_knots ( )

Calculate the second derivatives of the shape functions w.r.t. local coordinates at the integration points and store the results internally

Calculate the shape functions and thir first and second derivatives w.r.t. local coordinates at the integration points and store in internal storage of the element

395  {
396  // Find the number of nodes in the element
397  unsigned n_node = nnode();
398 #ifdef PARANOID
399  if (n_node == 0)
400  {
401  std::string error_message =
402  "FiniteElement::Node_pt must be resized to a value greater than\n";
403  error_message +=
404  "zero before calling pre_compute_d2shape_local_at_knots()";
405 
406  throw OomphLibError(
408  }
409 #endif
410  // Find number of interpolated position dofs
411  unsigned n_position_type = nnodal_position_type();
412  // Find spatial dimension of the element
413  unsigned Dim = dim();
414 
415  // Find the number of second derivatives required
416  // N.B. We are assuming that the mixed derivatives are symmetric here
417  unsigned n_deriv = 0;
418  switch (Dim)
419  {
420  case 1:
421  n_deriv = 1;
422  break;
423  case 2:
424  n_deriv = 3;
425  break;
426  case 3:
427  n_deriv = 6;
428  break;
429  default:
430  oomph_info << "Really more than 3 dimensions?" << std::endl;
431  break;
432  }
433 
434  // In case we have an exisiting integration scheme, wipe the stored data
438  // Element is now in charge of deleting its own stored data again
440 
441  // Allocate internal storage for the shape functions
442  Shape_stored_pt = new Vector<Shape*>;
443  DShape_local_stored_pt = new Vector<DShape*>;
444  D2Shape_local_stored_pt = new Vector<DShape*>;
445 
446  // Storage for the shape functions and their local derivatives
447  Shape psi(n_node, n_position_type);
448  DShape dpsids(n_node, n_position_type, Dim);
449  DShape d2psids(n_node, n_position_type, n_deriv);
450 
451  // Loop over the integration points
452  unsigned n_intpt = integral_pt()->nweight();
453  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
454  {
455  // Get the shape functions and local derivatives at the integration point
456  FiniteElement::d2shape_local_at_knot(ipt, psi, dpsids, d2psids);
457 
458  // Set up local storage for the shape functions and derivatives
459  Shape* psi_pt = new Shape(n_node, n_position_type);
460  DShape* dpsids_pt = new DShape(n_node, n_position_type, Dim);
461  DShape* d2psids_pt = new DShape(n_node, n_position_type, n_deriv);
462 
463  // Copy the values of the shape functions and their local derivatives
464  // into the element storage
465  for (unsigned n = 0; n < n_node; n++)
466  {
467  for (unsigned k = 0; k < n_position_type; k++)
468  {
469  (*psi_pt)(n, k) = psi(n, k);
470 
471  for (unsigned i = 0; i < Dim; i++)
472  {
473  (*dpsids_pt)(n, k, i) = dpsids(n, k, i);
474  }
475 
476  for (unsigned i = 0; i < n_deriv; i++)
477  {
478  (*d2psids_pt)(n, k, i) = d2psids(n, k, i);
479  }
480  }
481  }
482 
483  // Add the pointers to the shape functions and derivatives to the internal
484  // storage
485  Shape_stored_pt->push_back(psi_pt);
486  DShape_local_stored_pt->push_back(dpsids_pt);
487  D2Shape_local_stored_pt->push_back(d2psids_pt);
488  } // End of loop over integration points
489  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
unsigned dim() const
Definition: elements.h:2611
static const unsigned Dim
Problem dimension.
Definition: two_d_tilted_square.cc:62
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References Can_delete_shape_local_stored, oomph::FiniteElement::d2shape_local_at_knot(), D2Shape_local_stored_pt, delete_d2shape_local_stored(), delete_dshape_local_stored(), delete_shape_local_stored(), Global_Variables::Dim, oomph::FiniteElement::dim(), DShape_local_stored_pt, i, oomph::FiniteElement::integral_pt(), k, n, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, Shape_stored_pt, and oomph::Global_string_for_annotation::string().

Referenced by set_integration_scheme().

◆ pre_compute_dshape_eulerian_at_knots()

void oomph::StorableShapeElementBase::pre_compute_dshape_eulerian_at_knots ( )

Calculate the first derivatives of the shape functions w.r.t the global coordinates at the integration points and store the results internally

Calculate the values of the derivatives of the shape functions at the integration points and store in the internal storage of the element

520  {
521  // Pre-compute the basic shape functions
523 
524  // Find the number of nodes
525  unsigned n_node = nnode();
526  // Get the number of position types and the dimension from the element
527  unsigned n_position_type = this->nnodal_position_type();
528  unsigned n_dim = this->nodal_dimension();
529 
530  // Delete the exisiting stored objects
533  // Now we're in change of deletion again
535 
536  // Allocate storage for the stored shape function derivatives
537  DShape_eulerian_stored_pt = new Vector<DShape*>;
538  Jacobian_eulerian_stored_pt = new Vector<double>;
539 
540  // Assign local variables for the shape function and derivatives
541  Shape psi(n_node, n_position_type);
542  DShape dpsidx(n_node, n_position_type, n_dim);
543 
544  // Loop over the integration points
545  unsigned n_intpt = integral_pt()->nweight();
546  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
547  {
548  // Get the values of the shape function and derivatives at the
549  // integration point and add to the value of the Jacobian to the
550  // internally stored vector
551  Jacobian_eulerian_stored_pt->push_back(
552  FiniteElement::dshape_eulerian_at_knot(ipt, psi, dpsidx));
553 
554  // Set up local storage for the shape function derivatives
555  DShape* dpsidx_pt = new DShape(n_node, n_position_type, n_dim);
556 
557  // Now copy the values over
558  for (unsigned l = 0; l < n_node; l++)
559  {
560  for (unsigned k = 0; k < n_position_type; k++)
561  {
562  // First derivatives
563  for (unsigned i = 0; i < n_dim; i++)
564  {
565  (*dpsidx_pt)(l, k, i) = dpsidx(l, k, i);
566  }
567  }
568  }
569 
570  // Add the pointer to the vector of stored DShape objects
571  DShape_eulerian_stored_pt->push_back(dpsidx_pt);
572  } // End of loop over integration points
573  }

References Can_delete_dshape_eulerian_stored, delete_dshape_eulerian_stored(), delete_J_eulerian_stored(), oomph::FiniteElement::dshape_eulerian_at_knot(), DShape_eulerian_stored_pt, i, oomph::FiniteElement::integral_pt(), Jacobian_eulerian_stored_pt, k, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::Integral::nweight(), and pre_compute_shape_at_knots().

Referenced by set_integration_scheme().

◆ pre_compute_dshape_local_at_knots()

void oomph::StorableShapeElementBase::pre_compute_dshape_local_at_knots ( )

Calculate the shape functions and first derivatives w.r.t. local coordinatess at the integration points and store the results internally

Calculate the shape functions and thir first derivatives w.r.t. local coordinates at the integration points and store in internal storage of the element

322  {
323  // Find the number of nodes in the element
324  unsigned n_node = nnode();
325 #ifdef PARANOID
326  if (n_node == 0)
327  {
328  std::string error_message =
329  "FiniteElement::Node_pt must be resized to a value greater than\n";
330  error_message +=
331  "zero before calling pre_compute_dshape_local_at_knots()";
332 
333  throw OomphLibError(
335  }
336 #endif
337  // Find number of interpolated position dofs
338  unsigned n_position_type = nnodal_position_type();
339  // Find spatial dimension of the element
340  unsigned Dim = dim();
341 
342  // In case we have an exisiting integration scheme, wipe the stored data
345  // Element is now in charge of deleting its own stored data again
347 
348  // Allocate internal storage for the shape functions
349  Shape_stored_pt = new Vector<Shape*>;
350  DShape_local_stored_pt = new Vector<DShape*>;
351 
352  // Storage for the shape functions and their local derivatives
353  Shape psi(n_node, n_position_type);
354  DShape dpsids(n_node, n_position_type, Dim);
355 
356  // Loop over the integration points
357  unsigned n_intpt = integral_pt()->nweight();
358  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
359  {
360  // Get the shape functions and local derivatives at the integration point
361  FiniteElement::dshape_local_at_knot(ipt, psi, dpsids);
362 
363  // Set up local storage for the shape functions and derivatives
364  Shape* psi_pt = new Shape(n_node, n_position_type);
365  DShape* dpsids_pt = new DShape(n_node, n_position_type, Dim);
366 
367  // Copy the values of the shape functions and their local derivatives
368  // into the element storage
369  for (unsigned n = 0; n < n_node; n++)
370  {
371  for (unsigned k = 0; k < n_position_type; k++)
372  {
373  (*psi_pt)(n, k) = psi(n, k);
374 
375  for (unsigned i = 0; i < Dim; i++)
376  {
377  (*dpsids_pt)(n, k, i) = dpsids(n, k, i);
378  }
379  }
380  }
381 
382  // Add the pointers to the shape functions and derivatives to the internal
383  // storage
384  Shape_stored_pt->push_back(psi_pt);
385  DShape_local_stored_pt->push_back(dpsids_pt);
386  } // End of loop over integration points
387  }

References Can_delete_shape_local_stored, delete_dshape_local_stored(), delete_shape_local_stored(), Global_Variables::Dim, oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_local_at_knot(), DShape_local_stored_pt, i, oomph::FiniteElement::integral_pt(), k, n, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Shape_stored_pt, and oomph::Global_string_for_annotation::string().

Referenced by set_integration_scheme().

◆ pre_compute_J_eulerian_at_knots()

void oomph::StorableShapeElementBase::pre_compute_J_eulerian_at_knots ( )

Calculate the Jacobian of the mapping from local to global coordinates at the integration points and store the results internally.

Calculate the value of the Jacobian of the mapping from local to global coordinates at the integration points and store internally

496  {
497  // Delete previously existing storage
499  // Now we're in change of deletion again
501 
502  // Allocate storage for the stored Jacobian values
503  Jacobian_eulerian_stored_pt = new Vector<double>;
504 
505  // Loop over the integration points
506  unsigned n_intpt = integral_pt()->nweight();
507  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
508  {
509  // Add the value of the Jacobian to the internally stored vector
510  Jacobian_eulerian_stored_pt->push_back(
512  }
513  }

References Can_delete_dshape_eulerian_stored, delete_J_eulerian_stored(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::J_eulerian_at_knot(), Jacobian_eulerian_stored_pt, and oomph::Integral::nweight().

Referenced by set_integration_scheme().

◆ pre_compute_shape_at_knots()

void oomph::StorableShapeElementBase::pre_compute_shape_at_knots ( )

Calculate the shape functions at the integration points and store the results internally

Calculate the shape functions at the integration points and store in internal storage of the element

263  {
264  // Find the number of nodes in the element
265  unsigned n_node = nnode();
266 #ifdef PARANOID
267  if (n_node == 0)
268  {
269  std::string error_message =
270  "FiniteElement::Node_pt must be resized to a value greater than\n";
271  error_message += "zero before calling pre_compute_shape_at_knots()";
272 
273  throw OomphLibError(
275  }
276 #endif
277  // Find number of interpolated position dofs
278  unsigned n_position_type = nnodal_position_type();
279 
280  // In case we have an exisiting integration scheme, wipe the stored data
282  // Element is now in charge of deleting its own stored data again
284 
285  // Allocate internal storage for the shape functions
286  Shape_stored_pt = new Vector<Shape*>;
287 
288  // Storage for the shape functions and their local derivatives
289  Shape psi(n_node, n_position_type);
290 
291  // Loop over the integration points
292  unsigned n_intpt = integral_pt()->nweight();
293  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
294  {
295  // Get the shape functions
297 
298  // Set up local storage for the shape functions and derivatives
299  Shape* psi_pt = new Shape(n_node, n_position_type);
300 
301  // Copy the values of the shape functions and their local derivatives
302  // into the element storage
303  for (unsigned n = 0; n < n_node; n++)
304  {
305  for (unsigned k = 0; k < n_position_type; k++)
306  {
307  (*psi_pt)(n, k) = psi(n, k);
308  }
309  }
310 
311  // Add the pointers to the shape functions to the internal storage
312  Shape_stored_pt->push_back(psi_pt);
313  } // End of loop over integration points
314  }
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220

References Can_delete_shape_local_stored, delete_shape_local_stored(), oomph::FiniteElement::integral_pt(), k, n, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::FiniteElement::shape_at_knot(), Shape_stored_pt, and oomph::Global_string_for_annotation::string().

Referenced by pre_compute_d2shape_eulerian_at_knots(), oomph::StorableShapeSolidElementBase::pre_compute_d2shape_lagrangian_at_knots(), pre_compute_dshape_eulerian_at_knots(), oomph::StorableShapeSolidElementBase::pre_compute_dshape_lagrangian_at_knots(), and set_integration_scheme().

◆ set_dshape_eulerian_stored_from_element()

void oomph::StorableShapeElementBase::set_dshape_eulerian_stored_from_element ( StorableShapeElementBase *const &  element_pt)

Set the derivatives of stored shape functions with respect to the global coordinates to be the same as those pointed to by the FiniteElement element_pt. Note that this function also calls set_shape_local_stored_from_element(element_pt). so that the local derivatives are also stored. Calling this function only makes sense for uniformly-spaced meshes with elements of equal sizes.

Set the stored derivatives of shape functions w.r.t Eulerian coordinates to be those stored in the StorableShapeElementBase pointed to by element_pt. Using this function will allow a saving in the storage required for integration schemes in the (most common) case when a large number of elements have the same integration scheme

852  {
854 
855  // Only do this if the referenced Shape objects are not already the same
856  // Assume that if the stored shape functions are the same, the rest will be
857  if (DShape_eulerian_stored_pt != element_pt->dshape_eulerian_stored_pt())
858  {
859  // Delete the existing data
861  // Now this element can no longer delete the data pointed at by
862  // the internal vectors
864 
865  // Assign the pointers
866  DShape_eulerian_stored_pt = element_pt->dshape_eulerian_stored_pt();
867  D2Shape_eulerian_stored_pt = element_pt->d2shape_eulerian_stored_pt();
868  Jacobian_eulerian_stored_pt = element_pt->jacobian_eulerian_stored_pt();
869  }
870  }
void set_shape_local_stored_from_element(StorableShapeElementBase *const &element_pt)
Definition: stored_shape_function_elements.cc:810

References Can_delete_dshape_eulerian_stored, D2Shape_eulerian_stored_pt, d2shape_eulerian_stored_pt(), delete_all_dshape_eulerian_stored(), DShape_eulerian_stored_pt, dshape_eulerian_stored_pt(), Jacobian_eulerian_stored_pt, jacobian_eulerian_stored_pt(), and set_shape_local_stored_from_element().

◆ set_integration_scheme()

void oomph::StorableShapeElementBase::set_integration_scheme ( Integral *const &  integral_pt)
virtual

Set the spatial integration scheme – overloaded from the finite element base class since a change in the integration scheme forces a recomputation of the shape fcts at the integration points.

Set the spatial integration scheme and also calculate the values of the shape functions and their derivatives w.r.t. the local coordinates, placing the values into storage so that they may be re-used, without recalculation

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::StorableShapeSolidElementBase.

220  {
221  // Assign the integration scheme
223 
224  // If we are storing the shape functions and first and second derivatives
225  if (D2Shape_local_stored_pt != 0)
226  {
228  }
229  // If we are storing the shape functions and first derivatives
230  else if (DShape_local_stored_pt != 0)
231  {
233  }
234  // If we are storing the shape functions
235  else if (Shape_stored_pt != 0)
236  {
238  }
239 
240  // If we are storing Eulerian first and second derivatives, recompute them
242  {
244  }
245  // If we are storing Eulerian first derivatives, recompute them
246  else if (DShape_eulerian_stored_pt != 0)
247  {
249  }
250  // If we are storing the Jacobian of the mapping from local to Eulerian
251  // coordinates, recompute it
252  else if (Jacobian_eulerian_stored_pt != 0)
253  {
255  }
256  }
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3210
void pre_compute_d2shape_eulerian_at_knots()
Definition: stored_shape_function_elements.cc:580
void pre_compute_dshape_eulerian_at_knots()
Definition: stored_shape_function_elements.cc:519
void pre_compute_J_eulerian_at_knots()
Definition: stored_shape_function_elements.cc:495
void pre_compute_dshape_local_at_knots()
Definition: stored_shape_function_elements.cc:321
void pre_compute_d2shape_local_at_knots()
Definition: stored_shape_function_elements.cc:394

References D2Shape_eulerian_stored_pt, D2Shape_local_stored_pt, DShape_eulerian_stored_pt, DShape_local_stored_pt, oomph::FiniteElement::integral_pt(), Jacobian_eulerian_stored_pt, pre_compute_d2shape_eulerian_at_knots(), pre_compute_d2shape_local_at_knots(), pre_compute_dshape_eulerian_at_knots(), pre_compute_dshape_local_at_knots(), pre_compute_J_eulerian_at_knots(), pre_compute_shape_at_knots(), oomph::FiniteElement::set_integration_scheme(), and Shape_stored_pt.

Referenced by oomph::StorableShapeSolidElementBase::set_integration_scheme(), and oomph::StorableShapeElement< ELEMENT >::StorableShapeElement().

◆ set_shape_local_stored_from_element()

void oomph::StorableShapeElementBase::set_shape_local_stored_from_element ( StorableShapeElementBase *const &  element_pt)

Set the shape functions pointed to internally to be those pointed to by the FiniteElement element_pt (In most cases all elements of the same type have the same number of integration points so the shape function values and their local derivatives are the same --> They only need to be stored by one element). Calling this function deletes the locally created storage and re-directs the pointers to the stored shape function of the specified element.

Set the shape functions referenced in the internal vectors to be those stored in the StorableShapeElementBase pointed to by element_pt. Using this function will allow a saving in the storage required for integration schemes in the (most common) case when a large number of elements have the same integration scheme

812  {
813 #ifdef PARANOID
814  // Check that we aren't nulling out
815  if (element_pt->shape_stored_pt() == 0)
816  {
817  std::string error_message =
818  "Element does not have stored shape functions\n";
819 
820  throw OomphLibError(
822  }
823 #endif
824 
825  // Only do this if the referenced Shape objects are not already the same
826  // Assume that if the stored shape functions are the same, the rest will be
827  if (Shape_stored_pt != element_pt->shape_stored_pt())
828  {
829  // Delete the existing data
831  // Now this element can no longer delete the data pointed at by
832  // the internal vectors
834 
835  // Assign the pointers
836  Shape_stored_pt = element_pt->shape_stored_pt();
837  DShape_local_stored_pt = element_pt->dshape_local_stored_pt();
838  D2Shape_local_stored_pt = element_pt->d2shape_local_stored_pt();
839  }
840  }

References Can_delete_shape_local_stored, D2Shape_local_stored_pt, d2shape_local_stored_pt(), delete_all_shape_local_stored(), DShape_local_stored_pt, dshape_local_stored_pt(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Shape_stored_pt, shape_stored_pt(), and oomph::Global_string_for_annotation::string().

Referenced by set_dshape_eulerian_stored_from_element(), and oomph::StorableShapeSolidElementBase::set_dshape_lagrangian_stored_from_element().

◆ shape_at_knot()

void oomph::StorableShapeElementBase::shape_at_knot ( const unsigned ipt,
Shape psi 
) const
virtual

Return the geometric shape function at the ipt-th integration point

Return the shape function stored at the ipt-th integration point.

Reimplemented from oomph::FiniteElement.

673  {
674  // If we are not storing the shape functions, calculate the values
675  if (Shape_stored_pt == 0)
676  {
678  }
679  else
680  {
681  // Read out the stored shape functions
682  // Note this will copy the values by pointer (fast)
683  psi = (*Shape_stored_pt)[ipt];
684  }
685  }

References oomph::FiniteElement::shape_at_knot(), and Shape_stored_pt.

◆ shape_stored_pt() [1/4]

Vector<Shape*>*& oomph::StorableShapeElementBase::shape_stored_pt ( )
inline

Return a pointer to the vector of pointers to the stored shape functions

164  {
165  return Shape_stored_pt;
166  }

References Shape_stored_pt.

Referenced by oomph::StorableShapeSolidElementBase::d2shape_lagrangian_at_knot(), oomph::StorableShapeSolidElementBase::dshape_lagrangian_at_knot(), and set_shape_local_stored_from_element().

◆ shape_stored_pt() [2/4]

Vector<Shape*>* const& oomph::StorableShapeElementBase::shape_stored_pt ( ) const
inline

Return a pointer to the vector of pointers to the stored shape functions (const version)

171  {
172  return Shape_stored_pt;
173  }

References Shape_stored_pt.

◆ shape_stored_pt() [3/4]

Shape*& oomph::StorableShapeElementBase::shape_stored_pt ( const unsigned ipt)
inline

Return a pointer to the stored shape function at the ipt-th integration point

178  {
179  return (*Shape_stored_pt)[ipt];
180  }

References Shape_stored_pt.

◆ shape_stored_pt() [4/4]

Shape* const& oomph::StorableShapeElementBase::shape_stored_pt ( const unsigned ipt) const
inline

Return a pointer to the stored shape function at the ipt-th integration point (const version)

185  {
186  return (*Shape_stored_pt)[ipt];
187  }

References Shape_stored_pt.

Member Data Documentation

◆ Can_delete_dshape_eulerian_stored

bool oomph::StorableShapeElementBase::Can_delete_dshape_eulerian_stored
private

◆ Can_delete_shape_local_stored

bool oomph::StorableShapeElementBase::Can_delete_shape_local_stored
private

◆ D2Shape_eulerian_stored_pt

Vector<DShape*>* oomph::StorableShapeElementBase::D2Shape_eulerian_stored_pt
private

Pointer to storage for the second derivatives of the shape functions w.r.t. global coordinates at integration points

Referenced by d2shape_eulerian_at_knot(), d2shape_eulerian_stored_pt(), delete_d2shape_eulerian_stored(), pre_compute_d2shape_eulerian_at_knots(), set_dshape_eulerian_stored_from_element(), and set_integration_scheme().

◆ D2Shape_local_stored_pt

Vector<DShape*>* oomph::StorableShapeElementBase::D2Shape_local_stored_pt
private

Pointer to storage for the pointers to the second derivatives of the nodal shape functions w.r.t. the local coordinates at integration points

Referenced by d2shape_local_at_knot(), d2shape_local_stored_pt(), delete_d2shape_local_stored(), pre_compute_d2shape_local_at_knots(), set_integration_scheme(), and set_shape_local_stored_from_element().

◆ DShape_eulerian_stored_pt

Vector<DShape*>* oomph::StorableShapeElementBase::DShape_eulerian_stored_pt
private

◆ DShape_local_stored_pt

Vector<DShape*>* oomph::StorableShapeElementBase::DShape_local_stored_pt
private

Pointer to storage for the pointers to the derivatives of the nodal shape functions w.r.t. the local coordinates at integration points

Referenced by delete_dshape_local_stored(), dshape_local_at_knot(), dshape_local_stored_pt(), pre_compute_d2shape_local_at_knots(), pre_compute_dshape_local_at_knots(), set_integration_scheme(), and set_shape_local_stored_from_element().

◆ Jacobian_eulerian_stored_pt

◆ Shape_stored_pt

Vector<Shape*>* oomph::StorableShapeElementBase::Shape_stored_pt
private

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