33 #ifndef OOMPH_AXISYMM_SOLID_TRACTION_ELEMENTS_HEADER 34 #define OOMPH_AXISYMM_SOLID_TRACTION_ELEMENTS_HEADER 38 #include <oomph-lib-config.h> 42 #include "../generic/Qelements.h" 43 #include "../generic/hermite_elements.h" 55 template <
class ELEMENT>
77 for(
unsigned i=0;
i<2;
i++) {result[
i] = 0.0;}
82 (*Traction_fct_pt)(time,x,n,result);
104 const Vector<double> &, Vector<double> &)
123 void output(std::ostream &outfile,
const unsigned &n_plot)
130 void output(FILE* file_pt,
const unsigned &n_plot)
145 template<
class ELEMENT>
150 unsigned n_node =
nnode();
159 Shape psi(n_node,n_position_type);
160 DShape dpsids(n_node,n_position_type,1);
166 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
177 Vector<double> interpolated_dxds(2,0.0), interpolated_dxids(2,0.0);
180 for(
unsigned l=0;l<n_node;l++)
183 for(
unsigned k=0;k<n_position_type;k++)
186 for(
unsigned i=0;
i<2;
i++)
191 interpolated_xi[
i] +=
194 interpolated_dxds[
i] +=
196 interpolated_dxids[
i] +=
207 A(0,1) = A(1,0) = 0.0;
211 (interpolated_dxds[0] -
interpolated_x[1]*interpolated_dxids[1]) +
223 double W = w*sqrt(A(0,0)*A(1,1));
232 interpolated_normal[0] = -1.0*
237 interpolated_normal[1] = -1.0*
243 if(s_fixed_value()==-1)
245 interpolated_normal[0] *= -1.0;
246 interpolated_normal[1] *= -1.0;
251 for(
unsigned i=0;
i<2;
i++)
254 length += interpolated_normal[
i]*interpolated_normal[
i];
256 for(
unsigned i=0;
i<2;
i++)
258 interpolated_normal[
i] /= sqrt(length);
270 for(
unsigned l=0;l<n_node;l++)
273 for(
unsigned k=0;k<n_position_type;k++)
276 for(
unsigned i=0;
i<2;
i++)
284 residuals[local_eqn] -= traction[
i]*psi(l,k)*
W;
void(*&)(const double &, const Vector< double > &, const Vector< double > &, Vector< double > &) traction_fct_pt()
Return the imposed traction pointer.
AxisymmetricSolidTractionElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the value of the index and its limit.
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Return the residuals.
void get_traction(const double &time, const Vector< double > &x, const Vector< double > &n, Vector< double > &result) const
Return the surface traction force.
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
A general Finite Element class.
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...
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Return the jacobian.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
void output(std::ostream &outfile)
Overload the output function.
unsigned & bulk_position_type(const unsigned &i)
Return the position type in the "bulk" element that corresponds to position type i on the FaceElement...
void(* Traction_fct_pt)(const double &time, const Vector< double > &x, const Vector< double > &n, Vector< double > &result)
Pointer to an imposed traction function.
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n...
virtual void dshape_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsids) const
Return the geometric shape function and its derivative w.r.t. the local coordinates at the ipt-th int...
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
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...
void output(FILE *file_pt, const unsigned &n_plot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
unsigned nnode() const
Return the number of nodes.
void output(FILE *file_pt)
Overload the output function.