Chaste  Build::
DiscreteSource< DIM > Class Template Reference

#include <DiscreteSource.hpp>

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

Public Member Functions

 DiscreteSource ()
 
virtual ~DiscreteSource ()
 
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInUMeshValues ()
 
virtual std::vector< units::quantity< unit::rate > > GetLinearInUMeshValues ()
 
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInURegularGridValues ()
 
virtual std::vector< units::quantity< unit::rate > > GetLinearInURegularGridValues ()
 
void SetLabelName (const std::string &rLabel)
 
void SetPoints (std::vector< DimensionalChastePoint< DIM > > points)
 
void SetRegularGrid (boost::shared_ptr< RegularGrid< DIM > > pRegularGrid)
 
void SetMesh (boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > > pMesh)
 
void SetConstantInUValue (units::quantity< unit::concentration_flow_rate > value)
 
void SetLinearInUValue (units::quantity< unit::rate > value)
 

Static Public Member Functions

static boost::shared_ptr< DiscreteSource< DIM > > Create ()
 

Protected Attributes

boost::shared_ptr< RegularGrid< DIM > > mpRegularGrid
 
boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > > mpMesh
 
std::vector< DimensionalChastePoint< DIM > > mPoints
 
std::string mLabel
 
units::quantity< unit::concentration_flow_rate > mConstantInUValue
 
units::quantity< unit::rate > mLinearInUValue
 

Detailed Description

template<unsigned DIM>
class DiscreteSource< DIM >

This class calculates the value of discrete sources at grid/mesh locations in continuum problems. A grid or mesh is set and the source values are calculated at each grid point or in each element. Child classes can be used to customize the way source strengths are calculated.

Definition at line 53 of file DiscreteSource.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
DiscreteSource< DIM >::DiscreteSource ( )

Constructor

Definition at line 42 of file DiscreteSource.cpp.

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

Destructor

Definition at line 54 of file DiscreteSource.cpp.

Member Function Documentation

template<unsigned DIM>
boost::shared_ptr< DiscreteSource< DIM > > DiscreteSource< DIM >::Create ( )
static

Factory constructor method

Returns
a pointer to an instance of the class

Definition at line 60 of file DiscreteSource.cpp.

template<unsigned DIM>
std::vector< units::quantity< unit::concentration_flow_rate > > DiscreteSource< DIM >::GetConstantInUMeshValues ( )
virtual

Return the values of the source strengths sampled on the mesh elements

Returns
a vector of source strengths

Reimplemented in CellStateDependentDiscreteSource< DIM >, SolutionDependentDiscreteSource< DIM >, VesselBasedDiscreteSource< DIM >, and CellBasedDiscreteSource< DIM >.

Definition at line 67 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mConstantInUValue, DiscreteSource< DIM >::mpMesh, and DiscreteSource< DIM >::mPoints.

template<unsigned DIM>
std::vector< units::quantity< unit::concentration_flow_rate > > DiscreteSource< DIM >::GetConstantInURegularGridValues ( )
virtual

Return the values of the source strengths sampled on the regular grid

Returns
a vector of source strengths

Reimplemented in CellStateDependentDiscreteSource< DIM >, SolutionDependentDiscreteSource< DIM >, VesselBasedDiscreteSource< DIM >, and CellBasedDiscreteSource< DIM >.

Definition at line 103 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mConstantInUValue, DiscreteSource< DIM >::mPoints, and DiscreteSource< DIM >::mpRegularGrid.

template<unsigned DIM>
std::vector< units::quantity< unit::rate > > DiscreteSource< DIM >::GetLinearInUMeshValues ( )
virtual

Return the values of the source strengths sampled on the mesh elements

Returns
a vector of source strengths

Reimplemented in CellStateDependentDiscreteSource< DIM >, SolutionDependentDiscreteSource< DIM >, VesselBasedDiscreteSource< DIM >, and CellBasedDiscreteSource< DIM >.

Definition at line 85 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mLinearInUValue, DiscreteSource< DIM >::mpMesh, and DiscreteSource< DIM >::mPoints.

template<unsigned DIM>
std::vector< units::quantity< unit::rate > > DiscreteSource< DIM >::GetLinearInURegularGridValues ( )
virtual

Return the values of the source strengths sampled on the regular grid

Returns
a vector of source strengths

Reimplemented in CellStateDependentDiscreteSource< DIM >, SolutionDependentDiscreteSource< DIM >, VesselBasedDiscreteSource< DIM >, and CellBasedDiscreteSource< DIM >.

Definition at line 126 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mLinearInUValue, DiscreteSource< DIM >::mPoints, and DiscreteSource< DIM >::mpRegularGrid.

template<unsigned DIM>
void DiscreteSource< DIM >::SetConstantInUValue ( units::quantity< unit::concentration_flow_rate >  value)

Set the value of the source for PRESCRIBED type sources

Parameters
valuethe value of the source

Definition at line 173 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mConstantInUValue.

template<unsigned DIM>
void DiscreteSource< DIM >::SetLabelName ( const std::string &  rLabel)

Set the name of the label used in LABEL type sources

Parameters
rLabelthe label for the source strength value

Definition at line 149 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mLabel.

template<unsigned DIM>
void DiscreteSource< DIM >::SetLinearInUValue ( units::quantity< unit::rate >  value)

Set the value of the source for PRESCRIBED type sources

Parameters
valuethe value of the source

Definition at line 179 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mLinearInUValue.

template<unsigned DIM>
void DiscreteSource< DIM >::SetMesh ( boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > >  pMesh)

Set the finite element mesh

Parameters
pMeshthe finite element mesh

Definition at line 161 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mpMesh.

template<unsigned DIM>
void DiscreteSource< DIM >::SetPoints ( std::vector< DimensionalChastePoint< DIM > >  points)

Set the points for POINT type sources

Parameters
pointsthe point locations for POINT type sources

Definition at line 155 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mPoints.

template<unsigned DIM>
void DiscreteSource< DIM >::SetRegularGrid ( boost::shared_ptr< RegularGrid< DIM > >  pRegularGrid)

Set the regular grid

Parameters
pRegularGridthe regular grid

Definition at line 167 of file DiscreteSource.cpp.

References DiscreteSource< DIM >::mpRegularGrid.

Member Data Documentation

template<unsigned DIM>
units::quantity<unit::concentration_flow_rate> DiscreteSource< DIM >::mConstantInUValue
protected
template<unsigned DIM>
std::string DiscreteSource< DIM >::mLabel
protected

A label specifying the array name from which to obtain the source strength. Used for LABEL source strengths.

Definition at line 77 of file DiscreteSource.hpp.

Referenced by CellStateDependentDiscreteSource< DIM >::GetConstantInURegularGridValues(), and DiscreteSource< DIM >::SetLabelName().

template<unsigned DIM>
units::quantity<unit::rate> DiscreteSource< DIM >::mLinearInUValue
protected

The prescribed value of the source strength. Used for PRESCRIBED source strengths.

Definition at line 87 of file DiscreteSource.hpp.

Referenced by DiscreteSource< DIM >::GetLinearInUMeshValues(), DiscreteSource< DIM >::GetLinearInURegularGridValues(), and DiscreteSource< DIM >::SetLinearInUValue().


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