Public Member Functions | List of all members
oomph::Hijacked< ELEMENT > Class Template Reference

Hijacked elements are elements in which one or more Data values that affect the element's residuals, are determined by another element – the data values are then said to have been hijacked by another element. The main functionality added by the Hijacked element class is that it wipes out those entries in the element's residual vector and those rows in the element's Jacobian matrix that are determined by the "other" elements that have hijacked the values. Note that for continuation in homotopy parameters, it may be desriable to multiply the residuals and corresponding jacobian entries by a "homotopy parameter". The value of this parameter can be set by assigning residual_multiplier_pt() which has a default value of zero. Note: it would be possible to extend the functionality so that different residuals are multiplied by different values, but will this ever be required? More...

#include <hijacked_elements.h>

+ Inheritance diagram for oomph::Hijacked< ELEMENT >:

Public Member Functions

 Hijacked ()
 Constructor, call the constructors of the base elements. More...
 
 Hijacked (FiniteElement *const &element_pt, const int &face_index)
 Constructor used for hijacking face elements. More...
 
 Hijacked (FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0)
 Constructor used for hijacking face elements with specification of ID of additional variables. More...
 
Datahijack_internal_value (const unsigned &n, const unsigned &i, const bool &return_data=true)
 Hijack the i-th value stored at internal data n. Optionally return a custom-made (copied) data object that contains only the hijacked value. This can be used as the input to other elements. Note that the calling program assumes responsibility for this data object and must clean it up. The default is that the data object is returned. More...
 
Datahijack_external_value (const unsigned &n, const unsigned &i, const bool &return_data=true)
 Hijack the i-th value stored at external data n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Note that the calling program assumes responsibility for this data object and must clean it up. The default is that the data object is returned. More...
 
Datahijack_nodal_value (const unsigned &n, const unsigned &i, const bool &return_data=true)
 Hijack the i-th value stored at node n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Once again, the calling program must clean up the allocated Data object. The default is that the data object is returned. More...
 
Datahijack_nodal_position_value (const unsigned &n, const unsigned &i, const bool &return_data=true)
 Hijack the i-th positional value stored at node n. Optionaly return a custom-made (copied) data object that contains only the hijacked value. Again, responsibility for the memory allocated lies with the calling function. The default is that the data object is returned. More...
 
Datahijack_nodal_spine_value (const unsigned &n, const unsigned &i, const bool &return_data=true)
 Hijack the i-th value stored at the spine that affects local node n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Deletion must be handled at the higher level The default is that the data object is returned. More...
 
void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 Set up the local equation numbers for the underlying element, then set up the local arrays to hold the hijacked variables. If the boolean argument is true then pointers to the associated degrees of freedom are stored in the array Dof_pt. More...
 
void get_residuals (Vector< double > &residuals)
 Get the residuals from the underlying element, but then wipe the entries in the residual vector that correspond to hijacked values – they will be computed by other elements. More...
 
void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Get the residuals and Jacobian matrix from the underlying element, but then wipe the entries in the residual vector and the rows in the Jacobian matrix that correspond to hijacked values – they will be computed by other elements. More...
 
- Public Member Functions inherited from oomph::HijackedElementBase
 HijackedElementBase ()
 Constructor, initialise the pointer to the equation numbers for the storage to zero. More...
 
virtual ~HijackedElementBase ()
 Destructor, destroy the storage for the equation numbers. More...
 
void unhijack_all_data ()
 Reset the hijacked data pt, so that none of the equations in the element are hijacked. More...
 
const double & residual_multiplier () const
 Return the value of the residual multiplier. More...
 
double *& residual_multiplier_pt ()
 Return the pointer to the residual multiplier. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::HijackedElementBase
void hijack_global_eqn (long *const &global_eqn_pt)
 Mark the global equation, addressed by global_eqn_pt, as hijacked by this element. More...
 
void unhijack_global_eqn (long *const &global_eqn_pt)
 The global equation, addressed by global_eqn_pt, is no longer hijacked by this element. More...
 
- Protected Attributes inherited from oomph::HijackedElementBase
std::set< long * > * Hijacked_global_eqn_number_pt
 Pointer to a Set of pointers to the equation numbers that will be hijacked by this element. Note that these MUST be pointers because hijacking information is set BEFORE global equation numbers have been assigned. More...
 
Vector< int > * Hijacked_local_eqn_number_pt
 Pointer to a vector of integers containing the local equation numbers of any hijacked variables in the element. More...
 
double * Residual_multiplier_pt
 Pointer to a double that multiplies the contribution to the residuals from the original element. This is usually used as a homotopy parameter to permit a smooth transition between different types of boundary conditions, rather than switching them on or off abruptly. More...
 
- Static Protected Attributes inherited from oomph::HijackedElementBase
static double Default_residual_multiplier = 0.0
 Static default value for the double that multiplies the original residuals. More...
 

Detailed Description

template<class ELEMENT>
class oomph::Hijacked< ELEMENT >

Hijacked elements are elements in which one or more Data values that affect the element's residuals, are determined by another element – the data values are then said to have been hijacked by another element. The main functionality added by the Hijacked element class is that it wipes out those entries in the element's residual vector and those rows in the element's Jacobian matrix that are determined by the "other" elements that have hijacked the values. Note that for continuation in homotopy parameters, it may be desriable to multiply the residuals and corresponding jacobian entries by a "homotopy parameter". The value of this parameter can be set by assigning residual_multiplier_pt() which has a default value of zero. Note: it would be possible to extend the functionality so that different residuals are multiplied by different values, but will this ever be required?

Definition at line 131 of file hijacked_elements.h.

Constructor & Destructor Documentation

◆ Hijacked() [1/3]

template<class ELEMENT >
oomph::Hijacked< ELEMENT >::Hijacked ( )
inline

Constructor, call the constructors of the base elements.

Definition at line 135 of file hijacked_elements.h.

◆ Hijacked() [2/3]

template<class ELEMENT >
oomph::Hijacked< ELEMENT >::Hijacked ( FiniteElement *const &  element_pt,
const int &  face_index 
)
inline

Constructor used for hijacking face elements.

Definition at line 138 of file hijacked_elements.h.

◆ Hijacked() [3/3]

template<class ELEMENT >
oomph::Hijacked< ELEMENT >::Hijacked ( FiniteElement *const &  element_pt,
const int &  face_index,
const unsigned &  id = 0 
)
inline

Constructor used for hijacking face elements with specification of ID of additional variables.

Definition at line 146 of file hijacked_elements.h.

Member Function Documentation

◆ assign_local_eqn_numbers()

template<class ELEMENT >
void oomph::Hijacked< ELEMENT >::assign_local_eqn_numbers ( const bool &  store_local_dof_pt)
inline

Set up the local equation numbers for the underlying element, then set up the local arrays to hold the hijacked variables. If the boolean argument is true then pointers to the associated degrees of freedom are stored in the array Dof_pt.

Definition at line 318 of file hijacked_elements.h.

References oomph::HijackedElementBase::Hijacked_global_eqn_number_pt, oomph::HijackedElementBase::Hijacked_local_eqn_number_pt, and i.

◆ get_jacobian()

template<class ELEMENT >
void oomph::Hijacked< ELEMENT >::get_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Get the residuals and Jacobian matrix from the underlying element, but then wipe the entries in the residual vector and the rows in the Jacobian matrix that correspond to hijacked values – they will be computed by other elements.

Definition at line 395 of file hijacked_elements.h.

References oomph::HijackedElementBase::Hijacked_local_eqn_number_pt, i, and oomph::HijackedElementBase::residual_multiplier().

◆ get_residuals()

template<class ELEMENT >
void oomph::Hijacked< ELEMENT >::get_residuals ( Vector< double > &  residuals)
inline

Get the residuals from the underlying element, but then wipe the entries in the residual vector that correspond to hijacked values – they will be computed by other elements.

Definition at line 377 of file hijacked_elements.h.

References oomph::HijackedElementBase::Hijacked_local_eqn_number_pt, i, and oomph::HijackedElementBase::residual_multiplier().

◆ hijack_external_value()

template<class ELEMENT >
Data* oomph::Hijacked< ELEMENT >::hijack_external_value ( const unsigned &  n,
const unsigned &  i,
const bool &  return_data = true 
)
inline

Hijack the i-th value stored at external data n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Note that the calling program assumes responsibility for this data object and must clean it up. The default is that the data object is returned.

Definition at line 188 of file hijacked_elements.h.

References oomph::HijackedElementBase::hijack_global_eqn(), and i.

◆ hijack_internal_value()

template<class ELEMENT >
Data* oomph::Hijacked< ELEMENT >::hijack_internal_value ( const unsigned &  n,
const unsigned &  i,
const bool &  return_data = true 
)
inline

Hijack the i-th value stored at internal data n. Optionally return a custom-made (copied) data object that contains only the hijacked value. This can be used as the input to other elements. Note that the calling program assumes responsibility for this data object and must clean it up. The default is that the data object is returned.

Definition at line 160 of file hijacked_elements.h.

References oomph::HijackedElementBase::hijack_global_eqn(), and i.

◆ hijack_nodal_position_value()

template<class ELEMENT >
Data* oomph::Hijacked< ELEMENT >::hijack_nodal_position_value ( const unsigned &  n,
const unsigned &  i,
const bool &  return_data = true 
)
inline

Hijack the i-th positional value stored at node n. Optionaly return a custom-made (copied) data object that contains only the hijacked value. Again, responsibility for the memory allocated lies with the calling function. The default is that the data object is returned.

Definition at line 240 of file hijacked_elements.h.

References oomph::Data::eqn_number_pt(), oomph::HijackedElementBase::hijack_global_eqn(), i, oomph::Global_string_for_annotation::string(), and oomph::SolidNode::variable_position_pt().

◆ hijack_nodal_spine_value()

template<class ELEMENT >
Data* oomph::Hijacked< ELEMENT >::hijack_nodal_spine_value ( const unsigned &  n,
const unsigned &  i,
const bool &  return_data = true 
)
inline

Hijack the i-th value stored at the spine that affects local node n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Deletion must be handled at the higher level The default is that the data object is returned.

Definition at line 279 of file hijacked_elements.h.

References oomph::Data::eqn_number_pt(), oomph::HijackedElementBase::hijack_global_eqn(), i, oomph::Spine::spine_height_pt(), oomph::SpineNode::spine_pt(), and oomph::Global_string_for_annotation::string().

◆ hijack_nodal_value()

template<class ELEMENT >
Data* oomph::Hijacked< ELEMENT >::hijack_nodal_value ( const unsigned &  n,
const unsigned &  i,
const bool &  return_data = true 
)
inline

Hijack the i-th value stored at node n. Optionally return a custom-made (copied) data object that contains only the hijacked value. Once again, the calling program must clean up the allocated Data object. The default is that the data object is returned.

Definition at line 214 of file hijacked_elements.h.

References oomph::HijackedElementBase::hijack_global_eqn(), and i.

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


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