SimpleLinearEllipticSolver.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
00031
00032
00033
00034
00035
00036 #ifndef SIMPLELINEARELLIPTICSOLVER_HPP_
00037 #define SIMPLELINEARELLIPTICSOLVER_HPP_
00038
00039 #include "AbstractAssemblerSolverHybrid.hpp"
00040 #include "AbstractStaticLinearPdeSolver.hpp"
00041 #include "AbstractLinearEllipticPde.hpp"
00042
00048 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00049 class SimpleLinearEllipticSolver
00050 : public AbstractAssemblerSolverHybrid<ELEMENT_DIM, SPACE_DIM, 1, NORMAL>,
00051 public AbstractStaticLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, 1>
00052 {
00053 protected:
00054
00056 AbstractLinearEllipticPde<ELEMENT_DIM,SPACE_DIM>* mpEllipticPde;
00057
00070 virtual c_matrix<double, 1*(ELEMENT_DIM+1), 1*(ELEMENT_DIM+1)> ComputeMatrixTerm(
00071 c_vector<double, ELEMENT_DIM+1>& rPhi,
00072 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00073 ChastePoint<SPACE_DIM>& rX,
00074 c_vector<double,1>& rU,
00075 c_matrix<double,1,SPACE_DIM>& rGradU,
00076 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00077
00089 virtual c_vector<double,1*(ELEMENT_DIM+1)> ComputeVectorTerm(
00090 c_vector<double, ELEMENT_DIM+1>& rPhi,
00091 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00092 ChastePoint<SPACE_DIM>& rX,
00093 c_vector<double,1>& rU,
00094 c_matrix<double,1,SPACE_DIM>& rGradU,
00095 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00096
00097
00098
00099
00100
00101
00102
00103
00112 void SetupLinearSystem(Vec currentSolution, bool computeMatrix)
00113 {
00114 this->SetupGivenLinearSystem(currentSolution, computeMatrix, this->mpLinearSystem);
00115 }
00116
00117 public:
00118
00126 SimpleLinearEllipticSolver(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00127 AbstractLinearEllipticPde<ELEMENT_DIM,SPACE_DIM>* pPde,
00128 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,1>* pBoundaryConditions);
00129
00136 void InitialiseForSolve(Vec initialSolution = NULL);
00137 };
00138
00139 #endif