biharmonic_elements.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 #ifndef OOMPH_BIHARMONIC_ELEMENTS_HEADER
31 #define OOMPH_BIHARMONIC_ELEMENTS_HEADER
32 
33 // Config header generated by autoconfig
34 #ifdef HAVE_CONFIG_H
35  #include <oomph-lib-config.h>
36 #endif
37 
38 #ifdef OOMPH_HAS_MPI
39 //mpi headers
40 #include "mpi.h"
41 #endif
42 
43 // Generic C++ headers
44 #include <iostream>
45 #include <math.h>
46 
47 // oomph-lib headers
48 #include "../generic/matrices.h"
49 #include "../generic/elements.h"
50 #include "../generic/hermite_elements.h"
51 
52 
53 namespace oomph
54 {
55 
56 
57 //=============================================================================
58 /// \short Biharmonic Equation Class - contains the equations
59 //=============================================================================
60 template <unsigned DIM>
61 class BiharmonicEquations : public virtual FiniteElement
62 {
63 
64 public:
65 
66  /// source function type definition
67  typedef void (*SourceFctPt)(const Vector<double>& x, double& u);
68 
69 
70  /// Constructor (must initialise the Source_fct_pt to null)
72  {}
73 
74 
76 
77  /// Access function: Nodal function value at local node n
78  /// Uses suitably interpolated value for hanging nodes.
79  virtual double u(const unsigned& n, const unsigned& k) const =0;
80 
81 
82  /// gets source strength
83  virtual void get_source(const unsigned& ipt, const Vector<double>& x,
84  double& source) const
85  {
86  // if source function is not provided, i.e. zero, then return zero
87  if(Source_fct_pt==0) { source = 0.0; }
88 
89  // else get source strength
90  else { (*Source_fct_pt)(x,source); }
91  }
92 
93 
94  /// wrapper function, adds contribution to residual
96  {
97  // create a dummy matrix
98  DenseDoubleMatrix dummy(1);
99 
100  // call the generic residuals functions with flag set to zero
102  }
103 
104 
105  /// wrapper function, adds contribution to residual and generic
107  DenseMatrix<double>& jacobian)
108  {
109  // call generic routine with flag set to 1
111  }
112 
113 
114  /// output with nplot points
115  void output(std::ostream &outfile, const unsigned &nplot)
116  {
117 
118  //Vector of local coordinates
119  Vector<double> s(DIM);
120 
121  // Tecplot header info
122  outfile << this->tecplot_zone_string(nplot);
123 
124  // Loop over plot points
125  unsigned num_plot_points=this->nplot_points(nplot);
126  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
127  {
128 
129  // Get local coordinates of plot point
130  this->get_s_plot(iplot,nplot,s);
131 
132  for(unsigned i=0;i<DIM;i++)
133  {
134  outfile << this->interpolated_x(s,i) << " ";
135  }
136 
137  outfile << interpolated_u_biharmonic(s) << std::endl;
138  }
139 
140  // Write tecplot footer (e.g. FE connectivity lists)
141  this->write_tecplot_zone_footer(outfile,nplot);
142  }
143 
144 
145  /// Output at default number of plot points
146  void output(std::ostream &outfile)
147  {FiniteElement::output(outfile);}
148 
149  /// C-style output
150  void output(FILE* file_pt)
151  {FiniteElement::output(file_pt);}
152 
153  /// C_style output at n_plot points
154  void output(FILE* file_pt, const unsigned &n_plot)
155  {FiniteElement::output(file_pt,n_plot);}
156 
157 
158  /// output fluid velocity field
159  void output_fluid_velocity(std::ostream &outfile, const unsigned &nplot)
160  {
161 
162  //Vector of local coordinates
163  Vector<double> s(DIM);
164 
165  // Tecplot header info
166  outfile << this->tecplot_zone_string(nplot);
167 
168  // Loop over plot points
169  unsigned num_plot_points=this->nplot_points(nplot);
170  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
171  {
172 
173  // Get local coordinates of plot point
174  this->get_s_plot(iplot,nplot,s);
175 
176  for(unsigned i=0;i<DIM;i++)
177  {
178  outfile << this->interpolated_x(s,i) << " ";
179  }
180 
181  Vector<double> dudx(2,0.0);
182  interpolated_dudx(s,dudx);
183 
184  outfile << dudx[1] << " " << -dudx[0] << std::endl;
185  }
186 
187  // Write tecplot footer (e.g. FE connectivity lists)
188  this->write_tecplot_zone_footer(outfile,nplot);
189  }
190 
191 
192 
193  /// output with nplot points
195  {
196 
197  //Find out how many nodes there are
198  unsigned n_node = this->nnode();
199 
200  //Find out how many values there
201  unsigned n_value = this->node_pt(0)->nvalue();
202 
203  //set up memory for shape functions
204  Shape psi(n_node,n_value);
205  DShape dpsidx(n_node,n_value,DIM);
206 
207  // evaluate dpsidx at local coordinate s
208  dshape_eulerian(s,psi,dpsidx);
209 
210  // initialise storage for d2u_interpolated
211  dudx[0] = 0.0;
212  dudx[1] = 0.0;
213 
214  // loop over nodes, degrees of freedom, and dimension to calculate
215  // interpolated_d2u
216  for (unsigned n = 0; n < n_node; n++)
217  {
218  for (unsigned k = 0; k < n_value; k++)
219  {
220  for (unsigned d = 0; d < DIM; d++)
221  {
222  dudx[d] += this->node_pt(n)->value(k)*dpsidx(n,k,d);
223  }
224  }
225  }
226  }
227 
228 
229 
230 
231  /// output analytic solution
232  void output_fct(std::ostream &outfile,const unsigned &nplot,
234  {
235 
236  //Vector of local coordinates
237  Vector<double> s(DIM);
238 
239  // Vector for coordintes
240  Vector<double> x(DIM);
241 
242  // Tecplot header info
243  outfile << this->tecplot_zone_string(nplot);
244 
245  // Exact solution Vector (here a scalar)
246  Vector<double> exact_soln(1);
247 
248  // Loop over plot points
249  unsigned num_plot_points=this->nplot_points(nplot);
250  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
251  {
252 
253  // Get local coordinates of plot point
254  this->get_s_plot(iplot,nplot,s);
255 
256  // Get x position as Vector
257  this->interpolated_x(s,x);
258 
259  // Get exact solution at this point
260  (*exact_soln_pt)(x,exact_soln);
261 
262  //Output x,y,...,u_exact
263  for(unsigned i=0;i<DIM;i++)
264  {
265  outfile << x[i] << " ";
266  }
267  outfile << exact_soln[0] << std::endl;
268 
269  }
270 
271  // Write tecplot footer (e.g. FE connectivity lists)
272  this->write_tecplot_zone_footer(outfile,nplot);
273 
274  }
275 
276  /// \short Output exact solution specified via function pointer
277  /// at a given time and at a given number of plot points.
278  /// Function prints as many components as are returned in solution Vector.
279  /// Implement broken FiniteElement base class version
280  void output_fct(std::ostream &outfile, const unsigned &nplot,
281  const double& time,
283  {FiniteElement::output_fct(outfile,nplot,time,exact_soln_pt);}
284 
285 
286  /// computes the error
287  void compute_error(std::ostream &outfile,
289  exact_soln_pt, double& error, double& norm)
290  {
291 
292  // Initialise
293  error=0.0;
294  norm=0.0;
295 
296  //Vector of local coordinates
297  Vector<double> s(DIM);
298 
299  // Vector for coordintes
300  Vector<double> x(DIM);
301 
302  //Find out how many nodes there are in the element
303  unsigned n_node = this->nnode();
304 
305  Shape psi(n_node);
306 
307  //Set the value of n_intpt
308  unsigned n_intpt = this->integral_pt()->nweight();
309 
310  // Tecplot header info
311  outfile << this->tecplot_zone_string(3);
312 
313  // Tecplot
314 // outfile << "ZONE" << std::endl;
315 
316  // Exact solution Vector (here a scalar)
317  Vector<double> exact_soln(1);
318 
319  //Loop over the integration points
320  for(unsigned ipt=0;ipt<n_intpt;ipt++)
321  {
322 
323  //Assign values of s
324  for(unsigned i=0;i<DIM;i++)
325  {
326  s[i] = this->integral_pt()->knot(ipt,i);
327  }
328 
329  //Get the integral weight
330  double w = this->integral_pt()->weight(ipt);
331 
332  // Get jacobian of mapping
333  double J=this->J_eulerian(s);
334 
335  //Premultiply the weights and the Jacobian
336  double W = w*J;
337 
338  // Get x position as Vector
339  this->interpolated_x(s,x);
340 
341  // Get FE function value
342  double u_fe=interpolated_u_biharmonic(s);
343 
344  // Get exact solution at this point
345  (*exact_soln_pt)(x,exact_soln);
346 
347  //Output x,y,...,error
348  for(unsigned i=0;i<DIM;i++)
349  {
350  outfile << x[i] << " ";
351  }
352  outfile << exact_soln[0] << " " << fabs(exact_soln[0]-u_fe)
353  << std::endl;
354 
355  // Add to error and norm
356  norm+=exact_soln[0]*exact_soln[0]*W;
357  error+=(exact_soln[0]-u_fe)*(exact_soln[0]-u_fe)*W;
358  }
359 
360  this->write_tecplot_zone_footer(outfile,3);
361  }
362 
363 
364 
365  /// \short Plot the error when compared
366  /// against a given time-dependent exact solution \f$ {\bf f}(t,{\bf x}) \f$.
367  /// Also calculates the norm of the error and that of the exact solution.
368  /// Call broken base-class version.
369  void compute_error(std::ostream &outfile,
371  const double& time, double& error, double& norm)
372  {FiniteElement::compute_error(outfile,exact_soln_pt,time,error,norm);}
373 
374  /// calculates interpolated u at s
376  {
377  // initialise storage for u_interpolated
378  double uu=0;
379 
380  // number of nodes
381  unsigned n_node=this->nnode();
382 
383  // number of degrees of freedom per node
384  unsigned n_value=this->node_pt(0)->nvalue();
385 
386  // set up memory for shape functions
387  Shape psi(n_node,n_value);
388 
389  // find shape fn at position s
390  this->shape(s,psi);
391 
392  // calculate interpolated u
393  for (unsigned n = 0; n < n_node; n++)
394  {
395  for (unsigned k = 0; k < n_value; k++)
396  {
397  uu += u(n,k)*psi(n,k);
398  }
399  }
400 
401  // return interpolated_u
402  return uu;
403  }
404 
405 
406  ///self test wrapper
407  unsigned self_test()
408  {
409 
410  bool passed=true;
411 
412  // Check lower-level stuff
413  if (FiniteElement::self_test()!=0) { passed=false; }
414 
415  // Return verdict
416  if (passed) { return 0; }
417  else { return 1; }
418  }
419 
420 
421  /// return number of second derivate degrees of freedom
422  unsigned get_d2_dof()
423  {
424  return d2_dof[DIM-1];
425  }
426 
427 
428  /// \short The number of "DOF types" that degrees of freedom in this element
429  /// are sub-divided into (for block preconditioning)
430  unsigned ndof_types() const
431  {
432  return this->required_nvalue(1);
433  }
434 
435 
436  /// \short Create a list of pairs for all unknowns in this element,
437  /// so that the first entry in each pair contains the global equation
438  /// number of the unknown, while the second one contains the number
439  /// of the "DOF types" that this unknown is associated with.
440  /// (Function can obviously only be called if the equation numbering
441  /// scheme has been set up.) (for block preconditioning)
442  void get_dof_numbers_for_unknowns(std::list<std::pair<unsigned long,
443  unsigned> >
444  &dof_lookup_list) const
445  {
446 
447  // number of nodes
448  int n_node = this->nnode();
449 
450  // number of degrees of freedom at each node
451  int n_value = this->node_pt(0)->nvalue();
452 
453  // temporary pair (used to store dof lookup prior to being added to list
454  std::pair<unsigned long,unsigned> dof_lookup;
455 
456  // loop over the nodes
457  for (int n = 0; n < n_node; n++)
458  {
459 
460  //loop over the degree of freedom
461  for (int k = 0; k < n_value; k++)
462  {
463 
464  // determine local eqn number
465  int local_eqn_number = this->nodal_local_eqn(n, k);
466 
467  // if local equation number is less than zero then nodal dof pinned
468  // then ignore
469  if (local_eqn_number >= 0)
470  {
471 
472  // store dof lookup in temporary pair
473  dof_lookup.first = this->eqn_number(local_eqn_number);
474  dof_lookup.second = k;
475  dof_lookup_list.push_front(dof_lookup);
476  // add to list
477 
478  }
479  }
480  }
481  }
482 
483 
484 
485  /// Access functions for the source function pointer
487 
488  /// Access functions for the source function pointers (const version)
490 
491 
492 protected:
493 
494 
495  /// \short Compute element residual Vector only (if JFLAG=and/or element
496  /// Jacobian matrix
498  Vector<double> &residuals,
499  DenseMatrix<double>& jacobian,
500  unsigned JFLAG);
501 
502 
503  /// Pointer to source function:
505 
506 
507  /// Array to hold local eqn numbers: Local_eqn[n] (=-1 for BC)
509 
510 private:
511 
512 
513  // number of degrees of freedom of second derivative
514  static const unsigned d2_dof[];
515 
516 
517 };
518 
519 
520 // declares number of degrees of freedom of second derivative
521 template <unsigned DIM> const unsigned BiharmonicEquations<DIM>::d2_dof[3]
522 ={1,3,6};
523 
524 
525 
526 
527 //=============================================================================
528 /// biharmonic element class
529 //=============================================================================
530 template <unsigned DIM>
531  class BiharmonicElement : public virtual QHermiteElement<DIM>,
532  public virtual BiharmonicEquations<DIM>
533 {
534 
535 public:
536 
537 
538  /// access function for value, kth dof of node n
539  inline double u(const unsigned &n, const unsigned &k) const
540  {
541  return this->node_pt(n)->value(k);
542  }
543 
544 
545  ///\short Constructor: Call constructors for QElement and
546  /// Poisson equations
548 
549 
551 
552 
553  /// \short Required # of `values' (pinned or dofs)
554  /// at node n
555  inline unsigned required_nvalue(const unsigned &n) const
556  {
557  return DIM*2;
558  }
559 
560 
561  /// Output
562  void output(std::ostream &outfile)
564 
565  /// output wrapper
566  void output(std::ostream &outfile, const unsigned &n_plot)
567  {BiharmonicEquations<DIM>::output(outfile, n_plot);}
568 
569  /// C-style output
570  void output(FILE* file_pt)
572 
573  /// C_style output at n_plot points
574  void output(FILE* file_pt, const unsigned &n_plot)
575  {BiharmonicEquations<DIM>::output(file_pt,n_plot);}
576 
577 
578 
579  /// analytic solution wrapper
580  void output_fct(std::ostream &outfile,const unsigned &nplot,
582  {BiharmonicEquations<DIM>::output_fct(outfile, nplot, exact_soln_pt);}
583 
584 
585 /// Final override
586  void output_fct(std::ostream &outfile, const unsigned &nplot,
587  const double& time,
589  {BiharmonicEquations<DIM>::output_fct(outfile,nplot,time,exact_soln_pt);}
590 
591 
592  /// computes error
593  void compute_error(std::ostream &outfile,
595  exact_soln_pt, double& error, double& norm)
596  {BiharmonicEquations<DIM>::compute_error(outfile, exact_soln_pt, error,
597  norm);}
598 
599  /// Call the equations-class overloaded unsteady error calculation
600  void compute_error(std::ostream &outfile,
602  const double& time, double& error, double& norm)
604  compute_error(outfile,exact_soln_pt,time,error,norm);}
605 
606 
607 };
608 
609 
610 }
611 #endif
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
Definition: elements.h:2990
Class of matrices containing doubles, and stored as a DenseMatrix<double>, but with solving functiona...
Definition: matrices.h:1234
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
analytic solution wrapper
virtual unsigned required_nvalue(const unsigned &n) const
Number of values that must be stored at local node n by the element. The default is 0...
Definition: elements.h:2346
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...
Definition: elements.h:2978
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
Definition: elements.h:2884
unsigned self_test()
self test wrapper
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Call the equations-class overloaded unsteady error calculation.
SourceFctPt Source_fct_pt
Pointer to source function:
double interpolated_u_biharmonic(const Vector< double > &s)
calculates interpolated u at s
cstr elem_len * i
Definition: cfortran.h:607
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
virtual double u(const unsigned &n, const unsigned &k) const =0
virtual unsigned self_test()
Self-test: Check inversion of element & do self-test for GeneralisedElement. Return 0 if OK...
Definition: elements.cc:4333
double u(const unsigned &n, const unsigned &k) const
access function for value, kth dof of node n
SourceFctPt & source_fct_pt()
Access functions for the source function pointer.
A general Finite Element class.
Definition: elements.h:1274
void output(std::ostream &outfile, const unsigned &nplot)
output with nplot points
Vector< int > Local_eqn
Array to hold local eqn numbers: Local_eqn[n] (=-1 for BC)
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
Definition: elements.h:1729
void output_fluid_velocity(std::ostream &outfile, const unsigned &nplot)
output fluid velocity field
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:448
void output_fct(std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output exact solution specified via function pointer at a given time and at a given number of plot po...
void(* SourceFctPt)(const Vector< double > &x, double &u)
source function type definition
void output(FILE *file_pt)
C-style output.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
unsigned get_d2_dof()
return number of second derivate degrees of freedom
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
Definition: elements.h:3017
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
computes error
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
computes the error
void fill_in_contribution_to_residuals(Vector< double > &residuals)
wrapper function, adds contribution to residual
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
output analytic solution
unsigned required_nvalue(const unsigned &n) const
Required # of `values&#39; (pinned or dofs) at node n.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
Definition: elements.h:1723
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3881
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
Definition: elements.cc:3227
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1908
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into (for block pre...
static char t char * s
Definition: cfortran.h:572
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
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"...
Definition: elements.h:3003
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number...
Definition: elements.h:709
void output(FILE *file_pt)
C-style output.
BiharmonicEquations()
Constructor (must initialise the Source_fct_pt to null)
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
Definition: elements.h:2938
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2109
BiharmonicElement()
Constructor: Call constructors for QElement and Poisson equations.
biharmonic element class
void output(std::ostream &outfile)
Output.
void output(std::ostream &outfile)
Output at default number of plot points.
void output_fct(std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Final override.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Plot the error when compared against a given time-dependent exact solution . Also calculates the norm...
static const unsigned d2_dof[]
void fill_in_contribution_to_jacobian(Vector< double > &residual, DenseMatrix< double > &jacobian)
wrapper function, adds contribution to residual and generic
void interpolated_dudx(const Vector< double > &s, Vector< double > &dudx)
output with nplot points
SourceFctPt source_fct_pt() const
Access functions for the source function pointers (const version)
Biharmonic Equation Class - contains the equations.
virtual void get_source(const unsigned &ipt, const Vector< double > &x, double &source) const
gets source strength
int local_eqn_number(const unsigned long &ieqn_global) const
Return the local equation number corresponding to the ieqn_global-th global equation number...
Definition: elements.h:731
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2146
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
Definition: elements.h:3033
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s...
Definition: elements.cc:4022
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
virtual void fill_in_generic_residual_contribution_biharmonic(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned JFLAG)
Compute element residual Vector only (if JFLAG=and/or element Jacobian matrix.
double value(const unsigned &i) const
Return i-th value (dofs or pinned) at this node either directly or via hanging node representation...
Definition: nodes.cc:2328
void output(std::ostream &outfile, const unsigned &n_plot)
output wrapper
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...
Definition: elements.h:1386