29#ifndef OOMPH_SPECIFIC_NODE_UPDATE_INTERFACE_ELEMENTS_HEADER
30#define OOMPH_SPECIFIC_NODE_UPDATE_INTERFACE_ELEMENTS_HEADER
34#include <oomph-lib-config.h>
53 template<
class ELEMENT>
70 template<
class ELEMENT>
79 <<
"The generic FluidInterfaceAdditionalValues<ELEMENT> class has "
81 <<
"called. This should never happen. If you are creating your own\n"
82 <<
"surface equations you must overload the policy class to specify\n"
83 <<
"how many additional values are required at the surface nodes.\n"
84 <<
"For an example, see "
85 "src/fluid_interface/surfactant_transport_elements.h\n"
151 template<
class EQUATION_CLASS,
class DERIVATIVE_CLASS,
class ELEMENT>
153 :
public virtual Hijacked<SpineElement<FaceGeometry<ELEMENT>>>,
154 public virtual EQUATION_CLASS,
155 public DERIVATIVE_CLASS
172 it != bulk_node_number.end();
191 return DERIVATIVE_CLASS::compute_surface_derivatives(
psi,
204 const int& face_index,
205 const unsigned&
id = 0)
222 throw OomphLibError(
"This interface element will not work correctly "
223 "if nodes are hanging\n",
235 this->U_index_interface.resize(
n_u_index);
283 EQUATION_CLASS::fill_in_generic_residual_contribution_interface(
296 const unsigned&
flag,
307 EQUATION_CLASS::add_additional_residual_contributions_interface(
325 EQUATION_CLASS::output(
outfile);
337 EQUATION_CLASS::output(
file_pt);
353 const int& face_index)
369 face_el_pt->u_index_interface_boundary() = this->U_index_interface;
420 template<
class ELEMENT>
422 :
public Hijacked<SpineElement<FaceGeometry<FaceGeometry<ELEMENT>>>>,
464 residuals, jacobian, 1);
484 template<
class ELEMENT>
486 :
public Hijacked<SpineElement<FaceGeometry<FaceGeometry<ELEMENT>>>>,
529 residuals, jacobian, 1);
551 template<
class ELEMENT>
569 template<
class ELEMENT>
587 template<
class ELEMENT>
590 AxisymmetricDerivatives,
605 template<
class ELEMENT>
623 template<
class ELEMENT>
640 template<
class ELEMENT>
671 template<
class EQUATION_CLASS,
class DERIVATIVE_CLASS,
class ELEMENT>
673 :
public virtual Hijacked<FaceGeometry<ELEMENT>>,
674 public EQUATION_CLASS,
675 public DERIVATIVE_CLASS
687 return this->Lagrange_index[
n];
705 it != bulk_node_number.end();
724 return DERIVATIVE_CLASS::compute_surface_derivatives(
psi,
740 const int& face_index,
741 const unsigned&
id = 0)
742 :
FaceGeometry<ELEMENT>(), EQUATION_CLASS(), DERIVATIVE_CLASS()
755 if (this->has_hanging_nodes())
758 "This flux element will not work correctly if nodes are hanging\n",
769 this->U_index_interface.resize(
n_u_index);
808 ->index_of_first_value_assigned_by_face_element(
id);
824 const unsigned&
i)
const
841 EQUATION_CLASS::fill_in_generic_residual_contribution_interface(
845 this->fill_in_jacobian_from_solid_position_by_fd(jacobian);
851 EQUATION_CLASS::output(
outfile);
863 EQUATION_CLASS::output(
file_pt);
880 const unsigned&
flag,
891 EQUATION_CLASS::add_additional_residual_contributions_interface(
906 const unsigned n_node = this->nnode();
908 const unsigned nodal_dimension = this->nodal_dimension();
923 for (
unsigned i = 0;
i < nodal_dimension;
i++)
961 const int& face_index)
973 this->build_face_element(face_index,
face_el_pt);
976 face_el_pt->u_index_interface_boundary() = this->U_index_interface;
991 this->Lagrange_index[
face_el_pt->bulk_node_number(
n)];
999 const unsigned n_node = this->nnode();
1011 this->nbulk_value(
face_el_pt->bulk_node_number(
n));
1036 template<
class ELEMENT>
1062 const unsigned&
i)
const
1125 template<
class ELEMENT>
1155 const unsigned&
i)
const
1215 template<
class ELEMENT>
1224 const unsigned&
id = 0)
1233 template<
class ELEMENT>
1252 template<
class ELEMENT>
1255 AxisymmetricDerivatives,
1261 const unsigned&
id = 0)
1271 template<
class ELEMENT>
1290 template<
class ELEMENT>
1299 const unsigned&
id = 0)
1309 template<
class ELEMENT>
Class that establishes the surface derivative functions for AxisymmetricInterfaceElements....
A class that contains the information required by Nodes that are located on Mesh boundaries....
This policy class is used to associate specific bounding elements with specific FluidInterface elemen...
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Specialise the Elastic update case to axisymmetric equations.
Pseudo-elasticity version of the LineFluidInterfaceBoundingElement.
void output(FILE *file_pt)
Overload the C-style output function.
int kinematic_local_eqn(const unsigned &n)
Local eqn number of kinematic bc associated with local node n.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Specify the value of nodal zeta from the face geometry The "global" intrinsic coordinate of the eleme...
void output(std::ostream &outfile)
Overload the output function.
void set_lagrange_index(const Vector< unsigned > &lagrange_index)
Set the Id.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental residual vector and Jacobian.
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
Vector< unsigned > Lagrange_index
Short Storage for the index of Lagrange multiplier.
ElasticLineFluidInterfaceBoundingElement()
Constructor.
Specialise the elastic update template class to concrete 1D case.
Pseudo-elasticity version of the PointFluidInterfaceBoundingElement.
ElasticPointFluidInterfaceBoundingElement()
Constructor.
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
void output(FILE *file_pt)
Overload the C-style output function.
Vector< unsigned > Lagrange_index
Short Storage for the index of the Lagrange multiplier at the chosen nodes.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the element's residual vector and Jacobian.
void set_lagrange_index(const Vector< unsigned > &lagrange_index)
Set the Id and offset.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Specify the value of nodal zeta from the face geometry The "global" intrinsic coordinate of the eleme...
int kinematic_local_eqn(const unsigned &n)
Set the kinematic local equation.
Specialise Elastic update case to the concrete 2D case.
Generic Elastic node update interface template class that can be combined with a given surface equati...
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
void add_additional_residual_contributions_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const DShape &dpsifdS, const DShape &dpsifdS_div, const Vector< double > &s, const Vector< double > &interpolated_x, const Vector< double > &interpolated_n, const double &W, const double &J)
Helper function to calculate the additional contributions to be added at each integration point....
unsigned lagrange_index(const unsigned &n)
Return the index at which the lagrange multiplier is stored at the n-th node.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
The "global" intrinsic coordinate of the element when viewed as part of a geometric object should be ...
void output(std::ostream &outfile)
Overload the output function.
ElasticUpdateFluidInterfaceElement(FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0)
Constructor, pass a pointer to the bulk element and the face index of the bulk element to which the e...
Vector< unsigned > Lagrange_index
Storage for the location of the Lagrange multiplier (If other additional values have been added we ne...
virtual FluidInterfaceBoundingElement * make_bounding_element(const int &face_index)
Create an "bounding" element (here actually a 2D line element of type ElasticLineFluidInterfaceBoundi...
void output(FILE *file_pt)
Overload the C-style output function.
double & lagrange(const unsigned &n)
Return the lagrange multiplier at local node n.
int kinematic_local_eqn(const unsigned &n)
Equation number of the kinematic BC associated with node j. (This is the equation for the Lagrange mu...
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution to residuals and Jacobian.
void hijack_kinematic_conditions(const Vector< unsigned > &bulk_node_number)
Hijacking the kinematic condition corresponds to hijacking the variables associated with the Lagrange...
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations by calling the appropriate function from the der...
void assemble_set_of_all_geometric_data(std::set< Data * > &unique_geom_data_pt)
Return a set of all geometric data associated with the element.
void fill_in_jacobian_from_geometric_data(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the Jacobian matrix from the geometric data. This version assumes that...
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
In a FaceElement, the "global" intrinsic coordinate of the element along the boundary,...
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node.
unsigned nnode() const
Return the number of nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement....
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
void setup_equation_indices(FluidInterfaceElement *const &element_pt, const unsigned &id)
Specify any additional index setup information that is required; i.e. the look-up schemes for the add...
unsigned nadditional_values(const unsigned &n)
Specific interface that states how many additional values are required for the n-th node....
This policy class is used to allow additional values to be added to the nodes from new surface equati...
unsigned nadditional_values(const unsigned &n)
Specific interface that states how many additional values are required for the n-th node....
void setup_equation_indices(ELEMENT *const &element_pt, const unsigned &id)
Specify any additional index setup information that is required; i.e. the look-up schemes for the add...
Base class for elements at the boundary of free surfaces or interfaces, used typically to impose cont...
void output(std::ostream &outfile)
Overload the output function.
Base class establishing common interfaces and functions for all Navier-Stokes-like fluid interface el...
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 differe...
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) external data object to the element and return its index (i....
Hijacked elements are elements in which one or more Data values that affect the element's residuals,...
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 ...
Class that establishes the surface derivative functions for LineElements. These are defined in a sepa...
Specialisation of the interface boundary constraint to a line.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==true) the Jacobian – this funct...
An OomphLibError object which should be thrown when an run-time error is encountered....
Specialisation of the interface boundary constraint to a point.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==1) the Jacobian – this function...
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
SolidFiniteElement class.
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use finite differences to calculate the Jacobian entries corresponding to the solid positions....
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
The SpineElement<ELEMENT> class takes an existing element as a template parameter and adds the necess...
int spine_local_eqn(const unsigned &n)
Return the local equation number corresponding to the height of the spine at the n-th node.
Spine version of the LineFluidInterfaceBoundingElement.
int kinematic_local_eqn(const unsigned &n)
Local eqn number of the kinematic bc associated with local node n.
SpineLineFluidInterfaceBoundingElement()
Constructor.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the jacobian.
void output(std::ostream &outfile)
Overload the output function.
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
void output(FILE *file_pt)
Overload the C-style output function.
Spine version of the PointFluidInterfaceBoundingElement.
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
void output(FILE *file_pt)
Overload the C-style output function.
SpinePointFluidInterfaceBoundingElement()
Constructor.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
int kinematic_local_eqn(const unsigned &n)
Return local equation number associated with the kinematic constraint for local node n.
void output(std::ostream &outfile)
Overload the output function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental residual vector and the Jacobian.
Generic Spine node update interface template class that can be combined with a given surface equation...
SpineUpdateFluidInterfaceElement(FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0)
Constructor, the arguments are a pointer to the "bulk" element and the index of the face to be create...
void add_additional_residual_contributions_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const DShape &dpsifdS, const DShape &dpsifdS_div, const Vector< double > &s, const Vector< double > &interpolated_x, const Vector< double > &interpolated_n, const double &W, const double &J)
Helper function to calculate the additional contributions These are those filled in by the particular...
void output(std::ostream &outfile, const unsigned &n_plot)
Output the element.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contribution to the residuals and the jacobian.
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations by calling the appropriate class function.
int kinematic_local_eqn(const unsigned &n)
In spine elements, the kinematic condition is the equation used to determine the unknown spine height...
void output(FILE *file_pt)
Overload the C-style output function.
void hijack_kinematic_conditions(const Vector< unsigned > &bulk_node_number)
Hijacking the kinematic condition corresponds to hijacking the variables associated with the spine he...
virtual FluidInterfaceBoundingElement * make_bounding_element(const int &face_index)
Create an "bounding" element of the type specified by the BoundingElementType policy class Here,...
void output(std::ostream &outfile)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
Class that establishes the surface derivative functions for SurfaceInterfaceElements (2D surfaces in ...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).