db_nst_external_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// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 //LIC//
8 //LIC// This library is free software; you can redistribute it and/or
9 //LIC// modify it under the terms of the GNU Lesser General Public
10 //LIC// License as published by the Free Software Foundation; either
11 //LIC// version 2.1 of the License, or (at your option) any later version.
12 //LIC//
13 //LIC// This library is distributed in the hope that it will be useful,
14 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 //LIC// Lesser General Public License for more details.
17 //LIC//
18 //LIC// You should have received a copy of the GNU Lesser General Public
19 //LIC// License along with this library; if not, write to the Free Software
20 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 //LIC// 02110-1301 USA.
22 //LIC//
23 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 //LIC//
25 //LIC//====================================================================
26 //Header for a multi-physics problem that couples a Navier--Stokes
27 //mesh to an advection diffusion mesh, giving Boussinesq convection
28 
29 //Oomph-lib headers, we require the generic, advection-diffusion
30 //and navier-stokes elements.
31 #include "generic.h"
32 #include "advection_diffusion.h"
33 #include "navier_stokes.h"
34 
35 // Use the oomph and std namespaces
36 using namespace oomph;
37 using namespace std;
38 
39 //======================class definitions==============================
44 //=====================================================================
45 template<unsigned DIM>
47  public virtual RefineableQCrouzeixRaviartElement<DIM>,
48  public virtual ElementWithExternalElement
49 {
50 
51 private:
52 
54  double* Ra_T_pt;
55 
57  double* Ra_S_pt;
58 
61 
62 public:
63 
70  {
72 
74 
75  //There are two interactions
76  this->set_ninteraction(2);
77 
78  //We do not need to add any external geometric data because the
79  //element is fixed
80  this->ignore_external_geometric_data();
81  }
82 
84  const double &ra_t() const {return *Ra_T_pt;}
85 
87  double* &ra_t_pt() {return Ra_T_pt;}
88 
89 
91  const double &ra_s() const {return *Ra_S_pt;}
92 
94  double* &ra_s_pt() {return Ra_S_pt;}
95 
100  {
102 
103  //Cast the pointer to the father element to the specific
104  //element type
106  cast_father_element_pt
107  = dynamic_cast<
109  this->father_element_pt());
110 
111  //Set the pointer to the Rayleigh numbers to be the same as that in
112  //the father
113  this->Ra_T_pt = cast_father_element_pt->ra_t_pt();
114 
115  this->Ra_S_pt = cast_father_element_pt->ra_s_pt();
116  }
117 
118  // Overload get_body_force_nst to get the temperature "body force"
119  // from the "source" AdvectionDiffusion element via current integration point
120  void get_body_force_nst(const double& time, const unsigned& ipt,
121  const Vector<double> &s, const Vector<double> &x,
122  Vector<double> &result);
123 
126  void get_dbody_force_nst_dexternal_element_data(
127  const unsigned& ipt,
128  DenseMatrix<double> &result, Vector<unsigned> &global_eqn_number);
129 
130 
133  {
134  //Call the residuals of the Navier-Stokes equations
136  residuals);
137  }
138 
142  DenseMatrix<double> &jacobian)
143  {
144 #ifdef USE_FD_JACOBIAN_FOR_MY_NAVIER_STOKES_ELEMENT
145  // This function computes the Jacobian by finite-differencing
147 #else
148  //Get the contribution from the basic Navier--Stokes element
150  fill_in_contribution_to_jacobian(residuals,jacobian);
151  //Get the off-diagonal terms analytically
152  this->fill_in_off_diagonal_block_analytic(residuals,jacobian);
153 #endif
154 
155  }
156 
160  Vector<double> &residuals, DenseMatrix<double> &jacobian,
161  DenseMatrix<double> &mass_matrix)
162  {
163  //Call the standard (Broken) function
164  //which will prevent these elements from being used
165  //in eigenproblems until replaced.
167  residuals,jacobian,mass_matrix);
168  }
169 
173  DenseMatrix<double> &jacobian)
174  {
175  //Local storage for the index in the nodes at which the
176  //Navier-Stokes velocities are stored (we know that this should be 0,1,2)
177  unsigned u_nodal_nst[DIM];
178  for(unsigned i=0;i<DIM;i++)
179  {u_nodal_nst[i] = this->u_index_nst(i);}
180 
181  //Find out how many nodes there are
182  const unsigned n_node = this->nnode();
183 
184  //Set up memory for the shape and test functions and their derivatives
185  Shape psif(n_node), testf(n_node);
186  DShape dpsifdx(n_node,DIM), dtestfdx(n_node,DIM);
187 
188  //Number of integration points
189  const unsigned n_intpt = this->integral_pt()->nweight();
190 
191  //Integers to store the local equations and unknowns
192  int local_eqn=0, local_unknown=0;
193 
194  // Local storage for pointers to hang_info objects
195  HangInfo *hang_info_pt=0;
196 
197  //Loop over the integration points
198  for(unsigned ipt=0;ipt<n_intpt;ipt++)
199  {
200  //Get the integral weight
201  double w = this->integral_pt()->weight(ipt);
202 
203  //Call the derivatives of the shape and test functions
204  double J =
205  this->dshape_and_dtest_eulerian_at_knot_nst(ipt,psif,dpsifdx,
206  testf,dtestfdx);
207 
208  //Premultiply the weights and the Jacobian
209  double W = w*J;
210 
211  //Assemble the jacobian terms
212 
213  //Get the derivatives of the body force wrt the unknowns
214  //of the external element
215  DenseMatrix<double> dbody_dexternal_element_data;
216  //Vector of global equation number corresponding to the external
217  //element's data
218  Vector<unsigned> global_eqn_number_of_external_element_data;
219  //Get the appropriate derivatives
220  this->get_dbody_force_nst_dexternal_element_data(
221  ipt,dbody_dexternal_element_data,
222  global_eqn_number_of_external_element_data);
223  //Find out how many external data there are
224  const unsigned n_external_element_data =
225  global_eqn_number_of_external_element_data.size();
226 
227  //Loop over the test functions
228  for(unsigned l=0;l<n_node;l++)
229  {
230  //Assemble the contributions of the temperature to
231  //the Navier--Stokes equations (which arise through the buoyancy
232  //body-force term)
233  unsigned n_master = 1;
234  double hang_weight = 1.0;
235 
236  //Local bool (is the node hanging)
237  bool is_node_hanging = this->node_pt(l)->is_hanging();
238 
239  //If the node is hanging, get the number of master nodes
240  if(is_node_hanging)
241  {
242  hang_info_pt = this->node_pt(l)->hanging_pt();
243  n_master = hang_info_pt->nmaster();
244  }
245  //Otherwise there is just one master node, the node itself
246  else
247  {
248  n_master = 1;
249  }
250 
251  //Loop over the master nodes
252  for(unsigned m=0;m<n_master;m++)
253  {
254  //If the node is hanging get weight from master node
255  if(is_node_hanging)
256  {
257  //Get the hang weight from the master node
258  hang_weight = hang_info_pt->master_weight(m);
259  }
260  else
261  {
262  // Node contributes with full weight
263  hang_weight = 1.0;
264  }
265 
266 
267  //Loop over the velocity components in the Navier--Stokes equtions
268  for(unsigned i=0;i<DIM;i++)
269  {
270  //Get the equation number
271  if(is_node_hanging)
272  {
273  //Get the equation number from the master node
274  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
275  u_nodal_nst[i]);
276  }
277  else
278  {
279  // Local equation number
280  local_eqn = this->nodal_local_eqn(l,u_nodal_nst[i]);
281  }
282 
283  if(local_eqn >= 0)
284  {
285  //Loop over the external data
286  for(unsigned l2=0;l2<n_external_element_data;l2++)
287  {
288  //Find the local equation number corresponding to the global
289  //unknown
290  local_unknown =
291  this->local_eqn_number(
292  global_eqn_number_of_external_element_data[l2]);
293  if(local_unknown >= 0)
294  {
295  //Add contribution to jacobian matrix
296  jacobian(local_eqn,local_unknown)
297  += dbody_dexternal_element_data(i,l2)*testf(l)*hang_weight*W;
298  }
299  }
300  }
301  }
302  }
303  }
304  }
305  }
306 
307 };
308 
309 //======================class definitions==============================
313 //=====================================================================
314 template<unsigned DIM>
316  public virtual RefineableQAdvectionDiffusionElement<DIM,3>,
317  public virtual ElementWithExternalElement
318 {
319 
320 public:
321 
325  {
326  //There is one interaction
327  this->set_ninteraction(1);
328 
329  //We do not need to add any external geometric data because the
330  //element is fixed
331  this->ignore_external_geometric_data();
332  }
333 
338  void get_wind_adv_diff(const unsigned& ipt, const Vector<double> &s,
339  const Vector<double>& x, Vector<double>& wind) const;
340 
344  const unsigned& ipt, const unsigned &i,
345  Vector<double> &result, Vector<unsigned> &global_eqn_number);
346 
347 
350  {
353  }
354 
358  DenseMatrix<double> &jacobian)
359  {
360 #ifdef USE_FD_JACOBIAN_FOR_MY_ADVECTION_DIFFUSION_ELEMENT
361  // This function computes the Jacobian by finite-differencing
363 #else
364  //Get the contribution from the basic Navier--Stokes element
366  fill_in_contribution_to_jacobian(residuals,jacobian);
367  //Get the off-diagonal terms analytically
368  this->fill_in_off_diagonal_block_analytic(residuals,jacobian);
369 #endif
370  }
371 
375  Vector<double> &residuals, DenseMatrix<double> &jacobian,
376  DenseMatrix<double> &mass_matrix)
377  {
378  //Call the standard (Broken) function
379  //which will prevent these elements from being used
380  //in eigenproblems until replaced.
382  residuals,jacobian,mass_matrix);
383  }
384 
385 
389  DenseMatrix<double> &jacobian)
390  {
391  //Local storage for the index in the nodes at which the temperature
392  //is stored
393  const unsigned u_nodal_adv_diff = this->u_index_adv_diff();
394 
395  //Find out how many nodes there are
396  const unsigned n_node = this->nnode();
397 
398  //Set up memory for the shape and test functions and their derivatives
399  Shape psi(n_node), test(n_node);
400  DShape dpsidx(n_node,DIM), dtestdx(n_node,DIM);
401 
402  //Number of integration points
403  const unsigned n_intpt = this->integral_pt()->nweight();
404 
405  //Integers to store the local equations and unknowns
406  int local_eqn=0, local_unknown=0;
407 
408  // Local storage for pointers to hang_info objects
409  HangInfo *hang_info_pt=0;
410 
411  //Get the peclet number
412  const double peclet = this->pe();
413 
414  //Loop over the integration points
415  for(unsigned ipt=0;ipt<n_intpt;ipt++)
416  {
417  //Get the integral weight
418  double w = this->integral_pt()->weight(ipt);
419 
420  //Call the derivatives of the shape and test functions
421  double J =
422  this->dshape_and_dtest_eulerian_at_knot_adv_diff(ipt,psi,dpsidx,
423  test,dtestdx);
424 
425  //Premultiply the weights and the Jacobian
426  double W = w*J;
427 
428  //Calculate local values of the derivatives of the solution
429  Vector<double> interpolated_dudx(DIM,0.0);
430  // Loop over nodes
431  for(unsigned l=0;l<n_node;l++)
432  {
433  // Loop over directions
434  for(unsigned j=0;j<DIM;j++)
435  {
436  interpolated_dudx[j] +=
437  this->nodal_value(l,u_nodal_adv_diff)*dpsidx(l,j);
438  }
439  }
440 
441  //Get the derivatives of the wind wrt the unknowns
442  //of the external element
443  Vector<double> dwind_dexternal_element_data;
444  //Vector of global equation number corresponding to the external
445  //element's data
446  Vector<unsigned> global_eqn_number_of_external_element_data;
447 
448  //Loop over the wind directions
449  for(unsigned i2=0;i2<DIM;i2++)
450  {
451  //Get the appropriate derivatives
452  this->get_dwind_adv_diff_dexternal_element_data(
453  ipt,i2,dwind_dexternal_element_data,
454  global_eqn_number_of_external_element_data);
455 
456 
457  //Find out how many external data there are
458  const unsigned n_external_element_data =
459  global_eqn_number_of_external_element_data.size();
460 
461  //Loop over the test functions
462  for(unsigned l=0;l<n_node;l++)
463  {
464  //Assemble the contributions of the velocities to
465  //the advection-diffusion equations
466  unsigned n_master = 1;
467  double hang_weight = 1.0;
468 
469  //Local bool (is the node hanging)
470  bool is_node_hanging = this->node_pt(l)->is_hanging();
471 
472  //If the node is hanging, get the number of master nodes
473  if(is_node_hanging)
474  {
475  hang_info_pt = this->node_pt(l)->hanging_pt();
476  n_master = hang_info_pt->nmaster();
477  }
478  //Otherwise there is just one master node, the node itself
479  else
480  {
481  n_master = 1;
482  }
483 
484  //Loop over the master nodes
485  for(unsigned m=0;m<n_master;m++)
486  {
487  //If the node is hanging get weight from master node
488  if(is_node_hanging)
489  {
490  //Get the hang weight from the master node
491  hang_weight = hang_info_pt->master_weight(m);
492  }
493  else
494  {
495  // Node contributes with full weight
496  hang_weight = 1.0;
497  }
498 
499  //Get the equation number
500  if(is_node_hanging)
501  {
502  //Get the equation number from the master node
503  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
504  u_nodal_adv_diff);
505  }
506  else
507  {
508  // Local equation number
509  local_eqn = this->nodal_local_eqn(l,u_nodal_adv_diff);
510  }
511 
512  if(local_eqn >= 0)
513  {
514  //Loop over the external data
515  for(unsigned l2=0;l2<n_external_element_data;l2++)
516  {
517  //Find the local equation number corresponding to the global
518  //unknown
519  local_unknown =
520  this->local_eqn_number(
521  global_eqn_number_of_external_element_data[l2]);
522  if(local_unknown >= 0)
523  {
524  //Add contribution to jacobian matrix
525  jacobian(local_eqn,local_unknown)
526  -= peclet*dwind_dexternal_element_data[l2]*
527  interpolated_dudx[i2]*test(l)*hang_weight*W;
528  }
529  }
530  }
531  }
532  }
533  }
534  }
535  }
536 
537 };
538 
539 //======================start_of_get_body_force_nst============================
540 // Overload get_body_force_nst to get the temperature "body force"
541 // from the "source" AdvectionDiffusion element via current integration point
542 //=============================================================================
543 template<unsigned DIM>
546 (const double& time,const unsigned& ipt,const Vector<double> &s,
547  const Vector<double> &x,Vector<double> &result)
548 {
549  //Let's choose the thermal interaction to be interaction zeo
550  const unsigned t_interaction=0;
551  //The solutal interaction is interaction 1
552  const unsigned c_interaction=1;
553 
554  //Get the temperature field from the external element
555  const double interpolated_t =
556  dynamic_cast<AdvectionDiffusionEquations<DIM>*>
557  (external_element_pt(t_interaction,ipt))->
558  interpolated_u_adv_diff(external_element_local_coord(t_interaction,ipt));
559 
560 
561  //Get the interpolated concentration field from the external element
562  const double interpolated_c = dynamic_cast<AdvectionDiffusionEquations<DIM>*>
563  (external_element_pt(c_interaction,ipt))->
564  interpolated_u_adv_diff(external_element_local_coord(c_interaction,ipt));
565 
566  //Combine into the buoyancy force
567  const double buoyancy = interpolated_t*ra_t() + interpolated_c*ra_s();
568 
569 
570  // Get vector that indicates the direction of gravity from
571  // the Navier-Stokes equations
573 
574  // Temperature-dependent body force:
575  for (unsigned i=0;i<DIM;i++)
576  {
577  result[i] = -gravity[i]*buoyancy;
578  }
579 
580 } //end of get_body_force_nst
581 
582 //==========start_of_get_dbody_force=========== ===========================
585 //=========================================================================
586 template<unsigned DIM>
589  DenseMatrix<double> &result,
590  Vector<unsigned> &global_eqn_number)
591 {
592  // The temperature interaction index is 0 in this case
593  unsigned t_interaction=0;
594  // The concentration interaction index is 1 in this case
595  unsigned c_interaction = 1;
596 
597  //Get the temperature interactions
598  Vector<double> du_temp_ddata;
599  Vector<unsigned> global_eqn_number_temp;
600 
601  //Get the interation data from the temperature element
602  dynamic_cast<AdvectionDiffusionEquations<DIM>*>
603  (external_element_pt(t_interaction,ipt))->
604  dinterpolated_u_adv_diff_ddata(
605  external_element_local_coord(t_interaction,ipt),du_temp_ddata,
606  global_eqn_number_temp);
607 
608  //Get the concentration interactions
609  Vector<double> du_conc_ddata;
610  Vector<unsigned> global_eqn_number_conc;
611 
612  //Get the interation data from the temperature element
613  dynamic_cast<AdvectionDiffusionEquations<DIM>*>
614  (external_element_pt(c_interaction,ipt))->
615  dinterpolated_u_adv_diff_ddata(
616  external_element_local_coord(c_interaction,ipt),du_conc_ddata,
617  global_eqn_number_conc);
618 
619  // Get vector that indicates the direction of gravity from
620  // the Navier-Stokes equations
622 
623  //Find the number of external data
624  //Assuming that the temperature and concentration elements are separate
625  //which they are!
626  unsigned n_external_temp_data = du_temp_ddata.size();
627  unsigned n_external_conc_data = du_conc_ddata.size();
628 
629  //Set the size of the matrix to be returned
630  result.resize(DIM,n_external_temp_data+n_external_conc_data);
631 
632  // Temperature-dependent body force:
633  for (unsigned i=0;i<DIM;i++)
634  {
635  //Loop over the temperature external data
636  for(unsigned n=0;n<n_external_temp_data;n++)
637  {
638  result(i,n) = -gravity[i]*du_temp_ddata[n]*ra_t();
639  }
640 
641  //Loop over the concentration external data
642  //Loop over the temperature external data
643  for(unsigned n=0;n<n_external_conc_data;n++)
644  {
645  result(i,n_external_temp_data+n) = -gravity[i]*du_conc_ddata[n]*ra_s();
646  }
647  }
648 
649  //Set the size of the global equation numbers
650  global_eqn_number.resize(n_external_temp_data+n_external_conc_data);
651  //Fill in the entries temperature first
652  for(unsigned n=0;n<n_external_temp_data;n++)
653  {
654  global_eqn_number[n] = global_eqn_number_temp[n];
655  }
656  //Concentration second
657  for(unsigned n=0;n<n_external_conc_data;n++)
658  {
659  global_eqn_number[n_external_temp_data+n] = global_eqn_number_conc[n];
660  }
661 
662 
663 } // end_of_get_dbody_force
664 
665 
666 
667 //==========================start_of_get_wind_adv_diff====================
672 //==========================================================================
673 template<unsigned DIM>
676 (const unsigned& ipt,const Vector<double> &s,const Vector<double>& x,
677  Vector<double>& wind) const
678 {
679  // The interatction is stored at index 0 of the NST element
680  unsigned interaction=0;
681 
682  // Dynamic cast "other" element to correct type
683  NavierStokesEquations<DIM>* source_el_pt=
684  dynamic_cast<NavierStokesEquations<DIM>*>
685  (external_element_pt(interaction,ipt));
686 
687  //The wind function is simply the velocity at the points of the source element
688  source_el_pt->interpolated_u_nst
689  (external_element_local_coord(interaction,ipt),wind);
690 } //end of get_wind_adv_diff
691 
692 
693 
694 //=============start_of_get_dwind==========================================
697 //=========================================================================
698 template<unsigned DIM>
701  const unsigned &i,
702  Vector<double> &result,
703  Vector<unsigned> &global_eqn_number)
704 {
705  // The interaction index is 0 in this case
706  unsigned interaction=0;
707 
708  // Dynamic cast "other" element to correct type
709  NavierStokesEquations<DIM>* source_el_pt=
710  dynamic_cast<NavierStokesEquations<DIM>*>
711  (external_element_pt(interaction,ipt));
712 
713  // Get the external element's derivatives of the velocity with respect
714  // to the data. The wind is just the Navier--Stokes velocity, so this
715  // is all that's required
716  source_el_pt->dinterpolated_u_nst_ddata(
717  external_element_local_coord(interaction,ipt),i,result,
718  global_eqn_number);
719 } // end_of_get_dwind
720 
721 
722 
723 //=========================================================================
725 //=========================================================================
726 template<>
729 
730 template<>
733 
737 
738 
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: my_boussinesq_elements.h:415
void get_wind_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
void get_dwind_adv_diff_dexternal_element_data(const unsigned &ipt, const unsigned &i, Vector< double > &result, Vector< unsigned > &global_eqn_number)
RefineableQAdvectionDiffusionElementWithExternalElement()
Constructor: call the underlying constructors.
Definition: db_nst_external_elements.h:323
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: db_nst_external_elements.h:374
void fill_in_off_diagonal_block_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: db_nst_external_elements.h:388
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: db_nst_external_elements.h:357
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Just call the fill_in_residuals for AdvDiff.
Definition: db_nst_external_elements.h:349
Definition: db_nst_external_elements.h:49
void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: db_nst_external_elements.h:546
double *& ra_t_pt()
Access function for the pointer to the Rayleigh number.
Definition: db_nst_external_elements.h:87
void fill_in_off_diagonal_block_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: db_nst_external_elements.h:172
double *& ra_s_pt()
Access function for the pointer to the solutal Rayleigh number.
Definition: db_nst_external_elements.h:94
double * Ra_T_pt
Pointer to a private data member, the thermal Rayleigh number.
Definition: db_nst_external_elements.h:54
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: db_nst_external_elements.h:141
void get_dbody_force_nst_dexternal_element_data(const unsigned &ipt, DenseMatrix< double > &result, Vector< unsigned > &global_eqn_number)
external unknowns
Definition: db_nst_external_elements.h:588
const double & ra_t() const
Access function for the Rayleigh number (const version)
Definition: db_nst_external_elements.h:84
RefineableQCrouzeixRaviartElementWithTwoExternalElement()
Definition: db_nst_external_elements.h:67
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: db_nst_external_elements.h:159
double * Ra_S_pt
Pointer to the private data member, the solutal Rayleigh number.
Definition: db_nst_external_elements.h:57
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
Definition: db_nst_external_elements.h:60
const double & ra_s() const
Access function for the solutal Rayleigh number (const version)
Definition: db_nst_external_elements.h:91
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the constituent elements' contribution to the residual vector.
Definition: db_nst_external_elements.h:132
void further_build()
Definition: db_nst_external_elements.h:99
Definition: advection_diffusion_elements.h:52
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: advection_diffusion_elements.h:435
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: advection_diffusion_elements.h:421
Definition: shape.h:278
void resize(const unsigned long &n)
Definition: matrices.h:498
Definition: element_with_external_element.h:56
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:1735
double size() const
Definition: elements.cc:4290
virtual void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: elements.cc:1322
Definition: nodes.h:742
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Definition: nodes.h:808
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Definition: nodes.h:791
unsigned nmaster() const
Return the number of master nodes.
Definition: nodes.h:785
Definition: navier_stokes_elements.h:395
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: navier_stokes_elements.h:1260
void interpolated_u_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
Definition: navier_stokes_elements.h:1505
virtual void dinterpolated_u_nst_ddata(const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Definition: navier_stokes_elements.h:1587
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: navier_stokes_elements.h:1273
Definition: refineable_advection_diffusion_elements.h:355
Refineable version of Crouzeix Raviart elements. Generic class definitions.
Definition: refineable_navier_stokes_elements.h:1109
Definition: shape.h:76
RealScalar s
Definition: level1_cplx_impl.h:130
int * m
Definition: level2_cplx_impl.h:294
#define DIM
Definition: linearised_navier_stokes_elements.h:44
squared absolute sa ArrayBase::abs2 DOXCOMMA MatrixBase::cwiseAbs2 sa Eigen::abs2 DOXCOMMA Eigen::pow DOXCOMMA ArrayBase::square nearest sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round nearest integer not less than the given sa Eigen::floor DOXCOMMA ArrayBase::ceil not a number test
Definition: GlobalFunctions.h:109
void gravity(const double &t, const Vector< double > &xi, Vector< double > &b)
Definition: ConstraintElementsUnitTest.cpp:20
Definition: MortaringCantileverCompareToNonMortaring.cpp:176
double Default_Physical_Constant_Value
Default value for physical constants.
Definition: multi_domain_boussinesq_elements.h:48
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
const double & pe() const
Peclet number.
Definition: gen_axisym_advection_diffusion_elements.h:284
list x
Definition: plotDoE.py:28
Definition: indexed_view.cpp:20
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2