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
00029
00030
00031
00032
00033
00034
00035 #ifndef _QUADRATICBASISFUNCTION_HPP_
00036 #define _QUADRATICBASISFUNCTION_HPP_
00037
00038 #include "ChastePoint.hpp"
00039 #include "UblasMatrixInclude.hpp"
00040
00045 template <unsigned ELEMENT_DIM>
00046 class QuadraticBasisFunction
00047 {
00048 public:
00049
00050 static double ComputeBasisFunction(const ChastePoint<ELEMENT_DIM>& rPoint, unsigned basisIndex);
00051 static c_vector<double, ELEMENT_DIM> ComputeBasisFunctionDerivative(const ChastePoint<ELEMENT_DIM>& rPoint, unsigned basisIndex);
00052
00053 static void ComputeBasisFunctions(const ChastePoint<ELEMENT_DIM>& rPoint, c_vector<double, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00054 static void ComputeBasisFunctionDerivatives(const ChastePoint<ELEMENT_DIM>& rPoint,
00055 c_matrix<double, ELEMENT_DIM, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00056
00057 static void ComputeTransformedBasisFunctionDerivatives(const ChastePoint<ELEMENT_DIM>& rPoint,
00058 const c_matrix<double, ELEMENT_DIM, ELEMENT_DIM>& rInverseJacobian,
00059 c_matrix<double, ELEMENT_DIM, (ELEMENT_DIM+1)*(ELEMENT_DIM+2)/2>& rReturnValue);
00060 };
00061
00065 template<>
00066 class QuadraticBasisFunction<0>
00067 {
00068 public:
00069 static double ComputeBasisFunction(const ChastePoint<0>& rPoint, unsigned basisIndex);
00070 static void ComputeBasisFunctions(const ChastePoint<0>& rPoint, c_vector<double, 1>& rReturnValue);
00071 };
00072
00073 #endif //_QUADRATICBASISFUNCTION_HPP_