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 #ifndef _ABSTRACTLINEARPARABOLICPDE_HPP_
00029 #define _ABSTRACTLINEARPARABOLICPDE_HPP_
00030
00031 #include "UblasCustomFunctions.hpp"
00032 #include "ChastePoint.hpp"
00033 #include "Node.hpp"
00034 #include "Element.hpp"
00035 #include <petscvec.h>
00036
00037
00045 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
00046 class AbstractLinearParabolicPde
00047 {
00048 public:
00049
00055 virtual double ComputeDuDtCoefficientFunction(const ChastePoint<SPACE_DIM>& rX)=0;
00056
00063 virtual double ComputeSourceTerm(const ChastePoint<SPACE_DIM>& rX, double u)=0;
00064
00071 virtual double ComputeSourceTermAtNode(const Node<SPACE_DIM>& rNode, double u);
00072
00073
00081 virtual c_matrix<double, SPACE_DIM, SPACE_DIM> ComputeDiffusionTerm(const ChastePoint<SPACE_DIM>& rX, Element<ELEMENT_DIM,SPACE_DIM>* pElement=NULL)=0;
00085 virtual ~AbstractLinearParabolicPde()
00086 {}
00087 };
00088
00089
00091
00093
00094
00095
00096 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00097 double AbstractLinearParabolicPde<ELEMENT_DIM, SPACE_DIM>::ComputeSourceTermAtNode(const Node<SPACE_DIM>& rNode, double u)
00098 {
00099 return ComputeSourceTerm(rNode.GetPoint(), u);
00100 }
00101
00102 #endif //_ABSTRACTLINEARPARABOLICPDE_HPP_