Public Member Functions | Private Attributes | List of all members
oomph::ParameterDerivativeHandler Class Reference

A class that is used to define the functions used when assembling the derivatives of the residuals with respect to a parameter. The idea is to replace get_residuals with get_dresiduals_dparameter with a particular parameter and assembly handler that are passed on assembly. More...

#include <assembly_handler.h>

+ Inheritance diagram for oomph::ParameterDerivativeHandler:

Public Member Functions

 ParameterDerivativeHandler (AssemblyHandler *const &assembly_handler_pt, double *const &parameter_pt)
 Store the original assembly handler and parameter.
 
unsigned ndof (GeneralisedElement *const &elem_pt)
 Return the number of degrees of freedom in the element elem_pt Pass through to the original assembly handler.
 
unsigned long eqn_number (GeneralisedElement *const &elem_pt, const unsigned &ieqn_local)
 Return the global equation number of the local unknown ieqn_local in elem_pt.Pass through to the original assembly handler.
 
void get_residuals (GeneralisedElement *const &elem_pt, Vector< double > &residuals)
 Return the contribution to the residuals of the element elem_pt by using the derivatives.
 
void get_jacobian (GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt. Overloaded to return the derivatives wrt the parameter.
 
- Public Member Functions inherited from oomph::AssemblyHandler
 AssemblyHandler ()
 Empty constructor.
 
virtual void dof_vector (GeneralisedElement *const &elem_pt, const unsigned &t, Vector< double > &dof)
 Return vector of dofs at time level t in the element elem_pt.
 
virtual void dof_pt_vector (GeneralisedElement *const &elem_pt, Vector< double * > &dof_pt)
 Return vector of pointers to dofs in the element elem_pt.
 
virtual doublelocal_problem_dof (Problem *const &problem_pt, const unsigned &t, const unsigned &i)
 Return the t-th level of storage associated with the i-th (local) dof stored in the problem.
 
virtual void get_all_vectors_and_matrices (GeneralisedElement *const &elem_pt, Vector< Vector< double > > &vec, Vector< DenseMatrix< double > > &matrix)
 Calculate all desired vectors and matrices provided by the element elem_pt.
 
virtual void get_dresiduals_dparameter (GeneralisedElement *const &elem_pt, double *const &parameter_pt, Vector< double > &dres_dparam)
 Calculate the derivative of the residuals with respect to a parameter.
 
virtual void get_djacobian_dparameter (GeneralisedElement *const &elem_pt, double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 Calculate the derivative of the residuals and jacobian with respect to a parameter.
 
virtual void get_hessian_vector_products (GeneralisedElement *const &elem_pt, Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 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}.
 
virtual int bifurcation_type () const
 Return an unsigned integer to indicate whether the handler is a bifurcation tracking handler. The default is zero (not)
 
virtual doublebifurcation_parameter_pt () const
 Return a pointer to the bifurcation parameter in bifurcation tracking problems.
 
virtual void get_eigenfunction (Vector< DoubleVector > &eigenfunction)
 Return the eigenfunction(s) associated with the bifurcation that has been detected in bifurcation tracking problems.
 
virtual void get_inner_products (GeneralisedElement *const &elem_pt, Vector< std::pair< unsigned, unsigned > > const &history_index, Vector< double > &inner_product)
 Compute the inner products of the given vector of pairs of history values over the element.
 
virtual void get_inner_product_vectors (GeneralisedElement *const &elem_pt, Vector< unsigned > const &history_index, Vector< Vector< double > > &inner_product_vector)
 Compute the vectors that when taken as a dot product with other history values give the inner product over the element.
 
virtual void synchronise ()
 Function that is used to perform any synchronisation required during the solution.
 
virtual ~AssemblyHandler ()
 Empty virtual destructor.
 

Private Attributes

doubleParameter_pt
 The value of the parameter.
 
AssemblyHandlerAssembly_handler_pt
 The original assembly handler.
 

Detailed Description

A class that is used to define the functions used when assembling the derivatives of the residuals with respect to a parameter. The idea is to replace get_residuals with get_dresiduals_dparameter with a particular parameter and assembly handler that are passed on assembly.

Definition at line 338 of file assembly_handler.h.

Constructor & Destructor Documentation

◆ ParameterDerivativeHandler()

oomph::ParameterDerivativeHandler::ParameterDerivativeHandler ( AssemblyHandler *const assembly_handler_pt,
double *const parameter_pt 
)
inline

Store the original assembly handler and parameter.

Definition at line 348 of file assembly_handler.h.

Member Function Documentation

◆ eqn_number()

unsigned long oomph::ParameterDerivativeHandler::eqn_number ( GeneralisedElement *const elem_pt,
const unsigned ieqn_local 
)
inlinevirtual

Return the global equation number of the local unknown ieqn_local in elem_pt.Pass through to the original assembly handler.

Reimplemented from oomph::AssemblyHandler.

Definition at line 363 of file assembly_handler.h.

References Assembly_handler_pt, and oomph::AssemblyHandler::eqn_number().

◆ get_jacobian()

void oomph::ParameterDerivativeHandler::get_jacobian ( GeneralisedElement *const elem_pt,
Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt. Overloaded to return the derivatives wrt the parameter.

Reimplemented from oomph::AssemblyHandler.

Definition at line 382 of file assembly_handler.h.

References Assembly_handler_pt, oomph::AssemblyHandler::get_djacobian_dparameter(), and Parameter_pt.

◆ get_residuals()

void oomph::ParameterDerivativeHandler::get_residuals ( GeneralisedElement *const elem_pt,
Vector< double > &  residuals 
)
inlinevirtual

Return the contribution to the residuals of the element elem_pt by using the derivatives.

Reimplemented from oomph::AssemblyHandler.

Definition at line 371 of file assembly_handler.h.

References Assembly_handler_pt, oomph::AssemblyHandler::get_dresiduals_dparameter(), and Parameter_pt.

◆ ndof()

unsigned oomph::ParameterDerivativeHandler::ndof ( GeneralisedElement *const elem_pt)
inlinevirtual

Return the number of degrees of freedom in the element elem_pt Pass through to the original assembly handler.

Reimplemented from oomph::AssemblyHandler.

Definition at line 356 of file assembly_handler.h.

References Assembly_handler_pt, and oomph::AssemblyHandler::ndof().

Member Data Documentation

◆ Assembly_handler_pt

AssemblyHandler* oomph::ParameterDerivativeHandler::Assembly_handler_pt
private

The original assembly handler.

Definition at line 344 of file assembly_handler.h.

Referenced by eqn_number(), get_jacobian(), get_residuals(), and ndof().

◆ Parameter_pt

double* oomph::ParameterDerivativeHandler::Parameter_pt
private

The value of the parameter.

Definition at line 341 of file assembly_handler.h.

Referenced by get_jacobian(), and get_residuals().


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