26 #ifndef OOMPH_IMPOSE_IMPENETRABLE_ELEMENTS_HEADER 
   27 #define OOMPH_IMPOSE_IMPENETRABLE_ELEMENTS_HEADER 
   31 #include <oomph-lib-config.h> 
   42   template<
class ELEMENT>
 
   57                                  const unsigned& 
id = 0)
 
   90         residuals, jacobian, 1);
 
  100     void output(std::ostream& outfile, 
const unsigned& nplot)
 
  112                       const unsigned& 
i)
 const 
  123       const unsigned& flag)
 
  126       unsigned n_node = 
nnode();
 
  129       unsigned dim_el = 
dim();
 
  139       int local_unknown = 0;
 
  147       for (
unsigned i = 0; 
i < dim_el + 1; 
i++)
 
  149         u_index[
i] = el_pt->u_index_nst(
i);
 
  153       for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
 
  172         for (
unsigned j = 0; j < n_node; j++)
 
  175           for (
unsigned i = 0; 
i < dim_el + 1; 
i++)
 
  189           unsigned first_index =
 
  193           lambda += nod_pt->
value(first_index) * psi(j);
 
  202         for (
unsigned j = 0; j < n_node; j++)
 
  210           unsigned first_index =
 
  219             for (
unsigned i = 0; 
i < dim_el + 1; 
i++)
 
  222               residuals[local_eqn] +=
 
  223                 interpolated_u[
i] * norm_vec[
i] * psi(j) * 
W;
 
  229                 for (
unsigned jj = 0; jj < n_node; jj++)
 
  234                   if (local_unknown >= 0)
 
  236                     jacobian(local_eqn, local_unknown) +=
 
  237                       norm_vec[
i] * psi(jj) * psi(j) * 
W;
 
  245           for (
unsigned i = 0; 
i < dim_el + 1; 
i++)
 
  255               residuals[local_eqn] += norm_vec[
i] * psi(j) * lambda * 
W;
 
  261                 for (
unsigned jj = 0; jj < n_node; jj++)
 
  273                   if (local_unknown >= 0)
 
  275                     jacobian(local_eqn, local_unknown) +=
 
  276                       norm_vec[
i] * psi(jj) * psi(j) * 
W;
 
  303       return (this->
dim() + 1);
 
  313       std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
 const 
  317       std::pair<unsigned, unsigned> dof_lookup;
 
  320       const unsigned n_node = this->
nnode();
 
  323       unsigned dim_el = this->
dim();
 
  328         for (
unsigned j = 0; j < n_node; j++)
 
  341             dof_lookup.first = this->
eqn_number(local_eqn);
 
  345             dof_lookup_list.push_front(dof_lookup);
 
  362       unsigned const bulk_dim = dim_el + 1;
 
  364       for (
unsigned node_i = 0; node_i < n_node; node_i++)
 
  367         for (
unsigned velocity_i = 0; velocity_i < bulk_dim; velocity_i++)
 
  389             dof_lookup.second = velocity_i;
 
  390             dof_lookup_list.push_front(dof_lookup);
 
A class that contains the information required by Nodes that are located on Mesh boundaries....
 
unsigned index_of_first_value_assigned_by_face_element(const unsigned &face_id=0) const
Return the index of the first value associated with the i-th face element value. If no argument is sp...
 
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
 
Vector< unsigned > Bulk_node_number
List of indices of the local node numbers in the "bulk" element that correspond to the local node num...
 
FiniteElement * Bulk_element_pt
Pointer to the associated higher-dimensional "bulk" element.
 
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
 
void outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
 
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,...
 
void add_additional_values(const Vector< unsigned > &nadditional_values, const unsigned &id)
Helper function adding additional values for the unknowns associated with the FaceElement....
 
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
 
double J_eulerian_at_knot(const unsigned &ipt) const
Return the Jacobian of the mapping from local to global coordinates at the ipt-th integration point O...
 
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
 
A general Finite Element class.
 
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
 
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
 
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
 
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 dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
 
unsigned nnode() const
Return the number of nodes.
 
Integral *const  & integral_pt() const
Return the pointer to the integration scheme (const version)
 
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....
 
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
 
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
 
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
 
ImposeImpenetrabilityElement are elements that coincide with the faces of higher-dimensional "bulk" e...
 
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into: Just the soli...
 
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals.
 
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 contain...
 
void output(std::ostream &outfile)
Overload the output function.
 
void fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Helper function to compute the residuals and, if flag==1, the Jacobian.
 
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution from Jacobian.
 
unsigned additional_ndof_types() const
 
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, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
 
ImposeImpenetrabilityElement(FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0)
Constructor takes a "bulk" element, the index that identifies which face the ImposeImpenetrabilityEle...
 
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
 
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
 
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
 
double value(const unsigned &i) const
Return i-th value (dofs or pinned) at this node either directly or via hanging node representation....
 
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
 
//////////////////////////////////////////////////////////////////// ////////////////////////////////...