#include <Solver.h>
Public Member Functions | |
Solver () | |
virtual | ~Solver () |
virtual int | init (int num_nodes, int num_elements, mesh_node *node, tetra_element_linear *elem, SimulationParams *params, int num_pinned_nodes, int *pinned_nodes_list, set< int > bsite_pinned_nodes_list)=0 |
virtual int | solve (vector3 *x)=0 |
virtual void | apply_matrix (scalar *in, scalar *result)=0 |
|
inline |
Provide an empty constructor (to avoid linker problems)
|
inlinevirtual |
Make the destructor virtual (so that the destructor of derived classes will be called too)
Implemented in NoMassCGSolver, SparseSubstitutionSolver, ConjugateGradientSolver, and MassLumpedSolver.
Referenced by ~Solver().
|
pure virtual |
Initialises the solver (by building whatever representation of the mass matrix it needs) using the given node-element connectivity.
Implemented in NoMassCGSolver, SparseSubstitutionSolver, ConjugateGradientSolver, and MassLumpedSolver.
Referenced by Blob::init(), Blob::reset_solver(), and ~Solver().
|
pure virtual |
Solves the linear system Mx = f where f is the force vector (should be 'x' on input), and the mass matrix M has already been constructed (in whatever representation) by the init() function for a particular Blob. The solution is written to x.
Implemented in SparseSubstitutionSolver, NoMassCGSolver, ConjugateGradientSolver, and MassLumpedSolver.
Referenced by Blob::aggregate_forces_and_solve(), and ~Solver().