QuadraticBasisFunction.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 #ifndef _QUADRATICBASISFUNCTION_HPP_
00029 #define _QUADRATICBASISFUNCTION_HPP_
00030
00031 #include <boost/numeric/ublas/matrix.hpp>
00032
00033 #include "ChastePoint.hpp"
00034
00039 template <unsigned ELEMENT_DIM>
00040 class QuadraticBasisFunction
00041 {
00042 public:
00043
00044 static double ComputeBasisFunction(const ChastePoint<ELEMENT_DIM>& rPoint, unsigned basisIndex);
00045 static c_vector<double, ELEMENT_DIM> ComputeBasisFunctionDerivative(const ChastePoint<ELEMENT_DIM>& rPoint, unsigned basisIndex);
00046
00047 static void ComputeBasisFunctions(const ChastePoint<ELEMENT_DIM>& rPoint, c_vector<double, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00048 static void ComputeBasisFunctionDerivatives(const ChastePoint<ELEMENT_DIM>& rPoint,
00049 c_matrix<double, ELEMENT_DIM, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00050
00051 static void ComputeTransformedBasisFunctionDerivatives(const ChastePoint<ELEMENT_DIM>& rPoint,
00052 const c_matrix<double, ELEMENT_DIM, ELEMENT_DIM>& rInverseJacobian,
00053 c_matrix<double, ELEMENT_DIM, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00054 };
00055
00059 template<>
00060 class QuadraticBasisFunction<0>
00061 {
00062 public:
00063 static double ComputeBasisFunction(const ChastePoint<0>& rPoint, unsigned basisIndex);
00064 static void ComputeBasisFunctions(const ChastePoint<0>& rPoint, c_vector<double, 1>& rReturnValue);
00065 };
00066
00067 #endif //_QUADRATICBASISFUNCTION_HPP_