33 #ifndef OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER 34 #define OOMPH_POLAR_STRESS_INTEGRAL_ELEMENTS_HEADER 43 #include "../generic/Qelements.h" 55 template <
class ELEMENT>
77 virtual inline int u_local_eqn(
const unsigned &n,
const unsigned &
i)
87 unsigned n_node =
nnode();
91 for(
unsigned i=0;
i<n_node;
i++) {test[
i] = psi[
i];}
135 ELEMENT* elem_pt =
dynamic_cast<ELEMENT*
>(element_pt);
138 if(elem_pt->dim()==3)
147 "This flux element will not work correctly if nodes are hanging\n",
148 OOMPH_CURRENT_FUNCTION,
149 OOMPH_EXCEPTION_LOCATION);
190 void output(std::ostream &outfile,
const unsigned &nplot)
194 double u(
const unsigned &l,
const unsigned &
i )
198 double x(
const unsigned &l,
const unsigned &
i )
206 template<
class ELEMENT>
211 double dudphi,shear_contribution=0.0;
222 unsigned n_node =
nnode();
225 Shape psif(n_node), testf(n_node);
228 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
244 for(
unsigned i=0;
i<
Dim;
i++)
246 interpolated_x[
i] = 0.0;
250 for(
unsigned l=0;l<n_node;l++)
253 for(
unsigned i=0;
i<
Dim;
i++)
269 dudphi = el_pt->interpolated_dudx_pnst(s_bulk,0,1);
272 shear_contribution += dudphi*
W;
277 return shear_contribution;
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...
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
void(* Traction_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to an imposed traction function.
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
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 ...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the jacobian.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
void set_boundary(int bound)
Function to set boundary.
double x(const unsigned &l, const unsigned &i)
local position
A general Finite Element class.
~PolarStressIntegralElement()
Destructor should not delete anything.
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
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...
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
const double & alpha() const
Alpha.
double u(const unsigned &l, const unsigned &i)
local velocities
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.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
FiniteElement * Bulk_element_pt
Pointer to the associated higher-dimensional "bulk" element.
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,i) = local equation number or < 0 if pinned. The default is to asssume that n is the local node number and the i-th velocity component is the i-th unknown stored at the node.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned Dim
The highest dimension of the problem.
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 get_shear_stress()
Function to calculate the shear stress along boundary.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
void output(std::ostream &outfile)
Overload the output function.
double * Alpha_pt
Pointer to the angle alpha.
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...
unsigned nnode() const
Return the number of nodes.
Vector< double > local_coordinate_in_bulk(const Vector< double > &s) const
Return vector of local coordinates in bulk element, given the local coordinates in this FaceElement...
PolarStressIntegralElement(FiniteElement *const &element_pt, const int &face_index)
const int boundary() const
Boundary.
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...
double *& alpha_pt()
Pointer to Alpha.