29#ifndef OOMPH_HIJACKED_ELEMENTS_HEADER
30#define OOMPH_HIJACKED_ELEMENTS_HEADER
130 template<
class ELEMENT>
147 const int& face_index,
148 const unsigned&
id = 0)
248 std::string error_message =
"Failed to cast to SolidNode\n ";
249 error_message +=
"You may be trying to hijack a non-elastic element\n";
287 std::string error_message =
"Failed to cast to SpineNode\n ";
288 error_message +=
"You may be trying to hijack a non-spine element\n";
345 unsigned n_dof = this->ndof();
346 for (
unsigned i = 0;
i <
n_dof;
i++)
349 for (std::set<long*>::iterator
it =
398 ELEMENT::get_jacobian(
residuals, jacobian);
401 unsigned n_dof = this->ndof();
409 for (
unsigned j = 0;
j <
n_dof;
j++)
423 template<
class ELEMENT>
437 template<
class ELEMENT>
452 template<
class ELEMENT>
A class that represents a collection of data; each Data object may contain many different individual ...
FaceGeometry()
Constructor.
FaceGeometry()
Constructor.
FaceGeometry()
Constructor.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
Custom Data class that is used when HijackingData. The class always contains a single value that is c...
HijackedElement base class that provides storage and access funcitons for pointers to the global equa...
void unhijack_all_data()
Reset the hijacked data pt, so that none of the equations in the element are hijacked.
double * Residual_multiplier_pt
Pointer to a double that multiplies the contribution to the residuals from the original element....
double *& residual_multiplier_pt()
Return the pointer to the residual multiplier.
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....
void unhijack_global_eqn(long *const &global_eqn_pt)
The global equation, addressed by global_eqn_pt, is no longer hijacked by this element.
void hijack_global_eqn(long *const &global_eqn_pt)
Mark the global equation, addressed by global_eqn_pt, as hijacked by this element.
const double & residual_multiplier() const
Return the value of the residual multiplier.
HijackedElementBase()
Constructor, initialise the pointer to the equation numbers for the storage to zero.
Vector< int > * Hijacked_local_eqn_number_pt
Pointer to a vector of integers containing the local equation numbers of any hijacked variables in th...
virtual ~HijackedElementBase()
Destructor, destroy the storage for the equation numbers.
static double Default_residual_multiplier
Static default value for the double that multiplies the original residuals.
Hijacked elements are elements in which one or more Data values that affect the element's residuals,...
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 r...
Data * hijack_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...
Hijacked(FiniteElement *const &element_pt, const int &face_index)
Constructor used for hijacking face elements.
Data * hijack_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 objec...
Data * hijack_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 con...
Data * hijack_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 ...
Hijacked()
Constructor, call the constructors of the base elements.
Data * hijack_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...
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.
void get_residuals(Vector< double > &residuals)
Get the residuals from the underlying element, but then wipe the entries in the residual vector that ...
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 th...
An OomphLibError object which should be thrown when an run-time error is encountered....
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
Class for nodes that live on spines. The assumption is that each Node lies at a fixed fraction on a s...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).