#include <womersley_elements.h>
Public Member Functions  
NavierStokesWomersleyPressureControlElement (TemplateFreeWomersleyImpedanceTubeBase *womersley_tube_pt)  
Constructor takes a pointer to a suitable Womersley impedance tube which defines the pressure via get_response(...) More...  
~NavierStokesWomersleyPressureControlElement ()  
Destructor should not delete anything. More...  
void  fill_in_contribution_to_residuals (Vector< double > &residuals) 
This function returns the residuals. More...  
void  fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian) 
This function returns the residuals and the Jacobian, plus the Jacobian contribution for the NetFluxControlElementForWomersleyPressureControl with respect to unknowns in this element. More...  
Data *  volume_flux_data_pt () const 
Function to return a pointer to the Data object whose single value is the flux degree of freedom. More...  
void  add_pressure_data (Data *pressure_data_pt) 
Function to add to external data the Data object whose single value is the pressure applied at the boundary. More...  
unsigned  ndof_types () const 
The number of "DOF types" that degrees of freedom in this element are subdivided into  set to 1. More...  
void  get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const 
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 type" that this unknown is associated with. (Function can obviously only be called if the equation numbering scheme has been set up.) More...  
Public Member Functions inherited from oomph::GeneralisedElement  
GeneralisedElement()  GeneralisedElement (const GeneralisedElement &) 
Constructor: Initialise all pointers and all values to zero. More...  
void  operator= (const GeneralisedElement &) 
Broken assignment operator. More...  
Data *&  internal_data_pt (const unsigned &i) 
Return a pointer to ith internal data object. More...  
Data *const &  internal_data_pt (const unsigned &i) const 
Return a pointer to ith internal data object (const version) More...  
Data *&  external_data_pt (const unsigned &i) 
Return a pointer to ith external data object. More...  
Data *const &  external_data_pt (const unsigned &i) const 
Return a pointer to ith external data object (const version) More...  
unsigned long  eqn_number (const unsigned &ieqn_local) const 
Return the global equation number corresponding to the ieqn_localth local equation number. More...  
int  local_eqn_number (const unsigned long &ieqn_global) const 
Return the local equation number corresponding to the ieqn_globalth global equation number. Returns minus one (1) if there is no local degree of freedom corresponding to the chosen global equation number. More...  
unsigned  add_external_data (Data *const &data_pt, const bool &fd=true) 
bool  external_data_fd (const unsigned &i) const 
Return the status of the boolean flag indicating whether the external data is included in the finite difference loop. More...  
void  exclude_external_data_fd (const unsigned &i) 
Set the boolean flag to exclude the external datum from the the finite difference loop when computing the jacobian matrix. More...  
void  include_external_data_fd (const unsigned &i) 
Set the boolean flag to include the external datum in the the finite difference loop when computing the jacobian matrix. More...  
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) 
Set the timestepper associated with the ith internal data object. More...  
void  assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt) 
Assign the global equation numbers to the internal Data. The arguments are the current highest global equation number (which will be incremented) and a Vector of pointers to the global variables (to which any unpinned values in the internal Data are added). More...  
void  describe_dofs (std::ostream &out, const std::string ¤t_string) const 
Function to describe the dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More...  
virtual void  describe_local_dofs (std::ostream &out, const std::string ¤t_string) const 
Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More...  
void  add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt) 
Add pointers to the internal data values to map indexed by the global equation number. More...  
void  add_internal_data_values_to_vector (Vector< double > &vector_of_values) 
Add all internal data and time history values to the vector in the internal storage order. More...  
void  read_internal_data_values_from_vector (const Vector< double > &vector_of_values, unsigned &index) 
Read all internal data and time history values from the vector starting from index. On return the index will be set to the value at the end of the data that has been read in. More...  
void  add_internal_eqn_numbers_to_vector (Vector< long > &vector_of_eqn_numbers) 
Add all equation numbers associated with internal data to the vector in the internal storage order. More...  
void  read_internal_eqn_numbers_from_vector (const Vector< long > &vector_of_eqn_numbers, unsigned &index) 
Read all equation numbers associated with internal data from the vector starting from index. On return the index will be set to the value at the end of the data that has been read in. More...  
virtual void  assign_local_eqn_numbers (const bool &store_local_dof_pt) 
Setup the arrays of local equation numbers for the element. If the optional boolean argument is true, then pointers to the associated degrees of freedom are stored locally in the array Dof_pt. More...  
virtual void  complete_setup_of_dependencies () 
Complete the setup of any additional dependencies that the element may have. Empty virtual function that may be overloaded for specific derived elements. Used, e.g., for elements with algebraic node update functions to determine the "geometric
Data", i.e. the Data that affects the element's shape. This function is called (for all elements) at the very beginning of the equation numbering procedure to ensure that all dependencies are accounted for. More...  
virtual void  get_residuals (Vector< double > &residuals) 
Calculate the vector of residuals of the equations in the element. By default initialise the vector to zero and then call the fill_in_contribution_to_residuals() function. Note that this entire function can be overloaded if desired. More...  
virtual void  get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian) 
Calculate the elemental Jacobian matrix "d equation / d variable". More...  
virtual void  get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix) 
Calculate the residuals and the elemental "mass" matrix, the matrix that multiplies the time derivative terms in a problem. More...  
virtual void  get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix) 
Calculate the residuals and jacobian and elemental "mass" matrix, the matrix that multiplies the time derivative terms. More...  
virtual void  get_dresiduals_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam) 
Calculate the derivatives of the residuals with respect to a parameter. More...  
virtual void  get_djacobian_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam) 
Calculate the derivatives of the elemental Jacobian matrix and residuals with respect to a parameter. More...  
virtual void  get_djacobian_and_dmass_matrix_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam) 
Calculate the derivatives of the elemental Jacobian matrix mass matrix and residuals with respect to a parameter. More...  
virtual void  get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product) 
Calculate the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenvector, Y, and other specified vectors, C (d(J_{ij})/d u_{k}) Y_{j} C_{k}. More...  
virtual void  get_inner_products (Vector< std::pair< unsigned, unsigned > > const &history_index, Vector< double > &inner_product) 
Return the vector of inner product of the given pairs of history values. More...  
virtual void  get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double > > &inner_product_vector) 
Compute the vectors that when taken as a dot product with other history values give the inner product over the element. More...  
virtual unsigned  self_test () 
Selftest: Have all internal values been classified as pinned/unpinned? Return 0 if OK. More...  
virtual void  compute_norm (double &norm) 
Compute norm of solution – broken virtual can be overloaded by element writer to implement whatever norm is desired for the specific element. More...  
void  set_halo (const unsigned &non_halo_proc_ID) 
Label the element as halo and specify processor that holds nonhalo counterpart. More...  
void  set_nonhalo () 
Label the element as not being a halo. More...  
bool  is_halo () const 
Is this element a halo? More...  
int  non_halo_proc_ID () 
ID of processor ID that holds nonhalo counterpart of halo element; negative if not a halo. More...  
void  set_must_be_kept_as_halo () 
Insist that this element be kept as a halo element during a distribute? More...  
void  unset_must_be_kept_as_halo () 
Do not insist that this element be kept as a halo element during distribution. More...  
bool  must_be_kept_as_halo () const 
Test whether the element must be kept as a halo element. More...  
Protected Member Functions  
void  fill_in_generic_residual_contribution_pressure_control (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag) 
This function returns the residuals. flag=1(or 0): do (or don't) compute the Jacobian as well. Note that this function also calculates the Jacobian contribution for the NetFluxControlElementForWomersleyPressureControl. More...  
Protected Member Functions inherited from oomph::GeneralisedElement  
unsigned  add_internal_data (Data *const &data_pt, const bool &fd=true) 
Add a (pointer to an) internal data object to the element and return the index required to obtain it from the access function internal_data_pt() . The boolean indicates whether the datum should be included in the general finitedifference loop when calculating the jacobian. The default value is true, i.e. the data will be included in the finite differencing. More...  
bool  internal_data_fd (const unsigned &i) const 
Return the status of the boolean flag indicating whether the internal data is included in the finite difference loop. More...  
void  exclude_internal_data_fd (const unsigned &i) 
Set the boolean flag to exclude the internal datum from the finite difference loop when computing the jacobian matrix. More...  
void  include_internal_data_fd (const unsigned &i) 
Set the boolean flag to include the internal datum in the finite difference loop when computing the jacobian matrix. More...  
void  clear_global_eqn_numbers () 
Clear the storage for the global equation numbers and pointers to dofs (if stored) More...  
void  add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt) 
Add the contents of the queue global_eqn_numbers to the local storage for the localtoglobal translation scheme. It is essential that the entries in the queue are added IN ORDER i.e. from the front. More...  
virtual void  assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt) 
Assign the local equation numbers for the internal and external Data This must be called after the global equation numbers have all been assigned. It is virtual so that it can be overloaded by ElementWithExternalElements so that any external data from the external elements in included in the numbering scheme. If the boolean argument is true then pointers to the dofs will be stored in Dof_pt. More...  
virtual void  assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt) 
Assign all the local equation numbering schemes that can be applied generically for the element. In most cases, this is the function that will be overloaded by inherited classes. It is required to ensure that assign_additional_local_eqn_numbers() can always be called after ALL other local equation numbering has been performed. The default for the GeneralisedElement is simply to call internal and external local equation numbering. If the boolean argument is true then pointers to the dofs will be stored in Dof_pt. More...  
virtual void  assign_additional_local_eqn_numbers () 
Setup any additional lookup schemes for local equation numbers. Examples of use include using local storage to refer to explicit degrees of freedom. The additional memory cost of such storage may or may not be offset by fast local access. More...  
int  internal_local_eqn (const unsigned &i, const unsigned &j) const 
Return the local equation number corresponding to the jth value stored at the ith internal data. More...  
int  external_local_eqn (const unsigned &i, const unsigned &j) 
Return the local equation number corresponding to the jth value stored at the ith external data. More...  
void  fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false) 
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differences. This version of the function assumes that the residuals vector has already been calculated. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data. More...  
void  fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false) 
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differences. This version computes the residuals vector before calculating the jacobian terms. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data. More...  
void  fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false) 
Calculate the contributions to the jacobian from the external degrees of freedom using finite differences. This version of the function assumes that the residuals vector has already been calculated. If the boolean argument is true, the finite differencing will be performed for all external data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data. More...  
void  fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false) 
Calculate the contributions to the jacobian from the external degrees of freedom using finite differences. This version computes the residuals vector before calculating the jacobian terms. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data. More...  
virtual void  update_before_internal_fd () 
Function that is called before the finite differencing of any internal data. This may be overloaded to update any slaved data before finite differencing takes place. More...  
virtual void  reset_after_internal_fd () 
Function that is call after the finite differencing of the internal data. This may be overloaded to reset any slaved variables that may have changed during the finite differencing. More...  
virtual void  update_in_internal_fd (const unsigned &i) 
Function called within the finite difference loop for internal data after a change in any values in the ith internal data object. More...  
virtual void  reset_in_internal_fd (const unsigned &i) 
Function called within the finite difference loop for internal data after the values in the ith external data object are reset. The default behaviour is to call the update function. More...  
virtual void  update_before_external_fd () 
Function that is called before the finite differencing of any external data. This may be overloaded to update any slaved data before finite differencing takes place. More...  
virtual void  reset_after_external_fd () 
Function that is call after the finite differencing of the external data. This may be overloaded to reset any slaved variables that may have changed during the finite differencing. More...  
virtual void  update_in_external_fd (const unsigned &i) 
Function called within the finite difference loop for external data after a change in any values in the ith external data object. More...  
virtual void  reset_in_external_fd (const unsigned &i) 
Function called within the finite difference loop for external data after the values in the ith external data object are reset. The default behaviour is to call the update function. More...  
virtual void  fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix) 
Add the elemental contribution to the mass matrix matrix. and the residuals vector. Note that this function should NOT initialise the residuals vector or the mass matrix. It must be called after the residuals vector and jacobian matrix have been initialised to zero. The default is deliberately broken. More...  
virtual void  fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix) 
Add the elemental contribution to the jacobian matrix, mass matrix and the residuals vector. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero. More...  
virtual void  fill_in_contribution_to_dresiduals_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam) 
Add the elemental contribution to the derivatives of the residuals with respect to a parameter. This function should NOT initialise any entries and must be called after the entries have been initialised to zero The default implementation is to use finite differences to calculate the derivatives. More...  
virtual void  fill_in_contribution_to_djacobian_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam) 
Add the elemental contribution to the derivatives of the elemental Jacobian matrix and residuals with respect to a parameter. This function should NOT initialise any entries and must be called after the entries have been initialised to zero The default implementation is to use finite differences to calculate the derivatives. More...  
virtual void  fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam) 
Add the elemental contribution to the derivative of the jacobian matrix, mass matrix and the residuals vector with respect to the passed parameter. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero. More...  
virtual void  fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product) 
Fill in contribution to the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenvector, Y, and other specified vectors, C (d(J_{ij})/d u_{k}) Y_{j} C_{k}. More...  
virtual void  fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned > > const &history_index, Vector< double > &inner_product) 
Fill in the contribution to the inner products between given pairs of history values. More...  
virtual void  fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double > > &inner_product_vector) 
Fill in the contributions to the vectors that when taken as dot product with other history values give the inner product over the element. More...  
Private Attributes  
Data *  Volume_flux_data_pt 
Data object whose single value is the volume flux applied by the elements in the Flux_control_mesh_pt. More...  
TemplateFreeWomersleyImpedanceTubeBase *  Womersley_tube_pt 
Pointer to the Womersley impedance tube. More...  
unsigned  Pressure_data_id 
Id of external Data object whose single value is the pressure. More...  
unsigned  Volume_flux_data_id 
Id of internal Data object whose single value is the volume flux. More...  
Additional Inherited Members  
Static Public Attributes inherited from oomph::GeneralisedElement  
static bool  Suppress_warning_about_repeated_internal_data =false 
Static boolean to suppress warnings about repeated internal data. Defaults to false. More...  
static bool  Suppress_warning_about_repeated_external_data =true 
Static boolean to suppress warnings about repeated external data. Defaults to true. More...  
static double  Default_fd_jacobian_step =1.0e8 
Double used for the default finite difference step in elemental jacobian calculations. More...  
Protected Attributes inherited from oomph::GeneralisedElement  
int  Non_halo_proc_ID 
Nonhalo processor ID for Data; 1 if it's not a halo. More...  
bool  Must_be_kept_as_halo 
Does this element need to be kept as a halo element during a distribute? More...  
Static Protected Attributes inherited from oomph::GeneralisedElement  
static DenseMatrix< double >  Dummy_matrix 
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case when only the residuals are being assembled. More...  
static std::deque< double * >  Dof_pt_deque 
Static storage for deque used to add_global_equation_numbers when pointers to the dofs in each element are not required. More...  
An element to impose a fluid pressure obtained from a Womersley impedance tube at a boundary. This element is used in conjunction with a NetFluxControlElementForWomersleyPressureControl element, and is passed to the NetFluxControlElementForWomersleyPressureControl element's constructor. The volume flux across the boundary is then an unknown of the problem. The constructor argument for this element is a suitable Womersley impedance tube to give the pressure via its get_response(...) function.
Note: the NavierStokesWomersleyPressureControlElement element calculates Jacobian entries BOTH for itself AND for the NetFluxControlElementForWomersleyPressureControl with respect to the unknowns in this (NavierStokesWomersleyPressureControlElement) element.
Definition at line 2787 of file womersley_elements.h.

inline 
Constructor takes a pointer to a suitable Womersley impedance tube which defines the pressure via get_response(...)
Definition at line 2794 of file womersley_elements.h.
References oomph::GeneralisedElement::add_internal_data(), Volume_flux_data_id, and Volume_flux_data_pt.

inline 
Destructor should not delete anything.
Definition at line 2806 of file womersley_elements.h.

inline 
Function to add to external data the Data object whose single value is the pressure applied at the boundary.
Definition at line 2836 of file womersley_elements.h.
References oomph::GeneralisedElement::add_external_data(), and Pressure_data_id.
Referenced by oomph::NetFluxControlElementForWomersleyPressureControl::NetFluxControlElementForWomersleyPressureControl().

inlinevirtual 
This function returns the residuals and the Jacobian, plus the Jacobian contribution for the NetFluxControlElementForWomersleyPressureControl with respect to unknowns in this element.
Reimplemented from oomph::GeneralisedElement.
Definition at line 2822 of file womersley_elements.h.
References fill_in_generic_residual_contribution_pressure_control().

inlinevirtual 
This function returns the residuals.
Reimplemented from oomph::GeneralisedElement.
Definition at line 2809 of file womersley_elements.h.
References oomph::GeneralisedElement::Dummy_matrix, and fill_in_generic_residual_contribution_pressure_control().

inlineprotected 
This function returns the residuals. flag=1(or 0): do (or don't) compute the Jacobian as well. Note that this function also calculates the Jacobian contribution for the NetFluxControlElementForWomersleyPressureControl.
Definition at line 2873 of file womersley_elements.h.
References oomph::GeneralisedElement::external_data_pt(), oomph::GeneralisedElement::external_local_eqn(), oomph::TemplateFreeWomersleyImpedanceTubeBase::get_response(), oomph::GeneralisedElement::internal_local_eqn(), Pressure_data_id, oomph::Data::value(), Volume_flux_data_id, and Womersley_tube_pt.
Referenced by fill_in_contribution_to_jacobian(), and fill_in_contribution_to_residuals().

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 type" 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.
Definition at line 2854 of file womersley_elements.h.
References oomph::GeneralisedElement::eqn_number().

inlinevirtual 
The number of "DOF types" that degrees of freedom in this element are subdivided into  set to 1.
Reimplemented from oomph::GeneralisedElement.
Definition at line 2843 of file womersley_elements.h.

inline 
Function to return a pointer to the Data object whose single value is the flux degree of freedom.
Definition at line 2832 of file womersley_elements.h.
References Volume_flux_data_pt.

private 
Id of external Data object whose single value is the pressure.
Definition at line 2918 of file womersley_elements.h.
Referenced by add_pressure_data(), and fill_in_generic_residual_contribution_pressure_control().

private 
Id of internal Data object whose single value is the volume flux.
Definition at line 2922 of file womersley_elements.h.
Referenced by fill_in_generic_residual_contribution_pressure_control(), and NavierStokesWomersleyPressureControlElement().

private 
Data object whose single value is the volume flux applied by the elements in the Flux_control_mesh_pt.
Definition at line 2912 of file womersley_elements.h.
Referenced by NavierStokesWomersleyPressureControlElement(), and volume_flux_data_pt().

private 
Pointer to the Womersley impedance tube.
Definition at line 2915 of file womersley_elements.h.
Referenced by fill_in_generic_residual_contribution_pressure_control().