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 #ifndef MASSMATRIXASSEMBLER_HPP_
00031 #define MASSMATRIXASSEMBLER_HPP_
00032
00033 #include "AbstractFeObjectAssembler.hpp"
00034
00035
00045 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00046 class MassMatrixAssembler
00047 : public AbstractFeObjectAssembler<ELEMENT_DIM, SPACE_DIM, 1, false , true, NORMAL>
00048 {
00049 private:
00051 double mScaleFactor;
00052
00063 c_matrix<double,1*(ELEMENT_DIM+1),1*(ELEMENT_DIM+1)>
00064 ComputeMatrixTerm(
00065 c_vector<double, ELEMENT_DIM+1> &rPhi,
00066 c_matrix<double, SPACE_DIM, ELEMENT_DIM+1> &rGradPhi,
00067 ChastePoint<SPACE_DIM> &rX,
00068 c_vector<double,1> &rU,
00069 c_matrix<double, 1, SPACE_DIM> &rGradU ,
00070 Element<ELEMENT_DIM,SPACE_DIM>* pElement)
00071 {
00072 return mScaleFactor*outer_prod(rPhi, rPhi);
00073 }
00074 public:
00075
00081 MassMatrixAssembler(AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* pMesh, double scaleFactor=1.0)
00082 : AbstractFeObjectAssembler<ELEMENT_DIM,SPACE_DIM,1,false,true,NORMAL>(pMesh),
00083 mScaleFactor(scaleFactor)
00084 {
00085 }
00086 };
00087
00088 #endif