oomph::GeneralisedElement Class Reference

#include <elements.h>

+ Inheritance diagram for oomph::GeneralisedElement:

Public Member Functions

 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual unsigned self_test ()
 
virtual void compute_norm (Vector< double > &norm)
 
virtual void compute_norm (double &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 

Static Public Attributes

static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 

Protected Member Functions

unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
virtual void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Static Protected Attributes

static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Private Attributes

unsigned long * Eqn_number
 
double ** Dof_pt
 
Data ** Data_pt
 
int ** Data_local_eqn
 
unsigned Ndof
 Number of degrees of freedom. More...
 
unsigned Ninternal_data
 Number of internal data. More...
 
unsigned Nexternal_data
 Number of external data. More...
 
std::vector< boolData_fd
 

Detailed Description

A Generalised Element class.

The main components of a GeneralisedElement are:

  • pointers to its internal and external Data, which are stored together in a single array so that we need only store one pointer. The internal Data are placed at the beginning of the array and the external Data are stored at the end.
  • a pointer to a global Time
  • a lookup table that establishes the relation between local and global equation numbers.

We also provide interfaces for functions that compute the element's Jacobian matrix and/or the Vector of residuals. In addition, an interface that returns a mass matrix — the matrix of terms that multiply any time derivatives in the problem — is also provided to permit explicit time-stepping and the solution of the generalised eigenproblems.

Constructor & Destructor Documentation

◆ GeneralisedElement() [1/2]

oomph::GeneralisedElement::GeneralisedElement ( )
inline

Constructor: Initialise all pointers and all values to zero.

597  : Eqn_number(0),
598  Dof_pt(0),
599  Data_pt(0),
600  Data_local_eqn(0),
601  Ndof(0),
602  Ninternal_data(0),
603  Nexternal_data(0)
604 #ifdef OOMPH_HAS_MPI
605  ,
606  Non_halo_proc_ID(-1),
607  Must_be_kept_as_halo(false)
608 #endif
609  {
610  }
unsigned long * Eqn_number
Definition: elements.h:77
int ** Data_local_eqn
Definition: elements.h:101
unsigned Ninternal_data
Number of internal data.
Definition: elements.h:107
unsigned Nexternal_data
Number of external data.
Definition: elements.h:110
unsigned Ndof
Number of degrees of freedom.
Definition: elements.h:104
Data ** Data_pt
Definition: elements.h:92
double ** Dof_pt
Definition: elements.h:84

◆ ~GeneralisedElement()

GeneralisedElement::~GeneralisedElement ( )
virtual

Virtual destructor to clean up any memory allocated by the object.

Destructor for generalised elements: Wipe internal data. Pointers to external data get NULLed but are not deleted because they are (generally) shared by lots of elements.

277  {
278  // Delete each of the objects stored as internal data
279  for (unsigned i = Ninternal_data; i > 0; i--)
280  {
281  // The objects are stored at the beginning of the Data_pt array
282  delete Data_pt[i - 1];
283  Data_pt[i - 1] = 0;
284  }
285 
286  // Now delete the storage for internal and external data
287  delete[] Data_pt;
288 
289  // Now if we have allocated storage for the local equation for
290  // the internal and external data, delete it.
291  if (Data_local_eqn)
292  {
293  delete[] Data_local_eqn[0];
294  delete[] Data_local_eqn;
295  }
296 
297  // Delete the storage for the global equation numbers
298  delete[] Eqn_number;
299  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9

References Data_local_eqn, Data_pt, Eqn_number, i, and Ninternal_data.

◆ GeneralisedElement() [2/2]

oomph::GeneralisedElement::GeneralisedElement ( const GeneralisedElement )
delete

Broken copy constructor.

Member Function Documentation

◆ add_external_data()

unsigned GeneralisedElement::add_external_data ( Data *const &  data_pt,
const bool fd = true 
)

Add a (pointer to an) external data object to the element and return its index (i.e. the index required to obtain it from the access function external_data_pt(...). The optional boolean flag indicates whether the data should be included in the general finite-difference loop when calculating the jacobian. The default value is true, i.e. the data will be included in the finite-differencing

Add a (pointer to an) external data object to the element and return the index required to obtain it from the access function external_data_pt()

309  {
310  // Find the numbers of internal and external data
311  const unsigned n_internal_data = Ninternal_data;
312  const unsigned n_external_data = Nexternal_data;
313  // Find out whether the data is already stored in the array
314 
315  // Loop over the number of externals
316  // The external data are stored at the end of the array Data_pt
317  for (unsigned i = 0; i < n_external_data; i++)
318  {
319  // If the passed pointer is stored in the array
320  if (external_data_pt(i) == data_pt)
321  {
322 #ifdef PARANOID
324  {
325  oomph_info << std::endl << std::endl;
326  oomph_info
327  << "---------------------------------------------------------------"
328  "--"
329  << std::endl
330  << "Info: Data is already included in this element's external "
331  "storage."
332  << std::endl
333  << "It's stored as entry " << i << " and I'm not adding it again"
334  << std::endl
335  << std::endl
336  << "Note: You can suppress this message by recompiling without"
337  << "\n PARANOID or setting the boolean \n"
338  << "\n "
339  "GeneralisedElement::Suppress_warning_about_repeated_external_"
340  "data"
341  << "\n\n to true." << std::endl
342  << "---------------------------------------------------------------"
343  "--"
344  << std::endl
345  << std::endl;
346  }
347 #endif
348  // Return the index to the data object
349  return i;
350  }
351  }
352 
353  // Allocate new storage for the pointers to data
354  Data** new_data_pt = new Data*[n_internal_data + n_external_data + 1];
355 
356  // Copy the old internal and external values across to the new array
357  for (unsigned i = 0; i < (n_internal_data + n_external_data); i++)
358  {
359  new_data_pt[i] = Data_pt[i];
360  }
361 
362  // Add the new data pointer to the end of the array
363  new_data_pt[n_internal_data + n_external_data] = data_pt;
364 
365  // Delete the storage associated with the previous values
366  delete[] Data_pt;
367 
368  // Set the pointer to the new storage
369  Data_pt = new_data_pt;
370 
371  // Resize the array of boolean flags
372  Data_fd.resize(n_internal_data + n_external_data + 1);
373  // Now add the new flag to the end of the external data
374  Data_fd[n_internal_data + n_external_data] = fd;
375 
376  // Increase the number of externals
377  ++Nexternal_data;
378 
379  // Return the final index to the new external data
380  return n_external_data;
381  }
static bool Suppress_warning_about_repeated_external_data
Definition: elements.h:700
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659
std::vector< bool > Data_fd
Definition: elements.h:122
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References Data_fd, Data_pt, external_data_pt(), i, Nexternal_data, Ninternal_data, oomph::oomph_info, and Suppress_warning_about_repeated_external_data.

Referenced by oomph::NavierStokesFluxControlElement< ELEMENT >::add_pressure_data(), oomph::TemplateFreeNavierStokesFluxControlElementBase::add_pressure_data(), oomph::NavierStokesWomersleyPressureControlElement::add_pressure_data(), oomph::StefanBoltzmannRadiationBase::add_stefan_boltzmann_illumination_info(), oomph::ConstraintElement::build(), oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >::complete_setup_of_dependencies(), oomph::HelmholtzDtNBoundaryElement< ELEMENT >::complete_setup_of_dependencies(), AirwayReopeningProblem< ELEMENT >::connect_walls(), oomph::DisplacementControlElement::DisplacementControlElement(), FSICollapsibleChannelProblem< ELEMENT >::FSICollapsibleChannelProblem(), oomph::HeightControlElement::HeightControlElement(), oomph::ImmersedRigidBodyElement::initialise(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::LinearisedAxisymPoroelasticBJS_FSIElement(), oomph::FixedVolumeSpineLineMarangoniFluidInterfaceElement< ELEMENT >::make_bounding_element(), oomph::NetFluxControlElement< ELEMENT >::NetFluxControlElement(), oomph::SolidICProblem::reset_original_state(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::set_boundary_shape_geom_object_pt(), HeatedCircularPenetratorElement::set_contact_element_mesh_pt(), CircularPenetratorElement::set_contact_element_mesh_pt(), oomph::ImmersedRigidBodyElement::set_drag_mesh(), oomph::LinearisedNavierStokesEquations::set_eigenfunction_normalisation_element(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::set_external_data_from_navier_stokes_outflow_mesh(), oomph::FluidInterfaceElement::set_external_pressure_data(), oomph::PolarNavierStokesTractionElement< ELEMENT >::set_external_pressure_data(), oomph::YoungLaplaceEquations::set_kappa(), oomph::ElasticallySupportedRingElement::set_load_pt(), oomph::SurfaceContactElementBase< ELEMENT >::set_penetrator_pt(), oomph::FluxConstraint::set_pressure_data(), oomph::WomersleyEquations< DIM >::set_pressure_gradient_and_add_as_external_data(), oomph::PseudoBucklingRingElement::set_reference_pressure_pt(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::set_translation_and_rotation(), oomph::VolumeConstraintBoundingElement::set_volume_constraint_element(), oomph::FoepplvonKarmanEquations::set_volume_constraint_pressure_data_as_external_data(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::set_wrapped_navier_stokes_element_pt(), oomph::DGFaceElement::setup_neighbour_info(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::store_reynolds_strouhal_as_external_data(), oomph::SpaceTimeNavierStokesEquations< DIM >::store_strouhal_as_external_data(), and oomph::VolumeConstraintElement::VolumeConstraintElement().

◆ add_global_eqn_numbers()

void GeneralisedElement::add_global_eqn_numbers ( std::deque< unsigned long > const &  global_eqn_numbers,
std::deque< double * > const &  global_dof_pt 
)
protected

Add the contents of the queue global_eqn_numbers to the local storage for the local-to-global translation scheme. It is essential that the entries in the queue are added IN ORDER i.e. from the front.

Add the contents of the queue global_eqn_numbers to the local storage for the equation numbers, which represents the local-to-global translation scheme. It is essential that the entries are added in order, i.e. from the front.

159  {
160  // Find the number of dofs
161  const unsigned n_dof = Ndof;
162  // Find the number of additional dofs
163  const unsigned n_additional_dof = global_eqn_numbers.size();
164  // If there are none, return immediately
165  if (n_additional_dof == 0)
166  {
167  return;
168  }
169 
170  // Find the new total number of equation numbers
171  const unsigned new_n_dof = n_dof + n_additional_dof;
172  // Create storage for all equations, initialised to NULL
173  unsigned long* new_eqn_number = new unsigned long[new_n_dof];
174 
175  // Copy over the existing values to the start new storage
176  for (unsigned i = 0; i < n_dof; i++)
177  {
178  new_eqn_number[i] = Eqn_number[i];
179  }
180 
181  // Set an index to the next position in the new storage
182  unsigned index = n_dof;
183  // Loop over the queue and add it's entries to our new storage
184  for (std::deque<unsigned long>::const_iterator it =
185  global_eqn_numbers.begin();
186  it != global_eqn_numbers.end();
187  ++it)
188  {
189  // Add the value to the storage
190  new_eqn_number[index] = *it;
191  // Increase the array index
192  ++index;
193  }
194 
195 
196  // If a non-empty dof deque has been passed then do stuff
197  const unsigned n_additional_dof_pt = global_dof_pt.size();
198  if (n_additional_dof_pt > 0)
199  {
200 // If it's size is not the same as the equation numbers complain
201 #ifdef PARANOID
202  if (n_additional_dof_pt != n_additional_dof)
203  {
204  std::ostringstream error_stream;
205  error_stream
206  << "global_dof_pt is non-empty, yet it does not have the same size\n"
207  << "as global_eqn_numbers.\n"
208  << "There are " << n_additional_dof << " equation numbers,\n"
209  << "but " << n_additional_dof_pt << std::endl;
210 
211  throw OomphLibError(
212  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
213  }
214 #endif
215 
216  // Create storge for all dofs initialised to NULL
217  double** new_dof_pt = new double*[new_n_dof];
218  // Copy over the exisiting values to the start of new storage
219  for (unsigned i = 0; i < n_dof; i++)
220  {
221  new_dof_pt[i] = Dof_pt[i];
222  }
223 
224  // Set an index to the next position in the new storage
225  unsigned index = n_dof;
226  // Loop over the queue and add it's entries to our new storage
227  for (std::deque<double*>::const_iterator it = global_dof_pt.begin();
228  it != global_dof_pt.end();
229  ++it)
230  {
231  // Add the value to the storage
232  new_dof_pt[index] = *it;
233  // Increase the array index
234  ++index;
235  }
236 
237  // Now delete the old storage
238  delete[] Dof_pt;
239  // Set the pointer to address the new storage
240  Dof_pt = new_dof_pt;
241  }
242 
243  // Now delete the old for the equation numbers storage
244  delete[] Eqn_number;
245  // Set the pointer to address the new storage
246  Eqn_number = new_eqn_number;
247  // Finally update the number of degrees of freedom
248  Ndof = new_n_dof;
249  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References Dof_pt, Eqn_number, i, Ndof, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::ElementWithMovingNodes::assign_all_generic_local_eqn_numbers(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), oomph::RefineableElement::assign_hanging_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), oomph::FiniteElement::assign_nodal_local_eqn_numbers(), oomph::RefineableSolidElement::assign_solid_hanging_local_eqn_numbers(), and oomph::SolidFiniteElement::assign_solid_local_eqn_numbers().

◆ add_internal_data()

unsigned GeneralisedElement::add_internal_data ( Data *const &  data_pt,
const bool fd = true 
)
protected

Add a (pointer to an) internal data object to the element and return the index required to obtain it from the access function internal_data_pt(). The boolean indicates whether the datum should be included in the general finite-difference loop when calculating the jacobian. The default value is true, i.e. the data will be included in the finite differencing.

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// Add a (pointer to an) internal data object to the element and return the index required to obtain it from the access function internal_data_pt()

64  {
65  // Local cache of numbers of internal and external data
66  const unsigned n_internal_data = Ninternal_data;
67  const unsigned n_external_data = Nexternal_data;
68 
69  // Find out whether the data is already stored in the array
70 
71  // Loop over the number of internals
72  // The internal data are stored at the beginning of the array
73  for (unsigned i = 0; i < n_internal_data; i++)
74  {
75  // If the passed pointer is stored in the array
76  if (internal_data_pt(i) == data_pt)
77  {
78 #ifdef PARANOID
80  {
81  oomph_info << std::endl << std::endl;
83  << "---------------------------------------------------------------"
84  "--"
85  << std::endl
86  << "Info: Data is already included in this element's internal "
87  "storage."
88  << std::endl
89  << "It's stored as entry " << i << " and I'm not adding it again."
90  << std::endl
91  << std::endl
92  << "Note: You can suppress this message by recompiling without"
93  << "\n PARANOID or setting the boolean \n"
94  << "\n "
95  "GeneralisedElement::Suppress_warning_about_repeated_internal_"
96  "data"
97  << "\n\n to true." << std::endl
98  << "---------------------------------------------------------------"
99  "--"
100  << std::endl
101  << std::endl;
102  }
103 #endif
104  // Return the index to the data object
105  return i;
106  }
107  }
108 
109  // Allocate new storage for the pointers to data
110  Data** new_data_pt = new Data*[n_internal_data + n_external_data + 1];
111 
112  // Copy the old internal values across to the beginning of the array
113  for (unsigned i = 0; i < n_internal_data; i++)
114  {
115  new_data_pt[i] = Data_pt[i];
116  }
117 
118  // Now add the new value to the end of the internal data
119  new_data_pt[n_internal_data] = data_pt;
120 
121  // Copy the external values across
122  for (unsigned i = 0; i < n_external_data; i++)
123  {
124  new_data_pt[n_internal_data + 1 + i] = Data_pt[n_internal_data + i];
125  }
126 
127  // Delete the storage associated with the previous values
128  delete[] Data_pt;
129 
130  // Set the pointer to the new storage
131  Data_pt = new_data_pt;
132 
133  // Resize the array of boolean flags
134  Data_fd.resize(n_internal_data + n_external_data + 1);
135  // Shuffle the flags for the external data to the end of the array
136  for (unsigned i = n_external_data; i > 0; i--)
137  {
138  Data_fd[n_internal_data + i] = Data_fd[n_internal_data + i - 1];
139  }
140  // Now add the new flag to the end of the internal data
141  Data_fd[n_internal_data] = fd;
142 
143  // Increase the number of internals
144  ++Ninternal_data;
145 
146  // Return the final index to the new internal data
147  return n_internal_data;
148  }
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
static bool Suppress_warning_about_repeated_internal_data
Definition: elements.h:696

References Data_fd, Data_pt, i, internal_data_pt(), Nexternal_data, Ninternal_data, oomph::oomph_info, and Suppress_warning_about_repeated_internal_data.

Referenced by oomph::AxisymmetricQCrouzeixRaviartElement::AxisymmetricQCrouzeixRaviartElement(), oomph::AxisymmetricTCrouzeixRaviartElement::AxisymmetricTCrouzeixRaviartElement(), oomph::AxisymQPVDElementWithPressure::AxisymQPVDElementWithPressure(), oomph::ODEElement::build(), oomph::ConstraintElement::construct_lagrange_multipliers(), oomph::NodeNodeMortaringElement::construct_lagrange_multipliers(), oomph::DisplacementControlElement::DisplacementControlElement(), oomph::ElasticallySupportedRingElement::ElasticallySupportedRingElement(), oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, MESH >::FoepplvonKarmanVolumeConstraintElement(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement(), oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >::GeneralisedNewtonianQCrouzeixRaviartElement(), oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >::GeneralisedNewtonianTCrouzeixRaviartElement(), HeatedCircularPenetratorElement::HeatedCircularPenetratorElement(), oomph::HeightControlElement::HeightControlElement(), oomph::ImposeFluxForWomersleyElement< DIM >::ImposeFluxForWomersleyElement(), oomph::ImmersedRigidBodyElement::initialise(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::LinearisedAxisymmetricQCrouzeixRaviartElement(), oomph::LinearisedNavierStokesEigenfunctionNormalisationElement::LinearisedNavierStokesEigenfunctionNormalisationElement(), oomph::LinearisedQCrouzeixRaviartElement::LinearisedQCrouzeixRaviartElement(), oomph::NavierStokesWomersleyPressureControlElement::NavierStokesWomersleyPressureControlElement(), oomph::NetFluxControlElement< ELEMENT >::NetFluxControlElement(), oomph::NodeElementSolidOnlyMortaringElement::NodeElementSolidOnlyMortaringElement(), oomph::PolarCrouzeixRaviartElement::PolarCrouzeixRaviartElement(), oomph::PseudoBucklingRingElement::PseudoBucklingRingElement(), oomph::QCrouzeixRaviartElement< DIM >::QCrouzeixRaviartElement(), oomph::QPVDElementWithPressure< DIM >::QPVDElementWithPressure(), oomph::QSphericalCrouzeixRaviartElement::QSphericalCrouzeixRaviartElement(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::SingularNavierStokesSolutionElement(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::TAxisymmetricPoroelasticityElement(), oomph::TCrouzeixRaviartElement< DIM >::TCrouzeixRaviartElement(), oomph::TPoroelasticityElement< ORDER >::TPoroelasticityElement(), oomph::TRaviartThomasDarcyElement< ORDER >::TRaviartThomasDarcyElement(), oomph::VolumeConstraintElement::VolumeConstraintElement(), and ZeroResidualGenElement::ZeroResidualGenElement().

◆ add_internal_value_pt_to_map()

void GeneralisedElement::add_internal_value_pt_to_map ( std::map< unsigned, double * > &  map_of_value_pt)

Add pointers to the internal data values to map indexed by the global equation number.

This function loops over the internal data of the element and add pointers to their unconstrained values to a map indexed by the global equation number.

613  {
614  // Loop over the internal data and add their data to the map
615  // The internal data are stored at the beginning of the Data_pt array
616  for (unsigned i = 0; i < Ninternal_data; i++)
617  {
618  internal_data_pt(i)->add_value_pt_to_map(map_of_value_pt);
619  }
620  }
virtual void add_value_pt_to_map(std::map< unsigned, double * > &map_of_value_pt)
Definition: nodes.cc:1089

References oomph::Data::add_value_pt_to_map(), i, internal_data_pt(), and Ninternal_data.

◆ assign_additional_local_eqn_numbers()

virtual void oomph::GeneralisedElement::assign_additional_local_eqn_numbers ( )
inlineprotectedvirtual

◆ assign_all_generic_local_eqn_numbers()

virtual void oomph::GeneralisedElement::assign_all_generic_local_eqn_numbers ( const bool store_local_dof_pt)
inlineprotectedvirtual

Assign all the local equation numbering schemes that can be applied generically for the element. In most cases, this is the function that will be overloaded by inherited classes. It is required to ensure that assign_additional_local_eqn_numbers() can always be called after ALL other local equation numbering has been performed. The default for the GeneralisedElement is simply to call internal and external local equation numbering. If the boolean argument is true then pointers to the dofs will be stored in Dof_pt

Reimplemented in oomph::RefineableQSpectralPoissonElement< DIM, NNODE_1D >, oomph::SpectralElement, oomph::FaceElementAsGeomObject< ELEMENT >, oomph::SolidFiniteElement, oomph::FiniteElement, oomph::ElementWithSpecificMovingNodes< ELEMENT, NODE_TYPE >, oomph::ElementWithSpecificMovingNodes< ELEMENT, SpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, PerturbedSpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, AlgebraicNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, MacroElementNodeUpdateNode >, and oomph::ElementWithMovingNodes.

255  {
256  this->assign_internal_and_external_local_eqn_numbers(store_local_dof_pt);
257  }
virtual void assign_internal_and_external_local_eqn_numbers(const bool &store_local_dof_pt)
Definition: elements.cc:938

References assign_internal_and_external_local_eqn_numbers().

Referenced by oomph::FiniteElement::assign_all_generic_local_eqn_numbers(), and assign_local_eqn_numbers().

◆ assign_internal_and_external_local_eqn_numbers()

void GeneralisedElement::assign_internal_and_external_local_eqn_numbers ( const bool store_local_dof_pt)
protectedvirtual

Assign the local equation numbers for the internal and external Data This must be called after the global equation numbers have all been assigned. It is virtual so that it can be overloaded by ElementWithExternalElements so that any external data from the external elements in included in the numbering scheme. If the boolean argument is true then pointers to the dofs will be stored in Dof_pt

This function loops over the internal and external data of the element, adds the GLOBAL equation numbers to the local-to-global look-up scheme and fills in the look-up schemes for the local equation numbers. If the boolean argument is true then pointers to the dofs will be stored in Dof_pt

Reimplemented in oomph::ElementWithExternalElement.

940  {
941  // Find the number of internal and external data
942  const unsigned n_internal_data = Ninternal_data;
943  const unsigned n_external_data = Nexternal_data;
944  // Find the total number of data
945  const unsigned n_total_data = n_internal_data + n_external_data;
946 
947  // If there is data
948  if (n_total_data > 0)
949  {
950  // Find the number of local equations assigned so far
951  unsigned local_eqn_number = ndof();
952 
953  // We need to find the total number of values stored in all the
954  // internal and external data
955  // Initialise to the number stored in the first data object
956  unsigned n_total_values = Data_pt[0]->nvalue();
957  // Loop over the other data and add the number of values stored
958  for (unsigned i = 1; i < n_total_data; ++i)
959  {
960  n_total_values += Data_pt[i]->nvalue();
961  }
962 
963  // If allocated delete the old storage
964  if (Data_local_eqn)
965  {
966  delete[] Data_local_eqn[0];
967  delete[] Data_local_eqn;
968  }
969 
970  // If there are no values then we are done, null out the storage and
971  // return
972  if (n_total_values == 0)
973  {
974  Data_local_eqn = 0;
975  return;
976  }
977 
978  // Allocate the storage for the local equation numbers
979  // The idea is that we store internal equation numbers followed by
980  // external equation numbers
981 
982  // Firstly allocate pointers to the rows for each data item
983  Data_local_eqn = new int*[n_total_data];
984  // Now allocate storage for all the equation numbers
985  Data_local_eqn[0] = new int[n_total_values];
986  // Set all values to be unclassified
987  for (unsigned i = 0; i < n_total_values; ++i)
988  {
990  }
991 
992  // Loop over the remaining rows and set their pointers
993  for (unsigned i = 1; i < n_total_data; ++i)
994  {
995  // Initially set the pointer to the i-th row to the pointer
996  // to the i-1th row
998  // Now increase the row pointer by the number of values
999  // stored at the i-1th data object
1000  Data_local_eqn[i] += Data_pt[i - 1]->nvalue();
1001  }
1002 
1003  // A local queue to store the global equation numbers
1004  std::deque<unsigned long> global_eqn_number_queue;
1005 
1006  // Now loop over the internal data and assign local equation numbers
1007  for (unsigned i = 0; i < n_internal_data; i++)
1008  {
1009  // Pointer to the internal data
1010  Data* const data_pt = internal_data_pt(i);
1011  // Find the number of values stored at the internal data
1012  unsigned n_value = data_pt->nvalue();
1013 
1014  // Loop over the number of values
1015  for (unsigned j = 0; j < n_value; j++)
1016  {
1017  // Get the GLOBAL equation number
1018  long eqn_number = data_pt->eqn_number(j);
1019  // If the GLOBAL equation number is positive (a free variable)
1020  if (eqn_number >= 0)
1021  {
1022  // Add the GLOBAL equation number to the queue
1023  global_eqn_number_queue.push_back(eqn_number);
1024  // Add pointer to the dof to the queue if required
1025  if (store_local_dof_pt)
1026  {
1027  GeneralisedElement::Dof_pt_deque.push_back(data_pt->value_pt(j));
1028  }
1029  // Add the local equation number to the storage scheme
1031  // Increase the local number
1032  local_eqn_number++;
1033  }
1034  else
1035  {
1036  // Set the local scheme to be pinned
1038  }
1039  }
1040  } // End of loop over internal data
1041 
1042 
1043  // Now loop over the external data and assign local equation numbers
1044  for (unsigned i = 0; i < n_external_data; i++)
1045  {
1046  // Pointer to the external data
1047  Data* const data_pt = external_data_pt(i);
1048  // Find the number of values stored at the external data
1049  unsigned n_value = data_pt->nvalue();
1050 
1051  // Loop over the number of values
1052  for (unsigned j = 0; j < n_value; j++)
1053  {
1054  // Get the GLOBAL equation number
1055  long eqn_number = data_pt->eqn_number(j);
1056  // If the GLOBAL equation number is positive (a free variable)
1057  if (eqn_number >= 0)
1058  {
1059  // Add the GLOBAL equation number to the queue
1060  global_eqn_number_queue.push_back(eqn_number);
1061  // Add pointer to the dof to the queue if required
1062  if (store_local_dof_pt)
1063  {
1064  GeneralisedElement::Dof_pt_deque.push_back(data_pt->value_pt(j));
1065  }
1066  // Add the local equation number to the local scheme
1067  Data_local_eqn[n_internal_data + i][j] = local_eqn_number;
1068  // Increase the local number
1069  local_eqn_number++;
1070  }
1071  else
1072  {
1073  // Set the local scheme to be pinned
1074  Data_local_eqn[n_internal_data + i][j] = Data::Is_pinned;
1075  }
1076  }
1077  }
1078 
1079  // Now add our global equations numbers to the internal element storage
1080  add_global_eqn_numbers(global_eqn_number_queue,
1082  // Clear the memory used in the deque
1083  if (store_local_dof_pt)
1084  {
1085  std::deque<double*>().swap(GeneralisedElement::Dof_pt_deque);
1086  }
1087  }
1088  }
static long Is_pinned
Static "Magic number" to indicate pinned values.
Definition: nodes.h:183
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
static long Is_unclassified
Definition: nodes.h:192
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
static std::deque< double * > Dof_pt_deque
Definition: elements.h:231
int local_eqn_number(const unsigned long &ieqn_global) const
Definition: elements.h:726
void add_global_eqn_numbers(std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
Definition: elements.cc:156
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References add_global_eqn_numbers(), Data_local_eqn, Data_pt, Dof_pt_deque, oomph::Data::eqn_number(), eqn_number(), external_data_pt(), i, internal_data_pt(), oomph::Data::Is_pinned, oomph::Data::Is_unclassified, j, local_eqn_number(), ndof(), Nexternal_data, Ninternal_data, oomph::Data::nvalue(), and oomph::Data::value_pt().

Referenced by assign_all_generic_local_eqn_numbers(), and oomph::ElementWithExternalElement::assign_internal_and_external_local_eqn_numbers().

◆ assign_internal_eqn_numbers()

void GeneralisedElement::assign_internal_eqn_numbers ( unsigned long &  global_number,
Vector< double * > &  Dof_pt 
)

Assign the global equation numbers to the internal Data. The arguments are the current highest global equation number (which will be incremented) and a Vector of pointers to the global variables (to which any unpinned values in the internal Data are added).

This function loops over the internal data of the element and assigns GLOBAL equation numbers to the data objects.

Pass:

  • the current total number of dofs, global_number, which gets incremented.
  • Dof_pt, the Vector of pointers to the global dofs (to which any internal dofs are added).
531  {
532  // Loop over the internal data and assign the equation numbers
533  // The internal data are stored at the beginning of the Data_pt array
534  for (unsigned i = 0; i < Ninternal_data; i++)
535  {
536  internal_data_pt(i)->assign_eqn_numbers(global_number, Dof_pt);
537  }
538  }
virtual void assign_eqn_numbers(unsigned long &global_ndof, Vector< double * > &dof_pt)
Definition: nodes.cc:896

References oomph::Data::assign_eqn_numbers(), Dof_pt, i, internal_data_pt(), and Ninternal_data.

◆ assign_local_eqn_numbers()

void GeneralisedElement::assign_local_eqn_numbers ( const bool store_local_dof_pt)
virtual

Setup the arrays of local equation numbers for the element. If the optional boolean argument is true, then pointers to the associated degrees of freedom are stored locally in the array Dof_pt

Setup the arrays of local equation numbers for the element. In general, this function should not need to be overloaded. Instead the function assign_all_generic_local_eqn_numbers() will be overloaded by different types of Element. That said, the function is virtual so that it may be overloaded by the user if they really know what they are doing.

Reimplemented in oomph::Hijacked< PerturbedSpineElement< FaceGeometry< ELEMENT > > >, oomph::Hijacked< SpineElement< FaceGeometry< FaceGeometry< ELEMENT > > > >, and oomph::Hijacked< SpineElement< FaceGeometry< ELEMENT > > >.

693  {
695  assign_all_generic_local_eqn_numbers(store_local_dof_pt);
697 
698  // Check that no global equation numbers are repeated
699 #ifdef PARANOID
700 
701  std::ostringstream error_stream;
702 
703  // Loop over the array of equation numbers and add to set to assess
704  // uniqueness
705  std::map<unsigned, bool> is_repeated;
706  std::set<unsigned long> set_of_global_eqn_numbers;
707  unsigned old_ndof = 0;
708  for (unsigned n = 0; n < Ndof; ++n)
709  {
710  set_of_global_eqn_numbers.insert(Eqn_number[n]);
711  if (set_of_global_eqn_numbers.size() == old_ndof)
712  {
713  error_stream << "Repeated global eqn: " << Eqn_number[n] << std::endl;
714  is_repeated[Eqn_number[n]] = true;
715  }
716  old_ndof = set_of_global_eqn_numbers.size();
717  }
718 
719  // If the sizes do not match we have a repeat, throw an error
720  if (set_of_global_eqn_numbers.size() != Ndof)
721  {
722 #ifdef OOMPH_HAS_MPI
723  error_stream << "Element is ";
724  if (!is_halo()) error_stream << "not ";
725  error_stream << "a halo element\n\n";
726 #endif
727  error_stream << "\nLocal/lobal equation numbers: " << std::endl;
728  for (unsigned n = 0; n < Ndof; ++n)
729  {
730  error_stream << " " << n << " " << Eqn_number[n] << std::endl;
731  }
732 
733  // It's helpful for debugging purposes to output more about this element
734  error_stream << std::endl << " element address is " << this << std::endl;
735 
736  // Check if the repeated dofs are among the internal Data values
737  unsigned nint = this->ninternal_data();
738  error_stream << "Number of internal data " << nint << std::endl;
739  for (unsigned i = 0; i < nint; i++)
740  {
741  Data* data_pt = this->internal_data_pt(i);
742  unsigned nval = data_pt->nvalue();
743  for (unsigned j = 0; j < nval; j++)
744  {
745  int eqn_no = data_pt->eqn_number(j);
746  error_stream << "Internal dof: " << eqn_no << std::endl;
747  if (is_repeated[unsigned(eqn_no)])
748  {
749  error_stream << "Repeated internal dof: " << eqn_no << std::endl;
750  }
751  }
752  }
753 
754  // Check if the repeated dofs are among the external Data values
755  unsigned next = this->nexternal_data();
756  error_stream << "Number of external data " << next << std::endl;
757  for (unsigned i = 0; i < next; i++)
758  {
759  Data* data_pt = this->external_data_pt(i);
760  unsigned nval = data_pt->nvalue();
761  for (unsigned j = 0; j < nval; j++)
762  {
763  int eqn_no = data_pt->eqn_number(j);
764  error_stream << "External dof: " << eqn_no << std::endl;
765  if (is_repeated[unsigned(eqn_no)])
766  {
767  error_stream << "Repeated external dof: " << eqn_no;
768  Node* nod_pt = dynamic_cast<Node*>(data_pt);
769  if (nod_pt != 0)
770  {
771  error_stream << " (is a node at: ";
772  unsigned ndim = nod_pt->ndim();
773  for (unsigned ii = 0; ii < ndim; ii++)
774  {
775  error_stream << nod_pt->x(ii) << " ";
776  }
777  }
778  error_stream << ")\n";
779  }
780  }
781  }
782 
783 
784  // If it's an element with external element check the associated
785  // Data
786  ElementWithExternalElement* e_el_pt =
787  dynamic_cast<ElementWithExternalElement*>(this);
788  if (e_el_pt != 0)
789  {
790  // Check if the repeated dofs are among the external Data values
791  {
792  unsigned next = e_el_pt->nexternal_interaction_field_data();
793  error_stream << "Number of external element data " << next
794  << std::endl;
795  Vector<Data*> data_pt(e_el_pt->external_interaction_field_data_pt());
796  for (unsigned i = 0; i < next; i++)
797  {
798  unsigned nval = data_pt[i]->nvalue();
799  for (unsigned j = 0; j < nval; j++)
800  {
801  int eqn_no = data_pt[i]->eqn_number(j);
802  error_stream << "External element dof: " << eqn_no << std::endl;
803  if (is_repeated[unsigned(eqn_no)])
804  {
805  error_stream << "Repeated external element dof: " << eqn_no;
806  Node* nod_pt = dynamic_cast<Node*>(data_pt[i]);
807  if (nod_pt != 0)
808  {
809  error_stream << " (is a node at: ";
810  unsigned ndim = nod_pt->ndim();
811  for (unsigned ii = 0; ii < ndim; ii++)
812  {
813  error_stream << nod_pt->x(ii) << " ";
814  }
815  }
816  error_stream << ")\n";
817  }
818  }
819  }
820  }
821 
822 
823  // Check if the repeated dofs are among the external geom Data values
824  {
825  unsigned next = e_el_pt->nexternal_interaction_geometric_data();
826  error_stream << "Number of external element geom data " << next
827  << std::endl;
828  Vector<Data*> data_pt(
829  e_el_pt->external_interaction_geometric_data_pt());
830  for (unsigned i = 0; i < next; i++)
831  {
832  unsigned nval = data_pt[i]->nvalue();
833  for (unsigned j = 0; j < nval; j++)
834  {
835  int eqn_no = data_pt[i]->eqn_number(j);
836  error_stream << "External element geometric dof: " << eqn_no
837  << std::endl;
838  if (is_repeated[unsigned(eqn_no)])
839  {
840  error_stream
841  << "Repeated external element geometric dof: " << eqn_no
842  << " " << data_pt[i]->value(j);
843  Node* nod_pt = dynamic_cast<Node*>(data_pt[i]);
844  if (nod_pt != 0)
845  {
846  error_stream << " (is a node at: ";
847  unsigned ndim = nod_pt->ndim();
848  for (unsigned ii = 0; ii < ndim; ii++)
849  {
850  error_stream << nod_pt->x(i) << " ";
851  }
852  error_stream << ")";
853  }
854  error_stream << "\n";
855  }
856  }
857  }
858  }
859  }
860 
861  // If it's a FiniteElement then output its nodes
862  FiniteElement* f_el_pt = dynamic_cast<FiniteElement*>(this);
863  if (f_el_pt != 0)
864  {
865  unsigned n_node = f_el_pt->nnode();
866  for (unsigned n = 0; n < n_node; n++)
867  {
868  Node* nod_pt = f_el_pt->node_pt(n);
869  unsigned nval = nod_pt->nvalue();
870  for (unsigned j = 0; j < nval; j++)
871  {
872  int eqn_no = nod_pt->eqn_number(j);
873  error_stream << "Node " << n << ": Nodal dof: " << eqn_no;
874  if (eqn_no >= 0)
875  {
876  if (is_repeated[unsigned(eqn_no)])
877  {
878  error_stream << "Node " << n
879  << ": Repeated nodal dof: " << eqn_no;
880  if (j >= f_el_pt->required_nvalue(n))
881  {
882  error_stream << " (resized)";
883  }
884  error_stream << std::endl;
885  }
886  }
887  }
888  SolidNode* solid_nod_pt = dynamic_cast<SolidNode*>(nod_pt);
889  if (solid_nod_pt != 0)
890  {
891  Data* data_pt = solid_nod_pt->variable_position_pt();
892  unsigned nval = data_pt->nvalue();
893  for (unsigned j = 0; j < nval; j++)
894  {
895  int eqn_no = data_pt->eqn_number(j);
896  error_stream << "Node " << n << ": Positional dof: " << eqn_no
897  << std::endl;
898  if (is_repeated[unsigned(eqn_no)])
899  {
900  error_stream << "Repeated positional dof: " << eqn_no << " "
901  << data_pt->value(j) << std::endl;
902  }
903  }
904  }
905  }
906 
907  // Output nodal coordinates of element
908  n_node = f_el_pt->nnode();
909  for (unsigned n = 0; n < n_node; n++)
910  {
911  Node* nod_pt = f_el_pt->node_pt(n);
912  unsigned n_dim = nod_pt->ndim();
913  error_stream << "Node " << n << " at ( ";
914  for (unsigned i = 0; i < n_dim; i++)
915  {
916  error_stream << nod_pt->x(i) << " ";
917  }
918  error_stream << ")" << std::endl;
919  }
920  }
921 
922 
923  throw OomphLibError(
924  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
925  }
926 #endif
927  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
unsigned nexternal_data() const
Return the number of external data objects.
Definition: elements.h:829
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Definition: elements.h:253
virtual void assign_additional_local_eqn_numbers()
Definition: elements.h:263
unsigned ninternal_data() const
Return the number of internal data objects.
Definition: elements.h:823
void clear_global_eqn_numbers()
Definition: elements.h:207

References assign_additional_local_eqn_numbers(), assign_all_generic_local_eqn_numbers(), clear_global_eqn_numbers(), Eqn_number, oomph::Data::eqn_number(), external_data_pt(), oomph::ElementWithExternalElement::external_interaction_field_data_pt(), oomph::ElementWithExternalElement::external_interaction_geometric_data_pt(), i, internal_data_pt(), j, n, oomph::Node::ndim(), Ndof, nexternal_data(), oomph::ElementWithExternalElement::nexternal_interaction_field_data(), oomph::ElementWithExternalElement::nexternal_interaction_geometric_data(), ninternal_data(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::FiniteElement::required_nvalue(), oomph::Data::value(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

◆ clear_global_eqn_numbers()

void oomph::GeneralisedElement::clear_global_eqn_numbers ( )
inlineprotected

Clear the storage for the global equation numbers and pointers to dofs (if stored)

208  {
209  delete[] Eqn_number;
210  Eqn_number = 0;
211  delete[] Dof_pt;
212  Dof_pt = 0;
213  Ndof = 0;
214  }

References Dof_pt, Eqn_number, and Ndof.

Referenced by assign_local_eqn_numbers().

◆ complete_setup_of_dependencies()

virtual void oomph::GeneralisedElement::complete_setup_of_dependencies ( )
inlinevirtual

Complete the setup of any additional dependencies that the element may have. Empty virtual function that may be overloaded for specific derived elements. Used, e.g., for elements with algebraic node update functions to determine the "geometric Data", i.e. the Data that affects the element's shape. This function is called (for all elements) at the very beginning of the equation numbering procedure to ensure that all dependencies are accounted for.

Reimplemented in oomph::HelmholtzDtNBoundaryElement< ELEMENT >, oomph::SpineElement< ELEMENT >, oomph::SpineElement< PointElement >, oomph::SpineElement< FaceGeometry< ELEMENT > >, oomph::ElementWithSpecificMovingNodes< ELEMENT, NODE_TYPE >, oomph::ElementWithSpecificMovingNodes< ELEMENT, SpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, PerturbedSpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, AlgebraicNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, MacroElementNodeUpdateNode >, oomph::ElementWithMovingNodes, oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >, and oomph::PerturbedSpineElement< ELEMENT >.

974 {}

Referenced by oomph::Problem::assign_eqn_numbers().

◆ compute_norm() [1/2]

virtual void oomph::GeneralisedElement::compute_norm ( double norm)
inlinevirtual

Compute norm of solution – broken virtual can be overloaded by element writer to implement whatever norm is desired for the specific element

Reimplemented in oomph::UnsteadyHeatEquations< DIM >, oomph::UnsteadyHeatEquations< 2 >, oomph::TimeHarmonicLinearElasticityEquations< DIM >, oomph::TimeHarmonicFourierDecomposedLinearElasticityEquations, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::PoissonEquations< DIM >, oomph::PoissonEquations< 1 >, oomph::PoissonEquations< 2 >, oomph::PoissonEquations< 3 >, oomph::PMLTimeHarmonicLinearElasticityEquations< DIM >, oomph::PMLHelmholtzEquations< DIM >, oomph::PMLFourierDecomposedHelmholtzEquations, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::FourierDecomposedHelmholtzEquations, oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >, oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::AxisymmetricQAdvectionCrouzeixRaviartElement, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::SolidFiniteElement, and QThermalPVDElement< DIM >.

1141  {
1142  std::string error_message = "compute_norm undefined for this element \n";
1143  throw OomphLibError(
1145  }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

◆ compute_norm() [2/2]

virtual void oomph::GeneralisedElement::compute_norm ( Vector< double > &  norm)
inlinevirtual

Compute norm of solution – broken virtual can be overloaded by element writer to implement whatever norm is desired for the specific element

Reimplemented in oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::NavierStokesEquations< DIM >, and oomph::NavierStokesEquations< 2 >.

1129  {
1130  std::string error_message =
1131  "compute_norm(...) undefined for this element\n";
1132  throw OomphLibError(
1134  }

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::compute_norm(), and oomph::Mesh::compute_norm().

◆ describe_dofs()

void GeneralisedElement::describe_dofs ( std::ostream &  out,
const std::string &  current_string 
) const

Function to describe the dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Function to describe the dofs of the Element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

553  {
554  for (unsigned i = 0; i < Ninternal_data; i++)
555  {
556  std::stringstream conversion;
557  conversion << " of Internal Data " << i << current_string;
558  std::string in(conversion.str());
560  }
561  }
virtual void describe_dofs(std::ostream &out, const std::string &current_string) const
Definition: nodes.cc:939
std::ofstream out("Result.txt")

References oomph::Data::describe_dofs(), i, internal_data_pt(), Ninternal_data, out(), and oomph::Global_string_for_annotation::string().

◆ describe_local_dofs()

void GeneralisedElement::describe_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
virtual

Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Reimplemented in DistanceWrapper< ELEMENT >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableQSpectralPoissonElement< DIM, NNODE_1D >, oomph::SpectralElement, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::ProjectableElement< ELEMENT >, oomph::ProjectableElement< FVK_ELEMENT >, oomph::ProjectableElement< AXISYM_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< UNSTEADY_HEAT_ELEMENT >, oomph::ProjectableElement< LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< CROUZEIX_RAVIART_ELEMENT >, oomph::ProjectableElement< HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< AXISYMMETRIC_POROELASTICITY_ELEMENT >, oomph::ProjectableElement< TAYLOR_HOOD_ELEMENT >, oomph::ProjectableElement< PVD_ELEMENT >, oomph::ProjectableElement< ADR_ELEMENT >, oomph::ProjectableElement< DARCY_ELEMENT >, oomph::ProjectableElement< POISSON_ELEMENT >, oomph::ProjectableElement< FOURIER_DECOMPOSED_HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< TIME_HARMONIC_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< LINEAR_HEAT_AND_ELAST_ELEMENT >, oomph::FSIWallElement, oomph::FaceElementAsGeomObject< ELEMENT >, oomph::SolidFiniteElement, oomph::FiniteElement, oomph::ElementWithSpecificMovingNodes< ELEMENT, NODE_TYPE >, oomph::ElementWithSpecificMovingNodes< ELEMENT, SpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, PerturbedSpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, AlgebraicNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, MacroElementNodeUpdateNode >, oomph::ElementWithMovingNodes, oomph::HeatedLinearSurfaceContactElement< ELEMENT >, and oomph::ElementWithExternalElement.

575  {
576  // Find the number of internal and external data
577  const unsigned n_internal_data = Ninternal_data;
578  const unsigned n_external_data = Nexternal_data;
579 
580  // Now loop over the internal data and describe local equation numbers
581  for (unsigned i = 0; i < n_internal_data; i++)
582  {
583  // Pointer to the internal data
584  Data* const data_pt = internal_data_pt(i);
585 
586  std::stringstream conversion;
587  conversion << " of Internal Data " << i << current_string;
588  std::string in(conversion.str());
589  data_pt->describe_dofs(out, in);
590  }
591 
592 
593  // Now loop over the external data and assign local equation numbers
594  for (unsigned i = 0; i < n_external_data; i++)
595  {
596  // Pointer to the external data
597  Data* const data_pt = external_data_pt(i);
598 
599  std::stringstream conversion;
600  conversion << " of External Data " << i << current_string;
601  std::string in(conversion.str());
602  data_pt->describe_dofs(out, in);
603  }
604  }

References oomph::Data::describe_dofs(), external_data_pt(), i, internal_data_pt(), Nexternal_data, Ninternal_data, out(), and oomph::Global_string_for_annotation::string().

Referenced by oomph::ElementWithExternalElement::describe_local_dofs(), and oomph::FiniteElement::describe_local_dofs().

◆ dof_pt_vector()

void oomph::GeneralisedElement::dof_pt_vector ( Vector< double * > &  dof_pt)
inline

Return the vector of pointers to dof values.

867  {
868  // Check that the internal storage has been set up
869 #ifdef PARANOID
870  if (Dof_pt == 0)
871  {
872  std::stringstream error_stream;
873  error_stream << "Internal dof array not set up in element.\n"
874  << "In order to set it up you must call\n"
875  << " Problem::enable_store_local_dof_in_elements()\n"
876  << "before the call to Problem::assign_eqn_numbers()\n";
877  throw OomphLibError(
878  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
879  }
880 #endif
881  // Resize the vector
882  dof_pt.resize(this->Ndof);
883  // Loop over the vector and fill in the desired values
884  for (unsigned i = 0; i < this->Ndof; ++i)
885  {
886  dof_pt[i] = Dof_pt[i];
887  }
888  }

References Dof_pt, i, Ndof, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::AssemblyHandler::dof_pt_vector().

◆ dof_vector()

void oomph::GeneralisedElement::dof_vector ( const unsigned t,
Vector< double > &  dof 
)
inline

Return the vector of dof values at time level t.

842  {
843  // Check that the internal storage has been set up
844 #ifdef PARANOID
845  if (Dof_pt == 0)
846  {
847  std::stringstream error_stream;
848  error_stream << "Internal dof array not set up in element.\n"
849  << "In order to set it up you must call\n"
850  << " Problem::enable_store_local_dof_in_elements()\n"
851  << "before the call to Problem::assign_eqn_numbers()\n";
852  throw OomphLibError(
853  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
854  }
855 #endif
856  // Resize the vector
857  dof.resize(this->Ndof);
858  // Loop over the vector and fill in the desired values
859  for (unsigned i = 0; i < this->Ndof; ++i)
860  {
861  dof[i] = Dof_pt[i][t];
862  }
863  }
t
Definition: plotPSD.py:36

References Dof_pt, i, Ndof, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and plotPSD::t.

Referenced by oomph::AssemblyHandler::dof_vector().

◆ eqn_number()

unsigned long oomph::GeneralisedElement::eqn_number ( const unsigned ieqn_local) const
inline

Return the global equation number corresponding to the ieqn_local-th local equation number

705  {
706 #ifdef RANGE_CHECKING
707  if (ieqn_local >= Ndof)
708  {
709  std::ostringstream error_message;
710  error_message << "Range Error: Equation number " << ieqn_local
711  << " is not in the range (0," << Ndof - 1 << ")";
712  throw OomphLibError(error_message.str(),
715  }
716 #endif
717  return Eqn_number[ieqn_local];
718  }

References Eqn_number, Ndof, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::NavierStokesSchurComplementPreconditioner::assemble_inv_press_and_veloc_mass_matrix_diagonal(), oomph::PressureBasedSolidLSCPreconditioner::assemble_mass_matrix_diagonal(), oomph::ElementWithMovingNodes::assign_all_generic_local_eqn_numbers(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), oomph::RefineableElement::assign_hanging_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), oomph::FiniteElement::assign_nodal_local_eqn_numbers(), oomph::RefineableSolidElement::assign_solid_hanging_local_eqn_numbers(), oomph::SolidFiniteElement::assign_solid_local_eqn_numbers(), oomph::AssemblyHandler::eqn_number(), oomph::ExplicitTimeStepHandler::eqn_number(), oomph::EigenProblemHandler::eqn_number(), oomph::FoldHandler::eqn_number(), oomph::PitchForkHandler::eqn_number(), oomph::HopfHandler::eqn_number(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::fill_in_generic_contribution_to_residuals(), oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >::fill_in_generic_residual_contribution_fourier_decomposed_helmholtz_DtN_bc(), oomph::HelmholtzDtNBoundaryElement< ELEMENT >::fill_in_generic_residual_contribution_helmholtz_DtN_bc(), oomph::PeriodicOrbitEquations::fill_in_generic_residual_contribution_orbit(), oomph::FoldHandler::FoldHandler(), oomph::MultiPoissonEquations< DIM, NFIELDS >::get_dof_numbers_for_unknowns(), oomph::AxisymmetricLinearElasticityEquationsBase::get_dof_numbers_for_unknowns(), oomph::AxisymmetricQCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricQTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricTCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricTTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::FSIHermiteBeamElement::get_dof_numbers_for_unknowns(), oomph::BiharmonicEquations< DIM >::get_dof_numbers_for_unknowns(), oomph::TDisplacementBasedFoepplvonKarmanElement< NNODE_1D >::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricQTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricTTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianTTaylorHoodElement< DIM >::get_dof_numbers_for_unknowns(), oomph::DisplacementControlElement::get_dof_numbers_for_unknowns(), oomph::LinearElasticityEquationsBase< DIM >::get_dof_numbers_for_unknowns(), oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::get_dof_numbers_for_unknowns(), oomph::ImposeImpenetrabilityElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::ImposeParallelOutflowElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::NetFluxControlElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::TTaylorHoodElement< DIM >::get_dof_numbers_for_unknowns(), oomph::PMLHelmholtzEquations< DIM >::get_dof_numbers_for_unknowns(), oomph::PMLHelmholtzFluxElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::get_dof_numbers_for_unknowns(), oomph::FSIDiagHermiteShellElement::get_dof_numbers_for_unknowns(), oomph::ClampedHermiteShellBoundaryConditionElement::get_dof_numbers_for_unknowns(), oomph::PVDEquationsBase< DIM >::get_dof_numbers_for_unknowns(), oomph::PVDEquationsWithPressure< DIM >::get_dof_numbers_for_unknowns(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::BlockPrecQTaylorHoodSpaceTimeElement::get_dof_numbers_for_unknowns(), oomph::BlockPrecQTaylorHoodMixedOrderSpaceTimeElement::get_dof_numbers_for_unknowns(), oomph::QSphericalCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::QSphericalTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::TimeHarmonicFourierDecomposedLinearElasticityEquationsBase::get_dof_numbers_for_unknowns(), oomph::TimeHarmonicLinearElasticityEquationsBase< DIM >::get_dof_numbers_for_unknowns(), oomph::NavierStokesWomersleyPressureControlElement::get_dof_numbers_for_unknowns(), oomph::NetFluxControlElementForWomersleyPressureControl::get_dof_numbers_for_unknowns(), oomph::FoldHandler::get_dresiduals_dparameter(), oomph::PitchForkHandler::get_dresiduals_dparameter(), oomph::HopfHandler::get_dresiduals_dparameter(), oomph::Problem::get_inverse_mass_matrix_times_residuals(), oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::FoldHandler::get_residuals(), oomph::PitchForkHandler::get_residuals(), oomph::HopfHandler::get_residuals(), oomph::HopfHandler::HopfHandler(), oomph::METIS::partition_mesh(), oomph::PeriodicOrbitEquations::set_timestepper_weights(), oomph::FourierDecomposedHelmholtzDtNMesh< ELEMENT >::setup_gamma(), oomph::HelmholtzDtNMesh< ELEMENT >::setup_gamma(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().

◆ exclude_external_data_fd()

void oomph::GeneralisedElement::exclude_external_data_fd ( const unsigned i)
inline

Set the boolean flag to exclude the external datum from the the finite difference loop when computing the jacobian matrix

779  {
780 #ifdef RANGE_CHECKING
781  if (i >= Nexternal_data)
782  {
783  std::ostringstream error_message;
784  error_message << "Range Error: External data " << i
785  << " is not in the range (0," << Nexternal_data - 1
786  << ")";
787  throw OomphLibError(error_message.str(),
790  }
791 #endif
792  // Set the value
793  Data_fd[Ninternal_data + i] = false;
794  }

References Data_fd, i, Nexternal_data, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ exclude_internal_data_fd()

void oomph::GeneralisedElement::exclude_internal_data_fd ( const unsigned i)
inlineprotected

Set the boolean flag to exclude the internal datum from the finite difference loop when computing the jacobian matrix

168  {
169 #ifdef RANGE_CHECKING
170  if (i >= Ninternal_data)
171  {
172  std::ostringstream error_message;
173  error_message << "Range Error: Internal data " << i
174  << " is not in the range (0," << Ninternal_data - 1
175  << ")";
176  throw OomphLibError(error_message.str(),
179  }
180 #endif
181  // Set the value
182  Data_fd[i] = false;
183  }

References Data_fd, i, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ external_data_fd()

bool oomph::GeneralisedElement::external_data_fd ( const unsigned i) const
inline

Return the status of the boolean flag indicating whether the external data is included in the finite difference loop

758  {
759 #ifdef RANGE_CHECKING
760  if (i >= Nexternal_data)
761  {
762  std::ostringstream error_message;
763  error_message << "Range Error: Internal data " << i
764  << " is not in the range (0," << Nexternal_data - 1
765  << ")";
766  throw OomphLibError(error_message.str(),
769  }
770 #endif
771  // Return the value
772  return Data_fd[Ninternal_data + i];
773  }

References Data_fd, i, Nexternal_data, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by fill_in_jacobian_from_external_by_fd().

◆ external_data_pt() [1/2]

Data*& oomph::GeneralisedElement::external_data_pt ( const unsigned i)
inline

Return a pointer to i-th external data object.

660  {
661 #ifdef RANGE_CHECKING
662  if (i >= Nexternal_data)
663  {
664  std::ostringstream error_message;
665  error_message << "Range Error: External data " << i
666  << " is not in the range (0," << Nexternal_data - 1
667  << ")";
668  throw OomphLibError(error_message.str(),
671  }
672 #endif
673  return Data_pt[Ninternal_data + i];
674  }

References Data_pt, i, Nexternal_data, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by add_external_data(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), assign_local_eqn_numbers(), oomph::SolidICProblem::backup_original_state(), oomph::ImmersedRigidBodyElement::delete_external_hijacked_data(), describe_local_dofs(), HeatedCircularPenetratorElement::equilibrium_data(), oomph::ConstraintElement::ext_data_pt(), oomph::ElementElementConstraintElement::extern_data_pt(), external_local_eqn(), oomph::NavierStokesFluxControlElement< ELEMENT >::fill_in_generic_residual_contribution_fluid_traction(), oomph::NavierStokesWomersleyPressureControlElement::fill_in_generic_residual_contribution_pressure_control(), fill_in_jacobian_from_external_by_fd(), flush_external_data(), oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::get_drag_and_torque(), oomph::ElementElementConstraintElement::intern_data_pt(), oomph::ElasticallySupportedRingElement::load(), oomph::ElementElementConstraintElement::node_pt(), oomph::NavierStokesSurfaceDragTorqueElement< ELEMENT >::output(), oomph::VolumeConstraintElement::p_traded_data_pt(), oomph::SpaceTimeNavierStokesEquations< DIM >::re_st(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_st(), oomph::SpaceTimeNavierStokesEquations< DIM >::re_st_pt(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::re_st_pt(), oomph::PseudoBucklingRingElement::reference_pressure_pt(), oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::refineable_fill_in_generic_residual_contribution_fluid_traction(), self_test(), oomph::SpaceTimeNavierStokesEquations< DIM >::st(), and oomph::SpaceTimeNavierStokesEquations< DIM >::st_pt().

◆ external_data_pt() [2/2]

Data* const& oomph::GeneralisedElement::external_data_pt ( const unsigned i) const
inline

Return a pointer to i-th external data object (const version)

678  {
679 #ifdef RANGE_CHECKING
680  if (i >= Nexternal_data)
681  {
682  std::ostringstream error_message;
683  error_message << "Range Error: External data " << i
684  << " is not in the range (0," << Nexternal_data - 1
685  << ")";
686  throw OomphLibError(error_message.str(),
689  }
690 #endif
691  return Data_pt[Ninternal_data + i];
692  }

References Data_pt, i, Nexternal_data, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ external_local_eqn()

int oomph::GeneralisedElement::external_local_eqn ( const unsigned i,
const unsigned j 
)
inlineprotected

Return the local equation number corresponding to the j-th value stored at the i-th external data

312  {
313  // Check that the data has been allocated
314 #ifdef RANGE_CHECKING
315  if (i >= Nexternal_data)
316  {
317  std::ostringstream error_message;
318  error_message << "Range Error: External data " << i
319  << " is not in the range (0," << Nexternal_data - 1
320  << ")";
321  throw OomphLibError(error_message.str(),
324  }
325  else
326  {
327  unsigned n_value = external_data_pt(i)->nvalue();
328  if (j >= n_value)
329  {
330  std::ostringstream error_message;
331  error_message << "Range Error: value " << j << " at internal data "
332  << i << " is not in the range (0," << n_value - 1
333  << ")";
334  throw OomphLibError(error_message.str(),
337  }
338  }
339 #endif
340 #ifdef PARANOID
341  if (Data_local_eqn == 0)
342  {
343  throw OomphLibError(
344  "External local equation numbers have not been allocated",
347  }
348 #endif
349  // Return the local equation number stored as the j-th value of the
350  // i-th external data object.
351  return Data_local_eqn[Ninternal_data + i][j];
352  }

References Data_local_eqn, external_data_pt(), i, j, Nexternal_data, Ninternal_data, oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::DGFaceElement::add_flux_contributions(), oomph::LinearisedAxisymmetricNavierStokesEquations::assign_additional_local_eqn_numbers(), oomph::DisplacementControlElement::assign_additional_local_eqn_numbers(), oomph::ImmersedRigidBodyElement::centre_displacement_local_eqn(), oomph::LinearisedNavierStokesEquations::eigenvalue_local_eqn(), oomph::ConstraintElement::ext_eqn(), oomph::ElementElementConstraintElement::extern_data_eqn(), oomph::ConstraintElement::fill_in_contribution_to_residuals(), HeatedCircularPenetratorElement::fill_in_contribution_to_residuals(), oomph::FluxConstraint::fill_in_contribution_to_residuals(), oomph::FoepplvonKarmanEquations::fill_in_contribution_to_residuals(), oomph::ElasticallySupportedRingElement::fill_in_generic_residual_contribution(), oomph::NavierStokesFluxControlElement< ELEMENT >::fill_in_generic_residual_contribution_fluid_traction(), oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >::fill_in_generic_residual_contribution_fourier_decomposed_helmholtz_DtN_bc(), oomph::HelmholtzDtNBoundaryElement< ELEMENT >::fill_in_generic_residual_contribution_helmholtz_DtN_bc(), oomph::NavierStokesWomersleyPressureControlElement::fill_in_generic_residual_contribution_pressure_control(), fill_in_jacobian_from_external_by_fd(), oomph::ElementElementConstraintElement::intern_data_eqn(), oomph::ElementElementConstraintElement::node_eqn(), oomph::FluidInterfaceElement::pext_local_eqn(), oomph::VolumeConstraintElement::ptraded_local_eqn(), oomph::VolumeConstraintBoundingElement::ptraded_local_eqn(), oomph::PseudoBucklingRingElement::reference_pressure_local_eqn(), and oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::refineable_fill_in_generic_residual_contribution_fluid_traction().

◆ fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter()

void GeneralisedElement::fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam 
)
protectedvirtual

Add the elemental contribution to the derivative of the jacobian matrix, mass matrix and the residuals vector with respect to the passed parameter. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero.

Add the elemental contribution to the derivative of the jacobian matrix, mass matrix and the residuals vector with respect to a parameter. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero. The default is deliberately broken.

Reimplemented in oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, and oomph::AxisymmetricNavierStokesEquations.

1458  {
1459  std::string error_message =
1460  "Empty fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter() "
1461  "has";
1462  error_message += " been called.\n";
1463  error_message +=
1464  "This function is called from the default implementation of\n";
1465  error_message += "get_djacobian_and_dmass_matrix_dparameter();\n";
1466  error_message +=
1467  "and must calculate the residuals vector and mass and jacobian matrices ";
1468  error_message += "without initialising any of their entries.\n\n";
1469 
1470  error_message +=
1471  "If you do not wish to use these defaults, you must overload\n";
1472  error_message += "get_djacobian_and_dmass_matrix_dparameter(), which must "
1473  "initialise the\n";
1474  error_message += "entries of the returned vector and matrices to zero.\n";
1475 
1476 
1477  error_message +=
1478  "This function is intended for use instead of the default (global) \n";
1479  error_message +=
1480  "finite-difference routine when analytic expressions are to be used\n";
1481  error_message += "in continuation and bifurcation tracking problems.\n\n";
1482  error_message += "This function is only called when the function\n";
1483  error_message +=
1484  "Problem::set_analytic_dparameter() has been called in the driver code\n";
1485 
1486 
1487  throw OomphLibError(error_message,
1488  "GeneralisedElement::fill_in_contribution_to_djacobian_"
1489  "and_dmass_matrix_dparameter()",
1491  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_djacobian_and_dmass_matrix_dparameter().

◆ fill_in_contribution_to_djacobian_dparameter()

void GeneralisedElement::fill_in_contribution_to_djacobian_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam 
)
protectedvirtual

Add the elemental contribution to the derivatives of the elemental Jacobian matrix and residuals with respect to a parameter. This function should NOT initialise any entries and must be called after the entries have been initialised to zero The default implementation is to use finite differences to calculate the derivatives.

Reimplemented in oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::AxisymmetricNavierStokesEquations, and GelfandBratuElement< NNODE_1D >.

1406  {
1407  std::string error_message =
1408  "Empty fill_in_contribution_to_djacobian_dparameter() has been ";
1409  error_message += "called.\n";
1410  error_message +=
1411  "This function is called from the default implementation of\n";
1412  error_message += "get_djacobian_dparameter();\n";
1413  error_message +=
1414  "and must calculate the derivatives of residuals vector and jacobian ";
1415  error_message += "matrix\n";
1416  error_message += "with respect to the passed parameter ";
1417  error_message += "without initialising any values.\n\n";
1418 
1419  error_message +=
1420  "If you do not wish to use these defaults, you must overload\n";
1421  error_message +=
1422  "get_djacobian_dparameter(), which must initialise the entries\n";
1423  error_message += "of the returned vector and matrix to zero.\n\n";
1424 
1425  error_message +=
1426  "This function is intended for use instead of the default (global) \n";
1427  error_message +=
1428  "finite-difference routine when analytic expressions are to be used\n";
1429  error_message += "in continuation and bifurcation tracking problems.\n\n";
1430  error_message += "This function is only called when the function\n";
1431  error_message +=
1432  "Problem::set_analytic_dparameter() has been called in the driver code\n";
1433 
1434 
1435  throw OomphLibError(
1436  error_message,
1437  "GeneralisedElement::fill_in_contribution_to_djacobian_dparameter()",
1439  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_djacobian_dparameter().

◆ fill_in_contribution_to_dresiduals_dparameter()

void GeneralisedElement::fill_in_contribution_to_dresiduals_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam 
)
protectedvirtual

Add the elemental contribution to the derivatives of the residuals with respect to a parameter. This function should NOT initialise any entries and must be called after the entries have been initialised to zero The default implementation is to use finite differences to calculate the derivatives.

Add the elemental contribution to the derivatives of the residuals with respect to a parameter. This function should NOT initialise any entries and must be called after the entries have been initialised to zero The default implementation is deliberately broken

Reimplemented in oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::AxisymmetricNavierStokesEquations, and GelfandBratuElement< NNODE_1D >.

1360  {
1361  std::string error_message =
1362  "Empty fill_in_contribution_to_dresiduals_dparameter() has been ";
1363  error_message += "called.\n";
1364  error_message +=
1365  "This function is called from the default implementation of\n";
1366  error_message += "get_dresiduals_dparameter();\n";
1367  error_message += "and must calculate the derivatives of the residuals "
1368  "vector with respect\n";
1369  error_message += "to the passed parameter ";
1370  error_message += "without initialising any values.\n\n";
1371 
1372  error_message +=
1373  "If you do not wish to use these defaults, you must overload\n";
1374  error_message +=
1375  "get_dresiduals_dparameter(), which must initialise the entries\n";
1376  error_message += "of the returned vector to zero.\n";
1377 
1378  error_message +=
1379  "This function is intended for use instead of the default (global) \n";
1380  error_message +=
1381  "finite-difference routine when analytic expressions are to be used\n";
1382  error_message += "in continuation and bifurcation tracking problems.\n\n";
1383  error_message += "This function is only called when the function\n";
1384  error_message +=
1385  "Problem::set_analytic_dparameter() has been called in the driver code\n";
1386 
1387  throw OomphLibError(
1388  error_message,
1389  "GeneralisedElement::fill_in_contribution_to_dresiduals_dparameter()",
1391  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_dresiduals_dparameter().

◆ fill_in_contribution_to_hessian_vector_products()

void GeneralisedElement::fill_in_contribution_to_hessian_vector_products ( Vector< double > const &  Y,
DenseMatrix< double > const &  C,
DenseMatrix< double > &  product 
)
protectedvirtual

Fill in contribution to the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenvector, Y, and other specified vectors, C (d(J_{ij})/d u_{k}) Y_{j} C_{k}

Fill in contribution to the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenvector, Y, and other specified vectors, C (d(J_{ij})/d u_{k}) Y_{j} C_{k} At the moment the dof pointer is passed in to enable easy calculation of finite difference default

Reimplemented in oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::RefineableGeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::RefineableAxisymmetricNavierStokesEquations, and oomph::AxisymmetricNavierStokesEquations.

1507  {
1508  std::string error_message =
1509  "Empty fill_in_contribution_to_hessian_vector_products() has been ";
1510  error_message += "called.\n";
1511  error_message +=
1512  "This function is called from the default implementation of\n";
1513  error_message += "get_hessian_vector_products(); ";
1514  error_message += " and must calculate the products \n";
1515  error_message += "of the hessian matrix with the (global) ";
1516  error_message += "vectors Y and C\n";
1517  error_message += "without initialising any values.\n\n";
1518 
1519  error_message +=
1520  "If you do not wish to use these defaults, you must overload\n";
1521  error_message +=
1522  "get_hessian_vector_products(), which must initialise the entries\n";
1523  error_message += "of the returned vector to zero.\n\n";
1524 
1525  error_message +=
1526  "This function is intended for use instead of the default (global) \n";
1527  error_message +=
1528  "finite-difference routine when analytic expressions are to be used.\n";
1529  error_message += "This function is only called when the function\n";
1530  error_message += "Problem::set_analytic_hessian_products() has been called "
1531  "in the driver code\n";
1532 
1533  throw OomphLibError(
1534  error_message,
1535  "GeneralisedElement::fill_in_contribution_to_hessian_vector_product()",
1537  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_hessian_vector_products().

◆ fill_in_contribution_to_inner_product_vectors()

void GeneralisedElement::fill_in_contribution_to_inner_product_vectors ( Vector< unsigned > const &  history_index,
Vector< Vector< double >> &  inner_product_vector 
)
protectedvirtual

Fill in the contributions to the vectors that when taken as dot product with other history values give the inner product over the element

1574  {
1575  std::string error_message =
1576  "Empty fill_in_contribution_to_inner_product_vectors() has been "
1577  "called.\n";
1578  error_message +=
1579  "This function is called from the default implementation of\n";
1580  error_message += "get_inner_product_vectors(); ";
1581  error_message += " and must calculate the vectors \n";
1582  error_message += "corresponding to the input history values\n ";
1583  error_message +=
1584  "that when multiplied by other vectors of history values\n";
1585  error_message += "return the appropriate dot products.\n\n";
1586  error_message += "The output vectors must not be initialised.\n\n";
1587 
1588  error_message +=
1589  "If you do not wish to use these defaults, you must overload\n";
1590  error_message +=
1591  "get_inner_products(), which must initialise the entries\n";
1592  error_message += "of the returned vector to zero.\n\n";
1593 
1594  throw OomphLibError(
1596  }

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_inner_product_vectors().

◆ fill_in_contribution_to_inner_products()

void GeneralisedElement::fill_in_contribution_to_inner_products ( Vector< std::pair< unsigned, unsigned >> const &  history_index,
Vector< double > &  inner_product 
)
protectedvirtual

Fill in the contribution to the inner products between given pairs of history values

1546  {
1547  std::string error_message =
1548  "Empty fill_in_contribution_to_inner_products() has been called.\n";
1549  error_message +=
1550  "This function is called from the default implementation of\n";
1551  error_message += "get_inner_products();\n ";
1552  error_message += "It must calculate the inner products over the element\n";
1553  error_message += "of given pairs of history values\n";
1554  error_message += "without initialision of the output vector.\n\n";
1555 
1556  error_message +=
1557  "If you do not wish to use these defaults, you must overload\n";
1558  error_message +=
1559  "get_inner_products(), which must initialise the entries\n";
1560  error_message += "of the returned vector to zero.\n\n";
1561 
1562  throw OomphLibError(
1564  }

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by get_inner_products().

◆ fill_in_contribution_to_jacobian()

virtual void oomph::GeneralisedElement::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlineprotectedvirtual

Add the elemental contribution to the jacobian matrix. and the residuals vector. Note that this function will NOT initialise the residuals vector or the jacobian matrix. It must be called after the residuals vector and jacobian matrix have been initialised to zero. The default is to use finite differences to calculate the jacobian

Reimplemented in oomph::NodeNodeMortaringElement, oomph::NodeElementSolidOnlyMortaringElement, oomph::NavierStokesWomersleyPressureControlElement, oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >, oomph::WomersleyEquations< DIM >, oomph::UnsteadyHeatFluxElement< ELEMENT >, oomph::UnsteadyHeatEquations< DIM >, oomph::UnsteadyHeatEquations< 2 >, oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::TimeHarmonicLinearElasticityEquations< DIM >, oomph::TimeHarmonicFourierDecomposedLinearElasticityTractionElement< ELEMENT >, oomph::TimeHarmonicFourierDecomposedLinearElasticityEquations, oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >, oomph::SteadyAxisymAdvectionDiffusionEquations, oomph::SphericalNavierStokesEquations, oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >, oomph::SphericalAdvectionDiffusionEquations, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableFSISolidTractionElement< ELEMENT, DIM >, oomph::FSISolidTractionElement< ELEMENT, DIM >, oomph::RefineableSolidTractionElement< ELEMENT >, oomph::SolidTractionElement< ELEMENT >, oomph::PVDEquationsWithPressure< DIM >, oomph::PVDEquations< DIM >, oomph::FSIDiagHermiteShellElement, oomph::KirchhoffLoveShellEquations, oomph::ImmersedRigidBodyElement, oomph::PoroelasticityFaceElement< ELEMENT >, oomph::PoroelasticityEquations< DIM >, oomph::PoroelasticityEquations< 2 >, oomph::PolarStressIntegralElement< ELEMENT >, oomph::PolarNavierStokesEquations, oomph::PolarNavierStokesTractionElement< ELEMENT >, oomph::PoissonFluxElement< ELEMENT >, oomph::PoissonEquations< DIM >, oomph::PoissonEquations< 1 >, oomph::PoissonEquations< 2 >, oomph::PoissonEquations< 3 >, oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::PMLTimeHarmonicLinearElasticityEquations< DIM >, oomph::PMLHelmholtzFluxElement< ELEMENT >, oomph::PMLHelmholtzEquations< DIM >, oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >, oomph::PMLFourierDecomposedHelmholtzEquations, oomph::ODEElement, oomph::RefineableNavierStokesFluxControlElement< ELEMENT >, oomph::NavierStokesFluxControlElement< ELEMENT >, oomph::NetFluxControlElement< ELEMENT >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::FpPressureAdvDiffRobinBCElement< ELEMENT >, oomph::ImposeParallelOutflowElement< ELEMENT >, oomph::ImposeImpenetrabilityElement< ELEMENT >, oomph::RefineableNavierStokesTractionElement< ELEMENT >, oomph::NavierStokesTractionElement< ELEMENT >, oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::AdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::NavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::FourierDecomposedTimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >, oomph::BuoyantQCrouzeixRaviartElement< DIM >, RefineableLinearisedQCrouzeixRaviartMultiDomainElement, RefineableLinearisedQTaylorHoodMultiDomainElement, LinearisedQCrouzeixRaviartMultiDomainElement, LinearisedQTaylorHoodMultiDomainElement, oomph::LinearisedNavierStokesEigenfunctionNormalisationElement, RefineableLinearisedAxisymmetricQCrouzeixRaviartMultiDomainElement, RefineableLinearisedAxisymmetricQTaylorHoodMultiDomainElement, LinearisedAxisymmetricQCrouzeixRaviartMultiDomainElement, LinearisedAxisymmetricQTaylorHoodMultiDomainElement, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::LinearWaveFluxElement< ELEMENT >, oomph::LinearWaveEquations< DIM >, oomph::LinearElasticityTractionElement< ELEMENT >, oomph::LinearElasticityEquations< DIM >, oomph::HelmholtzFluxElement< ELEMENT >, oomph::HelmholtzEquations< DIM >, oomph::HelmholtzDtNBoundaryElement< ELEMENT >, oomph::HelmholtzAbsorbingBCElement< ELEMENT >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::ProjectableElement< ELEMENT >, oomph::ProjectableElement< FVK_ELEMENT >, oomph::ProjectableElement< AXISYM_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< UNSTEADY_HEAT_ELEMENT >, oomph::ProjectableElement< LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< CROUZEIX_RAVIART_ELEMENT >, oomph::ProjectableElement< HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< AXISYMMETRIC_POROELASTICITY_ELEMENT >, oomph::ProjectableElement< TAYLOR_HOOD_ELEMENT >, oomph::ProjectableElement< PVD_ELEMENT >, oomph::ProjectableElement< ADR_ELEMENT >, oomph::ProjectableElement< DARCY_ELEMENT >, oomph::ProjectableElement< POISSON_ELEMENT >, oomph::ProjectableElement< FOURIER_DECOMPOSED_HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< TIME_HARMONIC_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< LINEAR_HEAT_AND_ELAST_ELEMENT >, oomph::FSIWallElement, oomph::FaceElementAsGeomObject< ELEMENT >, oomph::SolidFiniteElement, oomph::FiniteElement, oomph::ElementWithExternalElement, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >, oomph::FourierDecomposedHelmholtzEquations, oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >, oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, MESH >, oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, RefineableTriangleMesh >, oomph::FluxTransportEquations< DIM >, oomph::ElasticLineFluidInterfaceBoundingElement< ELEMENT >, oomph::ElasticPointFluidInterfaceBoundingElement< ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, SurfaceDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< SurfactantTransportInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< SolubleSurfactantTransportInterfaceElement, LineDerivatives, ELEMENT >, oomph::ElasticUpdateFluidInterfaceElement< FluidInterfaceElement, LineDerivatives, ELEMENT >, oomph::SpineLineFluidInterfaceBoundingElement< ELEMENT >, oomph::SpinePointFluidInterfaceBoundingElement< ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< EQUATION_CLASS, DERIVATIVE_CLASS, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< SurfactantTransportInterfaceElement, LineDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< FluidInterfaceElement, SurfaceDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< SurfactantTransportInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< SurfactantTransportInterfaceElement, SurfaceDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< FluidInterfaceElement, AxisymmetricDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< SolubleSurfactantTransportInterfaceElement, LineDerivatives, ELEMENT >, oomph::SpineUpdateFluidInterfaceElement< FluidInterfaceElement, LineDerivatives, ELEMENT >, oomph::SpineSurfaceVolumeConstraintBoundingElement< ELEMENT >, oomph::ElasticSurfaceVolumeConstraintBoundingElement< ELEMENT >, oomph::SpineAxisymmetricVolumeConstraintBoundingElement< ELEMENT >, oomph::ElasticAxisymmetricVolumeConstraintBoundingElement< ELEMENT >, oomph::SpineLineVolumeConstraintBoundingElement< ELEMENT >, oomph::ElasticLineVolumeConstraintBoundingElement< ELEMENT >, oomph::VolumeConstraintElement, oomph::DarcyFaceElement< ELEMENT >, oomph::BiharmonicFluidBoundaryElement, oomph::BiharmonicFluxElement< DIM >, oomph::FSIHermiteBeamElement, oomph::KirchhoffLoveBeamEquations, oomph::AxisymmetricSolidTractionElement< ELEMENT >, oomph::AxisymmetricPVDEquationsWithPressure, oomph::AxisymmetricPVDEquations, oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >, oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >, oomph::AxisymmetricPoroelasticityTractionElement< POROELASTICITY_BULK_ELEMENT >, oomph::AxisymmetricPoroelasticityEquations, oomph::AxisymmetricNavierStokesEquations, oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >, oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >, oomph::FSIAxisymmetricLinearElasticityTractionElement< ELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >, oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >, oomph::AxisymmetricLinearElasticityEquations, oomph::AxisymAdvectionDiffusionEquations, oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >, oomph::GeneralisedAdvectionDiffusionEquations< DIM >, oomph::GeneralisedAdvectionDiffusionEquations< 2 >, oomph::AdvectionDiffusionFluxElement< ELEMENT >, oomph::AdvectionDiffusionEquations< DIM >, oomph::AdvectionDiffusionEquations< 2 >, oomph::PolarStreamfunctionEquations, oomph::PolarStreamfunctionTractionElement< ELEMENT >, oomph::FluxConstraint, ModalPRefineableQPoissonElement< DIM >, ModalPoissonEquations< DIM >, oomph::IMRODEElement, SpineGravityTractionElement< ELEMENT >, FixSpineHeightElement, oomph::SpinePointMarangoniSurfactantFluidInterfaceBoundingElement< ELEMENT >, SlavePositionPointElement, DependentPositionPointElement, oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, QThermalPVDElement< DIM >, oomph::RefineableBuoyantQSphericalCrouzeixRaviartElement, oomph::SpineLineMarangoniSurfactantFluidInterfaceElement< ELEMENT >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::SpineAxisymmetricMarangoniSurfactantFluidInterfaceElement< ELEMENT >, oomph::AxisymmetricQAdvectionCrouzeixRaviartElement, oomph::FixedVolumeSpineLineMarangoniFluidInterfaceElement< ELEMENT >, oomph::SpineLineMarangoniFluidInterfaceElement< ELEMENT >, oomph::SpineLineMarangoniSurfactantFluidInterfaceElement< ELEMENT >, QAdvectionDiffusionElementWithExternalElement< DIM >, QCrouzeixRaviartElementWithTwoExternalElement< DIM >, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithTwoExternalElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, QAxisymAdvectionDiffusionElementWithExternalElement, QAxisymCrouzeixRaviartElementWithExternalElement, RefineableQAxisymAdvectionDiffusionBoussinesqElement, RefineableQAxisymCrouzeixRaviartBoussinesqElement, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, QAxisymAdvectionDiffusionElementWithExternalElement, QAxisymCrouzeixRaviartElementWithExternalElement, RefineableQAxisymAdvectionDiffusionBoussinesqElement, RefineableQAxisymCrouzeixRaviartBoussinesqElement, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithExternalElement< DIM >, RefineableBuoyantQCrouzeixRaviartElement< DIM >, SSPorousChannelEquations, LinearisedAxisymmetricQCrouzeixRaviartMultiDomainElement, oomph::PerturbedSpineLinearisedAxisymmetricFluidInterfaceElement< ELEMENT >, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::MultiPoissonEquations< DIM, NFIELDS >, FluxConstraint, FixSpineHeightElement, SpineGravityTractionElement< ELEMENT >, oomph::HomogenisedLinearElasticityEquations< DIM >, oomph::HeatedPenetratorFluxElement< ELEMENT >, oomph::HeatedLinearSurfaceContactElement< ELEMENT >, oomph::TLinearHeatAndElasticityElement< DIM, NNODE_1D >, SSPorousChannelEquations, ABCElement, PredatorPreyElement, GelfandBratuElement< NNODE_1D >, MyNavierStokesElement, RefineableLinearisedAxisymmetricQCrouzeixRaviartMultiDomainElement, RefineableLinearisedAxisymmetricQTaylorHoodMultiDomainElement, LinearisedAxisymmetricQCrouzeixRaviartMultiDomainElement, LinearisedAxisymmetricQTaylorHoodMultiDomainElement, oomph::LinearisedAxisymmetricNavierStokesEquations, MortaringHelpers::PointElementWithExternalElement, oomph::BiharmonicEquations< DIM >, oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >, oomph::SingularNavierStokesSolutionElement< ELEMENT >, and DistanceWrapper< ELEMENT >.

501  {
502  // Add the contribution to the residuals
504  // Allocate storage for the full residuals (residuals of entire element)
505  Vector<double> full_residuals(Ndof);
506  // Get the residuals for the entire element
507  get_residuals(full_residuals);
508  // Calculate the contributions from the internal dofs
509  //(finite-difference the lot by default)
510  fill_in_jacobian_from_internal_by_fd(full_residuals, jacobian, true);
511  // Calculate the contributions from the external dofs
512  //(finite-difference the lot by default)
513  fill_in_jacobian_from_external_by_fd(full_residuals, jacobian, true);
514  }
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: elements.h:357
virtual void get_residuals(Vector< double > &residuals)
Definition: elements.h:980
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1199
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1102

References fill_in_contribution_to_residuals(), fill_in_jacobian_from_external_by_fd(), fill_in_jacobian_from_internal_by_fd(), get_residuals(), and Ndof.

Referenced by get_jacobian().

◆ fill_in_contribution_to_jacobian_and_mass_matrix()

void GeneralisedElement::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
protectedvirtual

Add the elemental contribution to the jacobian matrix, mass matrix and the residuals vector. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero.

Add the elemental contribution to the jacobian matrix, mass matrix and the residuals vector. Note that this function should NOT initialise any entries. It must be called after the residuals vector and matrices have been initialised to zero. The default is deliberately broken.

Reimplemented in oomph::SphericalNavierStokesEquations, oomph::SphericalAdvectionDiffusionEquations, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::PVDEquationsWithPressure< DIM >, oomph::PolarStressIntegralElement< ELEMENT >, oomph::PolarNavierStokesEquations, oomph::PolarNavierStokesTractionElement< ELEMENT >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::AdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::NavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >, oomph::BuoyantQCrouzeixRaviartElement< DIM >, oomph::LinearisedNavierStokesEigenfunctionNormalisationElement, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::DisplacementBasedFoepplvonKarmanEquations, oomph::FluxTransportEquations< DIM >, oomph::SurfactantTransportInterfaceElement, oomph::VolumeConstraintElement, oomph::AxisymmetricNavierStokesEquations, oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >, oomph::GeneralisedAdvectionDiffusionEquations< DIM >, oomph::GeneralisedAdvectionDiffusionEquations< 2 >, oomph::AdvectionDiffusionEquations< DIM >, oomph::AdvectionDiffusionEquations< 2 >, oomph::PolarStreamfunctionTractionElement< ELEMENT >, oomph::FluxConstraint, oomph::SolubleSurfactantTransportInterfaceElement, oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::RefineableBuoyantQSphericalCrouzeixRaviartElement, oomph::SpineLineMarangoniSurfactantFluidInterfaceElement< ELEMENT >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::SpineAxisymmetricMarangoniSurfactantFluidInterfaceElement< ELEMENT >, oomph::AxisymmetricQAdvectionCrouzeixRaviartElement, oomph::SpineLineMarangoniFluidInterfaceElement< ELEMENT >, oomph::SpineLineMarangoniSurfactantFluidInterfaceElement< ELEMENT >, QAdvectionDiffusionElementWithExternalElement< DIM >, QCrouzeixRaviartElementWithTwoExternalElement< DIM >, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithTwoExternalElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, QAxisymAdvectionDiffusionElementWithExternalElement, QAxisymCrouzeixRaviartElementWithExternalElement, RefineableQAxisymAdvectionDiffusionBoussinesqElement, RefineableQAxisymCrouzeixRaviartBoussinesqElement, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, QAxisymAdvectionDiffusionElementWithExternalElement, QAxisymCrouzeixRaviartElementWithExternalElement, RefineableQAxisymAdvectionDiffusionBoussinesqElement, RefineableQAxisymCrouzeixRaviartBoussinesqElement, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithExternalElement< DIM >, RefineableBuoyantQCrouzeixRaviartElement< DIM >, HarmonicEquations, oomph::LinearisedAxisymmetricNavierStokesEquations, OrrSommerfeldEquations< DIM >, HarmonicEquations, ComplexHarmonicEquations, ABCElement, PredatorPreyElement, and oomph::LinearisedAxisymmetricNavierStokesEquations.

1326  {
1327  std::string error_message =
1328  "Empty fill_in_contribution_to_jacobian_and_mass_matrix() has been ";
1329  error_message += "called.\n";
1330  error_message +=
1331  "This function is called from the default implementation of\n";
1332  error_message += "get_jacobian_and_mass_matrix();\n";
1333  error_message +=
1334  "and must calculate the residuals vector and mass and jacobian matrices ";
1335  error_message += "without initialising any of their entries.\n\n";
1336 
1337  error_message +=
1338  "If you do not wish to use these defaults, you must overload\n";
1339  error_message +=
1340  "get_jacobian_and_mass_matrix(), which must initialise the entries\n";
1341  error_message +=
1342  "of the residuals vector, jacobian and mass matrix to zero.\n";
1343 
1344  throw OomphLibError(
1345  error_message,
1346  "GeneralisedElement::fill_in_contribution_to_jacobian_and_mass_matrix()",
1348  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), RefineableQCrouzeixRaviartElementWithExternalElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement::fill_in_contribution_to_jacobian_and_mass_matrix(), RefineableQAxisymCrouzeixRaviartBoussinesqElement::fill_in_contribution_to_jacobian_and_mass_matrix(), RefineableQAxisymAdvectionDiffusionBoussinesqElement::fill_in_contribution_to_jacobian_and_mass_matrix(), QAxisymCrouzeixRaviartElementWithExternalElement::fill_in_contribution_to_jacobian_and_mass_matrix(), QAxisymAdvectionDiffusionElementWithExternalElement::fill_in_contribution_to_jacobian_and_mass_matrix(), RefineableQCrouzeixRaviartElementWithTwoExternalElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), RefineableQAdvectionDiffusionElementWithExternalElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), QCrouzeixRaviartElementWithTwoExternalElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), QAdvectionDiffusionElementWithExternalElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::NavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::AdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), and get_jacobian_and_mass_matrix().

◆ fill_in_contribution_to_mass_matrix()

void GeneralisedElement::fill_in_contribution_to_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  mass_matrix 
)
protectedvirtual

Add the elemental contribution to the mass matrix matrix. and the residuals vector. Note that this function should NOT initialise the residuals vector or the mass matrix. It must be called after the residuals vector and jacobian matrix have been initialised to zero. The default is deliberately broken

Add the elemental contribution to the mass matrix and the residuals vector. Note that this function will NOT initialise the residuals vector or the mass matrix. It must be called after the residuals vector and jacobian matrix have been initialised to zero. The default is deliberately broken.

Reimplemented in oomph::ODEElement, and oomph::FluxTransportEquations< DIM >.

1294  {
1295  std::string error_message =
1296  "Empty fill_in_contribution_to_mass_matrix() has been called.\n";
1297  error_message +=
1298  "This function is called from the default implementation of\n";
1299  error_message += "get_mass_matrix();\n";
1300  error_message += "and must calculate the residuals vector and mass matrix ";
1301  error_message += "without initialising any of their entries.\n\n";
1302 
1303  error_message +=
1304  "If you do not wish to use these defaults, you must overload\n";
1305  error_message += "get_mass_matrix(), which must initialise the entries\n";
1306  error_message += "of the residuals vector and mass matrix to zero.\n";
1307 
1308  throw OomphLibError(
1309  error_message,
1310  "GeneralisedElement::fill_in_contribution_to_mass_matrix()",
1312  }

References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by oomph::DGElement::get_inverse_mass_matrix_times_residuals(), get_mass_matrix(), and oomph::DGElement::pre_compute_mass_matrix().

◆ fill_in_contribution_to_residuals()

virtual void oomph::GeneralisedElement::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlineprotectedvirtual

Add the elemental contribution to the residuals vector. Note that this function will NOT initialise the residuals vector. It must be called after the residuals vector has been initialised to zero.

Reimplemented in oomph::NodeNodeMortaringElement, oomph::NodeElementSolidOnlyMortaringElement, oomph::HeightControlElement, oomph::YoungLaplaceEquations, oomph::YoungLaplaceContactAngleElement< ELEMENT >, oomph::RefineableYoungLaplaceEquations, oomph::NavierStokesWomersleyPressureControlElement, oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >, oomph::WomersleyEquations< DIM >, oomph::UnsteadyHeatFluxElement< ELEMENT >, oomph::UnsteadyHeatEquations< DIM >, oomph::UnsteadyHeatEquations< 2 >, oomph::TimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::TimeHarmonicLinearElasticityEquations< DIM >, oomph::TimeHarmonicFourierDecomposedLinearElasticityTractionElement< ELEMENT >, oomph::TimeHarmonicFourierDecomposedLinearElasticityEquations, oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >, oomph::SteadyAxisymAdvectionDiffusionEquations, oomph::SphericalNavierStokesEquations, oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >, oomph::SphericalAdvectionDiffusionEquations, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >, oomph::FpPressureAdvDiffRobinBCMixedOrderSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::SpaceTimeNavierStokesEquations< DIM >, oomph::FpPressureAdvDiffRobinBCSpaceTimeElement< ELEMENT >, oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >, oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::RefineableSolidTractionElement< ELEMENT >, oomph::SolidTractionElement< ELEMENT >, oomph::PVDEquationsWithPressure< DIM >, oomph::PVDEquations< DIM >, oomph::ClampedHermiteShellBoundaryConditionElement, oomph::KirchhoffLoveShellEquations, oomph::ImmersedRigidBodyElement, oomph::PoroelasticityFaceElement< ELEMENT >, oomph::PoroelasticityEquations< DIM >, oomph::PoroelasticityEquations< 2 >, oomph::PolarStressIntegralElement< ELEMENT >, oomph::PolarNavierStokesEquations, oomph::PolarNavierStokesTractionElement< ELEMENT >, oomph::PoissonFluxElement< ELEMENT >, oomph::PoissonEquations< DIM >, oomph::PoissonEquations< 1 >, oomph::PoissonEquations< 2 >, oomph::PoissonEquations< 3 >, oomph::PMLTimeHarmonicLinearElasticityTractionElement< ELEMENT >, oomph::PMLTimeHarmonicLinearElasticityEquations< DIM >, oomph::PMLHelmholtzFluxElement< ELEMENT >, oomph::PMLHelmholtzEquations< DIM >, oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >, oomph::PMLFourierDecomposedHelmholtzEquations, oomph::ODEElement, oomph::RefineableNavierStokesFluxControlElement< ELEMENT >, oomph::NavierStokesFluxControlElement< ELEMENT >, oomph::NetFluxControlElement< ELEMENT >, oomph::NavierStokesEquations< DIM >, oomph::NavierStokesEquations< 2 >, oomph::FpPressureAdvDiffRobinBCElement< ELEMENT >, oomph::ImposeParallelOutflowElement< ELEMENT >, oomph::ImposeImpenetrabilityElement< ELEMENT >, oomph::RefineableNavierStokesTractionElement< ELEMENT >, oomph::NavierStokesTractionElement< ELEMENT >, oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::TimeHarmonicLinElastLoadedByPMLHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::TimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >, oomph::FourierDecomposedTimeHarmonicLinElastLoadedByHelmholtzPressureBCElement< ELASTICITY_BULK_ELEMENT, HELMHOLTZ_BULK_ELEMENT >, oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >, oomph::BuoyantQCrouzeixRaviartElement< DIM >, oomph::LinearisedNavierStokesEquations, oomph::LinearisedNavierStokesEigenfunctionNormalisationElement, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::LinearWaveFluxElement< ELEMENT >, oomph::LinearWaveEquations< DIM >, oomph::LinearElasticityTractionElement< ELEMENT >, oomph::LinearElasticityEquations< DIM >, oomph::HelmholtzFluxElement< ELEMENT >, oomph::HelmholtzEquations< DIM >, oomph::HelmholtzDtNBoundaryElement< ELEMENT >, oomph::HelmholtzAbsorbingBCElement< ELEMENT >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::ProjectableElement< ELEMENT >, oomph::ProjectableElement< FVK_ELEMENT >, oomph::ProjectableElement< AXISYM_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< UNSTEADY_HEAT_ELEMENT >, oomph::ProjectableElement< LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< CROUZEIX_RAVIART_ELEMENT >, oomph::ProjectableElement< HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< AXISYMMETRIC_POROELASTICITY_ELEMENT >, oomph::ProjectableElement< TAYLOR_HOOD_ELEMENT >, oomph::ProjectableElement< PVD_ELEMENT >, oomph::ProjectableElement< ADR_ELEMENT >, oomph::ProjectableElement< DARCY_ELEMENT >, oomph::ProjectableElement< POISSON_ELEMENT >, oomph::ProjectableElement< FOURIER_DECOMPOSED_HELMHOLTZ_ELEMENT >, oomph::ProjectableElement< TIME_HARMONIC_LINEAR_ELAST_ELEMENT >, oomph::ProjectableElement< LINEAR_HEAT_AND_ELAST_ELEMENT >, oomph::DisplacementControlElement, oomph::GeneralisedNewtonianNavierStokesEquations< DIM >, oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations, oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >, oomph::FourierDecomposedHelmholtzEquations, oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >, oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, MESH >, oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, RefineableTriangleMesh >, oomph::FoepplvonKarmanEquations, oomph::DisplacementBasedFoepplvonKarmanEquations, oomph::FluxTransportEquations< DIM >, oomph::FluidInterfaceElement, oomph::FluidInterfaceBoundingElement, oomph::VolumeConstraintBoundingElement, oomph::VolumeConstraintElement, oomph::DarcyFaceElement< ELEMENT >, oomph::DarcyEquations< DIM >, oomph::DarcyEquations< 2 >, oomph::BiharmonicFluidBoundaryElement, oomph::BiharmonicFluxElement< DIM >, oomph::BiharmonicEquations< DIM >, oomph::ClampedSlidingHermiteBeamBoundaryConditionElement, oomph::KirchhoffLoveBeamEquations, oomph::AxisymmetricSolidTractionElement< ELEMENT >, oomph::AxisymmetricPVDEquationsWithPressure, oomph::AxisymmetricPVDEquations, oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >, oomph::AxisymmetricPoroelasticityTractionElement< POROELASTICITY_BULK_ELEMENT >, oomph::AxisymmetricPoroelasticityEquations, oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >, oomph::AxisymmetricNavierStokesEquations, oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >, oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >, oomph::FSIAxisymmetricLinearElasticityTractionElement< ELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >, oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >, oomph::AxisymmetricLinearElasticityEquations, oomph::AxisymFoepplvonKarmanEquations, oomph::AxisymFoepplvonKarmanEquations, oomph::AxisymAdvectionDiffusionEquations, oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >, oomph::GeneralisedAdvectionDiffusionEquations< DIM >, oomph::GeneralisedAdvectionDiffusionEquations< 2 >, oomph::AdvectionDiffusionFluxElement< ELEMENT >, oomph::AdvectionDiffusionEquations< DIM >, oomph::AdvectionDiffusionEquations< 2 >, oomph::NavierStokesFluxControlElement< ELEMENT >, oomph::NetFluxControlElement< ELEMENT >, oomph::PolarStreamfunctionEquations, oomph::PolarStreamfunctionTractionElement< ELEMENT >, oomph::FluxConstraint, ModalPRefineableQPoissonElement< DIM >, ModalPoissonEquations< DIM >, oomph::IMRODEElement, SpineGravityTractionElement< ELEMENT >, FixSpineHeightElement, SlavePositionPointElement, DependentPositionPointElement, oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, QThermalPVDElement< DIM >, oomph::RefineableBuoyantQSphericalCrouzeixRaviartElement, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::AxisymmetricQAdvectionCrouzeixRaviartElement, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithTwoExternalElement< DIM >, oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithExternalElement< DIM >, RefineableBuoyantQCrouzeixRaviartElement< DIM >, SSPorousChannelEquations, oomph::LinearisedAxisymmetricFluidInterfaceElement, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::MultiPoissonEquations< DIM, NFIELDS >, FluxConstraint, FixSpineHeightElement, SpineGravityTractionElement< ELEMENT >, oomph::HomogenisedLinearElasticityEquations< DIM >, oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >, CircularPenetratorElement, CircularPenetratorElement, HeatedCircularPenetratorElement, oomph::HeatedPenetratorFluxElement< ELEMENT >, oomph::TLinearHeatAndElasticityElement< DIM, NNODE_1D >, oomph::SurfaceMeltElement< ELEMENT >, oomph::UnsteadyHeatBaseFaceElement< ELEMENT >, oomph::SurfaceContactElementBase< ELEMENT >, ZeroResidualGenElement, SSPorousChannelEquations, ABCElement, PredatorPreyElement, GelfandBratuElement< NNODE_1D >, oomph::LinearisedAxisymmetricNavierStokesEquations, oomph::ConstraintElement, oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >, and oomph::SingularNavierStokesSolutionElement< ELEMENT >.

358  {
359  std::string error_message =
360  "Empty fill_in_contribution_to_residuals() has been called.\n";
361  error_message +=
362  "This function is called from the default implementations of\n";
363  error_message += "get_residuals() and get_jacobian();\n";
364  error_message +=
365  "and must calculate the residuals vector without initialising any of ";
366  error_message += "its entries.\n\n";
367 
368  error_message +=
369  "If you do not wish to use these defaults, you must overload both\n";
370  error_message += "get_residuals() and get_jacobian(), which must "
371  "initialise the entries\n";
372  error_message += "of the residuals vector and jacobian matrix to zero.\n";
373 
374  error_message += "N.B. the default get_jacobian() function employs "
375  "finite differencing\n";
376 
377  throw OomphLibError(
379  }

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by oomph::ElementWithExternalElement::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FiniteElement::fill_in_contribution_to_jacobian(), oomph::SolidFiniteElement::fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::DGElement::get_inverse_mass_matrix_times_residuals(), and get_residuals().

◆ fill_in_jacobian_from_external_by_fd() [1/2]

void oomph::GeneralisedElement::fill_in_jacobian_from_external_by_fd ( DenseMatrix< double > &  jacobian,
const bool fd_all_data = false 
)
inlineprotected

Calculate the contributions to the jacobian from the external degrees of freedom using finite differences. This version computes the residuals vector before calculating the jacobian terms. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

437  {
438  // Allocate storage for a residuals vector
439  Vector<double> residuals(Ndof);
440  // Get the residuals for the entire element
441  get_residuals(residuals);
442  // Call the jacobian calculation
443  fill_in_jacobian_from_external_by_fd(residuals, jacobian, fd_all_data);
444  }

References fill_in_jacobian_from_external_by_fd(), get_residuals(), and Ndof.

◆ fill_in_jacobian_from_external_by_fd() [2/2]

void GeneralisedElement::fill_in_jacobian_from_external_by_fd ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const bool fd_all_data = false 
)
protected

Calculate the contributions to the jacobian from the external degrees of freedom using finite differences. This version of the function assumes that the residuals vector has already been calculated. If the boolean argument is true, the finite differencing will be performed for all external data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

This function calculates the entries of Jacobian matrix, used in the Newton method, associated with the external degrees of freedom. It does this using finite differences, rather than an analytical formulation, so can be done in total generality. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

1203  {
1204  // Locally cache the number of external data
1205  const unsigned n_external_data = Nexternal_data;
1206  // If there aren't any external data, then return straight away
1207  if (n_external_data == 0)
1208  {
1209  return;
1210  }
1211 
1212  // Call the update function to ensure that the element is in
1213  // a consistent state before finite differencing starts
1215 
1216  // Find the number of dofs in the element
1217  const unsigned n_dof = ndof();
1218 
1219  // Create newres vector
1220  Vector<double> newres(n_dof);
1221 
1222  // Integer storage for local unknown
1223  int local_unknown = 0;
1224 
1225  // Use the default finite difference step
1226  const double fd_step = Default_fd_jacobian_step;
1227 
1228  // Loop over the external data
1229  for (unsigned i = 0; i < n_external_data; i++)
1230  {
1231  // If we are doing all finite differences or
1232  // the variable is included in the finite difference loop, do it
1233  if (fd_all_data || external_data_fd(i))
1234  {
1235  // Get the number of value at the external data
1236  const unsigned n_value = external_data_pt(i)->nvalue();
1237 
1238  // Loop over the number of values
1239  for (unsigned j = 0; j < n_value; j++)
1240  {
1241  // Get the local equation number
1242  local_unknown = external_local_eqn(i, j);
1243  // If it's not pinned
1244  if (local_unknown >= 0)
1245  {
1246  // Get a pointer to the External data value
1247  double* const value_pt = external_data_pt(i)->value_pt(j);
1248 
1249  // Save the old value of the External data
1250  const double old_var = *value_pt;
1251 
1252  // Increment the value of the External data
1253  *value_pt += fd_step;
1254 
1255  // Now update any dependent variables
1257 
1258  // Calculate the new residuals
1259  get_residuals(newres);
1260 
1261  // Do finite differences
1262  for (unsigned m = 0; m < n_dof; m++)
1263  {
1264  double sum = (newres[m] - residuals[m]) / fd_step;
1265  // Stick the entry into the Jacobian matrix
1266  jacobian(m, local_unknown) = sum;
1267  }
1268 
1269  // Reset the External data
1270  *value_pt = old_var;
1271 
1272  // Reset any dependent variables
1274  }
1275  }
1276  } // End of finite differencing for datum (if block)
1277  }
1278 
1279  // End of finite difference loop
1280  // Final reset of any dependent data
1282  }
double * value_pt(const unsigned &i) const
Definition: nodes.h:324
virtual void reset_in_external_fd(const unsigned &i)
Definition: elements.h:488
virtual void reset_after_external_fd()
Definition: elements.h:478
virtual void update_before_external_fd()
Definition: elements.h:473
static double Default_fd_jacobian_step
Definition: elements.h:1198
bool external_data_fd(const unsigned &i) const
Definition: elements.h:757
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
virtual void update_in_external_fd(const unsigned &i)
Definition: elements.h:483
int * m
Definition: level2_cplx_impl.h:294

References Default_fd_jacobian_step, external_data_fd(), external_data_pt(), external_local_eqn(), get_residuals(), i, j, m, ndof(), Nexternal_data, oomph::Data::nvalue(), reset_after_external_fd(), reset_in_external_fd(), update_before_external_fd(), update_in_external_fd(), and oomph::Data::value_pt().

Referenced by oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_jacobian(), oomph::SpinePointFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::SpineLineFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ElasticPointFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ElasticLineFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ElementWithExternalElement::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FiniteElement::fill_in_contribution_to_jacobian(), oomph::SolidFiniteElement::fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::ImmersedRigidBodyElement::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian(), oomph::SolidTractionElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::RefineableSolidTractionElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_jacobian(), and fill_in_jacobian_from_external_by_fd().

◆ fill_in_jacobian_from_internal_by_fd() [1/2]

void oomph::GeneralisedElement::fill_in_jacobian_from_internal_by_fd ( DenseMatrix< double > &  jacobian,
const bool fd_all_data = false 
)
inlineprotected

Calculate the contributions to the jacobian from the internal degrees of freedom using finite differences. This version computes the residuals vector before calculating the jacobian terms. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

403  {
404  // Allocate storage for the residuals
405  Vector<double> residuals(Ndof, 0.0);
406  // Get the residuals for the entire element
407  get_residuals(residuals);
408  // Call the jacobian calculation
409  fill_in_jacobian_from_internal_by_fd(residuals, jacobian, fd_all_data);
410  }

References fill_in_jacobian_from_internal_by_fd(), get_residuals(), and Ndof.

◆ fill_in_jacobian_from_internal_by_fd() [2/2]

void GeneralisedElement::fill_in_jacobian_from_internal_by_fd ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const bool fd_all_data = false 
)
protected

Calculate the contributions to the jacobian from the internal degrees of freedom using finite differences. This version of the function assumes that the residuals vector has already been calculated. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

This function calculates the entries of Jacobian matrix, used in the Newton method, associated with the internal degrees of freedom. It does this using finite differences, rather than an analytical formulation, so can be done in total generality. If the boolean argument is true, the finite differencing will be performed for all internal data, irrespective of the information in Data_fd. The default value (false) uses the information in Data_fd to selectively difference only certain data.

1106  {
1107  // Locally cache the number of internal data
1108  const unsigned n_internal_data = Ninternal_data;
1109 
1110  // If there aren't any internal data, then return straight away
1111  if (n_internal_data == 0)
1112  {
1113  return;
1114  }
1115 
1116  // Call the update function to ensure that the element is in
1117  // a consistent state before finite differencing starts
1119 
1120  // Find the number of dofs in the element
1121  const unsigned n_dof = ndof();
1122 
1123  // Create newres vector
1124  Vector<double> newres(n_dof);
1125 
1126  // Integer storage for local unknown
1127  int local_unknown = 0;
1128 
1129  // Use the default finite difference step
1130  const double fd_step = Default_fd_jacobian_step;
1131 
1132  // Loop over the internal data
1133  for (unsigned i = 0; i < n_internal_data; i++)
1134  {
1135  // If we are doing all finite differences or
1136  // the variable is included in the finite difference loop, do it
1137  if (fd_all_data || internal_data_fd(i))
1138  {
1139  // Get the number of value at the internal data
1140  const unsigned n_value = internal_data_pt(i)->nvalue();
1141 
1142  // Loop over the number of values
1143  for (unsigned j = 0; j < n_value; j++)
1144  {
1145  // Get the local equation number
1146  local_unknown = internal_local_eqn(i, j);
1147  // If it's not pinned
1148  if (local_unknown >= 0)
1149  {
1150  // Get a pointer to the value of the internal data
1151  double* const value_pt = internal_data_pt(i)->value_pt(j);
1152 
1153  // Save the old value of the Internal data
1154  const double old_var = *value_pt;
1155 
1156  // Increment the value of the Internal data
1157  *value_pt += fd_step;
1158 
1159  // Now update any dependent variables
1161 
1162  // Calculate the new residuals
1163  get_residuals(newres);
1164 
1165  // Do finite differences
1166  for (unsigned m = 0; m < n_dof; m++)
1167  {
1168  double sum = (newres[m] - residuals[m]) / fd_step;
1169  // Stick the entry into the Jacobian matrix
1170  jacobian(m, local_unknown) = sum;
1171  }
1172 
1173  // Reset the Internal data
1174  *value_pt = old_var;
1175 
1176  // Reset any dependent variables
1178  }
1179  }
1180  } // End of finite-differencing for datum (if block)
1181  }
1182 
1183  // End of finite difference loop
1184  // Final reset of any dependent data
1186  }
virtual void update_in_internal_fd(const unsigned &i)
Definition: elements.h:459
bool internal_data_fd(const unsigned &i) const
Definition: elements.h:146
virtual void update_before_internal_fd()
Definition: elements.h:449
virtual void reset_in_internal_fd(const unsigned &i)
Definition: elements.h:464
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
virtual void reset_after_internal_fd()
Definition: elements.h:454

References Default_fd_jacobian_step, get_residuals(), i, internal_data_fd(), internal_data_pt(), internal_local_eqn(), j, m, ndof(), Ninternal_data, oomph::Data::nvalue(), reset_after_internal_fd(), reset_in_internal_fd(), update_before_internal_fd(), update_in_internal_fd(), and oomph::Data::value_pt().

Referenced by oomph::IMRODEElement::fill_in_contribution_to_jacobian(), oomph::ElementWithExternalElement::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FiniteElement::fill_in_contribution_to_jacobian(), oomph::SolidFiniteElement::fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::ODEElement::fill_in_contribution_to_jacobian(), oomph::ImmersedRigidBodyElement::fill_in_contribution_to_jacobian(), and fill_in_jacobian_from_internal_by_fd().

◆ flush_external_data() [1/2]

void GeneralisedElement::flush_external_data ( )

Flush all external data.

Flush all the external data, i.e. clear the pointers to external data from the internal storage.

388  {
389  // Get the numbers of internal and external data
390  const unsigned n_external_data = Nexternal_data;
391  // If there is external data
392  if (n_external_data > 0)
393  {
394  // Storage for new data, initialised to NULL
395  Data** new_data_pt = 0;
396 
397  // Find the number of internal data
398  const unsigned n_internal_data = Ninternal_data;
399  // If there is internal data resize Data_pt and copy over
400  // the pointers
401  if (n_internal_data > 0)
402  {
403  // The new data pointer should only be the size of the internal data
404  new_data_pt = new Data*[n_internal_data];
405  // Copy over the internal data only
406  for (unsigned i = 0; i < n_internal_data; i++)
407  {
408  new_data_pt[i] = Data_pt[i];
409  }
410  }
411 
412  // Delete the old storage
413  delete[] Data_pt;
414  // Set the new storage, this will be NULL if there is no internal data
415  Data_pt = new_data_pt;
416  // Set the number of externals to zero
417  Nexternal_data = 0;
418 
419  // Resize the array of boolean flags to the number of internals
420  Data_fd.resize(n_internal_data);
421  }
422  }

References Data_fd, Data_pt, i, Nexternal_data, and Ninternal_data.

Referenced by oomph::ImmersedRigidBodyElement::flush_drag_mesh(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::set_boundary_shape_geom_object_pt(), HeatedCircularPenetratorElement::set_contact_element_mesh_pt(), oomph::ImmersedRigidBodyElement::set_drag_mesh(), oomph::PseudoBucklingRingElement::set_reference_pressure_pt(), and oomph::SolidICProblem::setup_problem().

◆ flush_external_data() [2/2]

void GeneralisedElement::flush_external_data ( Data *const &  data_pt)

Flush the object addressed by data_pt from the external data array.

Remove the object addressed by data_pt from the external data array Note that this could mess up the numbering of other external data

430  {
431  // Get the current numbers of external data
432  const unsigned n_external_data = Nexternal_data;
433  // Index of the data to be removed
434  // We initialise this to be n_external_data, and it will be smaller than
435  // n_external_data if the data pointer is found in the array
436  unsigned index = n_external_data;
437  // Loop over the external data and find the argument
438  for (unsigned i = 0; i < n_external_data; i++)
439  {
440  // If we have found the data pointer, set the index and break
441  if (external_data_pt(i) == data_pt)
442  {
443  index = i;
444  break;
445  }
446  }
447 
448  // If we have found an index less than Nexternal_data, then we have found
449  // the data in the array
450  if (index < n_external_data)
451  {
452  // Initialise a new array to NULL
453  Data** new_data_pt = 0;
454 
455  // Find the number of internals
456  const unsigned n_internal_data = Ninternal_data;
457 
458  // Find the new number of total data items (one fewer)
459  const unsigned n_total_data = n_internal_data + n_external_data - 1;
460 
461  // Create a new array containing the data items, if we have any
462  if (n_total_data > 0)
463  {
464  new_data_pt = new Data*[n_total_data];
465  }
466 
467  // Copy over all the internal data
468  for (unsigned i = 0; i < n_internal_data; i++)
469  {
470  new_data_pt[i] = Data_pt[i];
471  }
472 
473  // Now copy over the un-flushed data
474  unsigned counter = 0;
475  for (unsigned i = 0; i < n_external_data; i++)
476  {
477  // If we are not at the deleted index
478  if (i != index)
479  {
480  // Copy the undeleted entry into the next entry in our new
481  // array of pointers to Data
482  new_data_pt[n_internal_data + counter] = Data_pt[i];
483  // Increase the counter
484  ++counter;
485  }
486  }
487 
488  // Delete the storage associated with the previous values
489  delete[] Data_pt;
490 
491  // Set pointers to the new storage, will be NULL if no data left
492  Data_pt = new_data_pt;
493 
494  // Remove the entry from the array of boolean flags
495  Data_fd.erase(Data_fd.begin() + n_internal_data + index);
496 
497  // Decrease the number of externals
498  --Nexternal_data;
499 
500  // Issue a warning if there will be external data remaining
501  if (Nexternal_data > 1)
502  {
503  std::ostringstream warning_stream;
504  warning_stream
505  << "Data removed from element's external data " << std::endl
506  << "You may have to update the indices for remaining data "
507  << std::endl
508  << "This can be achieved by using add_external_data() "
509  << std::endl;
510  OomphLibWarning(warning_stream.str(),
511  "GeneralisedElement::flush_external_data()",
513  }
514  }
515  }

References Data_fd, Data_pt, external_data_pt(), i, Nexternal_data, Ninternal_data, and OOMPH_EXCEPTION_LOCATION.

◆ get_djacobian_and_dmass_matrix_dparameter()

virtual void oomph::GeneralisedElement::get_djacobian_and_dmass_matrix_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam,
DenseMatrix< double > &  dmass_matrix_dparam 
)
inlinevirtual

Calculate the derivatives of the elemental Jacobian matrix mass matrix and residuals with respect to a parameter

1066  {
1067  // Zero the residuals derivative vector
1068  dres_dparam.initialise(0.0);
1069  // Zero the jacobian derivative matrix
1070  djac_dparam.initialise(0.0);
1071  // Zero the mass matrix derivative
1072  dmass_matrix_dparam.initialise(0.0);
1073  // Add the elemental contribution to the residuals vector and matrices
1075  parameter_pt, dres_dparam, djac_dparam, dmass_matrix_dparam);
1076  }
void initialise(const T &val)
Initialize all values in the matrix to val.
Definition: matrices.h:514
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
Definition: elements.cc:1453
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167

References fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(), oomph::Vector< _Tp >::initialise(), and oomph::DenseMatrix< T >::initialise().

Referenced by oomph::HopfHandler::get_dresiduals_dparameter().

◆ get_djacobian_dparameter()

virtual void oomph::GeneralisedElement::get_djacobian_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam,
DenseMatrix< double > &  djac_dparam 
)
inlinevirtual

Calculate the derivatives of the elemental Jacobian matrix and residuals with respect to a parameter

1049  {
1050  // Zero the residuals vector
1051  dres_dparam.initialise(0.0);
1052  // Zero the jacobian matrix
1053  djac_dparam.initialise(0.0);
1054  // Add the elemental contribution to the residuals vector
1056  parameter_pt, dres_dparam, djac_dparam);
1057  }
virtual void fill_in_contribution_to_djacobian_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Definition: elements.cc:1402

References fill_in_contribution_to_djacobian_dparameter(), oomph::Vector< _Tp >::initialise(), and oomph::DenseMatrix< T >::initialise().

Referenced by oomph::AssemblyHandler::get_djacobian_dparameter(), oomph::FoldHandler::get_dresiduals_dparameter(), and oomph::PitchForkHandler::get_dresiduals_dparameter().

◆ get_dof_numbers_for_unknowns()

virtual void oomph::GeneralisedElement::get_dof_numbers_for_unknowns ( std::list< std::pair< unsigned long, unsigned >> &  dof_lookup_list) const
inlinevirtual

Create a list of pairs for the unknowns that this element is "in charge of" – ignore any unknowns associated with external Data. The first entry in each pair must contain the global equation number of the unknown, while the second one contains the number of the DOF type that this unknown is associated with. (The function can obviously only be called if the equation numbering scheme has been set up.)

Reimplemented in oomph::BlockPreconditionableSpaceTimeElementBase, oomph::NetFluxControlElementForWomersleyPressureControl, oomph::NavierStokesWomersleyPressureControlElement, oomph::TimeHarmonicLinearElasticityEquationsBase< DIM >, oomph::TimeHarmonicFourierDecomposedLinearElasticityEquationsBase, oomph::QSphericalTaylorHoodElement, oomph::QSphericalCrouzeixRaviartElement, oomph::BlockPrecRefineableQUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecQUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecRefineableQUnsteadyHeatSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecQUnsteadyHeatSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecRefineableQUnsteadyHeatSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecQUnsteadyHeatSpaceTimeElement< SPATIAL_DIM, NNODE_1D >, oomph::BlockPrecQTaylorHoodMixedOrderSpaceTimeElement, oomph::BlockPrecQTaylorHoodSpaceTimeElement, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::FSISolidTractionElement< ELEMENT, DIM >, oomph::PVDEquationsWithPressure< DIM >, oomph::PVDEquationsBase< DIM >, oomph::ClampedHermiteShellBoundaryConditionElement, oomph::FSIDiagHermiteShellElement, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >, oomph::PMLHelmholtzFluxElement< ELEMENT >, oomph::PMLHelmholtzEquations< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::TCrouzeixRaviartElement< DIM >, oomph::NetFluxControlElement< ELEMENT >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< 2 >, oomph::QCrouzeixRaviartElement< DIM >, oomph::ImposeParallelOutflowElement< ELEMENT >, oomph::ImposeImpenetrabilityElement< ELEMENT >, oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::LinearElasticityEquationsBase< DIM >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::DisplacementControlElement, oomph::GeneralisedNewtonianTTaylorHoodElement< DIM >, oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >, oomph::GeneralisedNewtonianQTaylorHoodElement< DIM >, oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >, oomph::GeneralisedNewtonianAxisymmetricTTaylorHoodElement, oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement, oomph::GeneralisedNewtonianAxisymmetricQTaylorHoodElement, oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement, oomph::TDisplacementBasedFoepplvonKarmanElement< NNODE_1D >, oomph::BiharmonicEquations< DIM >, oomph::FSIHermiteBeamElement, oomph::AxisymmetricTTaylorHoodElement, oomph::AxisymmetricTCrouzeixRaviartElement, oomph::AxisymmetricQTaylorHoodElement, oomph::AxisymmetricQCrouzeixRaviartElement, and oomph::AxisymmetricLinearElasticityEquationsBase.

1223  {
1224  // error message stream
1225  std::ostringstream error_message;
1226  error_message << "get_dof_numbers_for_unknowns() const has not been \n"
1227  << " implemented for this element\n"
1228  << std::endl;
1229  // throw error
1230  throw OomphLibError(
1231  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1232  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ get_dresiduals_dparameter()

virtual void oomph::GeneralisedElement::get_dresiduals_dparameter ( double *const &  parameter_pt,
Vector< double > &  dres_dparam 
)
inlinevirtual

Calculate the derivatives of the residuals with respect to a parameter

1036  {
1037  // Zero the dres_dparam vector
1038  dres_dparam.initialise(0.0);
1039  // Add the elemental contribution to the residuals vector
1041  dres_dparam);
1042  }
virtual void fill_in_contribution_to_dresiduals_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam)
Definition: elements.cc:1358

References fill_in_contribution_to_dresiduals_dparameter(), and oomph::Vector< _Tp >::initialise().

Referenced by oomph::AssemblyHandler::get_dresiduals_dparameter(), oomph::FoldHandler::get_dresiduals_dparameter(), and oomph::PitchForkHandler::get_dresiduals_dparameter().

◆ get_hessian_vector_products()

virtual void oomph::GeneralisedElement::get_hessian_vector_products ( Vector< double > const &  Y,
DenseMatrix< double > const &  C,
DenseMatrix< double > &  product 
)
inlinevirtual

Calculate the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenvector, Y, and other specified vectors, C (d(J_{ij})/d u_{k}) Y_{j} C_{k}

Add the elemental contribution to the product

1086  {
1087  // Initialise the product to zero
1088  product.initialise(0.0);
1091  }
virtual void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Definition: elements.cc:1503
void product(const MatrixType &m)
Definition: product.h:42
const char Y
Definition: test/EulerAngles.cpp:32

References fill_in_contribution_to_hessian_vector_products(), and product().

Referenced by oomph::AssemblyHandler::get_hessian_vector_products(), and oomph::PitchForkHandler::get_hessian_vector_products().

◆ get_inner_product_vectors()

virtual void oomph::GeneralisedElement::get_inner_product_vectors ( Vector< unsigned > const &  history_index,
Vector< Vector< double >> &  inner_product_vector 
)
inlinevirtual

Compute the vectors that when taken as a dot product with other history values give the inner product over the element.

1109  {
1110  const unsigned n_inner_product = inner_product_vector.size();
1111  for (unsigned i = 0; i < n_inner_product; ++i)
1112  {
1113  inner_product_vector[i].initialise(0.0);
1114  }
1116  inner_product_vector);
1117  }
virtual void fill_in_contribution_to_inner_product_vectors(Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
Definition: elements.cc:1571

References fill_in_contribution_to_inner_product_vectors(), and i.

Referenced by oomph::AssemblyHandler::get_inner_product_vectors().

◆ get_inner_products()

virtual void oomph::GeneralisedElement::get_inner_products ( Vector< std::pair< unsigned, unsigned >> const &  history_index,
Vector< double > &  inner_product 
)
inlinevirtual

Return the vector of inner product of the given pairs of history values

1098  {
1099  inner_product.initialise(0.0);
1100  this->fill_in_contribution_to_inner_products(history_index,
1101  inner_product);
1102  }
virtual void fill_in_contribution_to_inner_products(Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
Definition: elements.cc:1543

References fill_in_contribution_to_inner_products(), and oomph::Vector< _Tp >::initialise().

Referenced by oomph::AssemblyHandler::get_inner_products().

◆ get_jacobian()

virtual void oomph::GeneralisedElement::get_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Calculate the elemental Jacobian matrix "d equation / d variable".

Reimplemented in oomph::ImposeFluxForWomersleyElement< DIM >, oomph::RefineableSolidQElement< 2 >, oomph::RefineableSolidQElement< 1 >, oomph::RefineableSolidQElement< 3 >, oomph::PseudoBucklingRingElement, oomph::Hijacked< PerturbedSpineElement< FaceGeometry< ELEMENT > > >, oomph::Hijacked< SpineElement< FaceGeometry< FaceGeometry< ELEMENT > > > >, oomph::Hijacked< SpineElement< FaceGeometry< ELEMENT > > >, oomph::ElementWithSpecificMovingNodes< ELEMENT, NODE_TYPE >, oomph::ElementWithSpecificMovingNodes< ELEMENT, SpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, PerturbedSpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, AlgebraicNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, MacroElementNodeUpdateNode >, TwoNodePoissonElement, ElasticFishBackElement, and oomph::ElasticallySupportedRingElement.

992  {
993  // Zero the residuals vector
994  residuals.initialise(0.0);
995  // Zero the jacobian matrix
996  jacobian.initialise(0.0);
997  // Add the elemental contribution to the residuals vector
998  fill_in_contribution_to_jacobian(residuals, jacobian);
999  }
virtual void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:499

References fill_in_contribution_to_jacobian(), oomph::Vector< _Tp >::initialise(), and oomph::DenseMatrix< T >::initialise().

Referenced by oomph::AssemblyHandler::get_jacobian(), oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), oomph::RefineableSolidQElement< 3 >::get_jacobian(), oomph::RefineableSolidQElement< 1 >::get_jacobian(), oomph::RefineableSolidQElement< 2 >::get_jacobian(), oomph::FoldHandler::get_residuals(), oomph::PitchForkHandler::get_residuals(), and oomph::AugmentedBlockFoldLinearSolver::solve().

◆ get_jacobian_and_mass_matrix()

virtual void oomph::GeneralisedElement::get_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inlinevirtual

Calculate the residuals and jacobian and elemental "mass" matrix, the matrix that multiplies the time derivative terms.

Reimplemented in oomph::ElementWithSpecificMovingNodes< ELEMENT, NODE_TYPE >, oomph::ElementWithSpecificMovingNodes< ELEMENT, SpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, PerturbedSpineNode >, oomph::ElementWithSpecificMovingNodes< ELEMENT, AlgebraicNode >, and oomph::ElementWithSpecificMovingNodes< ELEMENT, MacroElementNodeUpdateNode >.

1019  {
1020  // Zero the residuals vector
1021  residuals.initialise(0.0);
1022  // Zero the jacobian matrix
1023  jacobian.initialise(0.0);
1024  // Zero the mass matrix
1025  mass_matrix.initialise(0.0);
1026  // Add the elemental contribution to the vector and matrix
1028  residuals, jacobian, mass_matrix);
1029  }
virtual void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: elements.cc:1322

References fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::Vector< _Tp >::initialise(), and oomph::DenseMatrix< T >::initialise().

Referenced by oomph::PeriodicOrbitEquations::fill_in_generic_residual_contribution_orbit(), oomph::EigenProblemHandler::get_all_vectors_and_matrices(), oomph::HopfHandler::get_jacobian(), oomph::HopfHandler::get_residuals(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().

◆ get_mass_matrix()

virtual void oomph::GeneralisedElement::get_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  mass_matrix 
)
inlinevirtual

Calculate the residuals and the elemental "mass" matrix, the matrix that multiplies the time derivative terms in a problem.

1005  {
1006  // Zero the residuals vector
1007  residuals.initialise(0.0);
1008  // Zero the mass matrix
1009  mass_matrix.initialise(0.0);
1010  // Add the elemental contribution to the vector and matrix
1011  fill_in_contribution_to_mass_matrix(residuals, mass_matrix);
1012  }
virtual void fill_in_contribution_to_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
Definition: elements.cc:1292

References fill_in_contribution_to_mass_matrix(), oomph::Vector< _Tp >::initialise(), and oomph::DenseMatrix< T >::initialise().

Referenced by oomph::ExplicitTimeStepHandler::get_all_vectors_and_matrices(), and oomph::ExplicitTimeStepHandler::get_jacobian().

◆ get_residuals()

virtual void oomph::GeneralisedElement::get_residuals ( Vector< double > &  residuals)
inlinevirtual

Calculate the vector of residuals of the equations in the element. By default initialise the vector to zero and then call the fill_in_contribution_to_residuals() function. Note that this entire function can be overloaded if desired.

Reimplemented in oomph::ImposeFluxForWomersleyElement< DIM >, oomph::PseudoBucklingRingElement, oomph::Hijacked< PerturbedSpineElement< FaceGeometry< ELEMENT > > >, oomph::Hijacked< SpineElement< FaceGeometry< FaceGeometry< ELEMENT > > > >, oomph::Hijacked< SpineElement< FaceGeometry< ELEMENT > > >, TwoNodePoissonElement, ElasticFishBackElement, oomph::ElasticallySupportedRingElement, and ZeroResidualGenElement.

981  {
982  // Zero the residuals vector
983  residuals.initialise(0.0);
984  // Add the elemental contribution to the residuals vector
986  }

References fill_in_contribution_to_residuals(), and oomph::Vector< _Tp >::initialise().

Referenced by oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_jacobian(), oomph::ElementWithExternalElement::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), oomph::FiniteElement::fill_in_contribution_to_jacobian(), oomph::SolidFiniteElement::fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian(), oomph::PeriodicOrbitEquations::fill_in_generic_residual_contribution_orbit(), fill_in_jacobian_from_external_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_field_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_geometric_by_fd(), oomph::ElementWithMovingNodes::fill_in_jacobian_from_geometric_data(), fill_in_jacobian_from_internal_by_fd(), oomph::FiniteElement::fill_in_jacobian_from_nodal_by_fd(), oomph::RefineableElement::fill_in_jacobian_from_nodal_by_fd(), oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::FiniteElement::get_dresidual_dnodal_coordinates(), oomph::RefineableElement::get_dresidual_dnodal_coordinates(), oomph::AssemblyHandler::get_residuals(), oomph::ExplicitTimeStepHandler::get_residuals(), oomph::FoldHandler::get_residuals(), and oomph::PitchForkHandler::get_residuals().

◆ include_external_data_fd()

void oomph::GeneralisedElement::include_external_data_fd ( const unsigned i)
inline

Set the boolean flag to include the external datum in the the finite difference loop when computing the jacobian matrix

799  {
800 #ifdef RANGE_CHECKING
801  if (i >= Nexternal_data)
802  {
803  std::ostringstream error_message;
804  error_message << "Range Error: External data " << i
805  << " is not in the range (0," << Nexternal_data - 1
806  << ")";
807  throw OomphLibError(error_message.str(),
810  }
811 #endif
812  // Set the value
813  Data_fd[Ninternal_data + i] = true;
814  }

References Data_fd, i, Nexternal_data, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ include_internal_data_fd()

void oomph::GeneralisedElement::include_internal_data_fd ( const unsigned i)
inlineprotected

Set the boolean flag to include the internal datum in the finite difference loop when computing the jacobian matrix

188  {
189 #ifdef RANGE_CHECKING
190  if (i >= Ninternal_data)
191  {
192  std::ostringstream error_message;
193  error_message << "Range Error: Internal data " << i
194  << " is not in the range (0," << Ninternal_data - 1
195  << ")";
196  throw OomphLibError(error_message.str(),
199  }
200 #endif
201  // Set the value
202  Data_fd[i] = true;
203  }

References Data_fd, i, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ internal_data_fd()

bool oomph::GeneralisedElement::internal_data_fd ( const unsigned i) const
inlineprotected

Return the status of the boolean flag indicating whether the internal data is included in the finite difference loop

147  {
148 #ifdef RANGE_CHECKING
149  if (i >= Ninternal_data)
150  {
151  std::ostringstream error_message;
152  error_message << "Range Error: Internal data " << i
153  << " is not in the range (0," << Ninternal_data - 1
154  << ")";
155  throw OomphLibError(error_message.str(),
158  }
159 #endif
160  // Return the value
161  return Data_fd[i];
162  }

References Data_fd, i, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by fill_in_jacobian_from_internal_by_fd().

◆ internal_data_pt() [1/2]

Data*& oomph::GeneralisedElement::internal_data_pt ( const unsigned i)
inline

Return a pointer to i-th internal data object.

623  {
624 #ifdef RANGE_CHECKING
625  if (i >= Ninternal_data)
626  {
627  std::ostringstream error_message;
628  error_message << "Range Error: Internal data " << i
629  << " is not in the range (0," << Ninternal_data - 1
630  << ")";
631  throw OomphLibError(error_message.str(),
634  }
635 #endif
636  return Data_pt[i];
637  }

References Data_pt, i, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_internal_data(), add_internal_value_pt_to_map(), HeatedCircularPenetratorElement::angle(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), assign_internal_eqn_numbers(), assign_local_eqn_numbers(), oomph::SolidICProblem::backup_original_state(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::c(), oomph::Problem::copy(), oomph::LinearisedQCrouzeixRaviartElement::copy_efunction_to_normalisation(), oomph::ProjectableAxisymmetricCrouzeixRaviartElement< CROUZEIX_RAVIART_ELEMENT >::data_values_of_field(), oomph::GeneralisedNewtonianProjectableAxisymmetricCrouzeixRaviartElement< CROUZEIX_RAVIART_ELEMENT >::data_values_of_field(), oomph::ProjectableGeneralisedNewtonianCrouzeixRaviartElement< CROUZEIX_RAVIART_ELEMENT >::data_values_of_field(), describe_dofs(), describe_local_dofs(), oomph::FSI_functions::doc_fsi(), oomph::Mesh::does_pointer_correspond_to_mesh_data(), oomph::AxisymmetricPoroelasticityEquations::dq_internal_dt(), oomph::PoroelasticityEquations< DIM >::dq_internal_dt(), oomph::Mesh::dump(), oomph::LinearisedNavierStokesEigenfunctionNormalisationElement::eigenvalue_data_pt(), oomph::ElasticallySupportedRingElement::ElasticallySupportedRingElement(), HeatedCircularPenetratorElement::equilibrium_data(), ZeroResidualGenElement::eval(), ZeroResidualGenElement::eval_pt(), oomph::IMRODEElement::fill_in_contribution_to_jacobian(), oomph::ODEElement::fill_in_contribution_to_jacobian(), HeatedCircularPenetratorElement::fill_in_contribution_to_residuals(), oomph::IMRODEElement::fill_in_contribution_to_residuals(), oomph::ODEElement::fill_in_contribution_to_residuals(), oomph::AxisymmetricPoroelasticityEquations::fill_in_generic_residual_contribution(), fill_in_jacobian_from_internal_by_fd(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::fix_cosine_component_of_pressure(), oomph::AxisymmetricTCrouzeixRaviartElement::fix_pressure(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::fix_pressure(), oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::QCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::PRefineableQCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::TCrouzeixRaviartElement< DIM >::fix_pressure(), oomph::PolarCrouzeixRaviartElement::fix_pressure(), oomph::QSphericalCrouzeixRaviartElement::fix_pressure(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::fix_pressure(), oomph::AxisymmetricQCrouzeixRaviartElement::fix_pressure(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::fix_pressure(), oomph::LinearisedQCrouzeixRaviartElement::fix_pressure(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::fix_sine_component_of_pressure(), oomph::AxisymQPVDElementWithPressure::fix_solid_pressure(), oomph::QPVDElementWithPressure< DIM >::fix_solid_pressure(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::further_build(), oomph::RefineableLinearisedQCrouzeixRaviartElement::further_build(), oomph::RefineableQCrouzeixRaviartElement< DIM >::further_build(), oomph::RefineablePolarCrouzeixRaviartElement::further_build(), oomph::RefineableQSphericalCrouzeixRaviartElement::further_build(), oomph::Problem::get_dofs(), oomph::PolarCrouzeixRaviartElement::get_load_data(), oomph::ODEProblem::global_temporal_error_norm(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::grad_p_bar(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::grad_u_bar(), HeatedCircularPenetratorElement::HeatedCircularPenetratorElement(), oomph::FiniteElement::identify_field_data_for_interactions(), oomph::RefineableElement::identify_field_data_for_interactions(), SegregatedFSICollapsibleChannelProblem< ELEMENT >::identify_fluid_and_solid_dofs(), SegregatedFSIDrivenCavityProblem< ELEMENT >::identify_fluid_and_solid_dofs(), oomph::RefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::identify_load_data(), oomph::RefineableQCrouzeixRaviartElement< DIM >::identify_load_data(), oomph::AxisymmetricTCrouzeixRaviartElement::identify_pressure_data(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::identify_pressure_data(), oomph::QSphericalCrouzeixRaviartElement::identify_pressure_data(), oomph::RefineablePolarCrouzeixRaviartElement::insert_load_data(), internal_local_eqn(), oomph::HeightControlElement::kappa_pt(), oomph::ConstraintElement::lagrange_multiplier(), oomph::ODEProblem::my_set_initial_condition(), oomph::ODEElement::nvalue(), oomph::AxisymmetricQCrouzeixRaviartElement::p_axi_nst(), oomph::AxisymmetricTCrouzeixRaviartElement::p_axi_nst(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::p_axi_nst(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::p_axi_nst(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::p_bar(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::p_data_pt(), oomph::TRaviartThomasDarcyElement< ORDER >::p_data_pt(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::p_lin_axi_nst(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::p_linearised_axi_nst(), oomph::LinearisedQCrouzeixRaviartElement::p_linearised_nst(), oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >::p_nst(), oomph::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::p_nst(), oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >::p_nst(), oomph::QCrouzeixRaviartElement< DIM >::p_nst(), oomph::PRefineableQCrouzeixRaviartElement< DIM >::p_nst(), oomph::TCrouzeixRaviartElement< DIM >::p_nst(), oomph::PolarCrouzeixRaviartElement::p_pnst(), oomph::QSphericalCrouzeixRaviartElement::p_spherical_nst(), oomph::VolumeConstraintElement::p_traded_data_pt(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::p_value(), oomph::TPoroelasticityElement< ORDER >::p_value(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), FlowAroundCylinderProblem< ELEMENT >::pin_all_base_flow_dofs(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::NavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::pin_c(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::pin_p_value(), oomph::TRaviartThomasDarcyElement< ORDER >::pin_p_value(), oomph::TPoroelasticityElement< ORDER >::pin_p_value(), oomph::LinearisedQCrouzeixRaviartElement::pin_pressure_normalisation_dofs(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::pin_q_internal_value(), oomph::TRaviartThomasDarcyElement< ORDER >::pin_q_internal_value(), oomph::TPoroelasticityElement< ORDER >::pin_q_internal_value(), oomph::LinearisedQCrouzeixRaviartElement::pin_real_or_imag(), oomph::ElasticallySupportedRingElement::pin_yc(), oomph::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement(), oomph::PRefineableQCrouzeixRaviartElement< DIM >::PRefineableQCrouzeixRaviartElement(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::q_internal(), oomph::TRaviartThomasDarcyElement< ORDER >::q_internal(), oomph::TPoroelasticityElement< ORDER >::q_internal(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::q_internal_data_pt(), oomph::TRaviartThomasDarcyElement< ORDER >::q_internal_data_pt(), oomph::Mesh::read(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::rebuild_from_sons(), oomph::RefineableLinearisedQCrouzeixRaviartElement::rebuild_from_sons(), oomph::PRefineableQCrouzeixRaviartElement< DIM >::rebuild_from_sons(), oomph::RefineablePolarCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableQSphericalCrouzeixRaviartElement::rebuild_from_sons(), oomph::SolidICProblem::reset_original_state(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), self_test(), HeatedCircularPenetratorElement::set_angle(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::set_c(), oomph::Mesh::set_consistent_pinned_values_for_continuation(), HeatedCircularPenetratorElement::set_contact_element_mesh_pt(), oomph::Problem::set_dofs(), set_internal_data_time_stepper(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::set_p_value(), oomph::TRaviartThomasDarcyElement< ORDER >::set_p_value(), oomph::Problem::set_pinned_values_to_zero(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::set_q_internal(), oomph::TRaviartThomasDarcyElement< ORDER >::set_q_internal(), oomph::AxisymmetricPoroelasticityEquations::set_q_internal_timestepper(), oomph::PoroelasticityEquations< DIM >::set_q_internal_timestepper(), oomph::QPVDElementWithPressure< DIM >::set_solid_p(), oomph::SolidICProblem::setup_problem(), oomph::AxisymQPVDElementWithPressure::solid_p(), oomph::QPVDElementWithPressure< DIM >::solid_p(), oomph::ODEProblem::solution(), oomph::IMRODEElement::time_interpolate_time(), oomph::IMRODEElement::time_interpolate_u(), oomph::ODEProblem::ts_pt(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::u_bar(), oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >::unfix_pressure(), oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >::unfix_pressure(), oomph::BuoyantQCrouzeixRaviartElement< DIM >::unfix_pressure(), FlowAroundCylinderProblem< ELEMENT >::unpin_all_base_flow_dofs(), oomph::AxisymmetricTCrouzeixRaviartElement::unpin_all_internal_pressure_dofs(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::unpin_all_internal_pressure_dofs(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::unpin_c(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::unpin_elemental_pressure_dofs(), oomph::PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM >::unpin_elemental_pressure_dofs(), oomph::RefineableLinearisedQCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableQCrouzeixRaviartElement< DIM >::unpin_elemental_pressure_dofs(), oomph::PRefineableQCrouzeixRaviartElement< DIM >::unpin_elemental_pressure_dofs(), oomph::RefineablePolarCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableQSphericalCrouzeixRaviartElement::unpin_elemental_pressure_dofs(), oomph::RefineableQPVDElementWithPressure< DIM >::unpin_elemental_solid_pressure_dofs(), oomph::QPVDElementWithPressure< DIM >::unpin_elemental_solid_pressure_dofs(), oomph::LinearisedQCrouzeixRaviartElement::unpin_real_or_imag(), oomph::ElasticallySupportedRingElement::unpin_yc(), ZeroResidualGenElement::ZeroResidualGenElement(), and oomph::ImmersedRigidBodyElement::~ImmersedRigidBodyElement().

◆ internal_data_pt() [2/2]

Data* const& oomph::GeneralisedElement::internal_data_pt ( const unsigned i) const
inline

Return a pointer to i-th internal data object (const version)

641  {
642 #ifdef RANGE_CHECKING
643  if (i >= Ninternal_data)
644  {
645  std::ostringstream error_message;
646  error_message << "Range Error: Internal data " << i
647  << " is not in the range (0," << Ninternal_data - 1
648  << ")";
649  throw OomphLibError(error_message.str(),
652  }
653 #endif
654  return Data_pt[i];
655  }

References Data_pt, i, Ninternal_data, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ internal_local_eqn()

int oomph::GeneralisedElement::internal_local_eqn ( const unsigned i,
const unsigned j 
) const
inlineprotected

Return the local equation number corresponding to the j-th value stored at the i-th internal data

268  {
269 #ifdef RANGE_CHECKING
270  if (i >= Ninternal_data)
271  {
272  std::ostringstream error_message;
273  error_message << "Range Error: Internal data " << i
274  << " is not in the range (0," << Ninternal_data - 1
275  << ")";
276  throw OomphLibError(error_message.str(),
279  }
280  else
281  {
282  unsigned n_value = internal_data_pt(i)->nvalue();
283  if (j >= n_value)
284  {
285  std::ostringstream error_message;
286  error_message << "Range Error: value " << j << " at internal data "
287  << i << " is not in the range (0," << n_value - 1
288  << ")";
289  throw OomphLibError(error_message.str(),
292  }
293  }
294 #endif
295  // Check that the data has been allocated
296 #ifdef PARANOID
297  if (Data_local_eqn == 0)
298  {
299  throw OomphLibError(
300  "Internal local equation numbers have not been allocated",
303  }
304 #endif
305  // Return the local equation number as stored in the Data_local_eqn array
306  return Data_local_eqn[i][j];
307  }

References Data_local_eqn, i, internal_data_pt(), j, Ninternal_data, oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by oomph::FoepplvonKarmanVolumeConstraintElement< ELEMENT, MESH >::assign_additional_local_eqn_numbers(), oomph::DisplacementControlElement::assign_additional_local_eqn_numbers(), oomph::HeightControlElement::assign_additional_local_eqn_numbers(), oomph::ImmersedRigidBodyElement::centre_displacement_local_eqn(), oomph::LinearisedNavierStokesEigenfunctionNormalisationElement::eigenvalue_local_eqn(), HeatedCircularPenetratorElement::fill_in_contribution_to_residuals(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::fill_in_generic_contribution_to_residuals(), oomph::ElasticallySupportedRingElement::fill_in_generic_residual_contribution(), oomph::NavierStokesWomersleyPressureControlElement::fill_in_generic_residual_contribution_pressure_control(), fill_in_jacobian_from_internal_by_fd(), oomph::PseudoBucklingRingElement::geometric_local_eqn(), oomph::ImposeFluxForWomersleyElement< DIM >::get_residuals(), oomph::ConstraintElement::lagrange_eqn(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::p_local_eqn(), oomph::PolarCrouzeixRaviartElement::p_local_eqn(), oomph::AxisymmetricQCrouzeixRaviartElement::p_local_eqn(), oomph::AxisymmetricTCrouzeixRaviartElement::p_local_eqn(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::p_local_eqn(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::p_local_eqn(), oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >::p_local_eqn(), oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >::p_local_eqn(), oomph::QCrouzeixRaviartElement< DIM >::p_local_eqn(), oomph::TCrouzeixRaviartElement< DIM >::p_local_eqn(), oomph::TPoroelasticityElement< ORDER >::p_local_eqn(), oomph::QSphericalCrouzeixRaviartElement::p_local_eqn(), oomph::LinearisedAxisymmetricQCrouzeixRaviartElement::p_local_eqn(), oomph::LinearisedQCrouzeixRaviartElement::p_local_eqn(), oomph::VolumeConstraintElement::ptraded_local_eqn(), oomph::TAxisymmetricPoroelasticityElement< ORDER >::q_internal_local_eqn(), oomph::TRaviartThomasDarcyElement< ORDER >::q_internal_local_eqn(), oomph::TPoroelasticityElement< ORDER >::q_internal_local_eqn(), oomph::AxisymQPVDElementWithPressure::solid_p_local_eqn(), and oomph::QPVDElementWithPressure< DIM >::solid_p_local_eqn().

◆ local_eqn_number()

int oomph::GeneralisedElement::local_eqn_number ( const unsigned long &  ieqn_global) const
inline

Return the local equation number corresponding to the ieqn_global-th global equation number. Returns minus one (-1) if there is no local degree of freedom corresponding to the chosen global equation number

727  {
728  // Cache the number of degrees of freedom in the element
729  const unsigned n_dof = this->Ndof;
730  // Loop over the local equation numbers
731  for (unsigned n = 0; n < n_dof; n++)
732  {
733  // If the global equation numbers match return
734  if (ieqn_global == Eqn_number[n])
735  {
736  return n;
737  }
738  }
739 
740  // If we've got all the way to the end the number has not been found
741  // return minus one.
742  return -1;
743  }

References Eqn_number, n, and Ndof.

Referenced by oomph::ElementWithMovingNodes::assign_all_generic_local_eqn_numbers(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), oomph::RefineableElement::assign_hanging_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), oomph::FiniteElement::assign_nodal_local_eqn_numbers(), oomph::RefineableSolidElement::assign_solid_hanging_local_eqn_numbers(), oomph::SolidFiniteElement::assign_solid_local_eqn_numbers(), oomph::BiharmonicFluidBoundaryElement::fill_in_generic_residual_contribution_biharmonic_boundary(), oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >::fill_in_off_diagonal_block_analytic(), oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::fill_in_off_diagonal_block_analytic(), oomph::NavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >::fill_in_off_diagonal_block_analytic(), oomph::AdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::fill_in_off_diagonal_block_analytic(), oomph::AxisymmetricQCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricQTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricTCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::AxisymmetricTTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::BiharmonicEquations< DIM >::get_dof_numbers_for_unknowns(), oomph::TDisplacementBasedFoepplvonKarmanElement< NNODE_1D >::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricQTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianAxisymmetricTTaylorHoodElement::get_dof_numbers_for_unknowns(), oomph::GeneralisedNewtonianTTaylorHoodElement< DIM >::get_dof_numbers_for_unknowns(), oomph::DisplacementControlElement::get_dof_numbers_for_unknowns(), oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >::get_dof_numbers_for_unknowns(), oomph::TTaylorHoodElement< DIM >::get_dof_numbers_for_unknowns(), oomph::PMLHelmholtzEquations< DIM >::get_dof_numbers_for_unknowns(), oomph::PMLHelmholtzFluxElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::BlockPrecQTaylorHoodSpaceTimeElement::get_dof_numbers_for_unknowns(), oomph::BlockPrecQTaylorHoodMixedOrderSpaceTimeElement::get_dof_numbers_for_unknowns(), oomph::QSphericalCrouzeixRaviartElement::get_dof_numbers_for_unknowns(), oomph::QSphericalTaylorHoodElement::get_dof_numbers_for_unknowns(), and print_connectivity_matrix().

◆ ndof()

unsigned oomph::GeneralisedElement::ndof ( ) const
inline

Return the number of equations/dofs in the element.

836  {
837  return Ndof;
838  }

References Ndof.

Referenced by oomph::NavierStokesSchurComplementPreconditioner::assemble_inv_press_and_veloc_mass_matrix_diagonal(), oomph::PressureBasedSolidLSCPreconditioner::assemble_mass_matrix_diagonal(), oomph::ElementWithMovingNodes::assign_all_generic_local_eqn_numbers(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), oomph::RefineableElement::assign_hanging_local_eqn_numbers(), assign_internal_and_external_local_eqn_numbers(), oomph::FiniteElement::assign_nodal_local_eqn_numbers(), oomph::RefineableSolidElement::assign_solid_hanging_local_eqn_numbers(), oomph::SolidFiniteElement::assign_solid_local_eqn_numbers(), oomph::FoldHandler::eqn_number(), oomph::PitchForkHandler::eqn_number(), oomph::HopfHandler::eqn_number(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), oomph::AxisymmetricNavierStokesEquations::fill_in_contribution_to_hessian_vector_products(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_contribution_to_hessian_vector_products(), oomph::SpinePointMarangoniSurfactantFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_jacobian(), oomph::ElementWithExternalElement::fill_in_contribution_to_jacobian(), oomph::FiniteElement::fill_in_contribution_to_jacobian(), oomph::SolidFiniteElement::fill_in_contribution_to_jacobian(), oomph::FSIWallElement::fill_in_contribution_to_jacobian(), oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian(), oomph::DisplacementBasedFoepplvonKarmanEquations::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), ZeroResidualGenElement::fill_in_contribution_to_residuals(), oomph::ElasticallySupportedRingElement::fill_in_generic_residual_contribution(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_generic_residual_contribution_axi_nst(), oomph::PeriodicOrbitEquations::fill_in_generic_residual_contribution_orbit(), oomph::SphericalNavierStokesEquations::fill_in_generic_residual_contribution_spherical_nst(), fill_in_jacobian_from_external_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_field_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_geometric_by_fd(), oomph::ElementWithMovingNodes::fill_in_jacobian_from_geometric_data(), fill_in_jacobian_from_internal_by_fd(), oomph::FiniteElement::fill_in_jacobian_from_nodal_by_fd(), oomph::RefineableElement::fill_in_jacobian_from_nodal_by_fd(), oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::FoldHandler::FoldHandler(), oomph::EigenProblemHandler::get_all_vectors_and_matrices(), oomph::AxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableGeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::FiniteElement::get_dresidual_dnodal_coordinates(), oomph::RefineableElement::get_dresidual_dnodal_coordinates(), oomph::FoldHandler::get_dresiduals_dparameter(), oomph::PitchForkHandler::get_dresiduals_dparameter(), oomph::HopfHandler::get_dresiduals_dparameter(), oomph::PeriodicOrbitBaseElement::get_inner_product_matrix(), oomph::Problem::get_inverse_mass_matrix_times_residuals(), oomph::DGElement::get_inverse_mass_matrix_times_residuals(), oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), oomph::FpPreconditionerAssemblyHandler::get_jacobian(), oomph::ImposeFluxForWomersleyElement< DIM >::get_jacobian(), oomph::AxisymmetricNavierStokesEquations::get_pressure_and_velocity_mass_matrix_diagonal(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_pressure_and_velocity_mass_matrix_diagonal(), oomph::SphericalNavierStokesEquations::get_pressure_and_velocity_mass_matrix_diagonal(), oomph::FoldHandler::get_residuals(), oomph::PitchForkHandler::get_residuals(), oomph::HopfHandler::get_residuals(), oomph::FpPreconditionerAssemblyHandler::get_residuals(), oomph::HopfHandler::HopfHandler(), oomph::AssemblyHandler::ndof(), oomph::ExplicitTimeStepHandler::ndof(), oomph::EigenProblemHandler::ndof(), oomph::FoldHandler::ndof(), oomph::PitchForkHandler::ndof(), oomph::HopfHandler::ndof(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::ndof(), oomph::METIS::partition_mesh(), oomph::DGElement::pre_compute_mass_matrix(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().

◆ ndof_types()

virtual unsigned oomph::GeneralisedElement::ndof_types ( ) const
inlinevirtual

The number of types of degrees of freedom in this element are sub-divided into

Reimplemented in oomph::NetFluxControlElementForWomersleyPressureControl, oomph::NavierStokesWomersleyPressureControlElement, oomph::TimeHarmonicLinearElasticityEquationsBase< DIM >, oomph::TimeHarmonicFourierDecomposedLinearElasticityEquationsBase, oomph::QSphericalTaylorHoodElement, oomph::QSphericalCrouzeixRaviartElement, oomph::QTaylorHoodSpaceTimeElement< DIM >, oomph::QTaylorHoodSpaceTimeElement< 2 >, oomph::BlockPreconditionableSpaceTimeElementBase, oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >, oomph::FSISolidTractionElement< ELEMENT, DIM >, oomph::PVDEquationsWithPressure< DIM >, oomph::PVDEquationsBase< DIM >, oomph::ClampedHermiteShellBoundaryConditionElement, oomph::FSIDiagHermiteShellElement, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >, oomph::PMLHelmholtzFluxElement< ELEMENT >, oomph::PMLHelmholtzEquations< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::TCrouzeixRaviartElement< DIM >, oomph::NetFluxControlElement< ELEMENT >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< 2 >, oomph::QCrouzeixRaviartElement< DIM >, oomph::ImposeParallelOutflowElement< ELEMENT >, oomph::ImposeImpenetrabilityElement< ELEMENT >, oomph::RefineableAdvectionDiffusionBoussinesqElement< AD_ELEMENT, NST_ELEMENT >, oomph::RefineableNavierStokesBoussinesqElement< NST_ELEMENT, AD_ELEMENT >, oomph::LinearisedQTaylorHoodElement, oomph::LinearisedQCrouzeixRaviartElement, oomph::LinearisedAxisymmetricQTaylorHoodElement, oomph::LinearisedAxisymmetricQCrouzeixRaviartElement, oomph::LinearElasticityEquationsBase< DIM >, oomph::PseudoSolidNodeUpdateElement< TCrouzeixRaviartElement< 2 >, TPVDBubbleEnrichedElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< TTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianAxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< AxisymmetricTTaylorHoodElement, TPVDElement< 2, 3 > >, oomph::PseudoSolidNodeUpdateElement< GeneralisedNewtonianTTaylorHoodElement< 2 >, TPVDElement< 2, 3 > >, oomph::DisplacementControlElement, oomph::GeneralisedNewtonianTTaylorHoodElement< DIM >, oomph::GeneralisedNewtonianTCrouzeixRaviartElement< DIM >, oomph::GeneralisedNewtonianQTaylorHoodElement< DIM >, oomph::GeneralisedNewtonianQCrouzeixRaviartElement< DIM >, oomph::GeneralisedNewtonianAxisymmetricTTaylorHoodElement, oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement, oomph::GeneralisedNewtonianAxisymmetricQTaylorHoodElement, oomph::GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement, oomph::TDisplacementBasedFoepplvonKarmanElement< NNODE_1D >, oomph::BiharmonicEquations< DIM >, oomph::FSIHermiteBeamElement, oomph::AxisymmetricTTaylorHoodElement, oomph::AxisymmetricTCrouzeixRaviartElement, oomph::AxisymmetricQTaylorHoodElement, oomph::AxisymmetricQCrouzeixRaviartElement, oomph::AxisymmetricLinearElasticityEquationsBase, RefineableQAdvectionDiffusionElementWithExternalElement< DIM >, RefineableQCrouzeixRaviartElementWithExternalElement< DIM >, RefineableBuoyantQCrouzeixRaviartElement< DIM >, oomph::LinearisedAxisymmetricQTaylorHoodElement, oomph::LinearisedAxisymmetricQCrouzeixRaviartElement, oomph::MyLinearElasticityElement< DIM >, oomph::MultiPoissonEquations< DIM, NFIELDS >, and oomph::MyTaylorHoodElement< DIM >.

1203  {
1204  // error message stream
1205  std::ostringstream error_message;
1206  error_message << "ndof_types() const has not been implemented for this \n"
1207  << "element\n"
1208  << std::endl;
1209  // throw error
1210  throw OomphLibError(
1211  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1212  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ nexternal_data()

◆ ninternal_data()

unsigned oomph::GeneralisedElement::ninternal_data ( ) const
inline

Return the number of internal data objects.

824  {
825  return Ninternal_data;
826  }

References Ninternal_data.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), assign_local_eqn_numbers(), oomph::SolidICProblem::backup_original_state(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::ElementElementConstraintElement::build(), oomph::Problem::copy(), oomph::FSI_functions::doc_fsi(), oomph::Mesh::does_pointer_correspond_to_mesh_data(), oomph::Mesh::dump(), oomph::Problem::get_dofs(), oomph::PolarCrouzeixRaviartElement::get_load_data(), oomph::FiniteElement::identify_field_data_for_interactions(), oomph::RefineableElement::identify_field_data_for_interactions(), SegregatedFSICollapsibleChannelProblem< ELEMENT >::identify_fluid_and_solid_dofs(), SegregatedFSIDrivenCavityProblem< ELEMENT >::identify_fluid_and_solid_dofs(), oomph::AxisymmetricTCrouzeixRaviartElement::identify_pressure_data(), oomph::GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement::identify_pressure_data(), oomph::QSphericalCrouzeixRaviartElement::identify_pressure_data(), oomph::MyProblem::my_set_initial_condition(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), FlowAroundCylinderProblem< ELEMENT >::pin_all_base_flow_dofs(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::NavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::pin_all_non_pressure_dofs(), oomph::Mesh::read(), oomph::SolidICProblem::reset_original_state(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), oomph::Mesh::set_consistent_pinned_values_for_continuation(), oomph::Problem::set_dofs(), oomph::Problem::set_pinned_values_to_zero(), oomph::MyProblem::set_up_impulsive_initial_condition(), oomph::SolidICProblem::setup_problem(), and FlowAroundCylinderProblem< ELEMENT >::unpin_all_base_flow_dofs().

◆ operator=()

void oomph::GeneralisedElement::operator= ( const GeneralisedElement )
delete

Broken assignment operator.

◆ reset_after_external_fd()

virtual void oomph::GeneralisedElement::reset_after_external_fd ( )
inlineprotectedvirtual

Function that is call after the finite differencing of the external data. This may be overloaded to reset any dependent variables that may have changed during the finite differencing.

Reimplemented in oomph::ImmersedRigidBodyElement, oomph::FSIWallElement, and oomph::FluidInterfaceBoundingElement.

478 {}

Referenced by fill_in_jacobian_from_external_by_fd().

◆ reset_after_internal_fd()

virtual void oomph::GeneralisedElement::reset_after_internal_fd ( )
inlineprotectedvirtual

Function that is call after the finite differencing of the internal data. This may be overloaded to reset any dependent variables that may have changed during the finite differencing.

Reimplemented in oomph::ImmersedRigidBodyElement, and oomph::FSIWallElement.

454 {}

Referenced by fill_in_jacobian_from_internal_by_fd().

◆ reset_in_external_fd()

virtual void oomph::GeneralisedElement::reset_in_external_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for external data after the values in the i-th external data object are reset. The default behaviour is to call the update function.

Reimplemented in oomph::ImmersedRigidBodyElement, oomph::FSIWallElement, and oomph::FluidInterfaceBoundingElement.

489  {
491  }

References i, and update_in_external_fd().

Referenced by fill_in_jacobian_from_external_by_fd().

◆ reset_in_internal_fd()

virtual void oomph::GeneralisedElement::reset_in_internal_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for internal data after the values in the i-th external data object are reset. The default behaviour is to call the update function.

Reimplemented in oomph::ImmersedRigidBodyElement, and oomph::FSIWallElement.

465  {
467  }

References i, and update_in_internal_fd().

Referenced by fill_in_jacobian_from_internal_by_fd().

◆ self_test()

unsigned GeneralisedElement::self_test ( )
virtual

Self-test: Have all internal values been classified as pinned/unpinned? Return 0 if OK.

Reimplemented in oomph::YoungLaplaceEquations, oomph::WomersleyEquations< DIM >, oomph::UnsteadyHeatEquations< DIM >, oomph::UnsteadyHeatEquations< 2 >, oomph::SteadyAxisymAdvectionDiffusionEquations, oomph::SphericalAdvectionDiffusionEquations, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >, oomph::SpaceTimeUnsteadyHeatEquations< 2 >, oomph::PoroelasticityEquations< DIM >, oomph::PoroelasticityEquations< 2 >, oomph::PoissonEquations< DIM >, oomph::PoissonEquations< 1 >, oomph::PoissonEquations< 2 >, oomph::PoissonEquations< 3 >, oomph::PMLHelmholtzEquations< DIM >, oomph::PMLFourierDecomposedHelmholtzEquations, oomph::LinearWaveEquations< DIM >, oomph::HelmholtzEquations< DIM >, oomph::FiniteElement, oomph::FourierDecomposedHelmholtzEquations, oomph::FoepplvonKarmanEquations, oomph::DisplacementBasedFoepplvonKarmanEquations, oomph::DarcyEquations< DIM >, oomph::DarcyEquations< 2 >, oomph::BiharmonicEquations< DIM >, oomph::AxisymmetricPoroelasticityEquations, oomph::AxisymFoepplvonKarmanEquations, oomph::AxisymFoepplvonKarmanEquations, oomph::AxisymAdvectionDiffusionEquations, oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >, oomph::GeneralisedAdvectionDiffusionEquations< DIM >, oomph::GeneralisedAdvectionDiffusionEquations< 2 >, oomph::AdvectionDiffusionEquations< DIM >, oomph::AdvectionDiffusionEquations< 2 >, ModalPRefineableQPoissonElement< DIM >, ModalPoissonEquations< DIM >, TwoNodePoissonElement, and oomph::MultiPoissonEquations< DIM, NFIELDS >.

1604  {
1605  // Initialise
1606  bool passed = true;
1607 
1608  // Loop over internal Data
1609  for (unsigned i = 0; i < Ninternal_data; i++)
1610  {
1611  if (internal_data_pt(i)->self_test() != 0)
1612  {
1613  passed = false;
1614  oomph_info << "\n ERROR: Failed GeneralisedElement::self_test()!"
1615  << std::endl;
1616  oomph_info << "for internal data object number: " << i << std::endl;
1617  }
1618  }
1619 
1620  // Loop over external Data
1621  for (unsigned i = 0; i < Nexternal_data; i++)
1622  {
1623  if (external_data_pt(i)->self_test() != 0)
1624  {
1625  passed = false;
1626  oomph_info << "\n ERROR: Failed GeneralisedElement::self_test()!"
1627  << std::endl;
1628  oomph_info << "for external data object number: " << i << std::endl;
1629  }
1630  }
1631 
1632  // Return verdict
1633  if (passed)
1634  {
1635  return 0;
1636  }
1637  else
1638  {
1639  return 1;
1640  }
1641  }
virtual unsigned self_test()
Definition: elements.cc:1603

References external_data_pt(), i, internal_data_pt(), Nexternal_data, Ninternal_data, and oomph::oomph_info.

Referenced by oomph::FiniteElement::self_test().

◆ set_internal_data_time_stepper()

void oomph::GeneralisedElement::set_internal_data_time_stepper ( const unsigned i,
TimeStepper *const &  time_stepper_pt,
const bool preserve_existing_data 
)
inline

Set the timestepper associated with the i-th internal data object

896  {
897  this->internal_data_pt(i)->set_time_stepper(time_stepper_pt,
898  preserve_existing_data);
899  }
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: nodes.cc:406

References internal_data_pt(), and oomph::Data::set_time_stepper().

◆ update_before_external_fd()

virtual void oomph::GeneralisedElement::update_before_external_fd ( )
inlineprotectedvirtual

Function that is called before the finite differencing of any external data. This may be overloaded to update any dependent data before finite differencing takes place.

473 {}

Referenced by fill_in_jacobian_from_external_by_fd().

◆ update_before_internal_fd()

virtual void oomph::GeneralisedElement::update_before_internal_fd ( )
inlineprotectedvirtual

Function that is called before the finite differencing of any internal data. This may be overloaded to update any dependent data before finite differencing takes place.

449 {}

Referenced by fill_in_jacobian_from_internal_by_fd().

◆ update_in_external_fd()

virtual void oomph::GeneralisedElement::update_in_external_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for external data after a change in any values in the i-th external data object

Reimplemented in oomph::ImmersedRigidBodyElement, oomph::FSIWallElement, and oomph::FluidInterfaceBoundingElement.

483 {}

Referenced by fill_in_jacobian_from_external_by_fd(), and reset_in_external_fd().

◆ update_in_internal_fd()

virtual void oomph::GeneralisedElement::update_in_internal_fd ( const unsigned i)
inlineprotectedvirtual

Function called within the finite difference loop for internal data after a change in any values in the i-th internal data object.

Reimplemented in oomph::ImmersedRigidBodyElement, and oomph::FSIWallElement.

459 {}

Referenced by fill_in_jacobian_from_internal_by_fd(), and reset_in_internal_fd().

Member Data Documentation

◆ Data_fd

std::vector<bool> oomph::GeneralisedElement::Data_fd
private

Storage for boolean flags of size Ninternal_data + Nexternal_data that correspond to the data used in the element. The flags indicate whether the particular internal or external data should be included in the general finite-difference loop in fill_in_jacobian_from_internal_by_fd() or fill_in_jacobian_from_external_by_fd(). The default is that all data WILL be included in the finite-difference loop, but in many circumstances it is possible to treat certain (external) data analytically. The use of an STL vector is optimal for memory use because the booleans are represented as single-bits.

Referenced by add_external_data(), add_internal_data(), exclude_external_data_fd(), exclude_internal_data_fd(), external_data_fd(), flush_external_data(), include_external_data_fd(), include_internal_data_fd(), and internal_data_fd().

◆ Data_local_eqn

int** oomph::GeneralisedElement::Data_local_eqn
private

Pointer to array storage for local equation numbers associated with internal and external data. Again, we save storage by using a single pointer to access this information. The first index of the array is of dimension Nineternal_data + Nexternal_data and the second index varies with the number of values stored at the data object. In the most general case, however, the scheme is as memory efficient as possible.

Referenced by assign_internal_and_external_local_eqn_numbers(), external_local_eqn(), internal_local_eqn(), and ~GeneralisedElement().

◆ Data_pt

Data** oomph::GeneralisedElement::Data_pt
private

Storage for pointers to internal and external data. The data is of the same type and so can be addressed by a single pointer. The idea is that the array is of total size Ninternal_data + Nexternal_data. The internal data are stored at the beginning of the array and the external data are stored at the end of the array.

Referenced by add_external_data(), add_internal_data(), assign_internal_and_external_local_eqn_numbers(), external_data_pt(), flush_external_data(), internal_data_pt(), and ~GeneralisedElement().

◆ Default_fd_jacobian_step

double GeneralisedElement::Default_fd_jacobian_step = 1.0e-8
static

Double used for the default finite difference step in elemental jacobian calculations

Default value used as the increment for finite difference calculations of the jacobian matrices

Referenced by oomph::ConstitutiveLaw::calculate_d_second_piola_kirchhoff_stress_dG(), oomph::FluxTransportEquations< DIM >::dflux_du(), oomph::DGFaceElement::dnumerical_flux_du(), oomph::SpinePointMarangoniSurfactantFluidInterfaceBoundingElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::ConstraintElement::fill_in_contribution_to_residuals(), fill_in_jacobian_from_external_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_field_by_fd(), oomph::ElementWithExternalElement::fill_in_jacobian_from_external_interaction_geometric_by_fd(), oomph::ElementWithMovingNodes::fill_in_jacobian_from_geometric_data(), fill_in_jacobian_from_internal_by_fd(), oomph::FiniteElement::fill_in_jacobian_from_nodal_by_fd(), oomph::RefineableElement::fill_in_jacobian_from_nodal_by_fd(), oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::RefineableSolidElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::DoubleBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::RefineableDoubleBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_by_fd(), oomph::AxisymmetricNavierStokesEquations::get_body_force_gradient_axi_nst(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_body_force_gradient_axi_nst(), oomph::LinearisedAxisymmetricNavierStokesEquations::get_body_force_gradient_base_flow(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::get_body_force_gradient_nst(), oomph::NavierStokesEquations< DIM >::get_body_force_gradient_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_gradient_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::get_body_force_gradient_nst(), oomph::ElementWithMovingNodes::get_dnodal_coordinates_dgeom_dofs(), oomph::AxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableGeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::RefineableGeneralisedNewtonianNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::FiniteElement::get_dresidual_dnodal_coordinates(), oomph::RefineableElement::get_dresidual_dnodal_coordinates(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::SpaceTimeNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::RefineableSpaceTimeNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >::get_reaction_deriv_adv_diff_react(), oomph::AxisymmetricNavierStokesEquations::get_source_fct_gradient(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_source_fct_gradient(), oomph::LinearisedAxisymmetricNavierStokesEquations::get_source_gradient_base_flow(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::get_source_gradient_nst(), oomph::NavierStokesEquations< DIM >::get_source_gradient_nst(), oomph::SpaceTimeNavierStokesEquations< DIM >::get_source_gradient_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::get_source_gradient_nst(), oomph::PoissonEquations< DIM >::get_source_gradient_poisson(), and oomph::FiniteElement::locate_zeta().

◆ Dof_pt

double** oomph::GeneralisedElement::Dof_pt
private

Storage for array of pointers to degrees of freedom ordered by local equation number. This information is not needed, except in continuation, bifurcation tracking and periodic orbit calculations. It is not set up unless the control flag Problem::Store_local_dof_pts_in_elements = true

Referenced by add_global_eqn_numbers(), assign_internal_eqn_numbers(), clear_global_eqn_numbers(), dof_pt_vector(), and dof_vector().

◆ Dof_pt_deque

◆ Dummy_matrix

DenseMatrix< double > GeneralisedElement::Dummy_matrix
staticprotected

Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case when only the residuals are being assembled

Referenced by oomph::AxisymmetricNavierStokesEquations::fill_in_contribution_to_djacobian_dparameter(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_contribution_to_djacobian_dparameter(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter(), oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_djacobian_dparameter(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_djacobian_dparameter(), oomph::AxisymmetricNavierStokesEquations::fill_in_contribution_to_dresiduals_dparameter(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_contribution_to_dresiduals_dparameter(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter(), oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_dresiduals_dparameter(), oomph::PeriodicOrbitEquations::fill_in_contribution_to_integrated_residuals(), oomph::LinearisedAxisymmetricNavierStokesEquations::fill_in_contribution_to_jacobian(), MyNavierStokesElement::fill_in_contribution_to_jacobian(), oomph::PolarStreamfunctionTractionElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::AdvectionDiffusionEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::GeneralisedAdvectionDiffusionEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >::fill_in_contribution_to_jacobian(), oomph::AxisymAdvectionDiffusionEquations::fill_in_contribution_to_jacobian(), oomph::fill_in_contribution_to_jacobian(), oomph::AxisymmetricNavierStokesEquations::fill_in_contribution_to_jacobian(), oomph::FluxTransportEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_contribution_to_jacobian(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::PolarNavierStokesTractionElement< ELEMENT >::fill_in_contribution_to_jacobian(), oomph::PolarNavierStokesEquations::fill_in_contribution_to_jacobian(), oomph::PVDEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::SphericalAdvectionDiffusionEquations::fill_in_contribution_to_jacobian(), oomph::SphericalNavierStokesEquations::fill_in_contribution_to_jacobian(), oomph::SteadyAxisymAdvectionDiffusionEquations::fill_in_contribution_to_jacobian(), oomph::PolarStreamfunctionTractionElement< ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::PolarNavierStokesTractionElement< ELEMENT >::fill_in_contribution_to_jacobian_and_mass_matrix(), oomph::FluxTransportEquations< DIM >::fill_in_contribution_to_mass_matrix(), oomph::SingularNavierStokesSolutionElement< WRAPPED_NAVIER_STOKES_ELEMENT >::fill_in_contribution_to_residuals(), oomph::SCoupledElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::LinearisedAxisymmetricNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::UnsteadyHeatFluxPseudoMeltElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::HelmholtzPointSourceElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::HomogenisedLinearElasticityEquations< DIM >::fill_in_contribution_to_residuals(), oomph::MultiPoissonEquations< DIM, NFIELDS >::fill_in_contribution_to_residuals(), oomph::LinearisedAxisymmetricFluidInterfaceElement::fill_in_contribution_to_residuals(), DependentPositionPointElement::fill_in_contribution_to_residuals(), SlavePositionPointElement::fill_in_contribution_to_residuals(), oomph::NavierStokesElementWithSingularity< BASIC_NAVIER_STOKES_ELEMENT >::fill_in_contribution_to_residuals(), oomph::PMLHelmholtzPointSourceElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PolarStreamfunctionTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PolarStreamfunctionEquations::fill_in_contribution_to_residuals(), oomph::NavierStokesFluxControlElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::AdvectionDiffusionEquations< DIM >::fill_in_contribution_to_residuals(), oomph::AdvectionDiffusionFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::GeneralisedAdvectionDiffusionEquations< DIM >::fill_in_contribution_to_residuals(), oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >::fill_in_contribution_to_residuals(), oomph::AxisymAdvectionDiffusionEquations::fill_in_contribution_to_residuals(), oomph::fill_in_contribution_to_residuals(), oomph::AxisymmetricLinearElasticityEquations::fill_in_contribution_to_residuals(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::fill_in_contribution_to_residuals(), oomph::AxisymmetricNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::fill_in_contribution_to_residuals(), oomph::AxisymmetricPoroelasticityEquations::fill_in_contribution_to_residuals(), oomph::AxisymmetricPVDEquationsWithPressure::fill_in_contribution_to_residuals(), oomph::DarcyEquations< DIM >::fill_in_contribution_to_residuals(), oomph::FluidInterfaceBoundingElement::fill_in_contribution_to_residuals(), oomph::FluidInterfaceElement::fill_in_contribution_to_residuals(), oomph::FluxTransportEquations< DIM >::fill_in_contribution_to_residuals(), oomph::FourierDecomposedHelmholtzDtNBoundaryElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::FourierDecomposedHelmholtzEquations::fill_in_contribution_to_residuals(), oomph::FourierDecomposedHelmholtzFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::fill_in_contribution_to_residuals(), oomph::ProjectableElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::HelmholtzAbsorbingBCElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::HelmholtzDtNBoundaryElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::HelmholtzEquations< DIM >::fill_in_contribution_to_residuals(), oomph::HelmholtzFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::LinearElasticityEquations< DIM >::fill_in_contribution_to_residuals(), oomph::LinearWaveEquations< DIM >::fill_in_contribution_to_residuals(), oomph::LinearWaveFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::LinearisedNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_contribution_to_residuals(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_contribution_to_residuals(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_contribution_to_residuals(), oomph::NavierStokesTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::RefineableNavierStokesTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::ImposeImpenetrabilityElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::ImposeParallelOutflowElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_residuals(), oomph::RefineableNavierStokesFluxControlElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PMLFourierDecomposedHelmholtzEquations::fill_in_contribution_to_residuals(), oomph::PMLFourierDecomposedHelmholtzFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PMLHelmholtzEquations< DIM >::fill_in_contribution_to_residuals(), oomph::PMLHelmholtzFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PMLTimeHarmonicLinearElasticityEquations< DIM >::fill_in_contribution_to_residuals(), oomph::PoissonEquations< DIM >::fill_in_contribution_to_residuals(), oomph::PoissonFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PolarNavierStokesTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::PolarNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::PoroelasticityEquations< DIM >::fill_in_contribution_to_residuals(), oomph::ImmersedRigidBodyElement::fill_in_contribution_to_residuals(), oomph::PVDEquations< DIM >::fill_in_contribution_to_residuals(), oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_residuals(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::NavierStokesSpaceTimeTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::RefineableNavierStokesSpaceTimeTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_contribution_to_residuals(), oomph::NavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::RefineableNavierStokesMixedOrderSpaceTimeTractionElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_contribution_to_residuals(), oomph::SpaceTimeUnsteadyHeatEquations< SPATIAL_DIM >::fill_in_contribution_to_residuals(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_contribution_to_residuals(), oomph::SphericalAdvectionDiffusionEquations::fill_in_contribution_to_residuals(), oomph::SphericalAdvectionDiffusionFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::SphericalNavierStokesEquations::fill_in_contribution_to_residuals(), oomph::SteadyAxisymAdvectionDiffusionEquations::fill_in_contribution_to_residuals(), oomph::SteadyAxisymAdvectionDiffusionFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::TimeHarmonicFourierDecomposedLinearElasticityEquations::fill_in_contribution_to_residuals(), oomph::TimeHarmonicLinearElasticityEquations< DIM >::fill_in_contribution_to_residuals(), oomph::UnsteadyHeatEquations< DIM >::fill_in_contribution_to_residuals(), oomph::UnsteadyHeatFluxElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::WomersleyEquations< DIM >::fill_in_contribution_to_residuals(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::fill_in_contribution_to_residuals(), oomph::NavierStokesWomersleyPressureControlElement::fill_in_contribution_to_residuals(), oomph::NodeElementSolidOnlyMortaringElement::fill_in_contribution_to_residuals(), oomph::NodeNodeMortaringElement::fill_in_contribution_to_residuals(), oomph::ScaleCoupledElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::VolumeCoupledElement< ELEMENT >::fill_in_contribution_to_residuals(), oomph::NavierStokesElementWithSingularity< BASIC_NAVIER_STOKES_ELEMENT >::fill_in_generic_residual_contribution_wrapped_nst(), oomph::NavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals(), oomph::SpaceTimeNavierStokesEquations< DIM >::fill_in_pressure_advection_diffusion_residuals(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::fill_in_pressure_advection_diffusion_residuals(), and oomph::SolidFiniteElement::fill_in_residuals_for_solid_ic().

◆ Eqn_number

unsigned long* oomph::GeneralisedElement::Eqn_number
private

Storage for the global equation numbers represented by the degrees of freedom in the element.

Referenced by add_global_eqn_numbers(), assign_local_eqn_numbers(), clear_global_eqn_numbers(), eqn_number(), local_eqn_number(), and ~GeneralisedElement().

◆ Ndof

◆ Nexternal_data

◆ Ninternal_data

◆ Suppress_warning_about_repeated_external_data

bool GeneralisedElement::Suppress_warning_about_repeated_external_data = true
static

Static boolean to suppress warnings about repeated external data. Defaults to true.

Static boolean to suppress warnings about repeated external data. Defaults to true

Referenced by add_external_data().

◆ Suppress_warning_about_repeated_internal_data

bool GeneralisedElement::Suppress_warning_about_repeated_internal_data
static
Initial value:
=
false

Static boolean to suppress warnings about repeated internal data. Defaults to false.

Static boolean to suppress warnings about repeated internal data. Defaults to false

Referenced by add_internal_data().


The documentation for this class was generated from the following files: