00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef ABSTRACTSTATICLINEARPDESOLVER_HPP_
00031 #define ABSTRACTSTATICLINEARPDESOLVER_HPP_
00032
00033 #include "AbstractLinearPdeSolver.hpp"
00034
00041 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
00042 class AbstractStaticLinearPdeSolver : public AbstractLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>
00043 {
00044 public:
00049 AbstractStaticLinearPdeSolver(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh)
00050 : AbstractLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>(pMesh)
00051 {
00052 }
00053
00058 Vec Solve(Vec initialGuess=NULL);
00059 };
00060
00061
00062 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
00063 Vec AbstractStaticLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>::Solve(Vec initialGuess)
00064 {
00065
00066 this->InitialiseForSolve(initialGuess);
00067
00068
00069 this->PrepareForSetupLinearSystem(NULL);
00070
00071
00072 this->SetupLinearSystem(NULL, true);
00073
00074 this->FinaliseLinearSystem(NULL);
00075
00076
00077 Vec solution = this->mpLinearSystem->Solve(initialGuess);
00078
00079 this->FollowingSolveLinearSystem(solution);
00080
00081 return solution;
00082 }
00083
00084
00085 #endif