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 SPACE_DIM>
00046 class AbstractLinearParabolicPde
00047 {
00048 public:
00052 virtual double ComputeDuDtCoefficientFunction(const ChastePoint<SPACE_DIM>& x)=0;
00053
00054
00059 virtual double ComputeNonlinearSourceTerm(const ChastePoint<SPACE_DIM>& x,
00060 double u)=0;
00061
00062 virtual double ComputeNonlinearSourceTermAtNode(const Node<SPACE_DIM>& node, double u)
00063 {
00064 return ComputeNonlinearSourceTerm(node.GetPoint(), u);
00065 }
00066
00067
00072 virtual double ComputeLinearSourceTerm(const ChastePoint<SPACE_DIM>& x)=0;
00073
00080 virtual c_matrix<double, SPACE_DIM, SPACE_DIM> ComputeDiffusionTerm(const ChastePoint<SPACE_DIM>& x, Element<SPACE_DIM,SPACE_DIM>* pElement=NULL)=0;
00081
00082 virtual double ComputeLinearSourceTermAtNode(const Node<SPACE_DIM>& node)
00083 {
00084 return ComputeLinearSourceTerm(node.GetPoint());
00085 }
00086
00087 virtual ~AbstractLinearParabolicPde()
00088 {}
00089 };
00090
00091 #endif //_ABSTRACTLINEARPARABOLICPDE_HPP_