![]() |
|
Element for integrating an initial value ODE. More...
#include <ode_elements.h>
Public Member Functions | |
ODEElement () | |
Default constructor: null any pointers. More... | |
ODEElement (TimeStepper *time_stepper_pt, SolutionFunctorBase *exact_solution_pt) | |
void | build (TimeStepper *time_stepper_pt, SolutionFunctorBase *exact_solution_pt) |
Store pointers, create internal data. More... | |
virtual | ~ODEElement () |
unsigned | nvalue () const |
virtual void | fill_in_contribution_to_residuals (Vector< double > &residuals) |
Get residuals. More... | |
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 > &mm) |
Vector< double > | exact_solution (const double &t) const |
Exact solution. More... | |
Vector< double > | derivative_function (const double &t, const Vector< double > &u) |
Exact solution. More... | |
![]() | |
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 ¤t_string) const |
virtual void | describe_local_dofs (std::ostream &out, const std::string ¤t_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 ¶meter_pt, Vector< double > &dres_dparam) |
virtual void | get_djacobian_dparameter (double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam) |
virtual void | get_djacobian_and_dmass_matrix_dparameter (double *const ¶meter_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 |
Public Attributes | |
SolutionFunctorBase * | Exact_solution_pt |
bool | Use_fd_jacobian |
Element for integrating an initial value ODE.
|
inline |
Default constructor: null any pointers.
References Exact_solution_pt, and Use_fd_jacobian.
|
inline |
Constructor: Pass time stepper and a solution function pointer, then build the element.
References build().
|
inline |
Store pointers, create internal data.
References oomph::GeneralisedElement::add_internal_data(), exact_solution(), Exact_solution_pt, nvalue(), and Use_fd_jacobian.
Referenced by ODEElement().
|
inline |
Exact solution.
References oomph::SolutionFunctorBase::derivative(), Exact_solution_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and plotPSD::t.
Referenced by oomph::IMRODEElement::fill_in_contribution_to_residuals(), and fill_in_contribution_to_residuals().
Exact solution.
References Exact_solution_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and plotPSD::t.
Referenced by build(), and oomph::ODEProblem::exact_solution().
|
inlinevirtual |
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 from oomph::GeneralisedElement.
Reimplemented in oomph::IMRODEElement.
References a, Exact_solution_pt, fill_in_contribution_to_residuals(), oomph::GeneralisedElement::fill_in_jacobian_from_internal_by_fd(), oomph::SolutionFunctorBase::have_jacobian(), i, oomph::GeneralisedElement::internal_data_pt(), oomph::SolutionFunctorBase::jacobian(), n, nvalue(), plotPSD::t, oomph::TimeStepper::time(), oomph::Data::time_stepper_pt(), Use_fd_jacobian, oomph::Data::value(), and oomph::TimeStepper::weight().
|
inlinevirtual |
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 from oomph::GeneralisedElement.
References fill_in_contribution_to_residuals(), j, and nvalue().
|
inlinevirtual |
Get residuals.
Reimplemented from oomph::GeneralisedElement.
Reimplemented in oomph::IMRODEElement.
References derivative_function(), oomph::GeneralisedElement::internal_data_pt(), j, nvalue(), plotPSD::t, oomph::TimeStepper::time(), oomph::TimeStepper::time_derivative(), oomph::Data::time_stepper_pt(), and oomph::Data::value().
Referenced by fill_in_contribution_to_jacobian(), and fill_in_contribution_to_mass_matrix().
|
inline |
References oomph::GeneralisedElement::internal_data_pt(), and oomph::Data::nvalue().
Referenced by build(), oomph::IMRODEElement::fill_in_contribution_to_jacobian(), fill_in_contribution_to_jacobian(), fill_in_contribution_to_mass_matrix(), fill_in_contribution_to_residuals(), oomph::ODEProblem::nvalue(), and oomph::IMRODEElement::time_interpolate_u().
SolutionFunctorBase* oomph::ODEElement::Exact_solution_pt |
bool oomph::ODEElement::Use_fd_jacobian |