Chaste
Build::
|
#include <AbstractDiscreteContinuumLinearEllipticPde.hpp>
Public Member Functions | |
AbstractDiscreteContinuumLinearEllipticPde () | |
virtual | ~AbstractDiscreteContinuumLinearEllipticPde () |
void | AddDiscreteSource (boost::shared_ptr< DiscreteSource< SPACE_DIM > > pDiscreteSource) |
double | ComputeConstantInUSourceTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement) |
units::quantity< unit::concentration_flow_rate > | ComputeConstantInUSourceTerm (unsigned gridIndex=0) |
c_matrix< double, SPACE_DIM, SPACE_DIM > | ComputeDiffusionTerm (const ChastePoint< SPACE_DIM > &) |
units::quantity< unit::diffusivity > | ComputeIsotropicDiffusionTerm () |
virtual units::quantity< unit::rate > | ComputeLinearInUCoeffInSourceTerm (unsigned gridIndex=0)=0 |
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > | GetDiscreteSources () |
void | SetContinuumConstantInUTerm (units::quantity< unit::concentration_flow_rate > constantInUTerm) |
void | SetIsotropicDiffusionConstant (units::quantity< unit::diffusivity > diffusivity) |
void | SetRegularGrid (boost::shared_ptr< RegularGrid< SPACE_DIM > > pRegularGrid) |
void | SetMesh (boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > pMesh) |
void | SetReferenceConcentration (units::quantity< unit::concentration > referenceConcentration) |
void | SetUseRegularGrid (bool useRegularGrid) |
virtual void | UpdateDiscreteSourceStrengths () |
Protected Attributes | |
c_matrix< double, SPACE_DIM, SPACE_DIM > | mDiffusionTensor |
units::quantity< unit::diffusivity > | mDiffusivity |
units::quantity< unit::concentration_flow_rate > | mConstantInUTerm |
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > | mDiscreteSources |
boost::shared_ptr< RegularGrid< SPACE_DIM > > | mpRegularGrid |
boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > | mpMesh |
bool | mUseRegularGrid |
std::vector< units::quantity< unit::concentration_flow_rate > > | mDiscreteConstantSourceStrengths |
units::quantity< unit::concentration > | mReferenceConcentration |
Base PDE class for managing discrete entities on the computational grid. Child classes need to implement methods for calculating the 'LinearInU' source terms, which will have units related to the field quantity being solved for.
Definition at line 57 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::AbstractDiscreteContinuumLinearEllipticPde | ( | ) |
Constructor
Definition at line 41 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusionTensor, and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusivity.
|
virtual |
Destructor
Definition at line 57 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::AddDiscreteSource | ( | boost::shared_ptr< DiscreteSource< SPACE_DIM > > | pDiscreteSource | ) |
Add a discrete source to the pde
pDiscreteSource | a pointer the discrete source |
Definition at line 62 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteSources.
double AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm | ( | const ChastePoint< SPACE_DIM > & | rX, |
Element< ELEMENT_DIM, SPACE_DIM > * | pElement | ||
) |
Overwritten method to return the constant in U contribution to the Chaste FE solver
rX | grid location |
pElement | pointer to containing element |
Definition at line 68 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References BaseUnits::GetReferenceTimeScale(), BaseUnits::Instance(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mConstantInUTerm, AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteConstantSourceStrengths, and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mReferenceConcentration.
units::quantity< unit::concentration_flow_rate > AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm | ( | unsigned | gridIndex = 0 | ) |
Overwritten method to return the constant in U contribution to the regular grid solvers
gridIndex | grid index |
Definition at line 88 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mConstantInUTerm, and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteConstantSourceStrengths.
c_matrix< double, SPACE_DIM, SPACE_DIM > AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeDiffusionTerm | ( | const ChastePoint< SPACE_DIM > & | ) |
Overwritten method to return the diffusion term to the Chaste FE solver
Definition at line 105 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusionTensor.
units::quantity< unit::diffusivity > AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeIsotropicDiffusionTerm | ( | ) |
Return the diffusion constant for isotropic diffusion
Definition at line 111 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusivity.
|
pure virtual |
Abstract method to return the linear in U contribution to the regular grid solvers
gridIndex | grid index |
Implemented in LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >.
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::GetDiscreteSources | ( | ) |
Return the collection of discrete sources
Definition at line 117 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteSources.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetContinuumConstantInUTerm | ( | units::quantity< unit::concentration_flow_rate > | constantInUTerm | ) |
Set the continuum constant in U term
constantInUTerm | the continuum constant in U term |
Definition at line 123 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mConstantInUTerm.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant | ( | units::quantity< unit::diffusivity > | diffusivity | ) |
Set the isotropic diffusion constant
diffusivity | the isotropic diffusion constant |
Definition at line 129 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References BaseUnits::GetReferenceLengthScale(), BaseUnits::GetReferenceTimeScale(), BaseUnits::Instance(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusionTensor, and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiffusivity.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetMesh | ( | boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > | pMesh | ) |
Set the finite element mesh
pMesh | the finite element mesh |
Definition at line 143 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mpMesh.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetReferenceConcentration | ( | units::quantity< unit::concentration > | referenceConcentration | ) |
Set the reference concentration
referenceConcentration | the reference concentration |
Definition at line 155 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mReferenceConcentration.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetRegularGrid | ( | boost::shared_ptr< RegularGrid< SPACE_DIM > > | pRegularGrid | ) |
Set the regular grid
pRegularGrid | the regular grid |
Definition at line 137 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mpRegularGrid.
void AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetUseRegularGrid | ( | bool | useRegularGrid | ) |
Set whether to use a regular grid
useRegularGrid | whether to use a regular grid |
Definition at line 149 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mUseRegularGrid.
|
virtual |
Update the discrete source strengths
Reimplemented in LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >.
Definition at line 161 of file AbstractDiscreteContinuumLinearEllipticPde.cpp.
References AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteConstantSourceStrengths, AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mDiscreteSources, AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mpRegularGrid, and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::mUseRegularGrid.
Referenced by LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().
|
protected |
The continuum constant in U term, discrete terms are added to this.
Definition at line 76 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetContinuumConstantInUTerm().
|
protected |
The diffusion tensor
Definition at line 66 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::AbstractDiscreteContinuumLinearEllipticPde(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeDiffusionTerm(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant().
|
protected |
The diffusion constant for isotropic diffusion
Definition at line 71 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::AbstractDiscreteContinuumLinearEllipticPde(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeIsotropicDiffusionTerm(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetIsotropicDiffusionConstant().
|
protected |
The constant source strengths for each point on the grid or element in the mesh
Definition at line 101 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().
|
protected |
The collection of discrete sources for addition to the continuum terms
Definition at line 81 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::AddDiscreteSource(), AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::GetDiscreteSources(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().
|
protected |
The mesh for solvers using finite element meshes
Definition at line 91 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetMesh(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().
|
protected |
The grid for solvers using regular grids
Definition at line 86 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetRegularGrid(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().
|
protected |
This is used internally to scale concentrations before and after linear system solves, reads and writes. Since those functions don't use Boost Units. It should not affect the solution, but can be judiciously chosen to avoid precision problems.
Definition at line 108 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTerm(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetReferenceConcentration().
|
protected |
Whether to use a regular grid or mesh for discrete source calculations
Definition at line 96 of file AbstractDiscreteContinuumLinearEllipticPde.hpp.
Referenced by AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::SetUseRegularGrid(), LinearSteadyStateDiffusionReactionPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths(), and AbstractDiscreteContinuumLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::UpdateDiscreteSourceStrengths().