oomph::HeightControlElement Class Reference

#include <young_laplace_elements.h>

+ Inheritance diagram for oomph::HeightControlElement:

Public Member Functions

 HeightControlElement (Node *control_node_pt, double *prescribed_height_pt)
 
Data *& kappa_pt ()
 
void assign_additional_local_eqn_numbers ()
 Setup local equation number for the height-control equation. More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
- 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
 
virtual void describe_local_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 unsigned self_test ()
 
virtual void compute_norm (Vector< double > &norm)
 
virtual void compute_norm (double &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 

Private Attributes

doublePrescribed_height_pt
 Pointer to value that stores the controlled height. More...
 
NodeControl_node_pt
 Pointer to node at which the height is controlled. More...
 
unsigned Curvature_data_index
 
unsigned Height_ctrl_local_eqn
 Local equation number of the height-control equation. More...
 

Additional Inherited Members

- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Protected Member Functions inherited from oomph::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_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
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_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
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)
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Height control element for YoungLaplace equations: Prescribe displacement along a spine (i.e. the "height of the meniscus" in exchange for treating the curvature as an unknown. Very similar to the DisplacementControlElement used in solid mechanics problems.

Constructor & Destructor Documentation

◆ HeightControlElement()

oomph::HeightControlElement::HeightControlElement ( Node control_node_pt,
double prescribed_height_pt 
)
inline

Constructor: Pass pointer to node at which the height is controlled and pointer to double that stores the prescribed height at that node.

563  {
564  // Store pointer to prescribed height value
565  Prescribed_height_pt = prescribed_height_pt;
566 
567  // Store pointer to Node at which the height is controlled
568  Control_node_pt = control_node_pt;
569 
570  // Create curvature Data, add it as internal data, and store
571  // its number with the internal data storage scheme
572  // (i.e. internal_data_pt(Curvature_data_index) will return
573  // the pointer to it...).
575 
576  // Add control_node_pt as external data
577  add_external_data(static_cast<Data*>(control_node_pt));
578  }
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307
GeneralisedElement()
Constructor: Initialise all pointers and all values to zero.
Definition: elements.h:596
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
unsigned Curvature_data_index
Definition: young_laplace_elements.h:616
Node * Control_node_pt
Pointer to node at which the height is controlled.
Definition: young_laplace_elements.h:612
double * Prescribed_height_pt
Pointer to value that stores the controlled height.
Definition: young_laplace_elements.h:609

References oomph::GeneralisedElement::add_external_data(), oomph::GeneralisedElement::add_internal_data(), Control_node_pt, Curvature_data_index, and Prescribed_height_pt.

Member Function Documentation

◆ assign_additional_local_eqn_numbers()

void oomph::HeightControlElement::assign_additional_local_eqn_numbers ( )
inlinevirtual

Setup local equation number for the height-control equation.

Reimplemented from oomph::GeneralisedElement.

589  {
590  // Get equation number from generic scheme: The height control
591  // equation is "the equation for the curvature" which is
592  // stored as internal data in the element and has been
593  // numbered as such...
595  }
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
unsigned Height_ctrl_local_eqn
Local equation number of the height-control equation.
Definition: young_laplace_elements.h:619

References Curvature_data_index, Height_ctrl_local_eqn, and oomph::GeneralisedElement::internal_local_eqn().

◆ fill_in_contribution_to_residuals()

void oomph::HeightControlElement::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Add the element's contribution to its residual vector: The height constraint. [Note: Jacobian is computed automatically by finite-differencing]

Reimplemented from oomph::GeneralisedElement.

602  {
603  residuals[Height_ctrl_local_eqn] =
604  Control_node_pt->value(0) - (*Prescribed_height_pt);
605  }
double value(const unsigned &i) const
Definition: nodes.cc:2408

References Control_node_pt, Height_ctrl_local_eqn, and oomph::Node::value().

◆ kappa_pt()

Data*& oomph::HeightControlElement::kappa_pt ( )
inline

Access function to the pointer to the Data object that stores the curvature.

583  {
585  }
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622

References Curvature_data_index, and oomph::GeneralisedElement::internal_data_pt().

Referenced by RefineableYoungLaplaceProblem< ELEMENT >::RefineableYoungLaplaceProblem(), and YoungLaplaceProblem< ELEMENT >::YoungLaplaceProblem().

Member Data Documentation

◆ Control_node_pt

Node* oomph::HeightControlElement::Control_node_pt
private

Pointer to node at which the height is controlled.

Referenced by fill_in_contribution_to_residuals(), and HeightControlElement().

◆ Curvature_data_index

unsigned oomph::HeightControlElement::Curvature_data_index
private

In which component (in the vector of the element's internal Data) is the unknown curvature stored?

Referenced by assign_additional_local_eqn_numbers(), HeightControlElement(), and kappa_pt().

◆ Height_ctrl_local_eqn

unsigned oomph::HeightControlElement::Height_ctrl_local_eqn
private

Local equation number of the height-control equation.

Referenced by assign_additional_local_eqn_numbers(), and fill_in_contribution_to_residuals().

◆ Prescribed_height_pt

double* oomph::HeightControlElement::Prescribed_height_pt
private

Pointer to value that stores the controlled height.

Referenced by HeightControlElement().


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