foeppl_von_karman_elements.cc
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 //Non-inline functions for FoepplvonKarman elements
31 
33 
34 #include <iostream>
35 
36 namespace oomph
37 {
38 
39 
40 //======================================================================
41 /// Set the data for the number of Variables at each node - 8
42 //======================================================================
43 template<unsigned NNODE_1D>
45 
46 // Foeppl von Karman equations static data
47 
48 /// Default value physical constants
50 
51 //======================================================================
52 /// Compute contribution to element residual Vector
53 ///
54 /// Pure version without hanging nodes
55 //======================================================================
58 {
59  //Find out how many nodes there are
60  const unsigned n_node = nnode();
61 
62  //Set up memory for the shape and test functions
63  Shape psi(n_node), test(n_node);
64  DShape dpsidx(n_node,2), dtestdx(n_node,2);
65 
66  //Indices at which the unknowns are stored
67  const unsigned w_nodal_index = nodal_index_fvk(0);
68  const unsigned laplacian_w_nodal_index = nodal_index_fvk(1);
69  const unsigned phi_nodal_index = nodal_index_fvk(2);
70  const unsigned laplacian_phi_nodal_index = nodal_index_fvk(3);
71  const unsigned smooth_dwdx_nodal_index = nodal_index_fvk(4);
72  const unsigned smooth_dwdy_nodal_index = nodal_index_fvk(5);
73  const unsigned smooth_dphidx_nodal_index = nodal_index_fvk(6);
74  const unsigned smooth_dphidy_nodal_index = nodal_index_fvk(7);
75 
76  //Set the value of n_intpt
77  const unsigned n_intpt = integral_pt()->nweight();
78 
79  //Integers to store the local equation numbers
80  int local_eqn=0;
81 
82  //Loop over the integration points
83  for(unsigned ipt=0;ipt<n_intpt;ipt++)
84  {
85  //Get the integral weight
86  double w = integral_pt()->weight(ipt);
87 
88  //Call the derivatives of the shape and test functions
89  double J = dshape_and_dtest_eulerian_at_knot_fvk(ipt,psi,dpsidx,
90  test,dtestdx);
91 
92  //Premultiply the weights and the Jacobian
93  double W = w*J;
94 
95  //Allocate and initialise to zero storage for the interpolated values
97 
98  double interpolated_w = 0;
99  double interpolated_laplacian_w = 0;
100  double interpolated_phi = 0;
101  double interpolated_laplacian_phi = 0;
102 
103  Vector<double> interpolated_dwdx(2,0.0);
104  Vector<double> interpolated_dlaplacian_wdx(2,0.0);
105  Vector<double> interpolated_dphidx(2,0.0);
106  Vector<double> interpolated_dlaplacian_phidx(2,0.0);
107 
108  Vector<double> interpolated_smooth_dwdx(2,0.0);
109  Vector<double> interpolated_smooth_dphidx(2,0.0);
110  double interpolated_continuous_d2wdx2 = 0;
111  double interpolated_continuous_d2wdy2 = 0;
112  double interpolated_continuous_d2phidx2 = 0;
113  double interpolated_continuous_d2phidy2 = 0;
114  double interpolated_continuous_d2wdxdy = 0;
115  double interpolated_continuous_d2phidxdy = 0;
116 
117  //Calculate function values and derivatives:
118  //-----------------------------------------
120  // Loop over nodes
121  for(unsigned l=0;l<n_node;l++)
122  {
123  //Get the nodal values
124  nodal_value[0] = raw_nodal_value(l,w_nodal_index);
125  nodal_value[1] = raw_nodal_value(l,laplacian_w_nodal_index);
126 
128  {
129  nodal_value[2] = raw_nodal_value(l,phi_nodal_index);
130  nodal_value[3] = raw_nodal_value(l,laplacian_phi_nodal_index);
131  nodal_value[4] = raw_nodal_value(l,smooth_dwdx_nodal_index);
132  nodal_value[5] = raw_nodal_value(l,smooth_dwdy_nodal_index);
133  nodal_value[6] = raw_nodal_value(l,smooth_dphidx_nodal_index);
134  nodal_value[7] = raw_nodal_value(l,smooth_dphidy_nodal_index);
135  }
136 
137  //Add contributions from current node/shape function
138  interpolated_w += nodal_value[0]*psi(l);
139  interpolated_laplacian_w += nodal_value[1]*psi(l);
140 
142  {
143  interpolated_phi += nodal_value[2]*psi(l);
144  interpolated_laplacian_phi += nodal_value[3]*psi(l);
145 
146  interpolated_smooth_dwdx[0] += nodal_value[4]*psi(l);
147  interpolated_smooth_dwdx[1] += nodal_value[5]*psi(l);
148  interpolated_smooth_dphidx[0] += nodal_value[6]*psi(l);
149  interpolated_smooth_dphidx[1] += nodal_value[7]*psi(l);
150 
151  interpolated_continuous_d2wdx2 += nodal_value[4]*dpsidx(l,0);
152  interpolated_continuous_d2wdy2 += nodal_value[5]*dpsidx(l,1);
153  interpolated_continuous_d2phidx2 += nodal_value[6]*dpsidx(l,0);
154  interpolated_continuous_d2phidy2 += nodal_value[7]*dpsidx(l,1);
155  //mjr CHECK THESE
156  interpolated_continuous_d2wdxdy += 0.5*(nodal_value[4]*dpsidx(l,1)
157  + nodal_value[5]*dpsidx(l,0));
158  interpolated_continuous_d2phidxdy += 0.5*(nodal_value[6]*dpsidx(l,1)
159  + nodal_value[7]*dpsidx(l,0));
160  }
161 
162  // Loop over directions
163  for(unsigned j=0;j<2;j++)
164  {
165  interpolated_x[j] += raw_nodal_position(l,j)*psi(l);
166  interpolated_dwdx[j] += nodal_value[0]*dpsidx(l,j);
167  interpolated_dlaplacian_wdx[j] += nodal_value[1]*dpsidx(l,j);
168 
170  {
171  interpolated_dphidx[j] += nodal_value[2]*dpsidx(l,j);
172  interpolated_dlaplacian_phidx[j] += nodal_value[3]*dpsidx(l,j);
173  }
174  }
175  }
176 
177  //Get pressure function
178  //-------------------
179  double pressure;
180  get_pressure_fvk(ipt,interpolated_x,pressure);
181 
182  double airy_forcing;
183  get_airy_forcing_fvk(ipt,interpolated_x,airy_forcing);
184 
185  // Assemble residuals and Jacobian
186  //--------------------------------
187 
188  // Loop over the test functions
189  for(unsigned l=0;l<n_node;l++)
190  {
191  //Get the local equation
192  local_eqn = nodal_local_eqn(l,w_nodal_index);
193 
194  // IF it's not a boundary condition
195  if(local_eqn >= 0)
196  {
197  residuals[local_eqn] += pressure*test(l)*W;
198 
199  // Reduced order biharmonic operator
200  for(unsigned k=0;k<2;k++)
201  {
202  residuals[local_eqn] += interpolated_dlaplacian_wdx[k]*dtestdx(l,k)*W;
203  }
204 
206  {
207  // Monge-Ampere part
208  residuals[local_eqn] +=
209  eta()*
210  (interpolated_continuous_d2wdx2*interpolated_continuous_d2phidy2
211  + interpolated_continuous_d2wdy2*interpolated_continuous_d2phidx2
212  - 2.0*interpolated_continuous_d2wdxdy*
213  interpolated_continuous_d2phidxdy)
214  *test(l)*W;
215  }
216  }
217 
218  //Get the local equation
219  local_eqn = nodal_local_eqn(l,laplacian_w_nodal_index);
220 
221  // IF it's not a boundary condition
222  if(local_eqn >= 0)
223  {
224  // The coupled Poisson equations for the biharmonic operator
225  residuals[local_eqn] += interpolated_laplacian_w*test(l)*W;
226 
227  for(unsigned k=0;k<2;k++)
228  {
229  residuals[local_eqn] += interpolated_dwdx[k]*dtestdx(l,k)*W;
230  }
231  }
232 
233  //Get the local equation
234  local_eqn = nodal_local_eqn(l,phi_nodal_index);
235 
236  // IF it's not a boundary condition
237  if(local_eqn >= 0)
238  {
239  residuals[local_eqn] += airy_forcing*test(l)*W;
240 
241  // Reduced order biharmonic operator
242  for(unsigned k=0;k<2;k++)
243  {
244  residuals[local_eqn] +=
245  interpolated_dlaplacian_phidx[k]*dtestdx(l,k)*W;
246  }
247 
248  // Monge-Ampere part
249  residuals[local_eqn] -=
250  (interpolated_continuous_d2wdx2*interpolated_continuous_d2wdy2
251  - interpolated_continuous_d2wdxdy*interpolated_continuous_d2wdxdy)
252  *test(l)*W;
253  }
254 
255  //Get the local equation
256  local_eqn = nodal_local_eqn(l,laplacian_phi_nodal_index);
257 
258  // IF it's not a boundary condition
259  if(local_eqn >= 0)
260  {
261  // The coupled Poisson equations for the biharmonic operator
262  residuals[local_eqn] += interpolated_laplacian_phi*test(l)*W;
263 
264  for(unsigned k=0;k<2;k++)
265  {
266  residuals[local_eqn] += interpolated_dphidx[k]*dtestdx(l,k)*W;
267  }
268  }
269 
270  //Residuals for the smooth derivatives
271  local_eqn = nodal_local_eqn(l,smooth_dwdx_nodal_index);
272 
273  if(local_eqn >= 0)
274  {
275  residuals[local_eqn] +=
276  (interpolated_dwdx[0] - interpolated_smooth_dwdx[0])*test(l)*W;
277  }
278 
279  local_eqn = nodal_local_eqn(l,smooth_dwdy_nodal_index);
280 
281  if(local_eqn >= 0)
282  {
283  residuals[local_eqn] +=
284  (interpolated_dwdx[1] - interpolated_smooth_dwdx[1])*test(l)*W;
285  }
286 
287  local_eqn = nodal_local_eqn(l,smooth_dphidx_nodal_index);
288 
289  if(local_eqn >= 0)
290  {
291  residuals[local_eqn] +=
292  (interpolated_dphidx[0] - interpolated_smooth_dphidx[0])*test(l)*W;
293  }
294 
295  local_eqn = nodal_local_eqn(l,smooth_dphidy_nodal_index);
296 
297  if(local_eqn >= 0)
298  {
299  residuals[local_eqn] +=
300  (interpolated_dphidx[1] - interpolated_smooth_dphidx[1])*test(l)*W;
301  }
302  }
303 
304  } // End of loop over integration points
305 
306 
307  // Finally: My contribution to the volume constraint equation
308  // (if any). Note this must call get_bounded_volume since the
309  // definition of the bounded volume can be overloaded in derived
310  // elements.
312  {
313  local_eqn=external_local_eqn(
315  if (local_eqn>=0)
316  {
317  residuals[local_eqn]+=get_bounded_volume();
318  }
319  }
320 
321 }
322 
323 /*
324 void FoepplvonKarmanEquations::fill_in_contribution_to_jacobian(Vector<double> &residuals,
325  DenseMatrix<double> &jacobian)
326 {
327  //Add the contribution to the residuals
328  FoepplvonKarmanEquations::fill_in_contribution_to_residuals(residuals);
329  //Allocate storage for the full residuals (residuals of entire element)
330  unsigned n_dof = ndof();
331  Vector<double> full_residuals(n_dof);
332  //Get the residuals for the entire element
333  FoepplvonKarmanEquations::get_residuals(full_residuals);
334  //Calculate the contributions from the internal dofs
335  //(finite-difference the lot by default)
336  fill_in_jacobian_from_internal_by_fd(full_residuals,jacobian,true);
337  //Calculate the contributions from the external dofs
338  //(finite-difference the lot by default)
339  fill_in_jacobian_from_external_by_fd(full_residuals,jacobian,true);
340  //Calculate the contributions from the nodal dofs
341  fill_in_jacobian_from_nodal_by_fd(full_residuals,jacobian);
342 }
343 */
344 
345 
346 //======================================================================
347 /// Self-test: Return 0 for OK
348 //======================================================================
350 {
351 
352  bool passed=true;
353 
354  // Check lower-level stuff
355  if (FiniteElement::self_test()!=0)
356  {
357  passed=false;
358  }
359 
360  // Return verdict
361  if (passed)
362  {
363  return 0;
364  }
365  else
366  {
367  return 1;
368  }
369 
370 }
371 
372 
373 //======================================================================
374 /// Compute in-plane stresses
375 //======================================================================
377  double& sigma_xx,
378  double& sigma_yy,
379  double& sigma_xy)
380 {
381 
382  // No in plane stresses if linear bending
384  {
385  sigma_xx=0.0;
386  sigma_yy=0.0;
387  sigma_xy=0.0;
388  return;
389  }
390 
391  // Get shape fcts and derivs
392  unsigned n_dim=this->dim();
393  unsigned n_node=this->nnode();
394  Shape psi(n_node);
395  DShape dpsidx(n_node,n_dim);
396  dshape_eulerian(s,psi,dpsidx);
397  double interpolated_continuous_d2phidx2 = 0;
398  double interpolated_continuous_d2phidy2 = 0;
399  double interpolated_continuous_d2phidxdy = 0;
400 
401  const unsigned smooth_dphidx_nodal_index = nodal_index_fvk(6);
402  const unsigned smooth_dphidy_nodal_index = nodal_index_fvk(7);
403 
404  // Loop over nodes
405  for(unsigned l=0;l<n_node;l++)
406  {
407  interpolated_continuous_d2phidx2 +=
408  raw_nodal_value(l,smooth_dphidx_nodal_index)*dpsidx(l,0);
409  interpolated_continuous_d2phidy2 +=
410  raw_nodal_value(l,smooth_dphidy_nodal_index)*dpsidx(l,1);
411  interpolated_continuous_d2phidxdy += 0.5*(
412  raw_nodal_value(l,smooth_dphidx_nodal_index)*dpsidx(l,1)+
413  raw_nodal_value(l,smooth_dphidy_nodal_index)*dpsidx(l,0));
414  }
415 
416  sigma_xx=interpolated_continuous_d2phidy2;
417  sigma_yy=interpolated_continuous_d2phidx2;
418  sigma_xy=-interpolated_continuous_d2phidxdy;
419 
420 }
421 
422 
423 
424 //======================================================================
425 /// Output function:
426 ///
427 /// x,y,w
428 ///
429 /// nplot points in each coordinate direction
430 //======================================================================
431 void FoepplvonKarmanEquations::output(std::ostream &outfile,
432  const unsigned &nplot)
433 {
434 
435  //Vector of local coordinates
436  Vector<double> s(2);
437 
438  // Tecplot header info
439  outfile << tecplot_zone_string(nplot);
440 
441  // Loop over plot points
442  unsigned num_plot_points=nplot_points(nplot);
443  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
444  {
445 
446  // Get local coordinates of plot point
447  get_s_plot(iplot,nplot,s);
448 
449  for(unsigned i=0;i<2;i++)
450  {
451  outfile << interpolated_x(s,i) << " ";
452  }
453  outfile << interpolated_w_fvk(s) << std::endl;
454 
455  }
456 
457  // Write tecplot footer (e.g. FE connectivity lists)
458  write_tecplot_zone_footer(outfile,nplot);
459 
460 }
461 
462 
463 //======================================================================
464 /// C-style output function:
465 ///
466 /// x,y,w
467 ///
468 /// nplot points in each coordinate direction
469 //======================================================================
471  const unsigned &nplot)
472 {
473  //Vector of local coordinates
474  Vector<double> s(2);
475 
476  // Tecplot header info
477  fprintf(file_pt,"%s",tecplot_zone_string(nplot).c_str());
478 
479  // Loop over plot points
480  unsigned num_plot_points=nplot_points(nplot);
481  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
482  {
483  // Get local coordinates of plot point
484  get_s_plot(iplot,nplot,s);
485 
486  for(unsigned i=0;i<2;i++)
487  {
488  fprintf(file_pt,"%g ",interpolated_x(s,i));
489  }
490  fprintf(file_pt,"%g \n",interpolated_w_fvk(s));
491  }
492 
493  // Write tecplot footer (e.g. FE connectivity lists)
494  write_tecplot_zone_footer(file_pt,nplot);
495 }
496 
497 
498 
499 //======================================================================
500  /// Output exact solution
501  ///
502  /// Solution is provided via function pointer.
503  /// Plot at a given number of plot points.
504  ///
505  /// x,y,w_exact
506 //======================================================================
507 void FoepplvonKarmanEquations::output_fct(std::ostream &outfile,
508  const unsigned &nplot,
510 {
511  //Vector of local coordinates
512  Vector<double> s(2);
513 
514  // Vector for coordintes
515  Vector<double> x(2);
516 
517  // Tecplot header info
518  outfile << tecplot_zone_string(nplot);
519 
520  // Exact solution Vector (here a scalar)
521  //Vector<double> exact_soln(1);
522  Vector<double> exact_soln(2);
523 
524  // Loop over plot points
525  unsigned num_plot_points=nplot_points(nplot);
526  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
527  {
528 
529  // Get local coordinates of plot point
530  get_s_plot(iplot,nplot,s);
531 
532  // Get x position as Vector
533  interpolated_x(s,x);
534 
535  // Get exact solution at this point
536  (*exact_soln_pt)(x,exact_soln);
537 
538  //Output x,y,w_exact
539  for(unsigned i=0;i<2;i++)
540  {
541  outfile << x[i] << " ";
542  }
543  outfile << exact_soln[0] << std::endl;
544  }
545 
546  // Write tecplot footer (e.g. FE connectivity lists)
547  write_tecplot_zone_footer(outfile,nplot);
548 }
549 
550 
551 
552 
553 //======================================================================
554  /// Validate against exact solution
555  ///
556  /// Solution is provided via function pointer.
557  /// Plot error at a given number of plot points.
558  ///
559 //======================================================================
560 void FoepplvonKarmanEquations::compute_error(std::ostream &outfile,
562  double& error, double& norm)
563 {
564 
565  // Initialise
566  error=0.0;
567  norm=0.0;
568 
569  //Vector of local coordinates
570  Vector<double> s(2);
571 
572  // Vector for coordintes
573  Vector<double> x(2);
574 
575  //Find out how many nodes there are in the element
576  unsigned n_node = nnode();
577 
578  Shape psi(n_node);
579 
580  //Set the value of n_intpt
581  unsigned n_intpt = integral_pt()->nweight();
582 
583  // Tecplot
584  outfile << "ZONE" << std::endl;
585 
586  // Exact solution Vector (here a scalar)
587  //Vector<double> exact_soln(1);
588  Vector<double> exact_soln(2);
589 
590  //Loop over the integration points
591  for(unsigned ipt=0;ipt<n_intpt;ipt++)
592  {
593 
594  //Assign values of s
595  for(unsigned i=0;i<2;i++)
596  {
597  s[i] = integral_pt()->knot(ipt,i);
598  }
599 
600  //Get the integral weight
601  double w = integral_pt()->weight(ipt);
602 
603  // Get jacobian of mapping
604  double J=J_eulerian(s);
605 
606  //Premultiply the weights and the Jacobian
607  double W = w*J;
608 
609  // Get x position as Vector
610  interpolated_x(s,x);
611 
612  // Get FE function value
613  double w_fe=interpolated_w_fvk(s);
614 
615  // Get exact solution at this point
616  (*exact_soln_pt)(x,exact_soln);
617 
618  //Output x,y,error
619  for(unsigned i=0;i<2;i++)
620  {
621  outfile << x[i] << " ";
622  }
623  outfile << exact_soln[0] << " " << exact_soln[0]-w_fe << std::endl;
624 
625  // Add to error and norm
626  norm+=exact_soln[0]*exact_soln[0]*W;
627  error+=(exact_soln[0]-w_fe)*(exact_soln[0]-w_fe)*W;
628 
629  }
630 }
631 
632 
633 //====================================================================
634 // Force build of templates
635 //====================================================================
636 template class QFoepplvonKarmanElement<2>;
637 template class QFoepplvonKarmanElement<3>;
638 template class QFoepplvonKarmanElement<4>;
639 
640 }
641 
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
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
virtual void get_airy_forcing_fvk(const unsigned &ipt, const Vector< double > &x, double &airy_forcing) const
Get Airy forcing term at (Eulerian) position x. This function is virtual to allow overloading in mult...
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
Definition: elements.h:2458
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.
static double Default_Physical_Constant_Value
Default value for physical constants.
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
bool Linear_bending_model
Flag which stores whether we are using a linear, pure bending model instead of the full non-linear Fo...
cstr elem_len * i
Definition: cfortran.h:607
virtual unsigned self_test()
Self-test: Check inversion of element & do self-test for GeneralisedElement. Return 0 if OK...
Definition: elements.cc:4333
virtual double get_bounded_volume() const
Return the integral of the displacement over the current element, effectively calculating its contrib...
static const unsigned Initial_Nvalue
Static int that holds the number of variables at nodes: always the same.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
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
int Volume_constraint_pressure_external_data_index
Index of the external Data object that represents the volume constraint pressure (initialised to -1 i...
void interpolated_stress(const Vector< double > &s, double &sigma_xx, double &sigma_yy, double &sigma_xy)
Compute in-plane stresses.
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
static char t char * s
Definition: cfortran.h:572
unsigned self_test()
Self-test: Return 0 for OK.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
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
virtual unsigned nodal_index_fvk(const unsigned &i=0) const
Return the index at which the i-th unknown value is stored. The default value, i, is appropriate for ...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals with this element&#39;s contribution.
virtual double dshape_and_dtest_eulerian_at_knot_fvk(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of ...
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...
Definition: elements.h:2470
void output(std::ostream &outfile)
Output with default number of plot points.
double raw_nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. Do not use the hanging node representation. NOTE: Moved to cc file because of a possible compiler bug in gcc (yes, really!). The move to the cc file avoids inlining which appears to cause problems (only) when compiled with gcc and -O3; offensive "illegal read" is in optimised-out section of code and data that is allegedly illegal is readily readable (by other means) just before this function is called so I can&#39;t really see how we could possibly be responsible for this...
Definition: elements.cc:1659
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Definition: elements.h:2482
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual void get_pressure_fvk(const unsigned &ipt, const Vector< double > &x, double &pressure) const
Get pressure term at (Eulerian) position x. This function is virtual to allow overloading in multi-ph...
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2146
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
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external data...
Definition: elements.h:313
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
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...