Chaste Commit::30a3e656d4b131f8c595cc6eb2becd297337570f
CellwiseSourceEllipticPde< DIM > Class Template Reference

#include <CellwiseSourceEllipticPde.hpp>

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

Public Member Functions

 CellwiseSourceEllipticPde (AbstractCellPopulation< DIM, DIM > &rCellPopulation, double constantSourceCoefficient=0.0, double linearSourceCoefficient=0.0, double diffusionCoefficient=1.0, bool scaleByCellVolume=false)
 
const AbstractCellPopulation< DIM > & rGetCellPopulation () const
 
double GetConstantCoefficient () const
 
double GetLinearCoefficient () const
 
double GetDiffusionCoefficient () const
 
bool GetScaleByCellVolume () const
 
double ComputeConstantInUSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement) override
 
double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement) override
 
double ComputeLinearInUCoeffInSourceTermAtNode (const Node< DIM > &rNode) override
 
double ComputeConstantInUSourceTermAtNode (const Node< DIM > &rNode) override
 
c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX) override
 
- Public Member Functions inherited from AbstractLinearEllipticPde< DIM, DIM >
 AbstractLinearEllipticPde ()
 
 ~AbstractLinearEllipticPde () override=default
 
virtual double ComputeConstantInUSourceTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement)=0
 
virtual double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement)=0
 
virtual c_matrix< double, SPACE_DIM, SPACE_DIM > ComputeDiffusionTerm (const ChastePoint< SPACE_DIM > &rX)=0
 
virtual double ComputeConstantInUSourceTermAtNode (const Node< SPACE_DIM > &rNode)
 
virtual double ComputeLinearInUCoeffInSourceTermAtNode (const Node< SPACE_DIM > &rNode)
 
- Public Member Functions inherited from AbstractLinearPde< ELEMENT_DIM, SPACE_DIM >
 AbstractLinearPde ()
 
virtual ~AbstractLinearPde ()
 

Protected Attributes

AbstractCellPopulation< DIM, DIM > & mrCellPopulation
 
double mConstantSourceCoefficient
 
double mLinearSourceCoefficient
 
double mDiffusionCoefficient
 
bool mScaleByCellVolume
 

Private Member Functions

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

Friends

class TestCellBasedEllipticPdes
 
class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class CellwiseSourceEllipticPde< DIM >

An elliptic PDE to be solved numerically using the finite element method, for coupling to a cell-based simulation.

The PDE takes the form

Grad.(D Grad(u)) + a*u*rho(x) + b*rho(x) = 0,

where the scalars a and b are specified by the members mLinearSourceCoefficient, and mConstantSourceCoefficient respectively, whose value must be set in the constructor.

For a node of the finite element mesh with location x, the function rho(x) equals one if there is a non-apoptotic cell associated with x, and zero otherwise. Here, 'associated with' takes a different meaning for each cell population class, and is encoded in the method IsPdeNodeAssociatedWithNonApoptoticCell().

Todo:
make member names and methods consistent with those of CellwiseSourceParabolicPde

Definition at line 65 of file CellwiseSourceEllipticPde.hpp.

Constructor & Destructor Documentation

◆ CellwiseSourceEllipticPde()

template<unsigned DIM>
CellwiseSourceEllipticPde< DIM >::CellwiseSourceEllipticPde ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation,
double  constantSourceCoefficient = 0.0,
double  linearSourceCoefficient = 0.0,
double  diffusionCoefficient = 1.0,
bool  scaleByCellVolume = false 
)

Constructor.

Parameters
rCellPopulationreference to the cell population
constantSourceCoefficientthe constant source term coefficient (defaults to 0.0)
linearSourceCoefficientthe linear source term coefficient (defaults to 0.0)
diffusionCoefficientthe rate of diffusion (defaults to 1.0)
scaleByCellVolumewhether to scale by cell volume (defaults to)

Definition at line 39 of file CellwiseSourceEllipticPde.cpp.

Member Function Documentation

◆ ComputeConstantInUSourceTerm()

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

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 84 of file CellwiseSourceEllipticPde.cpp.

References NEVER_REACHED.

◆ ComputeConstantInUSourceTermAtNode()

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::ComputeConstantInUSourceTermAtNode ( const Node< DIM > &  rNode)
override

Overridden ComputeConstantInUCoeffInSourceTermAtNode() method.

Parameters
rNodereference to the node
Returns
the constant part of the source term, i.e g(x) in Div(D Grad u) + f(x)u + g(x) = 0.

Definition at line 128 of file CellwiseSourceEllipticPde.cpp.

References EXCEPTION, and Node< SPACE_DIM >::GetIndex().

◆ ComputeDiffusionTerm()

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

Overridden ComputeDiffusionTerm() method.

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

Definition at line 158 of file CellwiseSourceEllipticPde.cpp.

◆ ComputeLinearInUCoeffInSourceTerm()

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

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 90 of file CellwiseSourceEllipticPde.cpp.

References NEVER_REACHED.

◆ ComputeLinearInUCoeffInSourceTermAtNode()

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::ComputeLinearInUCoeffInSourceTermAtNode ( const Node< DIM > &  rNode)
override

Overridden ComputeLinearInUCoeffInSourceTermAtNode() method.

Parameters
rNodereference to the node
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 97 of file CellwiseSourceEllipticPde.cpp.

References EXCEPTION, and Node< SPACE_DIM >::GetIndex().

◆ GetConstantCoefficient()

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::GetConstantCoefficient ( ) const
Returns
mConstantSourceCoefficient

Definition at line 59 of file CellwiseSourceEllipticPde.cpp.

◆ GetDiffusionCoefficient()

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::GetDiffusionCoefficient ( ) const
Returns
mDiffusionCoefficient

Definition at line 71 of file CellwiseSourceEllipticPde.cpp.

◆ GetLinearCoefficient()

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::GetLinearCoefficient ( ) const
Returns
mLinearSourceCoefficient

Definition at line 65 of file CellwiseSourceEllipticPde.cpp.

◆ GetScaleByCellVolume()

template<unsigned DIM>
bool CellwiseSourceEllipticPde< DIM >::GetScaleByCellVolume ( ) const
Returns
mScaleByCellVolume

Definition at line 77 of file CellwiseSourceEllipticPde.cpp.

◆ rGetCellPopulation()

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

Definition at line 53 of file CellwiseSourceEllipticPde.cpp.

◆ serialize()

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

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 72 of file CellwiseSourceEllipticPde.hpp.

◆ TestCellBasedEllipticPdes

template<unsigned DIM>
friend class TestCellBasedEllipticPdes
friend

Definition at line 67 of file CellwiseSourceEllipticPde.hpp.

Member Data Documentation

◆ mConstantSourceCoefficient

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::mConstantSourceCoefficient
protected

Coefficient of constant source term.

Definition at line 95 of file CellwiseSourceEllipticPde.hpp.

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

◆ mDiffusionCoefficient

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::mDiffusionCoefficient
protected

Diffusion coefficient.

Definition at line 101 of file CellwiseSourceEllipticPde.hpp.

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

◆ mLinearSourceCoefficient

template<unsigned DIM>
double CellwiseSourceEllipticPde< DIM >::mLinearSourceCoefficient
protected

Coefficient of linear source term.

Definition at line 98 of file CellwiseSourceEllipticPde.hpp.

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

◆ mrCellPopulation

template<unsigned DIM>
AbstractCellPopulation<DIM, DIM>& CellwiseSourceEllipticPde< DIM >::mrCellPopulation
protected

The cell population member.

Definition at line 92 of file CellwiseSourceEllipticPde.hpp.

◆ mScaleByCellVolume

template<unsigned DIM>
bool CellwiseSourceEllipticPde< DIM >::mScaleByCellVolume
protected

Whether to scale terms by cell volume.

Definition at line 104 of file CellwiseSourceEllipticPde.hpp.

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


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