36 #include "CellBasedEllipticPdeSolver.hpp"
38 template<
unsigned DIM>
46 template<
unsigned DIM>
51 template<
unsigned DIM>
53 c_vector<double, DIM+1>& rPhi,
54 c_matrix<double, DIM, DIM+1>& rGradPhi,
56 c_vector<double, 1>& rU,
57 c_matrix<double, 1, DIM>& rGradU ,
60 return mConstantInUSourceTerm * rPhi;
63 template<
unsigned DIM>
65 c_vector<double, DIM+1>& rPhi,
66 c_matrix<double, DIM, DIM+1>& rGradPhi,
68 c_vector<double, 1>& rU,
69 c_matrix<double, 1, DIM>& rGradU,
72 c_matrix<double, DIM, DIM> pde_diffusion_term = this->mpEllipticPde->ComputeDiffusionTerm(rX);
75 if (mLinearInUCoeffInSourceTerm != 0)
77 return prod( trans(rGradPhi), c_matrix<double, DIM, DIM+1>(prod(pde_diffusion_term, rGradPhi)) )
78 - mLinearInUCoeffInSourceTerm * outer_prod(rPhi,rPhi);
82 return prod( trans(rGradPhi), c_matrix<double, DIM, DIM+1>(prod(pde_diffusion_term, rGradPhi)) );
86 template<
unsigned DIM>
89 mConstantInUSourceTerm = 0;
90 mLinearInUCoeffInSourceTerm = 0;
93 template<
unsigned DIM>
96 mConstantInUSourceTerm += phiI * this->mpEllipticPde->ComputeConstantInUSourceTermAtNode(*pNode);
97 mLinearInUCoeffInSourceTerm += phiI * this->mpEllipticPde->ComputeLinearInUCoeffInSourceTermAtNode(*pNode);
100 template<
unsigned DIM>
106 this->mpLinearSystem->SetMatrixIsSymmetric(
true);
CellBasedEllipticPdeSolver(TetrahedralMesh< DIM, DIM > *pMesh, AbstractLinearEllipticPde< DIM, DIM > *pPde, BoundaryConditionsContainer< DIM, DIM, 1 > *pBoundaryConditions)
void IncrementInterpolatedQuantities(double phiI, const Node< DIM > *pNode)
void InitialiseForSolve(Vec initialSolution=nullptr)
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 ~CellBasedEllipticPdeSolver()
void InitialiseForSolve(Vec initialSolution)
void ResetInterpolatedQuantities()
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)