36 #include "CellBasedPdeSolver.hpp"
37 #include "TetrahedralMesh.hpp"
38 #include "SimpleLinearEllipticSolver.hpp"
40 template<
unsigned DIM>
48 template<
unsigned DIM>
53 template<
unsigned DIM>
55 c_vector<double, DIM+1>& rPhi,
56 c_matrix<double, DIM, DIM+1>& rGradPhi,
58 c_vector<double, 1>& rU,
59 c_matrix<double, 1, DIM>& rGradU ,
62 return mConstantInUSourceTerm * rPhi;
65 template<
unsigned DIM>
67 c_vector<double, DIM+1>& rPhi,
68 c_matrix<double, DIM, DIM+1>& rGradPhi,
70 c_vector<double, 1>& rU,
71 c_matrix<double, 1, DIM>& rGradU,
74 c_matrix<double, DIM, DIM> pde_diffusion_term = this->mpEllipticPde->ComputeDiffusionTerm(rX);
77 if (mLinearInUCoeffInSourceTerm != 0)
79 return prod( trans(rGradPhi), c_matrix<double, DIM, DIM+1>(prod(pde_diffusion_term, rGradPhi)) )
80 - mLinearInUCoeffInSourceTerm * outer_prod(rPhi,rPhi);
84 return prod( trans(rGradPhi), c_matrix<double, DIM, DIM+1>(prod(pde_diffusion_term, rGradPhi)) );
88 template<
unsigned DIM>
91 mConstantInUSourceTerm = 0;
92 mLinearInUCoeffInSourceTerm = 0;
95 template<
unsigned DIM>
98 mConstantInUSourceTerm += phiI * this->mpEllipticPde->ComputeConstantInUSourceTermAtNode(*pNode);
99 mLinearInUCoeffInSourceTerm += phiI * this->mpEllipticPde->ComputeLinearInUCoeffInSourceTermAtNode(*pNode);
102 template<
unsigned DIM>
108 this->mpLinearSystem->SetMatrixIsSymmetric(
true);
void InitialiseForSolve(Vec initialSolution=NULL)
void ResetInterpolatedQuantities()
virtual c_vector< double, 1 *(DIM+1)> ComputeVectorTerm(c_vector< double, DIM+1 > &rPhi, c_matrix< double, DIM, DIM+1 > &rGradPhi, ChastePoint< DIM > &rX, c_vector< double, 1 > &rU, c_matrix< double, 1, DIM > &rGradU, Element< DIM, DIM > *pElement)
virtual ~CellBasedPdeSolver()
void InitialiseForSolve(Vec initialSolution)
virtual c_matrix< double, 1 *(DIM+1), 1 *(DIM+1)> ComputeMatrixTerm(c_vector< double, DIM+1 > &rPhi, c_matrix< double, DIM, DIM+1 > &rGradPhi, ChastePoint< DIM > &rX, c_vector< double, 1 > &rU, c_matrix< double, 1, DIM > &rGradU, Element< DIM, DIM > *pElement)
CellBasedPdeSolver(TetrahedralMesh< DIM, DIM > *pMesh, AbstractLinearEllipticPde< DIM, DIM > *pPde, BoundaryConditionsContainer< DIM, DIM, 1 > *pBoundaryConditions)
void IncrementInterpolatedQuantities(double phiI, const Node< DIM > *pNode)