oomph::BiharmonicEquations< DIM > Class Template Referenceabstract

Biharmonic Equation Class - contains the equations. More...

#include <biharmonic_elements.h>

+ Inheritance diagram for oomph::BiharmonicEquations< DIM >:

Public Types

typedef void(* SourceFctPt) (const Vector< double > &x, double &u)
 source function type definition More...
 
- 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

 BiharmonicEquations ()
 Constructor (must initialise the Source_fct_pt to null) More...
 
 ~BiharmonicEquations ()
 
virtual double u (const unsigned &n, const unsigned &k) const =0
 
virtual void get_source (const unsigned &ipt, const Vector< double > &x, double &source) const
 gets source strength More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 wrapper function, adds contribution to residual More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residual, DenseMatrix< double > &jacobian)
 wrapper function, adds contribution to residual and generic More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 output with nplot points More...
 
void output (std::ostream &outfile)
 Output at default number of plot points. More...
 
void output (FILE *file_pt)
 C-style output. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 C_style output at n_plot points. More...
 
void output_fluid_velocity (std::ostream &outfile, const unsigned &nplot)
 output fluid velocity field More...
 
void interpolated_dudx (const Vector< double > &s, Vector< double > &dudx)
 output with nplot points More...
 
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 output analytic solution More...
 
void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 computes the error More...
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
double interpolated_u_biharmonic (const Vector< double > &s)
 calculates interpolated u at s More...
 
unsigned self_test ()
 self test wrapper More...
 
unsigned get_d2_dof ()
 return number of second derivate degrees of freedom More...
 
unsigned ndof_types () const
 
void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
SourceFctPtsource_fct_pt ()
 Access functions for the source function pointer. More...
 
SourceFctPt source_fct_pt () const
 Access functions for the source function pointers (const version) More...
 
- Public Member Functions inherited from oomph::FiniteElement
void set_dimension (const unsigned &dim)
 
void set_nodal_dimension (const unsigned &nodal_dim)
 
void set_nnodal_position_type (const unsigned &nposition_type)
 Set the number of types required to interpolate the coordinate. More...
 
void set_n_node (const unsigned &n)
 
int nodal_local_eqn (const unsigned &n, const unsigned &i) const
 
double dJ_eulerian_at_knot (const unsigned &ipt, Shape &psi, DenseMatrix< double > &djacobian_dX) const
 
 FiniteElement ()
 Constructor. More...
 
virtual ~FiniteElement ()
 
 FiniteElement (const FiniteElement &)=delete
 Broken copy constructor. More...
 
virtual bool local_coord_is_valid (const Vector< double > &s)
 Broken assignment operator. More...
 
virtual void move_local_coord_back_into_element (Vector< double > &s) const
 
void get_centre_of_gravity_and_max_radius_in_terms_of_zeta (Vector< double > &cog, double &max_radius) const
 
virtual void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
virtual void local_fraction_of_node (const unsigned &j, Vector< double > &s_fraction)
 
virtual double local_one_d_fraction_of_node (const unsigned &n1d, const unsigned &i)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 Set the spatial integration scheme. More...
 
Integral *const & integral_pt () const
 Return the pointer to the integration scheme (const version) More...
 
virtual void shape (const Vector< double > &s, Shape &psi) const =0
 
virtual void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
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_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 (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
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, 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 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)
 
- 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

virtual void fill_in_generic_residual_contribution_biharmonic (Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned JFLAG)
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Protected Attributes

SourceFctPt Source_fct_pt
 Pointer to source function: More...
 
Vector< intLocal_eqn
 Array to hold local eqn numbers: Local_eqn[n] (=-1 for BC) More...
 
- 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 Private Attributes

static const unsigned d2_dof [] = {1, 3, 6}
 

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

template<unsigned DIM>
class oomph::BiharmonicEquations< DIM >

Biharmonic Equation Class - contains the equations.

Member Typedef Documentation

◆ SourceFctPt

template<unsigned DIM>
typedef void(* oomph::BiharmonicEquations< DIM >::SourceFctPt) (const Vector< double > &x, double &u)

source function type definition

Constructor & Destructor Documentation

◆ BiharmonicEquations()

template<unsigned DIM>
oomph::BiharmonicEquations< DIM >::BiharmonicEquations ( )
inline

Constructor (must initialise the Source_fct_pt to null)

63 : Source_fct_pt(0) {}
SourceFctPt Source_fct_pt
Pointer to source function:
Definition: biharmonic_elements.h:504

◆ ~BiharmonicEquations()

template<unsigned DIM>
oomph::BiharmonicEquations< DIM >::~BiharmonicEquations ( )
inline
66 {};

Member Function Documentation

◆ compute_error() [1/2]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
inlinevirtual

computes the error

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

287  {
288  // Initialise
289  error = 0.0;
290  norm = 0.0;
291 
292  // Vector of local coordinates
293  Vector<double> s(DIM);
294 
295  // Vector for coordintes
296  Vector<double> x(DIM);
297 
298  // Find out how many nodes there are in the element
299  unsigned n_node = this->nnode();
300 
301  Shape psi(n_node);
302 
303  // Set the value of n_intpt
304  unsigned n_intpt = this->integral_pt()->nweight();
305 
306  // Tecplot header info
307  outfile << this->tecplot_zone_string(3);
308 
309  // Tecplot
310  // outfile << "ZONE" << std::endl;
311 
312  // Exact solution Vector (here a scalar)
313  Vector<double> exact_soln(1);
314 
315  // Loop over the integration points
316  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
317  {
318  // Assign values of s
319  for (unsigned i = 0; i < DIM; i++)
320  {
321  s[i] = this->integral_pt()->knot(ipt, i);
322  }
323 
324  // Get the integral weight
325  double w = this->integral_pt()->weight(ipt);
326 
327  // Get jacobian of mapping
328  double J = this->J_eulerian(s);
329 
330  // Premultiply the weights and the Jacobian
331  double W = w * J;
332 
333  // Get x position as Vector
334  this->interpolated_x(s, x);
335 
336  // Get FE function value
337  double u_fe = interpolated_u_biharmonic(s);
338 
339  // Get exact solution at this point
340  (*exact_soln_pt)(x, exact_soln);
341 
342  // Output x,y,...,error
343  for (unsigned i = 0; i < DIM; i++)
344  {
345  outfile << x[i] << " ";
346  }
347  outfile << exact_soln[0] << " " << fabs(exact_soln[0] - u_fe)
348  << std::endl;
349 
350  // Add to error and norm
351  norm += exact_soln[0] * exact_soln[0] * W;
352  error += (exact_soln[0] - u_fe) * (exact_soln[0] - u_fe) * W;
353  }
354 
355  this->write_tecplot_zone_footer(outfile, 3);
356  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
double interpolated_u_biharmonic(const Vector< double > &s)
calculates interpolated u at s
Definition: biharmonic_elements.h:372
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
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
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
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
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.
RealScalar s
Definition: level1_cplx_impl.h:130
#define DIM
Definition: linearised_navier_stokes_elements.h:44
void exact_soln(const double &time, const Vector< double > &x, Vector< double > &soln)
Definition: unstructured_two_d_curved.cc:301
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117
int error
Definition: calibrate.py:297
@ W
Definition: quadtree.h:63
list x
Definition: plotDoE.py:28

References DIM, calibrate::error, ProblemParameters::exact_soln(), boost::multiprecision::fabs(), i, oomph::FiniteElement::integral_pt(), oomph::BiharmonicEquations< DIM >::interpolated_u_biharmonic(), oomph::FiniteElement::interpolated_x(), J, oomph::FiniteElement::J_eulerian(), oomph::Integral::knot(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), s, oomph::FiniteElement::tecplot_zone_string(), w, oomph::QuadTreeNames::W, oomph::Integral::weight(), oomph::FiniteElement::write_tecplot_zone_footer(), and plotDoE::x.

Referenced by oomph::BiharmonicElement< DIM >::compute_error().

◆ compute_error() [2/2]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
inlinevirtual

Plot the error when compared against a given time-dependent exact solution \( {\bf f}(t,{\bf x}) \). Also calculates the norm of the error and that of the exact solution. Call broken base-class version.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

367  {
368  FiniteElement::compute_error(outfile, exact_soln_pt, time, error, norm);
369  }
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.
Definition: elements.h:3198

References oomph::FiniteElement::compute_error(), and calibrate::error.

◆ fill_in_contribution_to_jacobian()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residual,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

wrapper function, adds contribution to residual and generic

Reimplemented from oomph::GeneralisedElement.

106  {
107  // call generic routine with flag set to 1
109  }
virtual void fill_in_generic_residual_contribution_biharmonic(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned JFLAG)
Definition: biharmonic_elements.cc:41

References oomph::BiharmonicEquations< DIM >::fill_in_generic_residual_contribution_biharmonic().

◆ fill_in_contribution_to_residuals()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

wrapper function, adds contribution to residual

Reimplemented from oomph::GeneralisedElement.

94  {
95  // create a dummy matrix
96  DenseDoubleMatrix dummy(1);
97 
98  // call the generic residuals functions with flag set to zero
100  }

References oomph::BiharmonicEquations< DIM >::fill_in_generic_residual_contribution_biharmonic().

◆ fill_in_generic_residual_contribution_biharmonic()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::fill_in_generic_residual_contribution_biharmonic ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
unsigned  JFLAG 
)
protectedvirtual

Compute element residual Vector only (if JFLAG=and/or element Jacobian matrix

43  {
44  // Find out how many nodes there are
45  unsigned n_node = this->nnode();
46 
47  // Find out how many values there
48  unsigned n_value = this->node_pt(0)->nvalue();
49 
50  // Find out how many degrees of freedom are associated with 2nd derivative
51  unsigned d2_dof = this->get_d2_dof();
52 
53  // set up memory for shape and test functions
54  Shape psi(n_node, n_value);
55  DShape dpsidx(n_node, n_value, DIM);
56  DShape d2psidx(n_node, n_value, d2_dof);
57  // Shape psi(n_node,n_value);
58  DShape dpsids(n_node, n_value, DIM);
59  DShape d2psids(n_node, n_value, d2_dof);
60 
61  // storage of single local coordinate
62  Vector<double> s(DIM);
63 
64  // number of integration points
65  unsigned n_intpt = this->integral_pt()->nweight();
66 
67  // loop over integration points
68  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
69  {
70  // set local coordinates to be intergration scheme knot
71  for (unsigned i = 0; i < DIM; i++)
72  s[i] = this->integral_pt()->knot(ipt, i);
73 
74  // find weight at knot
75  double w = this->integral_pt()->weight(ipt);
76 
77  // find shape fn and derivate fns at knot point,
78  // and Jacobian of local to global mapping
79  double J = this->d2shape_eulerian(s, psi, dpsidx, d2psidx);
80  this->d2shape_local(s, psi, dpsids, d2psids);
81 
82  // premultiply weight by jacobian
83  double W = w * J;
84 
85  // initialise storage for d2u_interpolated
86  Vector<double> d2u_interpolated(DIM);
87  for (unsigned i = 0; i < DIM; i++)
88  {
89  d2u_interpolated[i] = 0.0;
90  }
91 
92  // loop over nodes, degrees of freedom, and dimension to calculate
93  // interpolated_d2u
94  for (unsigned n = 0; n < n_node; n++)
95  {
96  for (unsigned k = 0; k < n_value; k++)
97  {
98  for (unsigned d = 0; d < DIM; d++)
99  {
100  d2u_interpolated[d] +=
101  this->node_pt(n)->value(k) * d2psidx(n, k, d);
102  }
103  }
104  }
105 
106  // create vector for interpolated position and calculate
107  Vector<double> interpolated_position(DIM);
108  this->interpolated_x(s, interpolated_position);
109 
110  // evaluate source function at knot position
111  double source = 0.0;
112  get_source(ipt, interpolated_position, source);
113 
114  // loop over nodes
115  for (unsigned n1 = 0; n1 < n_node; n1++)
116  {
117  // loop over types of degrees of freedom
118  for (unsigned k1 = 0; k1 < n_value; k1++)
119  {
120  // determine the local equation number
121  int local_eqn_number = this->nodal_local_eqn(n1, k1);
122 
123  // if local equation number equal to -1 then its a boundary
124  // node(pinned)
125  if (local_eqn_number >= 0)
126  {
127  // add source contribution to residual
128  residuals[local_eqn_number] -= source * psi(n1, k1) * W;
129 
130  // loop over dimension of d2u interpolated
131  for (unsigned d1 = 0; d1 < DIM; d1++)
132  {
133  // loop over derivatives of d2psidx
134  for (unsigned d2 = 0; d2 < DIM; d2++)
135  {
136  // add residual contribution
137  residuals[local_eqn_number] +=
138  d2u_interpolated[d1] * d2psidx(n1, k1, d2) * W;
139  }
140 
141  // calculate the jacobian
142  if (JFLAG)
143  {
144  // loop over nodes
145  for (unsigned n2 = 0; n2 < n_node; n2++)
146  {
147  // loop over types of degrees of freedom
148  for (unsigned k2 = 0; k2 < n_value; k2++)
149  {
150  // get local dof, -if -1 then node pinned
151  int local_dof_number = this->nodal_local_eqn(n2, k2);
152 
153  // if local dof # = -1, then its pinned
154  if (local_dof_number >= 0)
155  {
156  // loop over derivatives
157  for (unsigned d2 = 0; d2 < DIM; d2++)
158  {
159  // add contribution to jacobian
160  jacobian(local_eqn_number, local_dof_number) +=
161  d2psidx(n1, k1, d1) * d2psidx(n2, k2, d2) * W;
162  }
163  }
164  }
165  }
166  }
167  }
168  }
169  }
170  }
171  }
172  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
virtual void get_source(const unsigned &ipt, const Vector< double > &x, double &source) const
gets source strength
Definition: biharmonic_elements.h:74
static const unsigned d2_dof[]
Definition: biharmonic_elements.h:512
unsigned get_d2_dof()
return number of second derivate degrees of freedom
Definition: biharmonic_elements.h:427
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Definition: elements.h:2016
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
double d2shape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
Definition: elements.cc:3448
int local_eqn_number(const unsigned long &ieqn_global) const
Definition: elements.h:726
double value(const unsigned &i) const
Definition: nodes.cc:2408
char char char int int * k
Definition: level2_impl.h:374
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46

References DIM, TanhSolnForPoisson::get_source(), i, J, k, n, s, TestProblem::source(), w, and oomph::QuadTreeNames::W.

Referenced by oomph::BiharmonicEquations< DIM >::fill_in_contribution_to_jacobian(), and oomph::BiharmonicEquations< DIM >::fill_in_contribution_to_residuals().

◆ get_d2_dof()

template<unsigned DIM>
unsigned oomph::BiharmonicEquations< DIM >::get_d2_dof ( )
inline

return number of second derivate degrees of freedom

428  {
429  return d2_dof[DIM - 1];
430  }

References oomph::BiharmonicEquations< DIM >::d2_dof, and DIM.

◆ get_dof_numbers_for_unknowns()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::get_dof_numbers_for_unknowns ( std::list< std::pair< unsigned long, unsigned >> &  dof_lookup_list) const
inlinevirtual

Create a list of pairs for all unknowns in this element, so that the first entry in each pair contains the global equation number of the unknown, while the second one contains the number of the "DOF types" that this unknown is associated with. (Function can obviously only be called if the equation numbering scheme has been set up.) (for block preconditioning)

Reimplemented from oomph::GeneralisedElement.

449  {
450  // number of nodes
451  int n_node = this->nnode();
452 
453  // number of degrees of freedom at each node
454  int n_value = this->node_pt(0)->nvalue();
455 
456  // temporary pair (used to store dof lookup prior to being added to list
457  std::pair<unsigned long, unsigned> dof_lookup;
458 
459  // loop over the nodes
460  for (int n = 0; n < n_node; n++)
461  {
462  // loop over the degree of freedom
463  for (int k = 0; k < n_value; k++)
464  {
465  // determine local eqn number
466  int local_eqn_number = this->nodal_local_eqn(n, k);
467 
468  // if local equation number is less than zero then nodal dof pinned
469  // then ignore
470  if (local_eqn_number >= 0)
471  {
472  // store dof lookup in temporary pair
473  dof_lookup.first = this->eqn_number(local_eqn_number);
474  dof_lookup.second = k;
475  dof_lookup_list.push_front(dof_lookup);
476  // add to list
477  }
478  }
479  }
480  }
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704

References oomph::GeneralisedElement::eqn_number(), k, oomph::GeneralisedElement::local_eqn_number(), n, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_local_eqn(), oomph::FiniteElement::node_pt(), and oomph::Data::nvalue().

◆ get_source()

template<unsigned DIM>
virtual void oomph::BiharmonicEquations< DIM >::get_source ( const unsigned ipt,
const Vector< double > &  x,
double source 
) const
inlinevirtual

gets source strength

77  {
78  // if source function is not provided, i.e. zero, then return zero
79  if (Source_fct_pt == 0)
80  {
81  source = 0.0;
82  }
83 
84  // else get source strength
85  else
86  {
87  (*Source_fct_pt)(x, source);
88  }
89  }

References TestProblem::source(), oomph::BiharmonicEquations< DIM >::Source_fct_pt, and plotDoE::x.

◆ interpolated_dudx()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::interpolated_dudx ( const Vector< double > &  s,
Vector< double > &  dudx 
)
inline

output with nplot points

194  {
195  // Find out how many nodes there are
196  unsigned n_node = this->nnode();
197 
198  // Find out how many values there
199  unsigned n_value = this->node_pt(0)->nvalue();
200 
201  // set up memory for shape functions
202  Shape psi(n_node, n_value);
203  DShape dpsidx(n_node, n_value, DIM);
204 
205  // evaluate dpsidx at local coordinate s
206  dshape_eulerian(s, psi, dpsidx);
207 
208  // initialise storage for d2u_interpolated
209  dudx[0] = 0.0;
210  dudx[1] = 0.0;
211 
212  // loop over nodes, degrees of freedom, and dimension to calculate
213  // interpolated_d2u
214  for (unsigned n = 0; n < n_node; n++)
215  {
216  for (unsigned k = 0; k < n_value; k++)
217  {
218  for (unsigned d = 0; d < DIM; d++)
219  {
220  dudx[d] += this->node_pt(n)->value(k) * dpsidx(n, k, d);
221  }
222  }
223  }
224  }
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298

References DIM, oomph::FiniteElement::dshape_eulerian(), k, n, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), s, and oomph::Node::value().

Referenced by oomph::BiharmonicEquations< DIM >::output_fluid_velocity().

◆ interpolated_u_biharmonic()

template<unsigned DIM>
double oomph::BiharmonicEquations< DIM >::interpolated_u_biharmonic ( const Vector< double > &  s)
inline

calculates interpolated u at s

373  {
374  // initialise storage for u_interpolated
375  double uu = 0;
376 
377  // number of nodes
378  unsigned n_node = this->nnode();
379 
380  // number of degrees of freedom per node
381  unsigned n_value = this->node_pt(0)->nvalue();
382 
383  // set up memory for shape functions
384  Shape psi(n_node, n_value);
385 
386  // find shape fn at position s
387  this->shape(s, psi);
388 
389  // calculate interpolated u
390  for (unsigned n = 0; n < n_node; n++)
391  {
392  for (unsigned k = 0; k < n_value; k++)
393  {
394  uu += u(n, k) * psi(n, k);
395  }
396  }
397 
398  // return interpolated_u
399  return uu;
400  }
virtual double u(const unsigned &n, const unsigned &k) const =0
virtual void shape(const Vector< double > &s, Shape &psi) const =0

References k, n, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::FiniteElement::shape(), and oomph::BiharmonicEquations< DIM >::u().

Referenced by oomph::BiharmonicEquations< DIM >::compute_error(), and oomph::BiharmonicEquations< DIM >::output().

◆ ndof_types()

template<unsigned DIM>
unsigned oomph::BiharmonicEquations< DIM >::ndof_types ( ) const
inlinevirtual

The number of "DOF types" that degrees of freedom in this element are sub-divided into (for block preconditioning)

Reimplemented from oomph::GeneralisedElement.

436  {
437  return this->required_nvalue(1);
438  }
virtual unsigned required_nvalue(const unsigned &n) const
Definition: elements.h:2455

References oomph::FiniteElement::required_nvalue().

◆ output() [1/4]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output ( FILE *  file_pt)
inlinevirtual

C-style output.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

149  {
150  FiniteElement::output(file_pt);
151  }
virtual void output(std::ostream &outfile)
Definition: elements.h:3050

References oomph::FiniteElement::output().

◆ output() [2/4]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output ( FILE *  file_pt,
const unsigned n_plot 
)
inlinevirtual

C_style output at n_plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

155  {
156  FiniteElement::output(file_pt, n_plot);
157  }

References oomph::FiniteElement::output().

◆ output() [3/4]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output ( std::ostream &  outfile)
inlinevirtual

Output at default number of plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

143  {
144  FiniteElement::output(outfile);
145  }

References oomph::FiniteElement::output().

◆ output() [4/4]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output ( std::ostream &  outfile,
const unsigned nplot 
)
inlinevirtual

output with nplot points

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

114  {
115  // Vector of local coordinates
116  Vector<double> s(DIM);
117 
118  // Tecplot header info
119  outfile << this->tecplot_zone_string(nplot);
120 
121  // Loop over plot points
122  unsigned num_plot_points = this->nplot_points(nplot);
123  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
124  {
125  // Get local coordinates of plot point
126  this->get_s_plot(iplot, nplot, s);
127 
128  for (unsigned i = 0; i < DIM; i++)
129  {
130  outfile << this->interpolated_x(s, i) << " ";
131  }
132 
133  outfile << interpolated_u_biharmonic(s) << std::endl;
134  }
135 
136  // Write tecplot footer (e.g. FE connectivity lists)
137  this->write_tecplot_zone_footer(outfile, nplot);
138  }
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::BiharmonicEquations< DIM >::interpolated_u_biharmonic(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), s, oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

Referenced by oomph::BiharmonicElement< DIM >::output().

◆ output_fct() [1/2]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
inlinevirtual

Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector. Implement broken FiniteElement base class version

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

277  {
278  FiniteElement::output_fct(outfile, nplot, time, exact_soln_pt);
279  }
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
Definition: elements.h:3104

References oomph::FiniteElement::output_fct().

◆ output_fct() [2/2]

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
inlinevirtual

output analytic solution

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::BiharmonicElement< DIM >.

231  {
232  // Vector of local coordinates
233  Vector<double> s(DIM);
234 
235  // Vector for coordintes
236  Vector<double> x(DIM);
237 
238  // Tecplot header info
239  outfile << this->tecplot_zone_string(nplot);
240 
241  // Exact solution Vector (here a scalar)
242  Vector<double> exact_soln(1);
243 
244  // Loop over plot points
245  unsigned num_plot_points = this->nplot_points(nplot);
246  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
247  {
248  // Get local coordinates of plot point
249  this->get_s_plot(iplot, nplot, s);
250 
251  // Get x position as Vector
252  this->interpolated_x(s, x);
253 
254  // Get exact solution at this point
255  (*exact_soln_pt)(x, exact_soln);
256 
257  // Output x,y,...,u_exact
258  for (unsigned i = 0; i < DIM; i++)
259  {
260  outfile << x[i] << " ";
261  }
262  outfile << exact_soln[0] << std::endl;
263  }
264 
265  // Write tecplot footer (e.g. FE connectivity lists)
266  this->write_tecplot_zone_footer(outfile, nplot);
267  }

References DIM, ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), s, oomph::FiniteElement::tecplot_zone_string(), oomph::FiniteElement::write_tecplot_zone_footer(), and plotDoE::x.

Referenced by oomph::BiharmonicElement< DIM >::output_fct().

◆ output_fluid_velocity()

template<unsigned DIM>
void oomph::BiharmonicEquations< DIM >::output_fluid_velocity ( std::ostream &  outfile,
const unsigned nplot 
)
inline

output fluid velocity field

162  {
163  // Vector of local coordinates
164  Vector<double> s(DIM);
165 
166  // Tecplot header info
167  outfile << this->tecplot_zone_string(nplot);
168 
169  // Loop over plot points
170  unsigned num_plot_points = this->nplot_points(nplot);
171  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
172  {
173  // Get local coordinates of plot point
174  this->get_s_plot(iplot, nplot, s);
175 
176  for (unsigned i = 0; i < DIM; i++)
177  {
178  outfile << this->interpolated_x(s, i) << " ";
179  }
180 
181  Vector<double> dudx(2, 0.0);
182  interpolated_dudx(s, dudx);
183 
184  outfile << dudx[1] << " " << -dudx[0] << std::endl;
185  }
186 
187  // Write tecplot footer (e.g. FE connectivity lists)
188  this->write_tecplot_zone_footer(outfile, nplot);
189  }
void interpolated_dudx(const Vector< double > &s, Vector< double > &dudx)
output with nplot points
Definition: biharmonic_elements.h:193

References DIM, oomph::FiniteElement::get_s_plot(), i, oomph::BiharmonicEquations< DIM >::interpolated_dudx(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), s, oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

Referenced by oomph::BiharmonicFluidProblem< DIM >::doc_solution().

◆ self_test()

template<unsigned DIM>
unsigned oomph::BiharmonicEquations< DIM >::self_test ( )
inlinevirtual

self test wrapper

Reimplemented from oomph::FiniteElement.

405  {
406  bool passed = true;
407 
408  // Check lower-level stuff
409  if (FiniteElement::self_test() != 0)
410  {
411  passed = false;
412  }
413 
414  // Return verdict
415  if (passed)
416  {
417  return 0;
418  }
419  else
420  {
421  return 1;
422  }
423  }
virtual unsigned self_test()
Definition: elements.cc:4440

References oomph::FiniteElement::self_test().

◆ source_fct_pt() [1/2]

template<unsigned DIM>
SourceFctPt& oomph::BiharmonicEquations< DIM >::source_fct_pt ( )
inline

Access functions for the source function pointer.

485  {
486  return Source_fct_pt;
487  }

References oomph::BiharmonicEquations< DIM >::Source_fct_pt.

Referenced by oomph::BiharmonicProblem< DIM >::set_source_function().

◆ source_fct_pt() [2/2]

template<unsigned DIM>
SourceFctPt oomph::BiharmonicEquations< DIM >::source_fct_pt ( ) const
inline

Access functions for the source function pointers (const version)

491  {
492  return Source_fct_pt;
493  }

References oomph::BiharmonicEquations< DIM >::Source_fct_pt.

◆ u()

template<unsigned DIM>
virtual double oomph::BiharmonicEquations< DIM >::u ( const unsigned n,
const unsigned k 
) const
pure virtual

Access function: Nodal function value at local node n Uses suitably interpolated value for hanging nodes.

Implemented in oomph::BiharmonicElement< DIM >.

Referenced by oomph::BiharmonicEquations< DIM >::interpolated_u_biharmonic().

Member Data Documentation

◆ d2_dof

template<unsigned DIM>
const unsigned oomph::BiharmonicEquations< DIM >::d2_dof = {1, 3, 6}
staticprivate

◆ Local_eqn

template<unsigned DIM>
Vector<int> oomph::BiharmonicEquations< DIM >::Local_eqn
protected

Array to hold local eqn numbers: Local_eqn[n] (=-1 for BC)

◆ Source_fct_pt

template<unsigned DIM>
SourceFctPt oomph::BiharmonicEquations< DIM >::Source_fct_pt
protected

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