#include <assembly_handler.h>
Public Member Functions | |
BlockHopfLinearSolver (LinearSolver *const linear_solver_pt) | |
Constructor, inherits the original linear solver. More... | |
~BlockHopfLinearSolver () | |
Destructor: clean up the allocated memory. More... | |
void | solve_for_two_rhs (Problem *const &problem_pt, DoubleVector &result, const DoubleVector &rhs2, DoubleVector &result2) |
Solve for two right hand sides. More... | |
void | solve (Problem *const &problem_pt, DoubleVector &result) |
The solve function uses the block factorisation. More... | |
void | solve (DoubleMatrixBase *const &matrix_pt, const DoubleVector &rhs, DoubleVector &result) |
The linear-algebra-type solver does not make sense. More... | |
void | solve (DoubleMatrixBase *const &matrix_pt, const Vector< double > &rhs, Vector< double > &result) |
The linear-algebra-type solver does not make sense. The interface is deliberately broken. More... | |
void | resolve (const DoubleVector &rhs, DoubleVector &result) |
The resolve function also uses the block factorisation. More... | |
LinearSolver * | linear_solver_pt () const |
Access function to the original linear solver. More... | |
![]() | |
LinearSolver () | |
Empty constructor, initialise the member data. More... | |
LinearSolver (const LinearSolver &dummy) | |
Broken copy constructor. More... | |
void | operator= (const LinearSolver &) |
Broken assignment operator. More... | |
virtual | ~LinearSolver () |
Empty virtual destructor. More... | |
void | enable_doc_time () |
Enable documentation of solve times. More... | |
void | disable_doc_time () |
Disable documentation of solve times. More... | |
bool | is_doc_time_enabled () const |
Is documentation of solve times enabled? More... | |
bool | is_resolve_enabled () const |
Boolean flag indicating if resolves are enabled. More... | |
virtual void | enable_resolve () |
Enable resolve (i.e. store matrix and/or LU decomposition, say) Virtual so it can be overloaded to perform additional tasks. More... | |
virtual void | disable_resolve () |
Disable resolve (i.e. store matrix and/or LU decomposition, say) This function simply resets an internal flag. It's virtual so it can be overloaded to perform additional tasks such as cleaning up memory that is only required for the resolve. More... | |
virtual void | clean_up_memory () |
Empty virtual function that can be overloaded in specific linear solvers to clean up any memory that may have been allocated (e.g. when preparing for a re-solve). More... | |
virtual double | jacobian_setup_time () const |
returns the time taken to assemble the Jacobian matrix and residual vector (needs to be overloaded for each solver) More... | |
virtual double | linear_solver_solution_time () const |
return the time taken to solve the linear system (needs to be overloaded for each linear solver) More... | |
virtual void | enable_computation_of_gradient () |
function to enable the computation of the gradient required for the globally convergent Newton method More... | |
void | disable_computation_of_gradient () |
function to disable the computation of the gradient required for the globally convergent Newton method More... | |
void | reset_gradient () |
function to reset the size of the gradient before each Newton solve More... | |
void | get_gradient (DoubleVector &gradient) |
function to access the gradient, provided it has been computed More... | |
![]() | |
DistributableLinearAlgebraObject () | |
Default constructor - create a distribution. More... | |
DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix) | |
Broken copy constructor. More... | |
void | operator= (const DistributableLinearAlgebraObject &) |
Broken assignment operator. More... | |
virtual | ~DistributableLinearAlgebraObject () |
Destructor. More... | |
LinearAlgebraDistribution * | distribution_pt () const |
access to the LinearAlgebraDistribution More... | |
unsigned | nrow () const |
access function to the number of global rows. More... | |
unsigned | nrow_local () const |
access function for the num of local rows on this processor. More... | |
unsigned | nrow_local (const unsigned &p) const |
access function for the num of local rows on this processor. More... | |
unsigned | first_row () const |
access function for the first row on this processor More... | |
unsigned | first_row (const unsigned &p) const |
access function for the first row on this processor More... | |
bool | distributed () const |
distribution is serial or distributed More... | |
bool | distribution_built () const |
void | build_distribution (const LinearAlgebraDistribution *const dist_pt) |
setup the distribution of this distributable linear algebra object More... | |
void | build_distribution (const LinearAlgebraDistribution &dist) |
setup the distribution of this distributable linear algebra object More... | |
Private Attributes | |
LinearSolver * | Linear_solver_pt |
Pointer to the original linear solver. More... | |
Problem * | Problem_pt |
Pointer to the problem, used in the resolve. More... | |
DoubleVector * | A_pt |
Pointer to the storage for the vector a. More... | |
DoubleVector * | E_pt |
Pointer to the storage for the vector e (0 to n-1) More... | |
DoubleVector * | G_pt |
Pointer to the storage for the vector g (0 to n-1) More... | |
Additional Inherited Members | |
![]() | |
void | clear_distribution () |
clear the distribution of this distributable linear algebra object More... | |
![]() | |
bool | Enable_resolve |
Boolean that indicates whether the matrix (or its factors, in the case of direct solver) should be stored so that the resolve function can be used. More... | |
bool | Doc_time |
Boolean flag that indicates whether the time taken. More... | |
bool | Compute_gradient |
flag that indicates whether the gradient required for the globally convergent Newton method should be computed or not More... | |
bool | Gradient_has_been_computed |
flag that indicates whether the gradient was computed or not More... | |
DoubleVector | Gradient_for_glob_conv_newton_solve |
DoubleVector storing the gradient for the globally convergent Newton method. More... | |
A custom linear solver class that is used to solve a block-factorised version of the Hopf bifurcation detection problem.
Definition at line 922 of file assembly_handler.h.
|
inline |
Constructor, inherits the original linear solver.
Definition at line 942 of file assembly_handler.h.
oomph::BlockHopfLinearSolver::~BlockHopfLinearSolver | ( | ) |
Destructor: clean up the allocated memory.
Clean up the memory that may have been allocated by the solver.
Definition at line 3462 of file assembly_handler.cc.
|
inline |
Access function to the original linear solver.
Definition at line 987 of file assembly_handler.h.
Referenced by oomph::HopfHandler::~HopfHandler().
|
virtual |
The resolve function also uses the block factorisation.
Reimplemented from oomph::LinearSolver.
Definition at line 4208 of file assembly_handler.cc.
|
virtual |
The solve function uses the block factorisation.
Use a block factorisation to solve the augmented system associated with a Hopf bifurcation.
Implements oomph::LinearSolver.
Definition at line 3473 of file assembly_handler.cc.
References oomph::Problem::actions_after_change_in_bifurcation_parameter(), oomph::Problem::assembly_handler_pt(), oomph::DoubleVector::built(), oomph::HopfHandler::C, oomph::Problem::communicator_pt(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::Problem::dof(), e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::eqn_number(), oomph::PitchForkHandler::eqn_number(), oomph::BlackBoxFDNewtonSolver::FD_step, oomph::GeneralisedElement::get_jacobian_and_mass_matrix(), oomph::Problem::get_residuals(), i, oomph::Problem::mesh_pt(), oomph::GeneralisedElement::ndof(), oomph::Problem::ndof(), oomph::Mesh::nelement(), oomph::HopfHandler::Omega, oomph::HopfHandler::Phi, oomph::PitchForkHandler::Problem_pt, oomph::HopfHandler::Psi, oomph::Problem::sign_of_jacobian(), oomph::HopfHandler::solve_complex_system(), oomph::HopfHandler::solve_full_system(), and oomph::HopfHandler::solve_standard_system().
|
inlinevirtual |
The linear-algebra-type solver does not make sense.
The interface is deliberately broken
Reimplemented from oomph::LinearSolver.
Definition at line 960 of file assembly_handler.h.
|
inlinevirtual |
The linear-algebra-type solver does not make sense. The interface is deliberately broken.
Reimplemented from oomph::LinearSolver.
Definition at line 972 of file assembly_handler.h.
void oomph::BlockHopfLinearSolver::solve_for_two_rhs | ( | Problem *const & | problem_pt, |
DoubleVector & | result, | ||
const DoubleVector & | rhs2, | ||
DoubleVector & | result2 | ||
) |
Solve for two right hand sides.
Solve for two right hand sides, required for (efficient) continuation because otherwise we have to store the inverse of the jacobian and the complex equivalent ... nasty.
Definition at line 3792 of file assembly_handler.cc.
References oomph::Problem::actions_after_change_in_bifurcation_parameter(), oomph::Problem::assembly_handler_pt(), oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::HopfHandler::C, oomph::Problem::communicator_pt(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::Problem::dof(), e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::eqn_number(), oomph::PitchForkHandler::eqn_number(), oomph::BlackBoxFDNewtonSolver::FD_step, oomph::GeneralisedElement::get_jacobian_and_mass_matrix(), oomph::Problem::get_residuals(), i, oomph::Problem::mesh_pt(), oomph::GeneralisedElement::ndof(), oomph::Problem::ndof(), oomph::Mesh::nelement(), oomph::HopfHandler::Omega, oomph::HopfHandler::Phi, oomph::PitchForkHandler::Problem_pt, oomph::HopfHandler::Psi, oomph::Problem::sign_of_jacobian(), oomph::HopfHandler::solve_complex_system(), oomph::HopfHandler::solve_full_system(), and oomph::HopfHandler::solve_standard_system().
|
private |
Pointer to the storage for the vector a.
Definition at line 931 of file assembly_handler.h.
|
private |
Pointer to the storage for the vector e (0 to n-1)
Definition at line 934 of file assembly_handler.h.
|
private |
Pointer to the storage for the vector g (0 to n-1)
Definition at line 937 of file assembly_handler.h.
|
private |
Pointer to the original linear solver.
Definition at line 925 of file assembly_handler.h.
|
private |
Pointer to the problem, used in the resolve.
Definition at line 928 of file assembly_handler.h.