Chaste Release::3.1
AveragedSourcePde< DIM > Class Template Reference

#include <AveragedSourcePde.hpp>

Inheritance diagram for AveragedSourcePde< DIM >:
Collaboration diagram for AveragedSourcePde< DIM >:

List of all members.

Public Member Functions

 AveragedSourcePde (AbstractCellPopulation< DIM > &rCellPopulation, double coefficient=0.0)
const AbstractCellPopulation
< DIM > & 
rGetCellPopulation () const
double GetCoefficient () const
virtual void SetupSourceTerms (TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=NULL)
double ComputeConstantInUSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)
double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)
c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX)
double GetUptakeRateForElement (unsigned elementIndex)

Protected Attributes

AbstractCellPopulation< DIM > & mrCellPopulation
double mCoefficient
std::vector< doublemCellDensityOnCoarseElements

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)

Friends

class TestCellBasedPdes
class boost::serialization::access

Detailed Description

template<unsigned DIM>
class AveragedSourcePde< DIM >

A PDE which calculates the source term by adding the number of cells in the element containing that point and scaling by the element area.

Definition at line 52 of file AveragedSourcePde.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
AveragedSourcePde< DIM >::AveragedSourcePde ( AbstractCellPopulation< DIM > &  rCellPopulation,
double  coefficient = 0.0 
)

Constructor.

Parameters:
rCellPopulationreference to the cell population
coefficientthe coefficient of consumption of nutrient by cells (defaults to 0.0)

Definition at line 41 of file AveragedSourcePde.cpp.


Member Function Documentation

template<unsigned DIM>
double AveragedSourcePde< DIM >::ComputeConstantInUSourceTerm ( const ChastePoint< DIM > &  rX,
Element< DIM, DIM > *  pElement 
)

Overridden ComputeConstantInUSourceTerm() method.

Parameters:
rXThe point in space
pElementthe element
Returns:
the constant in u part of the source term, i.e g(x) in Div(D Grad u) + f(x)u + g(x) = 0.

Definition at line 106 of file AveragedSourcePde.cpp.

template<unsigned DIM>
c_matrix< double, DIM, DIM > AveragedSourcePde< DIM >::ComputeDiffusionTerm ( const ChastePoint< DIM > &  rX)

Overridden ComputeDiffusionTerm() method.

Parameters:
rXThe point in space at which the diffusion term is computed
Returns:
a matrix.

Definition at line 119 of file AveragedSourcePde.cpp.

template<unsigned DIM>
double AveragedSourcePde< DIM >::ComputeLinearInUCoeffInSourceTerm ( const ChastePoint< DIM > &  rX,
Element< DIM, DIM > *  pElement 
)

Overridden ComputeLinearInUCoeffInSourceTerm() method.

Parameters:
rXThe point in space
pElementthe element
Returns:
the coefficient of u in the linear part of the source term, i.e f(x) in Div(D Grad u) + f(x)u + g(x) = 0.

Definition at line 112 of file AveragedSourcePde.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().

template<unsigned DIM>
double AveragedSourcePde< DIM >::GetCoefficient ( ) const
Returns:
mCoefficient (used in archiving).

Definition at line 54 of file AveragedSourcePde.cpp.

template<unsigned DIM>
double AveragedSourcePde< DIM >::GetUptakeRateForElement ( unsigned  elementIndex)

Returns the uptake rate.

Parameters:
elementIndexthe element we wish to return the uptake rate for

Definition at line 125 of file AveragedSourcePde.cpp.

template<unsigned DIM>
const AbstractCellPopulation< DIM > & AveragedSourcePde< DIM >::rGetCellPopulation ( ) const
Returns:
const reference to the cell population (used in archiving).

Definition at line 48 of file AveragedSourcePde.cpp.

template<unsigned DIM>
template<class Archive >
void AveragedSourcePde< DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the PDE and its member variables.

Parameters:
archivethe archive
versionthe current version of this class

Reimplemented from AbstractLinearEllipticPde< DIM, DIM >.

Reimplemented in VolumeDependentAveragedSourcePde< DIM >.

Definition at line 67 of file AveragedSourcePde.hpp.

References AveragedSourcePde< DIM >::mCellDensityOnCoarseElements, and AveragedSourcePde< DIM >::mCoefficient.

template<unsigned DIM>
void AveragedSourcePde< DIM >::SetupSourceTerms ( TetrahedralMesh< DIM, DIM > &  rCoarseMesh,
std::map< CellPtr, unsigned > *  pCellPdeElementMap = NULL 
) [virtual]

Set up the source terms.

Parameters:
rCoarseMeshreference to the coarse mesh
pCellPdeElementMapoptional pointer to the map from cells to coarse elements

Reimplemented in VolumeDependentAveragedSourcePde< DIM >.

Definition at line 60 of file AveragedSourcePde.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements().


Friends And Related Function Documentation

template<unsigned DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractLinearEllipticPde< DIM, DIM >.

Reimplemented in VolumeDependentAveragedSourcePde< DIM >.

Definition at line 59 of file AveragedSourcePde.hpp.


Member Data Documentation

template<unsigned DIM>
std::vector<double> AveragedSourcePde< DIM >::mCellDensityOnCoarseElements [protected]

Vector of averaged cell densities on elements of the coarse mesh.

Definition at line 83 of file AveragedSourcePde.hpp.

Referenced by AveragedSourcePde< DIM >::serialize().

template<unsigned DIM>
double AveragedSourcePde< DIM >::mCoefficient [protected]

Coefficient of consumption of nutrient by cells.

Definition at line 80 of file AveragedSourcePde.hpp.

Referenced by AveragedSourcePde< DIM >::serialize().

template<unsigned DIM>
AbstractCellPopulation<DIM>& AveragedSourcePde< DIM >::mrCellPopulation [protected]

The cell population member.

Definition at line 77 of file AveragedSourcePde.hpp.

Referenced by VolumeDependentAveragedSourcePde< DIM >::VolumeDependentAveragedSourcePde().


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