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

A custom linear solver class that is used to solve a block-factorised version of the PitchFork bifurcation detection problem. More...

#include <assembly_handler.h>

+ Inheritance diagram for oomph::BlockPitchForkLinearSolver:

Public Member Functions

 BlockPitchForkLinearSolver (LinearSolver *const linear_solver_pt)
 Constructor, inherits the original linear solver. More...
 
 ~BlockPitchForkLinearSolver ()
 Destructor: clean up the allocated memory. 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. The interface is deliberately broken. 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...
 
LinearSolverlinear_solver_pt () const
 Access function to the original linear solver. More...
 
- Public Member Functions inherited from oomph::LinearSolver
 LinearSolver ()
 Empty constructor, initialise the member data. More...
 
 LinearSolver (const LinearSolver &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const LinearSolver &)=delete
 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 solve_transpose (Problem *const &problem_pt, DoubleVector &result)
 Solver: Takes pointer to problem and returns the results vector which contains the solution of the linear system defined by the problem's fully assembled Jacobian and residual vector (broken virtual). More...
 
virtual void solve_transpose (DoubleMatrixBase *const &matrix_pt, const DoubleVector &rhs, DoubleVector &result)
 Linear-algebra-type solver: Takes pointer to a matrix and rhs vector and returns the solution of the linear system. More...
 
virtual void solve_transpose (DoubleMatrixBase *const &matrix_pt, const Vector< double > &rhs, Vector< double > &result)
 Linear-algebra-type solver: Takes pointer to a matrix and rhs vector and returns the solution of the linear system. More...
 
virtual void resolve_transpose (const DoubleVector &rhs, DoubleVector &result)
 Solver: Resolve the system defined by the last assembled jacobian and the rhs vector. Solution is returned in the vector result. (broken virtual) 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...
 
- Public Member Functions inherited from oomph::DistributableLinearAlgebraObject
 DistributableLinearAlgebraObject ()
 Default constructor - create a distribution. More...
 
 DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete
 Broken copy constructor. More...
 
void operator= (const DistributableLinearAlgebraObject &)=delete
 Broken assignment operator. More...
 
virtual ~DistributableLinearAlgebraObject ()
 Destructor. More...
 
LinearAlgebraDistributiondistribution_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
 if the communicator_pt is null then the distribution is not setup then false is returned, otherwise return true More...
 
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

LinearSolverLinear_solver_pt
 Pointer to the original linear solver. More...
 
ProblemProblem_pt
 Pointer to the problem, used in the resolve. More...
 
DoubleVectorB_pt
 Pointer to the storage for the vector b. More...
 
DoubleVectorC_pt
 Pointer to the storage for the vector c. More...
 
DoubleVectorD_pt
 Pointer to the storage for the vector d. More...
 
DoubleVectordJy_dparam_pt
 Pointer to the storage for the vector of derivatives with respect to the bifurcation parameter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject
void clear_distribution ()
 clear the distribution of this distributable linear algebra object More...
 
- Protected Attributes inherited from oomph::LinearSolver
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...
 

Detailed Description

A custom linear solver class that is used to solve a block-factorised version of the PitchFork bifurcation detection problem.

Definition at line 608 of file assembly_handler.h.

Constructor & Destructor Documentation

◆ BlockPitchForkLinearSolver()

oomph::BlockPitchForkLinearSolver::BlockPitchForkLinearSolver ( LinearSolver *const  linear_solver_pt)
inline

Constructor, inherits the original linear solver.

Definition at line 631 of file assembly_handler.h.

◆ ~BlockPitchForkLinearSolver()

oomph::BlockPitchForkLinearSolver::~BlockPitchForkLinearSolver ( )

Destructor: clean up the allocated memory.

Clean up the memory that may have been allocated by the solver.

Definition at line 1681 of file assembly_handler.cc.

References B_pt, C_pt, D_pt, and dJy_dparam_pt.

Member Function Documentation

◆ linear_solver_pt()

LinearSolver* oomph::BlockPitchForkLinearSolver::linear_solver_pt ( ) const
inline

Access function to the original linear solver.

Definition at line 676 of file assembly_handler.h.

References Linear_solver_pt.

Referenced by oomph::PitchForkHandler::~PitchForkHandler().

◆ resolve()

void oomph::BlockPitchForkLinearSolver::resolve ( const DoubleVector rhs,
DoubleVector result 
)
virtual

◆ solve() [1/3]

void oomph::BlockPitchForkLinearSolver::solve ( DoubleMatrixBase *const &  matrix_pt,
const DoubleVector rhs,
DoubleVector result 
)
inlinevirtual

The linear-algebra-type solver does not make sense. The interface is deliberately broken.

Reimplemented from oomph::LinearSolver.

Definition at line 649 of file assembly_handler.h.

◆ solve() [2/3]

void oomph::BlockPitchForkLinearSolver::solve ( DoubleMatrixBase *const &  matrix_pt,
const Vector< double > &  rhs,
Vector< double > &  result 
)
inlinevirtual

The linear-algebra-type solver does not make sense. The interface is deliberately broken.

Reimplemented from oomph::LinearSolver.

Definition at line 661 of file assembly_handler.h.

◆ solve() [3/3]

void oomph::BlockPitchForkLinearSolver::solve ( Problem *const &  problem_pt,
DoubleVector result 
)
virtual

Member Data Documentation

◆ B_pt

DoubleVector* oomph::BlockPitchForkLinearSolver::B_pt
private

Pointer to the storage for the vector b.

Definition at line 617 of file assembly_handler.h.

Referenced by resolve(), solve(), and ~BlockPitchForkLinearSolver().

◆ C_pt

DoubleVector* oomph::BlockPitchForkLinearSolver::C_pt
private

Pointer to the storage for the vector c.

Definition at line 620 of file assembly_handler.h.

Referenced by resolve(), solve(), and ~BlockPitchForkLinearSolver().

◆ D_pt

DoubleVector* oomph::BlockPitchForkLinearSolver::D_pt
private

Pointer to the storage for the vector d.

Definition at line 623 of file assembly_handler.h.

Referenced by resolve(), solve(), and ~BlockPitchForkLinearSolver().

◆ dJy_dparam_pt

DoubleVector* oomph::BlockPitchForkLinearSolver::dJy_dparam_pt
private

Pointer to the storage for the vector of derivatives with respect to the bifurcation parameter.

Definition at line 627 of file assembly_handler.h.

Referenced by solve(), and ~BlockPitchForkLinearSolver().

◆ Linear_solver_pt

LinearSolver* oomph::BlockPitchForkLinearSolver::Linear_solver_pt
private

Pointer to the original linear solver.

Definition at line 611 of file assembly_handler.h.

Referenced by linear_solver_pt(), resolve(), and solve().

◆ Problem_pt

Problem* oomph::BlockPitchForkLinearSolver::Problem_pt
private

Pointer to the problem, used in the resolve.

Definition at line 614 of file assembly_handler.h.

Referenced by resolve(), and solve().


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