27#ifndef OOMPH_YOUNGLAPLACE_ELEMENTS_HEADER
28#define OOMPH_YOUNGLAPLACE_ELEMENTS_HEADER
33#include <oomph-lib-config.h>
84 virtual inline double u(
const unsigned&
n)
const
116 throw OomphLibError(
"These equations are steady => no time dependence",
135 throw OomphLibError(
"These equations are steady => no time dependence",
221 for (
unsigned j = 0;
j < 2;
j++)
230 for (
unsigned j = 0;
j < 2;
j++)
250 for (
unsigned i = 0;
i < 3;
i++)
253 for (
unsigned j = 0;
j < 2;
j++)
278 for (
unsigned i = 0;
i < 3;
i++)
281 for (
unsigned j = 0;
j < 2;
j++)
360 for (
unsigned i = 0;
i <
n;
i++)
372 for (
unsigned i = 0;
i <
n;
i++)
386 for (
unsigned i = 0;
i <
n;
i++)
401 throw OomphLibError(
"Vectors must be of dimension 3 for cross-product!",
417 for (
unsigned i = 0;
i <
n;
i++)
459 template<
unsigned NNODE_1D>
532 template<
unsigned NNODE_1D>
534 :
public virtual QElement<1, NNODE_1D>
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
A class that represents a collection of data; each Data object may contain many different individual ...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
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...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
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.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as .
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as .
A Generalised Element class.
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 ...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data.
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....
Height control element for YoungLaplace equations: Prescribe displacement along a spine (i....
void assign_additional_local_eqn_numbers()
Setup local equation number for the height-control equation.
unsigned Curvature_data_index
In which component (in the vector of the element's internal Data) is the unknown curvature stored?
Data *& kappa_pt()
Access function to the pointer to the Data object that stores the curvature.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector: The height constraint. [Note: Jacobian is comp...
Node * Control_node_pt
Pointer to node at which the height is controlled.
double * Prescribed_height_pt
Pointer to value that stores the controlled height.
HeightControlElement(Node *control_node_pt, double *prescribed_height_pt)
Constructor: Pass pointer to node at which the height is controlled and pointer to double that stores...
unsigned Height_ctrl_local_eqn
Local equation number of the height-control equation.
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....
An OomphLibError object which should be thrown when an run-time error is encountered....
QYoungLaplaceElement elements are linear/quadrilateral/brick-shaped YoungLaplace elements with isopar...
QYoungLaplaceElement()
Constructor: Call constructors for QElement and YoungLaplace equations.
QYoungLaplaceElement(const QYoungLaplaceElement< NNODE_1D > &dummy)=delete
Broken copy constructor.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function at n_plot^2 plot points.
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solutio at n_plot^2 plot points.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at nodes: Initial_Nvalue[n].
void operator=(const QYoungLaplaceElement< NNODE_1D > &)=delete
Broken assignment operator.
unsigned required_nvalue(const unsigned &n) const
Required # of ‘values’ (pinned or dofs) at node n.
void output(std::ostream &outfile)
Output function.
void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output function for a time-dependent exact solution at n_plot^2 plot points (calls the steady version...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
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...
A class for all isoparametric elements that solve the YoungLaplace equations.
void get_spine(const Vector< double > &x, Vector< double > &spine, Vector< Vector< double > > &dspine) const
Get spine vector field: Defaults to standard cartesian representation if no spine base fct pointers h...
static double two_norm(const Vector< double > &v)
2-norm of a vector
static void scalar_times_vector(const double &lambda, const Vector< double > &v, Vector< double > &lambda_times_v)
Multiply a vector by a scalar.
void set_kappa(Data *kappa_pt)
Set curvature data (and add it to the element's external Data)
static double scalar_product(const Vector< double > &v1, const Vector< double > &v2)
Scalar product between two vectors.
static void allocate_vector_of_vectors(unsigned n_rows, unsigned n_cols, Vector< Vector< double > > &v)
Helper fct: Allocate storage for a vector of vectors of doubles to v(n_rows,n_cols) and initialise ea...
double interpolated_u(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Dummy, time dependent error checker.
virtual void get_spine_base(const Vector< double > &x, Vector< double > &spine_base, Vector< Vector< double > > &dspine_base) const
Get spine base vector field: Defaults to standard cartesian representation if no spine base fct point...
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output exact soln at n_plot^2 plot points (dummy time-dependent version to keep intel compiler happy)
unsigned self_test()
Self-test: Return 0 for OK.
void(* SpineBaseFctPt)(const Vector< double > &x, Vector< double > &spine_base, Vector< Vector< double > > &dspine_base)
Function pointer to "spine base" function.
virtual int u_local_eqn(const unsigned &n)
Get the local equation number of the (one and only) unknown stored at local node n (returns -1 if val...
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact soln at n_plot^2 plot points.
SpineFctPt & spine_fct_pt()
Access function to function pointer that specifies spine vector field.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
void output(std::ostream &outfile)
Output with default number of plot points.
void exact_position(const Vector< double > &s, Vector< double > &r, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Get exact position vector to meniscus at local coordinate s.
void(* SpineFctPt)(const Vector< double > &x, Vector< double > &spine, Vector< Vector< double > > &dspine)
Function pointer to "spine" function.
YoungLaplaceEquations()
Constructor: Initialise pointers to NULL, so by default prescribed kappa evaluates to zero,...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector.
virtual double u(const unsigned &n) const
Access function: Nodal function value at local node n Uses suitably interpolated value for hanging no...
double get_kappa() const
Get curvature.
bool use_spines() const
Use spines or not? (Based on availability of function pointers to to spine and spine base vector fiel...
void position(const Vector< double > &s, Vector< double > &r) const
Get position vector to meniscus at local coordinate s.
unsigned Kappa_index
Index of Kappa_pt in the element's storage of external Data.
static void cross_product(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &v_cross)
Cross-product: v_cross= v1 x v2.
Data * Kappa_pt
Pointer to Data item that stores kappa as its first value – private to ensure that it must be set wit...
SpineFctPt Spine_fct_pt
Pointer to spine function:
SpineBaseFctPt & spine_base_fct_pt()
Access function to function pointer that specifies spine base vector field.
void operator=(const YoungLaplaceEquations &)=delete
Broken assignment operator.
void get_flux(const Vector< double > &s, Vector< double > &flux) const
Get flux: flux[i] = du/dx_i: Mainly used for error estimation.
SpineBaseFctPt Spine_base_fct_pt
Pointer to spine base function:
Data * kappa_pt()
Access function: Pointer Data object that stores kappa (const version – kappa must be set with set_ka...
YoungLaplaceEquations(const YoungLaplaceEquations &dummy)=delete
Broken copy constructor.
static void vector_sum(const Vector< double > &v1, const Vector< double > &v2, Vector< double > &vs)
Vectorial sum of two vectors.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).