oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM > Class Template Referenceabstract

#include <pml_time_harmonic_linear_elasticity_elements.h>

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

Public Types

typedef void(* BodyForceFctPt) (const Vector< double > &x, Vector< std::complex< double >> &b)
 
- 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

 PMLTimeHarmonicLinearElasticityEquationsBase ()
 
virtual std::complex< unsignedu_index_time_harmonic_linear_elasticity (const unsigned i) const
 
void interpolated_u_time_harmonic_linear_elasticity (const Vector< double > &s, Vector< std::complex< double >> &disp) const
 Compute vector of FE interpolated displacement u at local coordinate s. More...
 
std::complex< doubleinterpolated_u_time_harmonic_linear_elasticity (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated displacement u[i] at local coordinate s. More...
 
PMLTimeHarmonicIsotropicElasticityTensor *& elasticity_tensor_pt ()
 Return the pointer to the elasticity_tensor. More...
 
std::complex< doubleE (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 Access function to the entries in the elasticity tensor. More...
 
double nu () const
 Access function to nu in the elasticity tensor. More...
 
const doubleomega_sq () const
 Access function for square of non-dim frequency. More...
 
double *& omega_sq_pt ()
 Access function for square of non-dim frequency. More...
 
BodyForceFctPtbody_force_fct_pt ()
 Access function: Pointer to body force function. More...
 
BodyForceFctPt body_force_fct_pt () const
 Access function: Pointer to body force function (const version) More...
 
virtual void get_stress (const Vector< double > &s, DenseMatrix< std::complex< double >> &sigma) const =0
 
void get_strain (const Vector< double > &s, DenseMatrix< std::complex< double >> &strain) const
 Return the strain tensor. More...
 
void body_force (const Vector< double > &x, Vector< std::complex< double >> &b) const
 
void values_to_be_pinned_on_outer_pml_boundary (Vector< unsigned > &values_to_pin)
 
unsigned ndof_types () const
 
void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
void compute_pml_coefficients (const unsigned &ipt, const Vector< double > &x, Vector< std::complex< double >> &pml_inverse_jacobian_diagonal, std::complex< double > &pml_jacobian_det)
 
PMLMapping *& pml_mapping_pt ()
 Return a pointer to the PML Mapping object. More...
 
PMLMapping *const & pml_mapping_pt () const
 Return a pointer to the PML Mapping object (const version) More...
 
- Public Member Functions inherited from oomph::PMLElementBase< DIM >
 PMLElementBase ()
 Constructor. More...
 
virtual ~PMLElementBase ()
 Virtual destructor. More...
 
void disable_pml ()
 
void enable_pml (const int &direction, const double &interface_border_value, const double &outer_domain_border_value)
 
- 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 (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)
 
- 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
 

Static Public Attributes

static ContinuousBermudezPMLMapping Default_pml_mapping
 
- 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 Attributes

PMLTimeHarmonicIsotropicElasticityTensorElasticity_tensor_pt
 Pointer to the elasticity tensor. More...
 
doubleOmega_sq_pt
 Square of nondim frequency. More...
 
BodyForceFctPt Body_force_fct_pt
 Pointer to body force function. More...
 
PMLMappingPml_mapping_pt
 
- Protected Attributes inherited from oomph::PMLElementBase< DIM >
bool Pml_is_enabled
 Boolean indicating if element is used in pml mode. More...
 
std::vector< boolPml_direction_active
 
Vector< doublePml_inner_boundary
 
Vector< doublePml_outer_boundary
 
- 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

static double Default_omega_sq_value
 Static default value for square of frequency. More...
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Additional Inherited Members

- 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)
 

Detailed Description

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

A base class for elements that solve the equations of time-harmonic linear elasticity in Cartesian coordinates. Combines a few generic functions that are shared by PMLTimeHarmonicLinearElasticityEquations and PMLTimeHarmonicLinearElasticityEquationsWithPressure (Note: The latter don't exist yet but will be written as soon as somebody needs them...)

Member Typedef Documentation

◆ BodyForceFctPt

template<unsigned DIM>
typedef void(* oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::BodyForceFctPt) (const Vector< double > &x, Vector< std::complex< double >> &b)

Function pointer to function that specifies the body force as a function of the Cartesian coordinates FCT(x,b) – x and b are Vectors!

Constructor & Destructor Documentation

◆ PMLTimeHarmonicLinearElasticityEquationsBase()

Constructor: Set null pointers for constitutive law and for isotropic growth function. Set physical parameter values to default values, and set body force to zero.

90  {
93  }
static ContinuousBermudezPMLMapping Default_pml_mapping
Definition: pml_time_harmonic_linear_elasticity_elements.h:415
static double Default_omega_sq_value
Static default value for square of frequency.
Definition: pml_time_harmonic_linear_elasticity_elements.h:428
PMLMapping * Pml_mapping_pt
Definition: pml_time_harmonic_linear_elasticity_elements.h:432
BodyForceFctPt Body_force_fct_pt
Pointer to body force function.
Definition: pml_time_harmonic_linear_elasticity_elements.h:425
PMLTimeHarmonicIsotropicElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
Definition: pml_time_harmonic_linear_elasticity_elements.h:419
double * Omega_sq_pt
Square of nondim frequency.
Definition: pml_time_harmonic_linear_elasticity_elements.h:422

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Default_pml_mapping, and oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Pml_mapping_pt.

Member Function Documentation

◆ body_force()

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::body_force ( const Vector< double > &  x,
Vector< std::complex< double >> &  b 
) const
inline

Evaluate body force at Eulerian coordinate x (returns zero vector if no body force function pointer has been set)

238  {
239  // If no function has been set, return zero vector
240  if (Body_force_fct_pt == 0)
241  {
242  // Get spatial dimension of element
243  unsigned n = dim();
244  for (unsigned i = 0; i < n; i++)
245  {
246  b[i] = std::complex<double>(0.0, 0.0);
247  }
248  }
249  else
250  {
251  // Get body force
252  (*Body_force_fct_pt)(x, b);
253  }
254  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Scalar * b
Definition: benchVecAdd.cpp:17
unsigned dim() const
Definition: elements.h:2611
list x
Definition: plotDoE.py:28

References b, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Body_force_fct_pt, oomph::FiniteElement::dim(), i, n, and plotDoE::x.

◆ body_force_fct_pt() [1/2]

template<unsigned DIM>
BodyForceFctPt& oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::body_force_fct_pt ( )
inline

Access function: Pointer to body force function.

213  {
214  return Body_force_fct_pt;
215  }

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Body_force_fct_pt.

◆ body_force_fct_pt() [2/2]

template<unsigned DIM>
BodyForceFctPt oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::body_force_fct_pt ( ) const
inline

Access function: Pointer to body force function (const version)

219  {
220  return Body_force_fct_pt;
221  }

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Body_force_fct_pt.

◆ compute_pml_coefficients()

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::compute_pml_coefficients ( const unsigned ipt,
const Vector< double > &  x,
Vector< std::complex< double >> &  pml_inverse_jacobian_diagonal,
std::complex< double > &  pml_jacobian_det 
)
inline

Compute pml coefficients at position x and integration point ipt. pml_inverse_jacobian_diagonal contains the diagonal terms from the inverse of the Jacobian of the PML transformation. These are used to transform derivatives in real x to derivatives in transformed space \(\tilde x \). This can be interpreted as an anisotropic stiffness. pml_jacobian_det is the determinant of the Jacobian of the PML transformation, this allows us to transform volume integrals in transformed space to real space. This can be interpreted as a mass factor If the PML is not enabled via enable_pml, both default to 1.0.

The factors all default to 1.0 if the propagation medium is the physical domain (no PML transformation)

Vector which points from the inner boundary to x

Vector which points from the inner boundary to the edge of the boundary

Calculate the square of the non-dimensional wavenumber

336  {
339  for (unsigned k = 0; k < DIM; k++)
340  {
341  pml_inverse_jacobian_diagonal[k] = std::complex<double>(1.0, 0.0);
342  }
343  pml_jacobian_det = std::complex<double>(1.0, 0.0);
344 
345  // Only calculate PML factors if PML is enabled
346  if (this->Pml_is_enabled)
347  {
349  Vector<double> nu(DIM);
350  for (unsigned k = 0; k < DIM; k++)
351  {
352  nu[k] = x[k] - this->Pml_inner_boundary[k];
353  }
354 
357  Vector<double> pml_width(DIM);
358  for (unsigned k = 0; k < DIM; k++)
359  {
360  pml_width[k] =
361  this->Pml_outer_boundary[k] - this->Pml_inner_boundary[k];
362  }
363 
364 #ifdef PARANOID
365  // Check if the Pml_mapping_pt is set
366  if (this->Pml_mapping_pt == 0)
367  {
368  std::ostringstream error_message_stream;
369  error_message_stream << "Pml_mapping_pt needs to be set "
370  << std::endl;
371 
372  throw OomphLibError(error_message_stream.str(),
375  }
376 #endif
377  // Declare gamma_i vectors of complex numbers for PML weights
378  Vector<std::complex<double>> pml_gamma(DIM);
379 
381  double wavenumber_squared = 2.0 * (1.0 + this->nu()) * this->omega_sq();
382 
383  for (unsigned k = 0; k < DIM; k++)
384  {
385  // If PML is enabled in the respective direction
386  if (this->Pml_direction_active[k])
387  {
388  std::complex<double> pml_gamma =
389  Pml_mapping_pt->gamma(nu[k], pml_width[k], wavenumber_squared);
390 
391  // The diagonals of the INVERSE of the PML transformation jacobian
392  // are 1/gamma
393  pml_inverse_jacobian_diagonal[k] = 1.0 / pml_gamma;
394  // To get the determinant, multiply all the diagonals together
395  pml_jacobian_det *= pml_gamma;
396  }
397  }
398  }
399  }
bool Pml_is_enabled
Boolean indicating if element is used in pml mode.
Definition: pml_meshes.h:119
std::vector< bool > Pml_direction_active
Definition: pml_meshes.h:124
Vector< double > Pml_outer_boundary
Definition: pml_meshes.h:134
Vector< double > Pml_inner_boundary
Definition: pml_meshes.h:129
virtual std::complex< double > gamma(const double &nu_i, const double &pml_width_i, const double &wavenumber_squared, const double &alpha_shift=0.0)=0
double nu() const
Access function to nu in the elasticity tensor.
Definition: pml_time_harmonic_linear_elasticity_elements.h:194
const double & omega_sq() const
Access function for square of non-dim frequency.
Definition: pml_time_harmonic_linear_elasticity_elements.h:200
char char char int int * k
Definition: level2_impl.h:374
#define DIM
Definition: linearised_navier_stokes_elements.h:44
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References DIM, oomph::PMLMapping::gamma(), k, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::nu(), oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::omega_sq(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::PMLElementBase< DIM >::Pml_direction_active, oomph::PMLElementBase< DIM >::Pml_inner_boundary, oomph::PMLElementBase< DIM >::Pml_is_enabled, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Pml_mapping_pt, oomph::PMLElementBase< DIM >::Pml_outer_boundary, and plotDoE::x.

◆ E()

template<unsigned DIM>
std::complex<double> oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::E ( const unsigned i,
const unsigned j,
const unsigned k,
const unsigned l 
) const
inline

Access function to the entries in the elasticity tensor.

189  {
190  return (*Elasticity_tensor_pt)(i, j, k, l);
191  }
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Elasticity_tensor_pt, i, j, and k.

◆ elasticity_tensor_pt()

◆ get_dof_numbers_for_unknowns()

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< 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.)

Reimplemented from oomph::GeneralisedElement.

286  {
287  // temporary pair (used to store dof lookup prior to being added
288  // to list)
289  std::pair<unsigned long, unsigned> dof_lookup;
290 
291  // number of nodes
292  const unsigned n_node = this->nnode();
293 
294  // Integer storage for local unknown
295  int local_unknown = 0;
296 
297  // Loop over the nodes
298  for (unsigned n = 0; n < n_node; n++)
299  {
300  // Loop over dimension (real and imag)
301  for (unsigned i = 0; i < 2 * DIM; i++)
302  {
303  // If the variable is free
304  local_unknown = nodal_local_eqn(n, i);
305 
306  // ignore pinned values
307  if (local_unknown >= 0)
308  {
309  // store dof lookup in temporary pair: First entry in pair
310  // is global equation number; second entry is dof type
311  dof_lookup.first = this->eqn_number(local_unknown);
312  dof_lookup.second = 0;
313 
314  // add to list
315  dof_lookup_list.push_front(dof_lookup);
316  }
317  }
318  }
319  }
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704

References DIM, oomph::GeneralisedElement::eqn_number(), i, n, oomph::FiniteElement::nnode(), and oomph::FiniteElement::nodal_local_eqn().

◆ get_strain()

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::get_strain ( const Vector< double > &  s,
DenseMatrix< std::complex< double >> &  strain 
) const

Return the strain tensor.

Compute the strain tensor at local coordinate s.

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

Now fill in the entries of the strain tensor

51  {
52 #ifdef PARANOID
53  if ((strain.ncol() != DIM) || (strain.nrow() != DIM))
54  {
55  std::ostringstream error_message;
56  error_message << "Strain matrix is " << strain.ncol() << " x "
57  << strain.nrow() << ", but dimension of the equations is "
58  << DIM << std::endl;
59  throw OomphLibError(
60  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
61  }
62 
63  // Find out how many position types there are
64  unsigned n_position_type = this->nnodal_position_type();
65 
66  if (n_position_type != 1)
67  {
68  std::ostringstream error_message;
69  error_message << "PMLTimeHarmonicLinearElasticity is not yet "
70  << "implemented for more than one position type"
71  << std::endl;
72  throw OomphLibError(
73  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
74  }
75 #endif
76 
77 
78  // Find out how many nodes there are in the element
79  unsigned n_node = nnode();
80 
81  // Find the indices at which the local velocities are stored
82  std::complex<unsigned> u_nodal_index[DIM];
83  for (unsigned i = 0; i < DIM; i++)
84  {
86  }
87 
88  // Set up memory for the shape and derivative functions
89  Shape psi(n_node);
90  DShape dpsidx(n_node, DIM);
91 
92  // Call the derivatives of the shape functions
93  (void)dshape_eulerian(s, psi, dpsidx);
94 
95  // Calculate interpolated values of the derivative of global position
96  DenseMatrix<std::complex<double>> interpolated_dudx(
97  DIM, DIM, std::complex<double>(0.0, 0.0));
98 
99  // Loop over nodes
100  for (unsigned l = 0; l < n_node; l++)
101  {
102  // Loop over velocity components
103  for (unsigned i = 0; i < DIM; i++)
104  {
105  // Get the nodal value
106  const std::complex<double> u_value =
107  std::complex<double>(this->nodal_value(l, u_nodal_index[i].real()),
108  this->nodal_value(l, u_nodal_index[i].imag()));
109 
110  // Loop over derivative directions
111  for (unsigned j = 0; j < DIM; j++)
112  {
113  interpolated_dudx(i, j) += u_value * dpsidx(l, j);
114  }
115  }
116  }
117 
119  for (unsigned i = 0; i < DIM; i++)
120  {
121  // Do upper half of matrix
122  // Note that j must be signed here for the comparison test to work
123  // Also i must be cast to an int
124  for (int j = (DIM - 1); j >= static_cast<int>(i); j--)
125  {
126  // Off diagonal terms
127  if (static_cast<int>(i) != j)
128  {
129  strain(i, j) =
130  0.5 * (interpolated_dudx(i, j) + interpolated_dudx(j, i));
131  }
132  // Diagonal terms will including growth factor when it comes back in
133  else
134  {
135  strain(i, i) = interpolated_dudx(i, i);
136  }
137  }
138  // Matrix is symmetric so just copy lower half
139  for (int j = (i - 1); j >= 0; j--)
140  {
141  strain(i, j) = strain(j, i);
142  }
143  }
144  }
AnnoyingScalar imag(const AnnoyingScalar &)
Definition: AnnoyingScalar.h:132
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
unsigned nnodal_position_type() const
Definition: elements.h:2463
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
virtual std::complex< unsigned > u_index_time_harmonic_linear_elasticity(const unsigned i) const
Definition: pml_time_harmonic_linear_elasticity_elements.h:98
float real
Definition: datatypes.h:10
RealScalar s
Definition: level1_cplx_impl.h:130

References DIM, i, imag(), j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

Referenced by oomph::TPMLTimeHarmonicLinearElasticityElement< DIM, NNODE_1D >::get_Z2_flux().

◆ get_stress()

template<unsigned DIM>
virtual void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::get_stress ( const Vector< double > &  s,
DenseMatrix< std::complex< double >> &  sigma 
) const
pure virtual

Return the Cauchy stress tensor, as calculated from the elasticity tensor at specified local coordinate Virtual so separaete versions can (and must!) be provided for displacement and pressure-displacement formulations.

Implemented in oomph::PMLTimeHarmonicLinearElasticityEquations< DIM >.

◆ interpolated_u_time_harmonic_linear_elasticity() [1/2]

template<unsigned DIM>
std::complex<double> oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::interpolated_u_time_harmonic_linear_elasticity ( const Vector< double > &  s,
const unsigned i 
) const
inline

Return FE interpolated displacement u[i] at local coordinate s.

141  {
142  // Find number of nodes
143  unsigned n_node = nnode();
144 
145  // Local shape function
146  Shape psi(n_node);
147 
148  // Find values of shape function
149  shape(s, psi);
150 
151  // Get nodal index at which i-th velocity is stored
152  std::complex<unsigned> u_nodal_index =
154 
155  // Initialise value of u
156  std::complex<double> interpolated_u(0.0, 0.0);
157 
158  // Loop over the local nodes and sum
159  for (unsigned l = 0; l < n_node; l++)
160  {
161  const std::complex<double> u_value(
162  nodal_value(l, u_nodal_index.real()),
163  nodal_value(l, u_nodal_index.imag()));
164 
165  interpolated_u += u_value * psi[l];
166  }
167 
168  return (interpolated_u);
169  }
virtual void shape(const Vector< double > &s, Shape &psi) const =0

References i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), and oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::u_index_time_harmonic_linear_elasticity().

◆ interpolated_u_time_harmonic_linear_elasticity() [2/2]

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::interpolated_u_time_harmonic_linear_elasticity ( const Vector< double > &  s,
Vector< std::complex< double >> &  disp 
) const
inline

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

107  {
108  // Find number of nodes
109  unsigned n_node = nnode();
110 
111  // Local shape function
112  Shape psi(n_node);
113 
114  // Find values of shape function
115  shape(s, psi);
116 
117  for (unsigned i = 0; i < DIM; i++)
118  {
119  // Index at which the nodal value is stored
120  std::complex<unsigned> u_nodal_index =
122 
123  // Initialise value of u
124  disp[i] = std::complex<double>(0.0, 0.0);
125 
126  // Loop over the local nodes and sum
127  for (unsigned l = 0; l < n_node; l++)
128  {
129  const std::complex<double> u_value(
130  nodal_value(l, u_nodal_index.real()),
131  nodal_value(l, u_nodal_index.imag()));
132 
133  disp[i] += u_value * psi[l];
134  }
135  }
136  }

References DIM, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::FiniteElement::shape(), and oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::u_index_time_harmonic_linear_elasticity().

◆ ndof_types()

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

The number of "DOF types" that degrees of freedom in this element are sub-divided into: for now lump them all into one DOF type. Can be adjusted later

Reimplemented from oomph::GeneralisedElement.

274  {
275  return 1;
276  }

◆ nu()

template<unsigned DIM>
double oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::nu ( ) const
inline

Access function to nu in the elasticity tensor.

195  {
196  return Elasticity_tensor_pt->nu();
197  }
double nu() const
Poisson's ratio.
Definition: pml_time_harmonic_elasticity_tensor.h:194

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Elasticity_tensor_pt, and oomph::PMLTimeHarmonicIsotropicElasticityTensor::nu().

Referenced by oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::compute_pml_coefficients().

◆ omega_sq()

template<unsigned DIM>
const double& oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::omega_sq ( ) const
inline

◆ omega_sq_pt()

template<unsigned DIM>
double*& oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::omega_sq_pt ( )
inline

Access function for square of non-dim frequency.

207  {
208  return Omega_sq_pt;
209  }

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Omega_sq_pt.

Referenced by ElasticAnnulusProblem< ELASTICITY_ELEMENT >::complete_problem_setup().

◆ pml_mapping_pt() [1/2]

template<unsigned DIM>
PMLMapping*& oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::pml_mapping_pt ( )
inline

Return a pointer to the PML Mapping object.

403  {
404  return Pml_mapping_pt;
405  }

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Pml_mapping_pt.

◆ pml_mapping_pt() [2/2]

template<unsigned DIM>
PMLMapping* const& oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::pml_mapping_pt ( ) const
inline

Return a pointer to the PML Mapping object (const version)

409  {
410  return Pml_mapping_pt;
411  }

References oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Pml_mapping_pt.

◆ u_index_time_harmonic_linear_elasticity()

template<unsigned DIM>
virtual std::complex<unsigned> oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::u_index_time_harmonic_linear_elasticity ( const unsigned  i) const
inlinevirtual

Return the index at which the i-th real or imag unknown displacement component is stored. The default value is appropriate for single-physics problems:

100  {
101  return std::complex<unsigned>(i, i + DIM);
102  }

References DIM, and i.

Referenced by oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::interpolated_u_time_harmonic_linear_elasticity().

◆ values_to_be_pinned_on_outer_pml_boundary()

template<unsigned DIM>
void oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::values_to_be_pinned_on_outer_pml_boundary ( Vector< unsigned > &  values_to_pin)
inlinevirtual

Pure virtual function in which we specify the values to be pinned (and set to zero) on the outer edge of the pml layer. All of them! Vector is resized internally.

Implements oomph::PMLElementBase< DIM >.

262  {
263  values_to_pin.resize(DIM * 2);
264  for (unsigned j = 0; j < DIM * 2; j++)
265  {
266  values_to_pin[j] = j;
267  }
268  }

References DIM, and j.

Member Data Documentation

◆ Body_force_fct_pt

◆ Default_omega_sq_value

template<unsigned DIM>
double oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Default_omega_sq_value
staticprotected
Initial value:
=
1.0

Static default value for square of frequency.

◆ Default_pml_mapping

template<unsigned DIM>
ContinuousBermudezPMLMapping oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::Default_pml_mapping
static

Static so that the class doesn't need to instantiate a new default everytime it uses it

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

◆ Elasticity_tensor_pt

◆ Omega_sq_pt

◆ Pml_mapping_pt


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