29 #ifndef OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER
30 #define OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER
39 #include "../generic/Qelements.h"
50 template<
class ELEMENT>
69 virtual inline int u_local_eqn(
const unsigned& n,
const unsigned&
i)
81 unsigned n_node =
nnode();
85 for (
unsigned i = 0;
i < n_node;
i++)
143 ELEMENT* elem_pt =
dynamic_cast<ELEMENT*
>(element_pt);
146 if (elem_pt->dim() == 3)
155 throw OomphLibError(
"This flux element will not work correctly "
156 "if nodes are hanging\n",
157 OOMPH_CURRENT_FUNCTION,
158 OOMPH_EXCEPTION_LOCATION);
202 void output(std::ostream& outfile,
const unsigned& nplot)
208 double u(
const unsigned& l,
const unsigned&
i)
214 double x(
const unsigned& l,
const unsigned&
i)
223 template<
class ELEMENT>
227 double dudphi, shear_contribution = 0.0;
230 unsigned n_intpt = integral_pt()->nweight();
238 unsigned n_node = nnode();
241 Shape psif(n_node), testf(n_node);
244 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
247 double w = integral_pt()->weight(ipt);
251 double J = shape_and_test_at_knot(ipt, psif, testf);
260 for (
unsigned i = 0;
i <
Dim;
i++)
262 interpolated_x[
i] = 0.0;
266 for (
unsigned l = 0; l < n_node; l++)
269 for (
unsigned i = 0;
i <
Dim;
i++)
271 interpolated_x[
i] += nodal_position(l,
i) * psif[l];
276 s_local[0] = integral_pt()->knot(ipt, 0);
279 s_bulk = this->local_coordinate_in_bulk(s_local);
282 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(this->Bulk_element_pt);
285 dudphi = el_pt->interpolated_dudx_pnst(s_bulk, 0, 1);
288 shear_contribution += dudphi *
W;
293 return shear_contribution;
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...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
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 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 ...
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.
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.
double * Alpha_pt
Pointer to the angle alpha.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
const double & alpha() const
Alpha.
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...
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.
~PolarStressIntegralElement()
Destructor should not delete anything.
void(* Traction_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to an imposed traction function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
void set_boundary(int bound)
Function to set boundary.
double x(const unsigned &l, const unsigned &i)
local position
double *& alpha_pt()
Pointer to Alpha.
const int boundary() const
Boundary.
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,...
unsigned Dim
The highest dimension of the problem.
double get_shear_stress()
Function to calculate the shear stress along boundary.
PolarStressIntegralElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the value of the index and its limit.
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...
unsigned Dim
Dimension of zeta tuples (set by get_dim_helper) – needed because we store the scalar coordinates in ...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...