30#ifndef OOMPH_POLAR_FLUID_TRACTION_ELEMENTS_HEADER
31#define OOMPH_POLAR_FLUID_TRACTION_ELEMENTS_HEADER
35#include <oomph-lib-config.h>
51 template<
class ELEMENT>
104 for (
unsigned i = 0;
i <
Dim;
i++)
112 (*Traction_fct_pt)(time,
x,
result);
203 ELEMENT*
elem_pt =
dynamic_cast<ELEMENT*
>(element_pt);
214 throw OomphLibError(
"This flux element will not work correctly "
215 "if nodes are hanging\n",
293 double u(
const unsigned&
l,
const unsigned&
i)
299 double x(
const unsigned&
l,
const unsigned&
i)
315 template<
class ELEMENT>
335 const double Alpha = alpha();
343 const int multiplier = boundary();
346 const double eta = get_eta();
358 if (Pext_data_pt == 0)
368 pext = Pext_data_pt->
value(0);
394 for (
unsigned i = 0;
i < Dim;
i++)
397 interpolated_u[
i] = 0.0;
405 for (
unsigned i = 0;
i < Dim;
i++)
492 if (pext_local_eqn >= 0)
A class that represents a collection of data; each Data object may contain many different individual ...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
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 ...
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
int & face_index()
Index of the face (a number that uniquely identifies the face in the 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...
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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.
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 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.
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
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....
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external 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....
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.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
An OomphLibError object which should be thrown when an run-time error is encountered....
A class for elements that allow the imposition of an applied traction to the Navier–Stokes equations ...
void output(std::ostream &outfile)
Overload the output function.
const double & alpha() const
Alpha.
const int boundary() const
Boundary.
void get_traction(double time, const Vector< double > &x, Vector< double > &result)
Function to calculate the traction applied to the fluid.
double * Alpha_pt
Pointer to the angle alpha.
~PolarNavierStokesTractionElement()
Destructor should not delete anything.
PolarNavierStokesTractionElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the value of the index and its limit.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
This function returns the residuals for the traction function. flag=1(or 0): do (or don't) compute th...
unsigned External_data_number_of_Pext
The Data that contains the traded pressure is stored as external Data for the element....
void(* Traction_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to an imposed traction function.
void(*&)(const double &t, const Vector< double > &x, Vector< double > &result) traction_fct_pt()
unsigned Dim
The highest dimension of the problem.
Data * Pext_data_pt
Pointer to the Data item that stores the external pressure.
const double get_eta() const
Eta.
double x(const unsigned &l, const unsigned &i)
local position
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Function to compute the shape and test functions and to return the Jacobian of mapping.
double u(const unsigned &l, const unsigned &i)
local velocities
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Compute the element's residual Vector and the jacobian matrix Plus the mass matrix especially for eig...
void set_external_pressure_data(Data *pext_data_pt)
Function for setting up external pressure.
void set_eta(double eta)
Function to set Eta.
void set_boundary(int bound)
Function to set boundary.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
virtual int u_local_eqn(const unsigned &n, const unsigned &i)
Access function that returns the local equation numbers for velocity components. u_local_eqn(n,...
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
double *& alpha_pt()
Pointer to Alpha.
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...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).