AbstractLinearEllipticPde.hpp
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 #ifndef _ABSTRACTLINEARELLIPTICPDE_HPP_
00030 #define _ABSTRACTLINEARELLIPTICPDE_HPP_
00031
00032 #include "ChasteSerialization.hpp"
00033 #include "ClassIsAbstract.hpp"
00034
00035 #include "UblasCustomFunctions.hpp"
00036 #include "ChastePoint.hpp"
00037 #include "Node.hpp"
00038 #include "Element.hpp"
00039 #include <petscvec.h>
00040
00051 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00052 class AbstractLinearEllipticPde
00053 {
00054 private:
00055
00057 friend class boost::serialization::access;
00064 template<class Archive>
00065 void serialize(Archive & archive, const unsigned int version)
00066 {
00067 }
00068
00069 public:
00070
00074 AbstractLinearEllipticPde()
00075 {}
00076
00080 virtual ~AbstractLinearEllipticPde()
00081 {}
00082
00090 virtual double ComputeConstantInUSourceTerm(const ChastePoint<SPACE_DIM>& rX, Element<ELEMENT_DIM,SPACE_DIM>* pElement)=0;
00091
00099 virtual double ComputeLinearInUCoeffInSourceTerm(const ChastePoint<SPACE_DIM>& rX,
00100 Element<ELEMENT_DIM,SPACE_DIM>* pElement)=0;
00101
00108 virtual c_matrix<double, SPACE_DIM, SPACE_DIM> ComputeDiffusionTerm(const ChastePoint<SPACE_DIM>& rX)=0;
00109
00116 virtual double ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00117
00124 virtual double ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode);
00125 };
00126
00127 TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(AbstractLinearEllipticPde)
00128
00129
00130
00132
00133 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00134 double AbstractLinearEllipticPde<ELEMENT_DIM, SPACE_DIM>::ComputeConstantInUSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00135 {
00136 return ComputeConstantInUSourceTerm(rNode.GetPoint(), NULL);
00137 }
00138
00139 template <unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00140 double AbstractLinearEllipticPde<ELEMENT_DIM, SPACE_DIM>::ComputeLinearInUCoeffInSourceTermAtNode(const Node<SPACE_DIM>& rNode)
00141 {
00142 return ComputeLinearInUCoeffInSourceTerm(rNode.GetPoint(), NULL);
00143 }
00144
00145 #endif //_ABSTRACTLINEARELLIPTICPDE_HPP_