77 const unsigned& nplot)
95 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
101 for (
unsigned i = 0;
i < 2;
i++)
104 outfile << x[
i] <<
" ";
117 outfile << sigma(0, 0) <<
" ";
118 outfile << sigma(0, 1) <<
" ";
119 outfile << sigma(1, 1) <<
" ";
122 outfile << strain(0, 0) <<
" ";
123 outfile << strain(0, 1) <<
" ";
124 outfile << strain(1, 1) <<
" ";
125 outfile << std::endl;
141 const unsigned& nplot)
151 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
156 for (
unsigned i = 0;
i < 2;
i++)
177 std::ostream& outfile,
178 const unsigned& nplot,
196 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
205 (*exact_soln_pt)(x, exact_soln);
208 for (
unsigned i = 0;
i < 2;
i++)
210 outfile << x[
i] <<
" ";
212 outfile << exact_soln[0] <<
" ";
213 outfile << exact_soln[1] <<
" ";
214 outfile << exact_soln[2] << std::endl;
230 std::ostream& outfile,
246 unsigned n_node =
nnode();
254 outfile <<
"ZONE" << std::endl;
260 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
263 for (
unsigned i = 0;
i < 2;
i++)
284 (*exact_soln_pt)(x, exact_soln);
287 for (
unsigned i = 0;
i < 2;
i++)
289 outfile << x[
i] <<
" ";
291 outfile << exact_soln[0] <<
" " << exact_soln[0] - w_fe << std::endl;
294 norm += exact_soln[0] * exact_soln[0] *
W;
295 error += (exact_soln[0] - w_fe) * (exact_soln[0] - w_fe) *
W;
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
unsigned self_test()
Self-test: Return 0 for OK.
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact soln: x,y,w_exact at n_plot^DIM plot points.
void get_stress_and_strain_for_output(const Vector< double > &s, DenseMatrix< double > &sigma, DenseMatrix< double > &strain)
void output(std::ostream &outfile)
Output with default number of plot points.
double interpolated_w_fvk(const Vector< double > &s, unsigned index=0) const
Return FE representation of function value w_fvk(s) at local coordinate s (by default - if index > 0,...
static double Default_Nu_Value
Default value for Poisson's ratio.
static double Default_Physical_Constant_Value
Default value for physical constants.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction")
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
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 .
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction")
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
virtual unsigned self_test()
Self-test: Check inversion of element & do self-test for GeneralisedElement. Return 0 if OK.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
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.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...