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
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 template <unsigned ELEM_DIM, unsigned SPACE_DIM>
00064 class AbstractLinearEllipticPde
00065 {
00066 public:
00067
00074 virtual double ComputeConstantInUSourceTerm(const ChastePoint<SPACE_DIM>& rX)=0;
00075
00083 virtual double ComputeLinearInUCoeffInSourceTerm(const ChastePoint<SPACE_DIM>& rX,
00084 Element<ELEM_DIM,SPACE_DIM>* pElement)=0;
00085
00092 virtual c_matrix<double, SPACE_DIM, SPACE_DIM> ComputeDiffusionTerm(const ChastePoint<SPACE_DIM>& rX)=0;
00093
00100 virtual double ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00101
00108 virtual double ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00109
00113 virtual ~AbstractLinearEllipticPde()
00114 {}
00115 };
00116
00117
00119
00121
00122
00123 template <unsigned ELEM_DIM, unsigned SPACE_DIM>
00124 double AbstractLinearEllipticPde<ELEM_DIM, SPACE_DIM>::ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00125 {
00126 return ComputeConstantInUSourceTerm(rNode.GetPoint());
00127 }
00128
00129 template <unsigned ELEM_DIM, unsigned SPACE_DIM>
00130 double AbstractLinearEllipticPde<ELEM_DIM, SPACE_DIM>::ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00131 {
00132 return ComputeLinearInUCoeffInSourceTerm(rNode.GetPoint(), NULL);
00133 }
00134
00135 #endif //_ABSTRACTLINEARELLIPTICPDE_HPP_