Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
LinearSystem Class Referenceabstract

Virtual class for solving a linear system of the form Ax = b. More...

#include <LinearSystem.hpp>

Inheritance diagram for LinearSystem:

Public Member Functions

 LinearSystem ()
 Creates a LinearSystem object. More...
 
virtual ~LinearSystem ()=0
 Destroys this LinearSystem object. More...
 
virtual const Eigen::VectorXd & GetSolution ()=0
 Gets the solution vector. More...
 
virtual bool SolveSystem (Eigen::SparseMatrix< double > &A, Eigen::VectorXd &b)=0
 Solve the linear system. More...
 

Detailed Description

Virtual class for solving a linear system of the form Ax = b.

See also
EigenSolver.hpp MumpsSolver.hpp PetscSolver.hpp

Constructor & Destructor Documentation

◆ LinearSystem()

LinearSystem::LinearSystem ( )

Creates a LinearSystem object.

◆ ~LinearSystem()

virtual LinearSystem::~LinearSystem ( )
pure virtual

Destroys this LinearSystem object.

Member Function Documentation

◆ GetSolution()

virtual const Eigen::VectorXd& LinearSystem::GetSolution ( )
pure virtual

Gets the solution vector.

Returns
The solution vector.

Implemented in MumpsSolver, PetscSolver, and EigenSolver.

◆ SolveSystem()

virtual bool LinearSystem::SolveSystem ( Eigen::SparseMatrix< double > &  A,
Eigen::VectorXd &  b 
)
pure virtual

Solve the linear system.

Parameters
AThe matrix with the left-hand side.
bThe vector with the right-hand side.
Returns
Whether or not the system was successfully solved.
See also
Integrator::ComputeEffectiveForce(), Integrator::ComputeEffectiveStiffness().

Implemented in MumpsSolver, PetscSolver, and EigenSolver.