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 #ifndef SIMPLELINEARELLIPTICSOLVER_HPP_
00030 #define SIMPLELINEARELLIPTICSOLVER_HPP_
00031
00032 #include "AbstractAssemblerSolverHybrid.hpp"
00033 #include "AbstractStaticLinearPdeSolver.hpp"
00034 #include "AbstractLinearEllipticPde.hpp"
00035
00041 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00042 class SimpleLinearEllipticSolver
00043 : public AbstractAssemblerSolverHybrid<ELEMENT_DIM, SPACE_DIM, 1, NORMAL>,
00044 public AbstractStaticLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, 1>
00045 {
00046 protected:
00047
00049 AbstractLinearEllipticPde<ELEMENT_DIM,SPACE_DIM>* mpEllipticPde;
00050
00063 virtual c_matrix<double, 1*(ELEMENT_DIM+1), 1*(ELEMENT_DIM+1)> ComputeMatrixTerm(
00064 c_vector<double, ELEMENT_DIM+1>& rPhi,
00065 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00066 ChastePoint<SPACE_DIM>& rX,
00067 c_vector<double,1>& rU,
00068 c_matrix<double,1,SPACE_DIM>& rGradU,
00069 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00070
00082 virtual c_vector<double,1*(ELEMENT_DIM+1)> ComputeVectorTerm(
00083 c_vector<double, ELEMENT_DIM+1>& rPhi,
00084 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00085 ChastePoint<SPACE_DIM>& rX,
00086 c_vector<double,1>& rU,
00087 c_matrix<double,1,SPACE_DIM>& rGradU,
00088 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00089
00090
00091
00092
00093
00094
00095
00096
00105 void SetupLinearSystem(Vec currentSolution, bool computeMatrix)
00106 {
00107 SetupGivenLinearSystem(currentSolution, computeMatrix, this->mpLinearSystem);
00108 }
00109
00110 public:
00111
00120 SimpleLinearEllipticSolver(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00121 AbstractLinearEllipticPde<ELEMENT_DIM,SPACE_DIM>* pPde,
00122 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,1>* pBoundaryConditions,
00123 unsigned numQuadPoints = 2);
00124
00131 void InitialiseForSolve(Vec initialSolution = NULL);
00132 };
00133
00134 #endif