element_with_external_element.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-2023 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 file for the class
27 // ElementWithExternalElement which stores pointers to external elements
28 
29 // Include guards to prevent multiple inclusion of the header
30 #ifndef OOMPH_ELEMENT_WITH_EXTERNAL_ELEMENT_HEADER
31 #define OOMPH_ELEMENT_WITH_EXTERNAL_ELEMENT_HEADER
32 
33 // Config header generated by autoconfig
34 #ifdef HAVE_CONFIG_H
35 #include <oomph-lib-config.h>
36 #endif
37 
38 // Oomph-lib headers
39 #include "elements.h"
40 
41 namespace oomph
42 {
43  //========================================================================
44  /// This is a base class for all elements that require external sources
45  /// (e.g. FSI, multi-domain problems such as Helmholtz, multi-mesh
46  /// Boussinesq convection, etc.). It provides storage for the source
47  /// element and corresponding local coordinate at each integration point,
48  /// and allows use of locate_zeta to obtain such source elements. In
49  /// addition separate storage is allocated for all field data in the
50  /// external elements and all geometric data that can affect the field
51  /// data in the external elements. Generic finite difference routines
52  /// are provided to calculate entries in the Jacobian from the data
53  /// of the external elements.
54  //========================================================================
56  {
57  public:
58  /// Constructor. Initialise member data and pointers to data
59  /// associated with the external elements to zero.
61  : FiniteElement(),
66  Ninteraction(0),
67  Nintpt(0),
77  {
78  }
79 
80  /// The destructor, clean up any allocated memory
82 
83  /// Broken copy constructor
85 
86  /// Broken assignment operator
87  void operator=(const ElementWithExternalElement&) = delete;
88 
89  /// Helper function to check if storage has actually been allocated
91  {
92  // If either of the storage arrays is zero, then storage has not
93  // yet been allocated. Both arrays are allocated at once, so
94  // if one is zero both will (should) be
96  {
97  return false;
98  }
99  else
100  {
101  return true;
102  }
103  }
104 
105  /// Access function to source element for specified interaction
106  /// index at specified integration point
107  FiniteElement*& external_element_pt(const unsigned& interaction_index,
108  const unsigned& ipt)
109  {
110 #ifdef PARANOID
112 #endif
113 #ifdef RANGE_CHECKING
114  range_check(interaction_index, ipt);
115 #endif
116  // Return the appropriate entry in the storage array
117  return External_element_pt[Nintpt * interaction_index + ipt];
118  }
119 
120  /// Access function to source element, const version
121  FiniteElement* const& external_element_pt(const unsigned& interaction_index,
122  const unsigned& ipt) const
123  {
124 #ifdef PARANOID
126 #endif
127 #ifdef RANGE_CHECKING
128  range_check(interaction_index, ipt);
129 #endif
130  // Return the appropriate entry in the storage array
131  return External_element_pt[Nintpt * interaction_index + ipt];
132  }
133 
134  /// Access function to get source element's local coords for
135  /// specified interaction index at specified integration point
137  const unsigned& interaction_index, const unsigned& ipt)
138  {
139 #ifdef PARANOID
141 #endif
142 #ifdef RANGE_CHECKING
143  range_check(interaction_index, ipt);
144 #endif
145  return External_element_local_coord[Nintpt * interaction_index + ipt];
146  }
147 
148  /// Access function to get source element's coords, const version
150  const unsigned& interaction_index, const unsigned& ipt) const
151  {
152 #ifdef PARANOID
154 #endif
155 #ifdef RANGE_CHECKING
156  range_check(interaction_index, ipt);
157 #endif
158  return External_element_local_coord[Nintpt * interaction_index + ipt];
159  }
160 
161 
162  /// Output by plotting vector from integration point to
163  /// corresponding point in external element for specified interaction
164  /// index
165  void output_external_elements(std::ostream& outfile,
166  const unsigned& interaction_index);
167 
168  /// Initialise storage for pointers to external elements and their
169  /// local coordinates. This must be called before any of
170  /// the access functions are used.
172 
173  /// Flush the storage for external elements
175 
176  /// Set the number of interactions in the element
177  /// This function is usually called in the specific element's constructor
178  inline void set_ninteraction(const unsigned& n_interaction)
179  {
180  Ninteraction = n_interaction;
181  }
182 
183  /// Return the number of interactions in the element
184  unsigned ninteraction() const
185  {
186  return Ninteraction;
187  }
188 
189  /// Function that must return all the data involved
190  /// in the desired interactions from the external element
192  Vector<std::set<FiniteElement*>> const& external_elements_pt,
193  std::set<std::pair<Data*, unsigned>>& paired_interaction_data);
194 
195  /// Function that must return all geometric data involved
196  /// in the desired interactions from the external element
198  Vector<std::set<FiniteElement*>> const& external_elements_pt,
199  std::set<Data*>& external_geometric_data_pt);
200 
201  /// Return the number of Data items that affect the
202  /// external interactions in this element.
203  /// This includes e.g. fluid velocities
204  /// and pressures in adjacent fluid elements in an FSI problem
206  {
208  }
209 
210  /// Return vector of pointers to the field Data objects that
211  /// affect the interactions on the element.
213  {
214  // Find out how many external field data there are
215  const unsigned n_external_interaction_field_data =
217  // Create and populate a temporary vector
218  Vector<Data*> temp_data(n_external_interaction_field_data);
219  for (unsigned i = 0; i < n_external_interaction_field_data; i++)
220  {
221  temp_data[i] = External_interaction_field_data_pt[i];
222  }
223  // Return the temporary data
224  return temp_data;
225  }
226 
227 
228  /// Return the number of geometric Data items that affect the
229  /// external interactions in this element: i.e. any geometric Data
230  /// in the problem that affects the nodal positions in the
231  /// external elements.
233  {
235  }
236 
237  /// Are we including external geometric data in the element's Jacobian
239  {
241  }
242 
243  /// Are we including external data in the element's Jacobian
245  {
247  }
248 
249  /// Return vector of pointers to the geometric Data objects that
250  /// affect the interactions on the element.
252  {
253  // Find out how many external field data there are
254  const unsigned n_external_interaction_geometric_data =
256  // Create and populate a temporary vector
257  Vector<Data*> temp_data(n_external_interaction_geometric_data);
258  for (unsigned i = 0; i < n_external_interaction_geometric_data; i++)
259  {
261  }
262  // Return the temporary data
263  return temp_data;
264  }
265 
266  /// Do not include any external geometric data when computing
267  /// the element's Jacobian. This function should be
268  /// called if the external element does not move and/or if
269  /// the "source term" does not depend on spatial derivatives
270  /// of the field computed by the other element.
272  {
274  }
275 
276  /// Do not include any external interaction data when computing
277  /// the element's Jacobian
279  {
281  }
282 
283  /// Do include external geometric data when computing
284  /// the element's Jacobian. This function should be called
285  /// to re-enable inclusion of external geometric data.
287  {
289  }
290 
291  /// Do include external geometric data when computing the element's
292  /// Jacobian This function should be called
293  /// to re-enable inclusion of external interaction data
295  {
297  }
298 
299  /// Is the external geometric data taken into account when forming
300  /// the Jacobian?
302  {
304  }
305 
306  /// Function to describe the local dofs of the element. The ostream
307  /// specifies the output stream to which the description
308  /// is written; the string stores the currently
309  /// assembled output that is ultimately written to the
310  /// output stream by Data::describe_dofs(...); it is typically
311  /// built up incrementally as we descend through the
312  /// call hierarchy of this function when called from
313  /// Problem::describe_dofs(...)
314  void describe_local_dofs(std::ostream& out,
315  const std::string& curr_string) const;
316 
317  protected:
318  /// Overload the assign internal and external local equation
319  /// number scheme so that the interaction data is taken into account
321  const bool& store_local_dof_pt)
322  {
323  // Call the external stuff first so that it is near the front of the
324  // list for fast searches when using indexing by global dof for
325  // analytic calculation of interaction blocks.
327  store_local_dof_pt);
328  // Now call the underlying equation numbering
330  store_local_dof_pt);
331  }
332 
333  /// Assign the local equation numbers for those
334  /// Data values involved in the external interactions that
335  /// affect the residuals of the element
337  const bool& store_local_dof_pt);
338 
339 
340  /// Calculate the contributions to the jacobian from all external
341  /// interaction degrees of freedom (geometric and field data) in
342  /// the external element using finite differences.
343  /// This version of the function assumes that the residuals vector has
344  /// already been calculated.
346  Vector<double>& residuals, DenseMatrix<double>& jacobian)
347  {
348  // Get the contribution from the external field data
350  jacobian);
351  // Get the contribution from the external geometric data
353  jacobian);
354  }
355 
356  /// Calculate the contributions to the jacobian from all enternal
357  /// interaction degrees of freedom (geometric and field data) in
358  /// the external element using finite differences. This version computes
359  /// the residuals vector before calculating the jacobian terms.
361  DenseMatrix<double>& jacobian)
362  {
363  const unsigned n_dof = this->ndof();
364  // Allocate storage for the residuals
365  Vector<double> residuals(n_dof, 0.0);
366  // Get the residuals for the entire element
367  get_residuals(residuals);
368  // Call the jacobian calculation
370  }
371 
372 
373  /// Calculate the contributions to the jacobian from the external
374  /// interaction degrees of freedom associated with fields interpolated by
375  /// the external element using finite differences.
376  /// This version of the function assumes that the residuals vector has
377  /// already been calculated.
379  Vector<double>& residuals, DenseMatrix<double>& jacobian);
380 
381  /// Calculate the contributions to the jacobian from the enternal
382  /// interaction degrees of freedom associated with fields interpolated by
383  /// the external element using finite differences. This version computes
384  /// the residuals vector before calculating the jacobian terms.
386  DenseMatrix<double>& jacobian)
387  {
388  const unsigned n_dof = this->ndof();
389  // Allocate storage for the residuals
390  Vector<double> residuals(n_dof, 0.0);
391  // Get the residuals for the entire element
392  get_residuals(residuals);
393  // Call the jacobian calculation
395  jacobian);
396  }
397 
398  /// Calculate the contributions to the jacobian from the external
399  /// interaction degrees of freedom associated with the geometry of
400  /// the external elements using finite differences.
401  /// This version of the function assumes that the residuals vector has
402  /// already been calculated.
404  Vector<double>& residuals, DenseMatrix<double>& jacobian);
405 
406  /// Calculate the contributions to the jacobian from the
407  /// external
408  /// interaction degrees of freedom associated with the geometry of
409  /// the external elements using finite differences. This version computes
410  /// the residuals vector before calculating the jacobian terms.
412  DenseMatrix<double>& jacobian)
413  {
414  const unsigned n_dof = this->ndof();
415  // Allocate storage for the residuals
416  Vector<double> residuals(n_dof, 0.0);
417  // Get the residuals for the entire element
418  get_residuals(residuals);
419  // Call the jacobian calculation
421  jacobian);
422  }
423 
424  /// Fill in the element's contribution to the Jacobian matrix
425  /// and the residual vector: Done by finite differencing the
426  /// residual vector w.r.t. all nodal, internal, external and load Data.
428  DenseMatrix<double>& jacobian)
429  {
430  // Add the contribution to the residuals
432  // Allocate storage for the full residuals (residuals of entire element)
433  const unsigned n_dof = this->ndof();
434  Vector<double> full_residuals(n_dof);
435  // Get the residuals for the entire element
436  get_residuals(full_residuals);
437  // Add the internal and external by finite differences
438  fill_in_jacobian_from_internal_by_fd(full_residuals, jacobian);
439  fill_in_jacobian_from_external_by_fd(full_residuals, jacobian);
440  fill_in_jacobian_from_nodal_by_fd(full_residuals, jacobian);
442  jacobian);
443  }
444 
445 
446  /// Function that is called before the finite differencing of
447  /// any external interaction data associated with external fields.
448  /// This may be overloaded to update any dependent
449  /// data before finite differencing takes place.
451 
452  /// Function that is call after the finite differencing of
453  /// the external interaction data associated with external fields
454  /// This may be overloaded to reset any dependent
455  /// variables that may have changed during the finite differencing.
457 
458  /// Function called within the finite difference loop for
459  /// external interaction data after a change in any values in the i-th
460  /// external interaction data object associated with external fields.
462  const unsigned& i)
463  {
464  }
465 
466  /// Function called within the finite difference loop for
467  /// external interaction data after the values in the
468  /// i-th external interaction data object associated with external fields
469  /// are reset. The default behaviour is to call the update function.
471  const unsigned& i)
472  {
474  }
475 
476 
477  /// Function that is called before the finite differencing of
478  /// any external interaction data associated with external geometry.
479  /// This may be overloaded to update any dependent
480  /// data before finite differencing takes place.
482 
483  /// Function that is call after the finite differencing of
484  /// the external interaction data associated with external geometry.
485  /// This may be overloaded to reset any dependent
486  /// variables that may have changed during the finite differencing.
488 
489  /// Function called within the finite difference loop for
490  /// external interaction data after a change in any values in the i-th
491  /// external interaction data object associated with external geometry.
493  const unsigned& i)
494  {
495  }
496 
497  /// Function called within the finite difference loop for
498  /// external interaction data after the values in the
499  /// i-th external interaction data object associated with external geometry
500  /// are reset. The default behaviour is to call the update function.
502  const unsigned& i)
503  {
505  }
506 
507  /// Boolean flag to indicate whether to include the external data
509 
510  /// Boolean flag to indicate whether to include the external geometric data
512 
513  /// / Storage for pointers to external field Data that affect the
514  /// interactions in the elemenet
516 
517  /// / Storage for pointers to external geometric Data that affect the
518  /// interactions in the elemenet
520 
521  private:
522  /// Helper function to check that storage has actually been allocated
524  {
525  // If either of the storage arrays is zero, then storage has not
526  // yet been allocated. Both arrays are allocated at once, so
527  // if one is zero both will (should) be
529  {
530  std::ostringstream error_stream;
531  error_stream
532  << "Storage for the external elements has not been allocated.\n"
533  << "initialise_external_element_storage() must be called.\n"
534  << "This tends to be done automatically during the multi-domain\n"
535  << "setup procedures -- you're most likely to get this error\n"
536  << "because you have not specified the number of interactions\n"
537  << "that your ElementWithExternalElement is involved in.\n"
538  << "You ought to specify this with a call to\n\n"
539  << " ElementWithExternalElement::set_ninteraction(...)\n\n";
540  throw OomphLibError(
541  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
542  }
543  }
544 
545  /// Helper function for range checking in the access functions
546  void range_check(const unsigned& interaction_index,
547  const unsigned& ipt) const
548  {
549  // Boolean flag used to indicate range error
550  bool range_error = false;
551  // String for the error message
552  std::ostringstream error_message;
553  // If there is a range error in the interaction index
554  if (interaction_index >= Ninteraction)
555  {
556  error_message << "Range Error: Interaction " << interaction_index
557  << " is not in the range (0," << Ninteraction - 1 << ")";
558  // There has been a range error
559  range_error = true;
560  }
561 
562  // If there is a range error in the integration point
563  if (ipt >= Nintpt)
564  {
565  error_message << "Range Error: Integration point " << ipt
566  << " is not in the range (0," << Nintpt - 1 << ")";
567  range_error = true;
568  }
569 
570 
571  // If there has been a range error report it
572  if (range_error)
573  {
574  throw OomphLibError(error_message.str(),
575  OOMPH_CURRENT_FUNCTION,
576  OOMPH_EXCEPTION_LOCATION);
577  }
578  }
579 
580  /// Number of interactions
581  unsigned Ninteraction;
582 
583  /// Number of intergation point in the element
584  unsigned Nintpt;
585 
586  /// Number of entries in the external element storage schemes
587  /// (Nintergation_pt * Ninteraction)
589 
590  /// Number of external interaction field data
592 
593  /// Number of external interaction geometric data
595 
596 
597  /// Storage for pointers to elements that provide contributions
598  /// to the residuals of the current element. Potentially a different
599  /// element contributes to each integration point.
601 
602  /// Storage for vectors of local coordinates in
603  /// external elements that correspond to the appropriate integration
604  /// / point.
606 
607  /// Storage for the index of the values in the external field data
608  /// that affect the interactions in the element
610 
611  /// Storage for the local equation number associated with the
612  /// external field data the affect the interactions in the element
614 
615  /// Storage for the index of the values in the external
616  /// geometric data
617  /// that affect the interactions in the element
619 
620  /// Storage for the local equation number associated with the
621  /// external geometric data the affect the interactions in the element
623  };
624 } // namespace oomph
625 
626 #endif
cstr elem_len * i
Definition: cfortran.h:603
A class that represents a collection of data; each Data object may contain many different individual ...
Definition: nodes.h:86
This is a base class for all elements that require external sources (e.g. FSI, multi-domain problems ...
virtual void update_before_external_interaction_field_fd()
Function that is called before the finite differencing of any external interaction data associated wi...
void output_external_elements(std::ostream &outfile, const unsigned &interaction_index)
Output by plotting vector from integration point to corresponding point in external element for speci...
ElementWithExternalElement(const ElementWithExternalElement &)=delete
Broken copy constructor.
unsigned Nexternal_interaction_field_data
Number of external interaction field data.
Vector< double > & external_element_local_coord(const unsigned &interaction_index, const unsigned &ipt)
Access function to get source element's local coords for specified interaction index at specified int...
FiniteElement *const & external_element_pt(const unsigned &interaction_index, const unsigned &ipt) const
Access function to source element, const version.
bool storage_has_been_allocated() const
Helper function to check if storage has actually been allocated.
void set_ninteraction(const unsigned &n_interaction)
Set the number of interactions in the element This function is usually called in the specific element...
bool external_geometric_data_is_included() const
Is the external geometric data taken into account when forming the Jacobian?
void initialise_external_element_storage()
Initialise storage for pointers to external elements and their local coordinates. This must be called...
void include_external_geometric_data()
Do include external geometric data when computing the element's Jacobian. This function should be cal...
unsigned Nexternal_element_storage
Number of entries in the external element storage schemes (Nintergation_pt * Ninteraction)
virtual void update_before_external_interaction_geometric_fd()
Function that is called before the finite differencing of any external interaction data associated wi...
void operator=(const ElementWithExternalElement &)=delete
Broken assignment operator.
void describe_local_dofs(std::ostream &out, const std::string &curr_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
virtual void reset_in_external_interaction_geometric_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after the values in t...
FiniteElement *& external_element_pt(const unsigned &interaction_index, const unsigned &ipt)
Access function to source element for specified interaction index at specified integration point.
unsigned Nexternal_interaction_geometric_data
Number of external interaction geometric data.
virtual void reset_after_external_interaction_field_fd()
Function that is call after the finite differencing of the external interaction data associated with ...
virtual void identify_all_geometric_data_for_external_interaction(Vector< std::set< FiniteElement * >> const &external_elements_pt, std::set< Data * > &external_geometric_data_pt)
Function that must return all geometric data involved in the desired interactions from the external e...
bool add_external_geometric_data()
Are we including external geometric data in the element's Jacobian.
unsigned nexternal_interaction_geometric_data() const
Return the number of geometric Data items that affect the external interactions in this element: i....
unsigned * External_interaction_field_data_index
Storage for the index of the values in the external field data that affect the interactions in the el...
void fill_in_jacobian_from_external_interaction_field_by_fd(DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the enternal interaction degrees of freedom associat...
unsigned nexternal_interaction_field_data() const
Return the number of Data items that affect the external interactions in this element....
virtual void reset_in_external_interaction_field_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after the values in t...
virtual ~ElementWithExternalElement()
The destructor, clean up any allocated memory.
void ignore_external_interaction_data()
Do not include any external interaction data when computing the element's Jacobian.
void fill_in_jacobian_from_external_interaction_field_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the external interaction degrees of freedom associat...
void check_storage_allocated() const
Helper function to check that storage has actually been allocated.
FiniteElement ** External_element_pt
Storage for pointers to elements that provide contributions to the residuals of the current element....
void range_check(const unsigned &interaction_index, const unsigned &ipt) const
Helper function for range checking in the access functions.
Data ** External_interaction_field_data_pt
/ Storage for pointers to external field Data that affect the interactions in the elemenet
Vector< Data * > external_interaction_field_data_pt() const
Return vector of pointers to the field Data objects that affect the interactions on the element.
Vector< double > * External_element_local_coord
Storage for vectors of local coordinates in external elements that correspond to the appropriate inte...
int * External_interaction_field_data_local_eqn
Storage for the local equation number associated with the external field data the affect the interact...
void fill_in_jacobian_from_external_interaction_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from all external interaction degrees of freedom (geometr...
void fill_in_jacobian_from_external_interaction_by_fd(DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from all enternal interaction degrees of freedom (geometr...
virtual void reset_after_external_interaction_geometric_fd()
Function that is call after the finite differencing of the external interaction data associated with ...
bool Add_external_geometric_data
Boolean flag to indicate whether to include the external geometric data.
bool add_external_interaction_data()
Are we including external data in the element's Jacobian.
void include_external_interaction_data()
Do include external geometric data when computing the element's Jacobian This function should be call...
virtual void update_in_external_interaction_geometric_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after a change in any...
Data ** External_interaction_geometric_data_pt
/ Storage for pointers to external geometric Data that affect the interactions in the elemenet
void assign_internal_and_external_local_eqn_numbers(const bool &store_local_dof_pt)
Overload the assign internal and external local equation number scheme so that the interaction data i...
unsigned * External_interaction_geometric_data_index
Storage for the index of the values in the external geometric data that affect the interactions in th...
bool Add_external_interaction_data
Boolean flag to indicate whether to include the external data.
void fill_in_jacobian_from_external_interaction_geometric_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the external interaction degrees of freedom associat...
virtual void identify_all_field_data_for_external_interaction(Vector< std::set< FiniteElement * >> const &external_elements_pt, std::set< std::pair< Data *, unsigned >> &paired_interaction_data)
Function that must return all the data involved in the desired interactions from the external element...
void ignore_external_geometric_data()
Do not include any external geometric data when computing the element's Jacobian. This function shoul...
unsigned ninteraction() const
Return the number of interactions in the element.
Vector< Data * > external_interaction_geometric_data_pt() const
Return vector of pointers to the geometric Data objects that affect the interactions on the element.
void fill_in_jacobian_from_external_interaction_geometric_by_fd(DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the external interaction degrees of freedom associat...
void assign_external_interaction_data_local_eqn_numbers(const bool &store_local_dof_pt)
Assign the local equation numbers for those Data values involved in the external interactions that af...
unsigned Nintpt
Number of intergation point in the element.
unsigned Ninteraction
Number of interactions.
int * External_interaction_geometric_data_local_eqn
Storage for the local equation number associated with the external geometric data the affect the inte...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the element's contribution to the Jacobian matrix and the residual vector: Done by finite dif...
virtual void update_in_external_interaction_field_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after a change in any...
ElementWithExternalElement()
Constructor. Initialise member data and pointers to data associated with the external elements to zer...
void flush_all_external_element_storage()
Flush the storage for external elements.
Vector< double > const & external_element_local_coord(const unsigned &interaction_index, const unsigned &ipt) const
Access function to get source element's coords, const version.
A general Finite Element class.
Definition: elements.h:1313
virtual void fill_in_jacobian_from_nodal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the nodal degrees of freedom using finite difference...
Definition: elements.cc:3660
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the external degrees of freedom using finite differe...
Definition: elements.cc:1199
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the elemental contribution to the residuals vector. Note that this function will NOT initialise t...
Definition: elements.h:357
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differe...
Definition: elements.cc:1102
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
virtual void get_residuals(Vector< double > &residuals)
Calculate the vector of residuals of the equations in the element. By default initialise the vector t...
Definition: elements.h:980
virtual void assign_internal_and_external_local_eqn_numbers(const bool &store_local_dof_pt)
Assign the local equation numbers for the internal and external Data This must be called after the gl...
Definition: elements.cc:938
An OomphLibError object which should be thrown when an run-time error is encountered....
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...