Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
LinearSystem.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // Seismo Virtual Laboratory
4 // Module for Serial and Parallel Analysis of seismic
5 // wave propagation and soil-structure interaction simulation
6 // Copyright (C) 2018-2021, The California Institute of Technology
7 // All Rights Reserved.
8 //
9 // Commercial use of this program without express permission of the California
10 // Institute of Technology, is strictly prohibited. See file "COPYRIGHT" in
11 // main directory for information on usage and redistribution, and for a
12 // DISCLAIMER OF ALL WARRANTIES.
13 //
14 //==============================================================================
15 //
16 // Written by:
17 // Danilo S. Kusanovic (dkusanov@caltech.edu)
18 // Elnaz E. Seylabi (elnaze@unr.edu)
19 //
20 // Supervised by:
21 // Domniki M. Asimaki (domniki@caltech.edu)
22 //
23 // References :
24 // [1]
25 //
26 // Description:
29 //------------------------------------------------------------------------------
30 
31 #ifndef _LINEARSYSTEM_HHP_
32 #define _LINEARSYSTEM_HHP_
33 
34 #include <Eigen/Dense>
35 #include <Eigen/SparseCore>
36 
44 class LinearSystem {
45 
46  public:
48  LinearSystem();
49 
51  virtual ~LinearSystem() = 0;
52 
55  virtual const Eigen::VectorXd& GetSolution() = 0;
56 
62  virtual bool SolveSystem(Eigen::SparseMatrix<double> &A, Eigen::VectorXd &b) = 0;
63 
64  private:
65  //No private varibles.
66 };
67 
68 #endif
virtual ~LinearSystem()=0
Destroys this LinearSystem object.
LinearSystem()
Creates a LinearSystem object.
virtual const Eigen::VectorXd & GetSolution()=0
Gets the solution vector.
virtual bool SolveSystem(Eigen::SparseMatrix< double > &A, Eigen::VectorXd &b)=0
Solve the linear system.
Virtual class for solving a linear system of the form Ax = b.
Definition: LinearSystem.hpp:44