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
00035
00040 template <unsigned ELEM_DIM>
00041 class QuadraticBasisFunction
00042 {
00043 public:
00044
00045 static double ComputeBasisFunction(const ChastePoint<ELEM_DIM>& rPoint, unsigned basisIndex);
00046 static c_vector<double, ELEM_DIM> ComputeBasisFunctionDerivative(const ChastePoint<ELEM_DIM>& rPoint, unsigned basisIndex);
00047
00048 static void ComputeBasisFunctions(const ChastePoint<ELEM_DIM>& rPoint, c_vector<double, (ELEM_DIM+1)*(ELEM_DIM+2)/2>& rReturnValue);
00049 static void ComputeBasisFunctionDerivatives(const ChastePoint<ELEM_DIM>& rPoint,
00050 c_matrix<double, ELEM_DIM, (ELEM_DIM+1)*(ELEM_DIM+2)/2>& rReturnValue);
00051
00052 static void ComputeTransformedBasisFunctionDerivatives(const ChastePoint<ELEM_DIM>& rPoint,
00053 const c_matrix<double, ELEM_DIM, ELEM_DIM>& rInverseJacobian,
00054 c_matrix<double, ELEM_DIM, (ELEM_DIM+1)*(ELEM_DIM+2)/2>& rReturnValue);
00055
00056
00057 };
00058
00062 template<>
00063 class QuadraticBasisFunction<0>
00064 {
00065 public:
00066 static double ComputeBasisFunction(const ChastePoint<0>& rPoint, unsigned basisIndex);
00067 static void ComputeBasisFunctions(const ChastePoint<0>& rPoint, c_vector<double, 1>& rReturnValue);
00068 };
00069
00070 #endif //_QUADRATICBASISFUNCTION_HPP_
00071