Changeset ac6d04 for src/solver/solver.hpp
- Timestamp:
- Apr 10, 2012, 1:55:49 PM (14 years ago)
- Children:
- a40eea
- Parents:
- d24c2f
- File:
-
- 1 edited
-
src/solver/solver.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/solver/solver.hpp
rd24c2f rac6d04 20 20 #include "mg.hpp" 21 21 22 namespace VMGTests23 {24 class SolverTestSuite;25 }26 27 22 namespace VMG 28 23 { … … 31 26 { 32 27 public: 33 friend class VMGTests::SolverTestSuite;34 35 28 Solver() 36 29 { 37 30 size = 0; 31 } 32 33 Solver(int size) : 34 size(size) 35 { 36 this->Realloc(size); 38 37 } 39 38 … … 44 43 void Run(Grid& sol, Grid& rhs); 45 44 46 private:47 48 virtual void Compute() = 0; ///< Solves the system of equations49 virtual void AssembleMatrix(const Grid& rhs) = 0; ///< Assembles all matrices and vectors.50 virtual void ExportSol(Grid& sol, Grid& rhs) = 0; ///< Exports the solution back to a given mesh.51 52 std::vector<vmg_float> A, b, x;53 int size;54 55 protected:56 45 void Realloc(int n); 57 46 void Realloc(Grid& x); … … 73 62 74 63 const int& Size() const {return size;} 64 65 protected: 66 virtual void Compute() = 0; ///< Solves the system of equations 67 68 private: 69 virtual void AssembleMatrix(const Grid& rhs) = 0; ///< Assembles all matrices and vectors. 70 virtual void ExportSol(Grid& sol, Grid& rhs) = 0; ///< Exports the solution back to a given mesh. 71 72 std::vector<vmg_float> A, b, x; 73 int size; 75 74 }; 76 75
Note:
See TracChangeset
for help on using the changeset viewer.
