AbstractStaticLinearPdeSolver.hpp
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:
00045
00051 AbstractStaticLinearPdeSolver(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh)
00052 : AbstractLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>(pMesh)
00053 {
00054 }
00055
00061 Vec Solve(Vec initialGuess=NULL);
00062 };
00063
00064 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
00065 Vec AbstractStaticLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>::Solve(Vec initialGuess)
00066 {
00067
00068 this->InitialiseForSolve(initialGuess);
00069
00070
00071 this->PrepareForSetupLinearSystem(NULL);
00072
00073
00074 this->SetupLinearSystem(NULL, true);
00075
00076 this->FinaliseLinearSystem(NULL);
00077
00078
00079 Vec solution = this->mpLinearSystem->Solve(initialGuess);
00080
00081 this->FollowingSolveLinearSystem(solution);
00082
00083 return solution;
00084 }
00085
00086 #endif