A class that is used to assemble and solve the augmented system of equations associated with calculating periodic orbits directly. More...
#include <periodic_orbit_handler.h>
Public Member Functions | |
PeriodicOrbitAssemblyHandler (Problem *const &problem_pt, const unsigned &n_element_in_period, const DenseMatrix< double > &initial_guess, const double &omega) | |
Constructor, initialises values and constructs mesh of elements. More... | |
void | set_previous_dofs_to_current_dofs () |
Update the previous dofs. More... | |
unsigned | ndof (GeneralisedElement *const &elem_pt) |
Return the number of degrees of freedom in the element elem_pt. More... | |
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. More... | |
void | get_residuals (GeneralisedElement *const &elem_pt, Vector< double > &residuals) |
Return the contribution to the residuals of the element elem_pt. More... | |
void | get_dofs_for_element (GeneralisedElement *const elem_pt, Vector< double > &dofs) |
void | get_previous_dofs_for_element (GeneralisedElement *const elem_pt, Vector< double > &dofs) |
void | set_dofs_for_element (GeneralisedElement *const elem_pt, Vector< double > const &dofs) |
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. More... | |
void | orbit_output (std::ostream &outfile, const unsigned &n_plot) |
Calculate all desired vectors and matrices provided by the element elem_pt. More... | |
void | discrete_times (Vector< double > &t) |
Tell me the times at which you want the solution. More... | |
void | adapt_temporal_mesh () |
Adapt the time mesh. More... | |
~PeriodicOrbitAssemblyHandler () | |
Destructor, destroy the time mesh. More... | |
Public Member Functions inherited from oomph::PeriodicOrbitAssemblyHandlerBase | |
PeriodicOrbitAssemblyHandlerBase () | |
Public Member Functions inherited from oomph::AssemblyHandler | |
AssemblyHandler () | |
Empty constructor. More... | |
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. More... | |
virtual void | dof_pt_vector (GeneralisedElement *const &elem_pt, Vector< double * > &dof_pt) |
Return vector of pointers to dofs in the element elem_pt. More... | |
virtual double & | local_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. More... | |
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. More... | |
virtual void | get_dresiduals_dparameter (GeneralisedElement *const &elem_pt, double *const ¶meter_pt, Vector< double > &dres_dparam) |
Calculate the derivative of the residuals with respect to a parameter. More... | |
virtual void | get_djacobian_dparameter (GeneralisedElement *const &elem_pt, double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam) |
Calculate the derivative of the residuals and jacobian with respect to a parameter. More... | |
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}. More... | |
virtual int | bifurcation_type () const |
Return an unsigned integer to indicate whether the handler is a bifurcation tracking handler. The default is zero (not) More... | |
virtual double * | bifurcation_parameter_pt () const |
Return a pointer to the bifurcation parameter in bifurcation tracking problems. More... | |
virtual void | get_eigenfunction (Vector< DoubleVector > &eigenfunction) |
Return the eigenfunction(s) associated with the bifurcation that has been detected in bifurcation tracking problems. More... | |
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. More... | |
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. More... | |
virtual void | synchronise () |
Function that is used to perform any synchronisation required during the solution. More... | |
virtual | ~AssemblyHandler () |
Empty virtual destructor. More... | |
Private Attributes | |
PeriodicOrbitTimeDiscretisation * | Time_stepper_pt |
Pointer to the timestepper. More... | |
Problem * | Problem_pt |
Pointer to the problem. More... | |
PeriodicOrbitTemporalMesh< SpectralPeriodicOrbitElement< NNODE_1D > > * | Time_mesh_pt |
Storage for mesh of temporal elements. More... | |
Mesh * | Basic_time_mesh_pt |
Storage for the mesh of temporal elements with a simple mesh pointer. More... | |
Vector< double > | Previous_dofs |
Storage for the previous solution. More... | |
unsigned | Ndof |
Store number of degrees of freedom in the original problem. More... | |
unsigned | N_element_in_period |
Storage for number of elements in the period. More... | |
unsigned | N_tstorage |
Storage for the number of unknown time values. More... | |
double | Omega |
Storage for the frequency of the orbit (scaled by 2pi) More... | |
A class that is used to assemble and solve the augmented system of equations associated with calculating periodic orbits directly.
Definition at line 690 of file periodic_orbit_handler.h.
|
inline |
Constructor, initialises values and constructs mesh of elements.
Definition at line 719 of file periodic_orbit_handler.h.
|
inline |
Destructor, destroy the time mesh.
Definition at line 1450 of file periodic_orbit_handler.h.
References oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt.
|
inline |
Adapt the time mesh.
Definition at line 1045 of file periodic_orbit_handler.h.
References oomph::Problem::assign_eqn_numbers(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Basic_time_mesh_pt, oomph::LinearAlgebraDistribution::build(), oomph::Problem::communicator_pt(), oomph::Mesh::Default_TimeStepper, oomph::Problem::Dof_distribution_pt, oomph::Problem::Dof_pt, e, oomph::Mesh::element_pt(), oomph::Problem::global_data_pt(), i, oomph::GeneralisedElement::internal_data_pt(), oomph::Problem::mesh_pt(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::N_element_in_period, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::N_tstorage, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Ndof, oomph::Mesh::nelement(), oomph::Problem::nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), oomph::Problem::nsub_mesh(), oomph::Data::nvalue(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Omega, oomph::PeriodicOrbitEquations::omega_pt(), oomph::oomph_info, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Previous_dofs, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Problem_pt, oomph::PeriodicOrbitEquations::set_ntstorage(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs(), oomph::Data::set_time_stepper(), oomph::Data::set_value(), t, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt, oomph::PeriodicOrbitEquations::time_pt(), oomph::Problem::time_pt(), oomph::GeomObject::time_stepper_pt(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_stepper_pt, oomph::Data::value(), oomph::Node::value(), and oomph::SolidNode::variable_position_pt().
|
inline |
Tell me the times at which you want the solution.
Definition at line 1034 of file periodic_orbit_handler.h.
References t, and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt.
|
inlinevirtual |
Return the global equation number of the local unknown ieqn_local in elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 918 of file periodic_orbit_handler.h.
References oomph::GeneralisedElement::eqn_number(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::N_tstorage, oomph::GeneralisedElement::ndof(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Ndof, and t.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_dofs_for_element(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_previous_dofs_for_element(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_dofs_for_element().
|
inlinevirtual |
Implements oomph::PeriodicOrbitAssemblyHandlerBase.
Definition at line 949 of file periodic_orbit_handler.h.
References oomph::Problem::dof(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), i, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::ndof(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Problem_pt.
|
inlinevirtual |
Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 994 of file periodic_orbit_handler.h.
References oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt.
|
inlinevirtual |
Implements oomph::PeriodicOrbitAssemblyHandlerBase.
Definition at line 963 of file periodic_orbit_handler.h.
References oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), i, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::ndof(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Previous_dofs.
|
inlinevirtual |
Return the contribution to the residuals of the element elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 941 of file periodic_orbit_handler.h.
References oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt.
|
inlinevirtual |
Return the number of degrees of freedom in the element elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 911 of file periodic_orbit_handler.h.
References oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::N_tstorage, and oomph::GeneralisedElement::ndof().
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_dofs_for_element(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_previous_dofs_for_element(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_dofs_for_element().
|
inline |
Calculate all desired vectors and matrices provided by the element elem_pt.
Return an unsigned integer to indicate whether the handler is a bifurcation tracking handler. The default is zero (not) Return a pointer to the bifurcation parameter in bifurcation tracking problems Return the eigenfunction(s) associated with the bifurcation that has been detected in bifurcation tracking problems Return the contribution to the residuals of the element elem_pt
Definition at line 1022 of file periodic_orbit_handler.h.
References e, oomph::Mesh::element_pt(), oomph::Problem::mesh_pt(), oomph::Mesh::nelement(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Problem_pt, and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Time_mesh_pt.
|
inlinevirtual |
Implements oomph::PeriodicOrbitAssemblyHandlerBase.
Definition at line 978 of file periodic_orbit_handler.h.
References oomph::Problem::dof(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), i, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::ndof(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Problem_pt.
|
inline |
Update the previous dofs.
Definition at line 902 of file periodic_orbit_handler.h.
References oomph::Problem::dof(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::N_tstorage, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Ndof, oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Previous_dofs, and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::Problem_pt.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().
|
private |
Storage for the mesh of temporal elements with a simple mesh pointer.
Definition at line 704 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().
|
private |
Storage for number of elements in the period.
Definition at line 713 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().
|
private |
Storage for the number of unknown time values.
Definition at line 716 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::ndof(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs().
|
private |
Store number of degrees of freedom in the original problem.
Definition at line 710 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::eqn_number(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs().
|
private |
Storage for the frequency of the orbit (scaled by 2pi)
Definition at line 719 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().
|
private |
Storage for the previous solution.
Definition at line 707 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_previous_dofs_for_element(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs().
|
private |
Pointer to the problem.
Definition at line 697 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_dofs_for_element(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_dofs_for_element(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs().
|
private |
Storage for mesh of temporal elements.
Definition at line 701 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::discrete_times(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_jacobian(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_residuals(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), and oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::~PeriodicOrbitAssemblyHandler().
|
private |
Pointer to the timestepper.
Definition at line 694 of file periodic_orbit_handler.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().