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 SIMPLELINEARPARABOLICSOLVER_HPP_
00031 #define SIMPLELINEARPARABOLICSOLVER_HPP_
00032
00033 #include "AbstractAssemblerSolverHybrid.hpp"
00034 #include "AbstractDynamicLinearPdeSolver.hpp"
00035 #include "AbstractLinearParabolicPde.hpp"
00036
00042 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00043 class SimpleLinearParabolicSolver
00044 : public AbstractAssemblerSolverHybrid<ELEMENT_DIM, SPACE_DIM, 1, NORMAL>,
00045 public AbstractDynamicLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, 1>
00046 {
00047 protected:
00048
00050 AbstractLinearParabolicPde<ELEMENT_DIM,SPACE_DIM>* mpParabolicPde;
00051
00065 virtual c_matrix<double, 1*(ELEMENT_DIM+1), 1*(ELEMENT_DIM+1)> ComputeMatrixTerm(
00066 c_vector<double, ELEMENT_DIM+1>& rPhi,
00067 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00068 ChastePoint<SPACE_DIM>& rX,
00069 c_vector<double,1>& rU,
00070 c_matrix<double,1,SPACE_DIM>& rGradU,
00071 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00072
00083 virtual c_vector<double,1*(ELEMENT_DIM+1)> ComputeVectorTerm(
00084 c_vector<double, ELEMENT_DIM+1>& rPhi,
00085 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1>& rGradPhi,
00086 ChastePoint<SPACE_DIM>& rX,
00087 c_vector<double,1>& rU,
00088 c_matrix<double,1,SPACE_DIM>& rGradU,
00089 Element<ELEMENT_DIM,SPACE_DIM>* pElement);
00090
00099 virtual c_vector<double, ELEMENT_DIM> ComputeVectorSurfaceTerm(const BoundaryElement<ELEMENT_DIM-1,SPACE_DIM>& rSurfaceElement,
00100 c_vector<double, ELEMENT_DIM>& rPhi,
00101 ChastePoint<SPACE_DIM>& rX);
00102
00110 void SetupLinearSystem(Vec currentSolution, bool computeMatrix)
00111 {
00112 SetupGivenLinearSystem(currentSolution, computeMatrix, this->mpLinearSystem);
00113 }
00114
00115 public:
00116
00125 SimpleLinearParabolicSolver(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh,
00126 AbstractLinearParabolicPde<ELEMENT_DIM,SPACE_DIM>* pPde,
00127 BoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,1>* pBoundaryConditions,
00128 unsigned numQuadPoints = 2);
00129 };
00130
00131 #endif