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 _ABSTRACTLINEARELLIPTICPDE_HPP_
00029 #define _ABSTRACTLINEARELLIPTICPDE_HPP_
00030
00031 #include "UblasCustomFunctions.hpp"
00032 #include "ChastePoint.hpp"
00033 #include "Node.hpp"
00034 #include "Element.hpp"
00035 #include <petscvec.h>
00036
00037
00049 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00050 class AbstractLinearEllipticPde
00051 {
00052 public:
00053
00060 virtual double ComputeConstantInUSourceTerm(const ChastePoint<SPACE_DIM>& rX)=0;
00061
00069 virtual double ComputeLinearInUCoeffInSourceTerm(const ChastePoint<SPACE_DIM>& rX,
00070 Element<ELEMENT_DIM,SPACE_DIM>* pElement)=0;
00071
00078 virtual c_matrix<double, SPACE_DIM, SPACE_DIM> ComputeDiffusionTerm(const ChastePoint<SPACE_DIM>& rX)=0;
00079
00086 virtual double ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00087
00094 virtual double ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00095
00099 virtual ~AbstractLinearEllipticPde()
00100 {}
00101 };
00102
00103
00105
00107
00108
00109 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00110 double AbstractLinearEllipticPde<ELEMENT_DIM, SPACE_DIM>::ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00111 {
00112 return ComputeConstantInUSourceTerm(rNode.GetPoint());
00113 }
00114
00115 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00116 double AbstractLinearEllipticPde<ELEMENT_DIM, SPACE_DIM>::ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00117 {
00118 return ComputeLinearInUCoeffInSourceTerm(rNode.GetPoint(), NULL);
00119 }
00120
00121 #endif //_ABSTRACTLINEARELLIPTICPDE_HPP_