Chaste  Release::3.4
CellBasedPdeSolver< DIM > Class Template Reference

#include <CellBasedPdeSolver.hpp>

+ Inheritance diagram for CellBasedPdeSolver< DIM >:
+ Collaboration diagram for CellBasedPdeSolver< DIM >:

Public Member Functions

 CellBasedPdeSolver (TetrahedralMesh< DIM, DIM > *pMesh, AbstractLinearEllipticPde< DIM, DIM > *pPde, BoundaryConditionsContainer< DIM, DIM, 1 > *pBoundaryConditions)
 
virtual ~CellBasedPdeSolver ()
 
- Public Member Functions inherited from SimpleLinearEllipticSolver< DIM, DIM >
 SimpleLinearEllipticSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, AbstractLinearEllipticPde< ELEMENT_DIM, SPACE_DIM > *pPde, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 1 > *pBoundaryConditions)
 
void InitialiseForSolve (Vec initialSolution=NULL)
 
- Public Member Functions inherited from AbstractAssemblerSolverHybrid< ELEMENT_DIM, SPACE_DIM, 1, NORMAL >
 AbstractAssemblerSolverHybrid (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > *pBoundaryConditions)
 
virtual ~AbstractAssemblerSolverHybrid ()
 
void SetupGivenLinearSystem (Vec currentSolution, bool computeMatrix, LinearSystem *pLinearSystem)
 
- Public Member Functions inherited from AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, true, true, INTERPOLATION_LEVEL >
 AbstractFeVolumeIntegralAssembler (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
virtual ~AbstractFeVolumeIntegralAssembler ()
 
- Public Member Functions inherited from AbstractFeAssemblerCommon< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >
 AbstractFeAssemblerCommon ()
 
void SetCurrentSolution (Vec currentSolution)
 
virtual ~AbstractFeAssemblerCommon ()
 
- Public Member Functions inherited from AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >
 AbstractFeAssemblerInterface ()
 
void SetMatrixToAssemble (Mat &rMatToAssemble, bool zeroMatrixBeforeAssembly=true)
 
void SetVectorToAssemble (Vec &rVecToAssemble, bool zeroVectorBeforeAssembly)
 
void Assemble ()
 
void AssembleMatrix ()
 
void AssembleVector ()
 
virtual ~AbstractFeAssemblerInterface ()
 
- Public Member Functions inherited from AbstractStaticLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 1 >
 AbstractStaticLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
Vec Solve (Vec initialGuess=NULL)
 
- Public Member Functions inherited from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >
 AbstractLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
virtual ~AbstractLinearPdeSolver ()
 
virtual void PrepareForSetupLinearSystem (Vec currentSolution)
 
virtual void FinaliseLinearSystem (Vec currentSolution)
 
virtual void FollowingSolveLinearSystem (Vec currentSolution)
 
LinearSystemGetLinearSystem ()
 

Protected Member Functions

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 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)
 
void ResetInterpolatedQuantities ()
 
void IncrementInterpolatedQuantities (double phiI, const Node< DIM > *pNode)
 
void InitialiseForSolve (Vec initialSolution)
 
- Protected Member Functions inherited from SimpleLinearEllipticSolver< DIM, DIM >
virtual c_matrix< double,
1 *(ELEMENT_DIM+1),
1 *(ELEMENT_DIM+1)> 
ComputeMatrixTerm (c_vector< double, ELEMENT_DIM+1 > &rPhi, c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, 1 > &rU, c_matrix< double, 1, SPACE_DIM > &rGradU, Element< ELEMENT_DIM, SPACE_DIM > *pElement)
 
virtual c_vector< double,
1 *(ELEMENT_DIM+1)> 
ComputeVectorTerm (c_vector< double, ELEMENT_DIM+1 > &rPhi, c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, 1 > &rU, c_matrix< double, 1, SPACE_DIM > &rGradU, Element< ELEMENT_DIM, SPACE_DIM > *pElement)
 
void SetupLinearSystem (Vec currentSolution, bool computeMatrix)
 
- Protected Member Functions inherited from AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, true, true, INTERPOLATION_LEVEL >
void ComputeTransformedBasisFunctionDerivatives (const ChastePoint< ELEMENT_DIM > &rPoint, const c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian, c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rReturnValue)
 
void DoAssemble ()
 
virtual c_matrix< double,
PROBLEM_DIM *(ELEMENT_DIM+1),
PROBLEM_DIM *(ELEMENT_DIM+1)> 
ComputeMatrixTerm (c_vector< double, ELEMENT_DIM+1 > &rPhi, c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, PROBLEM_DIM > &rU, c_matrix< double, PROBLEM_DIM, SPACE_DIM > &rGradU, Element< ELEMENT_DIM, SPACE_DIM > *pElement)
 
virtual c_vector< double,
PROBLEM_DIM *(ELEMENT_DIM+1)> 
ComputeVectorTerm (c_vector< double, ELEMENT_DIM+1 > &rPhi, c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, PROBLEM_DIM > &rU, c_matrix< double, PROBLEM_DIM, SPACE_DIM > &rGradU, Element< ELEMENT_DIM, SPACE_DIM > *pElement)
 
virtual void AssembleOnElement (Element< ELEMENT_DIM, SPACE_DIM > &rElement, c_matrix< double, PROBLEM_DIM *(ELEMENT_DIM+1), PROBLEM_DIM *(ELEMENT_DIM+1) > &rAElem, c_vector< double, PROBLEM_DIM *(ELEMENT_DIM+1)> &rBElem)
 
virtual bool ElementAssemblyCriterion (Element< ELEMENT_DIM, SPACE_DIM > &rElement)
 
- Protected Member Functions inherited from AbstractFeAssemblerCommon< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >
virtual double GetCurrentSolutionOrGuessValue (unsigned nodeIndex, unsigned indexOfUnknown)
 
virtual void IncrementInterpolatedQuantities (double phiI, const Node< SPACE_DIM > *pNode)
 
virtual void IncrementInterpolatedGradientQuantities (const c_matrix< double, SPACE_DIM, ELEMENT_DIM+1 > &rGradPhi, unsigned phiIndex, const Node< SPACE_DIM > *pNode)
 

Private Attributes

double mConstantInUSourceTerm
 
double mLinearInUCoeffInSourceTerm
 

Additional Inherited Members

- Protected Types inherited from AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, true, true, INTERPOLATION_LEVEL >
typedef LinearBasisFunction
< ELEMENT_DIM > 
BasisFunction
 
- Protected Attributes inherited from SimpleLinearEllipticSolver< DIM, DIM >
AbstractLinearEllipticPde
< ELEMENT_DIM, SPACE_DIM > * 
mpEllipticPde
 
- Protected Attributes inherited from AbstractAssemblerSolverHybrid< ELEMENT_DIM, SPACE_DIM, 1, NORMAL >
NaturalNeumannSurfaceTermAssembler
< ELEMENT_DIM, SPACE_DIM,
PROBLEM_DIM > 
mNaturalNeumannSurfaceTermAssembler
 
BoundaryConditionsContainer
< ELEMENT_DIM, SPACE_DIM,
PROBLEM_DIM > * 
mpBoundaryConditions
 
- Protected Attributes inherited from AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, true, true, INTERPOLATION_LEVEL >
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
 
GaussianQuadratureRule
< ELEMENT_DIM > * 
mpQuadRule
 
- Protected Attributes inherited from AbstractFeAssemblerCommon< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >
ReplicatableVector mCurrentSolutionOrGuessReplicated
 
- Protected Attributes inherited from AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >
Vec mVectorToAssemble
 
Mat mMatrixToAssemble
 
bool mAssembleMatrix
 
bool mAssembleVector
 
bool mZeroMatrixBeforeAssembly
 
bool mZeroVectorBeforeAssembly
 
PetscInt mOwnershipRangeLo
 
PetscInt mOwnershipRangeHi
 
- Protected Attributes inherited from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >
LinearSystemmpLinearSystem
 
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
 

Detailed Description

template<unsigned DIM>
class CellBasedPdeSolver< DIM >

A purpose-made elliptic solver that interpolates the source terms from node onto Gauss points, as for a cell-based simulation with PDEs the source will only be known at the cells (nodes), not the Gauss points.

Definition at line 48 of file CellBasedPdeSolver.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
CellBasedPdeSolver< DIM >::CellBasedPdeSolver ( TetrahedralMesh< DIM, DIM > *  pMesh,
AbstractLinearEllipticPde< DIM, DIM > *  pPde,
BoundaryConditionsContainer< DIM, DIM, 1 > *  pBoundaryConditions 
)

Constructor.

Parameters
pMeshpointer to the mesh
pPdepointer to the PDE
pBoundaryConditionspointer to the boundary conditions

Definition at line 41 of file CellBasedPdeSolver.cpp.

template<unsigned DIM>
CellBasedPdeSolver< DIM >::~CellBasedPdeSolver ( )
virtual

Destructor.

Definition at line 49 of file CellBasedPdeSolver.cpp.

Member Function Documentation

template<unsigned DIM>
c_matrix< double, 1 *(DIM+1), 1 *(DIM+1)> CellBasedPdeSolver< DIM >::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 
)
protectedvirtual

The SimpleLinearEllipticSolver version of this method is overloaded using the interpolated source term.

Parameters
rPhiThe basis functions, rPhi(i) = phi_i, i=1..numBases
rGradPhiBasis gradients, rGradPhi(i,j) = d(phi_j)/d(X_i)
rXThe point in space
rUThe unknown as a vector, u(i) = u_i
rGradUThe gradient of the unknown as a matrix, rGradU(i,j) = d(u_i)/d(X_j)
pElementPointer to the element
Returns
The matrix term for the stiffness matrix

Definition at line 66 of file CellBasedPdeSolver.cpp.

template<unsigned DIM>
c_vector< double, 1 *(DIM+1)> CellBasedPdeSolver< DIM >::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 
)
protectedvirtual

The SimpleLinearEllipticSolver version of this method is overloaded using the interpolated source term.

Parameters
rPhi
rGradPhi
rX
rU
rGradU
pElement
Returns
vector term.

Definition at line 54 of file CellBasedPdeSolver.cpp.

template<unsigned DIM>
void CellBasedPdeSolver< DIM >::IncrementInterpolatedQuantities ( double  phiI,
const Node< DIM > *  pNode 
)
protected

Overridden IncrementInterpolatedQuantities() method.

Parameters
phiI
pNode

Definition at line 96 of file CellBasedPdeSolver.cpp.

template<unsigned DIM>
void CellBasedPdeSolver< DIM >::InitialiseForSolve ( Vec  initialSolution)
protectedvirtual

Create the linear system object if it hasn't been already. Can use an initial solution as PETSc template, or base it on the mesh size.

Parameters
initialSolutionan initial guess

Reimplemented from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.

Definition at line 103 of file CellBasedPdeSolver.cpp.

References SimpleLinearEllipticSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve().

template<unsigned DIM>
void CellBasedPdeSolver< DIM >::ResetInterpolatedQuantities ( void  )
protectedvirtual

Member Data Documentation

template<unsigned DIM>
double CellBasedPdeSolver< DIM >::mConstantInUSourceTerm
private

The constant in u part of the source term, interpolated onto the current point.

Definition at line 54 of file CellBasedPdeSolver.hpp.

template<unsigned DIM>
double CellBasedPdeSolver< DIM >::mLinearInUCoeffInSourceTerm
private

The linear in u part of the source term, interpolated onto the current point.

Definition at line 57 of file CellBasedPdeSolver.hpp.


The documentation for this class was generated from the following files: