A class that is used to assemble the residuals in parallel by overloading the get_all_vectors_and_matrices, so that only the residuals are returned. This ensures that the (moderately complex) distributed parallel assembly loops are only in one place. More...
#include <assembly_handler.h>
Public Member Functions | |
ParallelResidualsHandler (AssemblyHandler *const &assembly_handler_pt) | |
Constructor, set the original assembly handler. More... | |
unsigned | ndof (GeneralisedElement *const &elem_pt) |
Use underlying assembly handler to 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) |
Use underlying AssemblyHandler to 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) |
Use underlying AssemblyHandler to return the contribution to the residuals of the element elem_pt. More... | |
void | get_jacobian (GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian) |
Use underlying AssemblyHandler to Calculate the elemental Jacobian matrix "d equation
/ d variable" for elem_pt. More... | |
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 This function calls only the get_residuals function associated with the original assembly handler. More... | |
~ParallelResidualsHandler () | |
Empty virtual destructor. More... | |
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_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 | |
AssemblyHandler * | Assembly_handler_pt |
The original assembly handler. More... | |
A class that is used to assemble the residuals in parallel by overloading the get_all_vectors_and_matrices, so that only the residuals are returned. This ensures that the (moderately complex) distributed parallel assembly loops are only in one place.
Definition at line 268 of file assembly_handler.h.
|
inline |
Constructor, set the original assembly handler.
Definition at line 275 of file assembly_handler.h.
|
inline |
Empty virtual destructor.
Definition at line 327 of file assembly_handler.h.
|
inlinevirtual |
Use underlying AssemblyHandler to return the global equation number of the local unknown ieqn_local in elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 289 of file assembly_handler.h.
References Assembly_handler_pt, and oomph::AssemblyHandler::eqn_number().
|
inlinevirtual |
Calculate all desired vectors and matrices provided by the element elem_pt This function calls only the get_residuals function associated with the original assembly handler.
Reimplemented from oomph::AssemblyHandler.
Definition at line 319 of file assembly_handler.h.
References Assembly_handler_pt, and oomph::AssemblyHandler::get_residuals().
|
inlinevirtual |
Use underlying AssemblyHandler to Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 307 of file assembly_handler.h.
References Assembly_handler_pt, and oomph::AssemblyHandler::get_jacobian().
|
inlinevirtual |
Use underlying AssemblyHandler to return the contribution to the residuals of the element elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 297 of file assembly_handler.h.
References Assembly_handler_pt, and oomph::AssemblyHandler::get_residuals().
|
inlinevirtual |
Use underlying assembly handler to return the number of degrees of freedom in the element elem_pt.
Reimplemented from oomph::AssemblyHandler.
Definition at line 282 of file assembly_handler.h.
References Assembly_handler_pt, and oomph::AssemblyHandler::ndof().
|
private |
The original assembly handler.
Definition at line 271 of file assembly_handler.h.
Referenced by eqn_number(), get_all_vectors_and_matrices(), get_jacobian(), get_residuals(), and ndof().