Electrodes< DIM > Class Template Reference

#include <Electrodes.hpp>

Collaboration diagram for Electrodes< DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Electrodes (AbstractTetrahedralMesh< DIM, DIM > &rMesh, bool groundSecondElectrode, unsigned index, double lowerValue, double upperValue, double magnitude, double duration)
 ~Electrodes ()
BoundaryConditionsContainer
< DIM, DIM, 2 > * 
GetBoundaryConditionsContainer ()
bool SwitchOff (double time)

Private Attributes

bool mGroundSecondElectrode
BoundaryConditionsContainer
< DIM, DIM, 2 > * 
mpBoundaryConditionsContainer
double mEndTime
bool mAreActive

Friends

class TestBidomainWithBathAssembler


Detailed Description

template<unsigned DIM>
class Electrodes< DIM >

A class for setting up the boundary conditions associated with electrodes. There are two modes: grounding the second electrode, in which case the first electrode has an input flux (Neumann boundary condition) of the specified magnitude, the extracellular potential is fixed on the second electrode; or not grounded, in which case the opposite electrode has an equal and opposite output flux.

This class assumes the given mesh is cuboid, and the electrodes are taken to be the specified opposite surfaces.

Definition at line 50 of file Electrodes.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
Electrodes< DIM >::Electrodes ( AbstractTetrahedralMesh< DIM, DIM > &  rMesh,
bool  groundSecondElectrode,
unsigned  index,
double  lowerValue,
double  upperValue,
double  magnitude,
double  duration 
) [inline]

Constructor.

Parameters:
rMesh The mesh, assumed to be a cuboid.
groundSecondElectrode Whether to ground the second electrode (see class documentation)
index The value i when applying the electrodes to x_i=a and x_i=b (a<b)
lowerValue The value a when applying the electrodes to x_i=a and x_i=b (a<b) (should be the minimum value of x_i for the given mesh)
upperValue The value b when applying the electrodes to x_i=a and x_i=b (a<b) (should be the maximum value of x_i for the given mesh)
magnitude Magnitude of the stimulus
duration Duration of the stimulus. Note, start time currently assumed to be zero.

Definition at line 32 of file Electrodes.cpp.

References BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition(), BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory(), DistributedVectorFactory::GetLocalOwnership(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), DistributedVectorFactory::GetProblemSize(), Electrodes< DIM >::mAreActive, Electrodes< DIM >::mEndTime, Electrodes< DIM >::mGroundSecondElectrode, and Electrodes< DIM >::mpBoundaryConditionsContainer.

template<unsigned DIM>
Electrodes< DIM >::~Electrodes (  )  [inline]

Delete the set up bcc

Definition at line 84 of file Electrodes.hpp.

References Electrodes< DIM >::mpBoundaryConditionsContainer.


Member Function Documentation

template<unsigned DIM>
BoundaryConditionsContainer<DIM,DIM,2>* Electrodes< DIM >::GetBoundaryConditionsContainer (  )  [inline]

Get the boundary conditions container in which is set up the Neumann fluxes for the first electrode, and the opposite fluxes for the second electrode if the the second electrode isn't grounded

Definition at line 94 of file Electrodes.hpp.

References Electrodes< DIM >::mAreActive, and Electrodes< DIM >::mpBoundaryConditionsContainer.

template<unsigned DIM>
bool Electrodes< DIM >::SwitchOff ( double  time  )  [inline]

Whether it is time to switch off the electrodes yet. THIS ONLY RETURNS TRUE ONCE - the first appropriate time. After that the electrodes assume they have been switched off and therefore this returns false.

Parameters:
time the current time

Definition at line 107 of file Electrodes.hpp.

References Electrodes< DIM >::mAreActive, and Electrodes< DIM >::mEndTime.


Member Data Documentation

template<unsigned DIM>
bool Electrodes< DIM >::mGroundSecondElectrode [private]

Whether the second electrode is grounded

Definition at line 56 of file Electrodes.hpp.

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

template<unsigned DIM>
BoundaryConditionsContainer<DIM,DIM,2>* Electrodes< DIM >::mpBoundaryConditionsContainer [private]

template<unsigned DIM>
double Electrodes< DIM >::mEndTime [private]

The time the electrodes are switched off

Definition at line 60 of file Electrodes.hpp.

Referenced by Electrodes< DIM >::Electrodes(), and Electrodes< DIM >::SwitchOff().

template<unsigned DIM>
bool Electrodes< DIM >::mAreActive [private]

Whether the electrodes are currently switched on

Definition at line 62 of file Electrodes.hpp.

Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::GetBoundaryConditionsContainer(), and Electrodes< DIM >::SwitchOff().


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

Generated on Tue Aug 4 16:11:13 2009 for Chaste by  doxygen 1.5.5