#include <Electrodes.hpp>
Public Member Functions | |
Electrodes (AbstractTetrahedralMesh< DIM, DIM > &rMesh) | |
boost::shared_ptr < BoundaryConditionsContainer < DIM, DIM, 2 > > | GetBoundaryConditionsContainer () |
bool | SwitchOff (double time) |
bool | SwitchOn (double time) |
double | GetSwitchOnTime () |
double | GetSwitchOffTime () |
bool | HasGroundedElectrode () |
Private Member Functions | |
void | ComputeElectrodesAreasAndCheckEquality (unsigned index, double lowerValue, double upperValue) |
template<class Archive> | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive> | |
void | load (Archive &archive, const unsigned int version) |
Electrodes () | |
Private Attributes | |
bool | mGroundSecondElectrode |
boost::shared_ptr < BoundaryConditionsContainer < DIM, DIM, 2 > > | mpBoundaryConditionsContainer |
double | mStartTime |
double | mEndTime |
bool | mAreActive |
AbstractTetrahedralMesh< DIM, DIM > * | mpMesh |
double | mLeftElectrodeArea |
double | mRightElectrodeArea |
Friends | |
class | TestBidomainWithBathProblem |
class | TestElectrodes |
class | boost::serialization::access |
This class assumes the given mesh is cuboid, and the electrodes are taken to be the specified opposite surfaces.
Note the class now includes a pointer to the mesh as a member variable, as this is required to archive (reconstruct) itself. Because boost is clever it will still only archive one copy of the mesh.
Definition at line 58 of file Electrodes.hpp.
Electrodes< DIM >::Electrodes | ( | ) | [inline, private] |
Private default constructor for archiving only.
Definition at line 141 of file Electrodes.hpp.
Electrodes< DIM >::Electrodes | ( | AbstractTetrahedralMesh< DIM, DIM > & | rMesh | ) | [inline] |
Constructor. Needs only a reference to a mesh. All other parameters from the HeartConfig class
rMesh | The mesh, assumed to be a cuboid. |
Definition at line 35 of file Electrodes.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox(), Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), HeartConfig::GetElectrodeParameters(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), HeartConfig::Instance(), Electrodes< DIM >::mAreActive, Electrodes< DIM >::mEndTime, Electrodes< DIM >::mGroundSecondElectrode, Electrodes< DIM >::mLeftElectrodeArea, Electrodes< DIM >::mpBoundaryConditionsContainer, Electrodes< DIM >::mpMesh, Electrodes< DIM >::mRightElectrodeArea, Electrodes< DIM >::mStartTime, ChasteCuboid< SPACE_DIM >::rGetLowerCorner(), and ChasteCuboid< SPACE_DIM >::rGetUpperCorner().
void Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality | ( | unsigned | index, | |
double | lowerValue, | |||
double | upperValue | |||
) | [inline, private] |
Helper method to compute electrodes area and check they are equal. Throws if they are not.
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) |
Definition at line 164 of file Electrodes.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfBoundaryElement(), EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForBoundaryElement(), Electrodes< DIM >::mLeftElectrodeArea, Electrodes< DIM >::mpMesh, and Electrodes< DIM >::mRightElectrodeArea.
Referenced by Electrodes< DIM >::Electrodes().
void Electrodes< DIM >::save | ( | Archive & | archive, | |
const unsigned int | version | |||
) | const [inline, private] |
Save the Electrodes class
archive | the archive | |
version | the current version of this class |
Definition at line 107 of file Electrodes.hpp.
References ProcessSpecificArchive< Archive >::Get(), Electrodes< DIM >::mAreActive, Electrodes< DIM >::mEndTime, Electrodes< DIM >::mGroundSecondElectrode, Electrodes< DIM >::mpBoundaryConditionsContainer, Electrodes< DIM >::mpMesh, and Electrodes< DIM >::mStartTime.
void Electrodes< DIM >::load | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Load the Electrodes class
archive | the archive | |
version | the current version of this class |
Definition at line 123 of file Electrodes.hpp.
References ProcessSpecificArchive< Archive >::Get(), Electrodes< DIM >::mAreActive, Electrodes< DIM >::mEndTime, Electrodes< DIM >::mGroundSecondElectrode, Electrodes< DIM >::mpBoundaryConditionsContainer, Electrodes< DIM >::mpMesh, and Electrodes< DIM >::mStartTime.
boost::shared_ptr< 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 128 of file Electrodes.cpp.
References Electrodes< DIM >::mpBoundaryConditionsContainer.
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.
time | the current time |
Definition at line 136 of file Electrodes.cpp.
References Electrodes< DIM >::mAreActive, and Electrodes< DIM >::mEndTime.
bool Electrodes< DIM >::SwitchOn | ( | double | time | ) | [inline] |
Whether it is time to switch on the electrodes yet. THIS ONLY RETURNS TRUE ONCE - the first appropriate time. After that the electrodes assume they have been switched on and therefore this returns false.
time | the current time |
Definition at line 150 of file Electrodes.cpp.
References Electrodes< DIM >::mAreActive, Electrodes< DIM >::mEndTime, and Electrodes< DIM >::mStartTime.
double Electrodes< DIM >::GetSwitchOnTime | ( | ) | [inline] |
Get the time the electrodes are switched on
Definition at line 180 of file Electrodes.hpp.
References Electrodes< DIM >::mStartTime.
double Electrodes< DIM >::GetSwitchOffTime | ( | ) | [inline] |
Get the time the electrodes are switched off
Definition at line 186 of file Electrodes.hpp.
References Electrodes< DIM >::mEndTime.
bool Electrodes< DIM >::HasGroundedElectrode | ( | ) | [inline] |
Whether the second electrode is grounded or not
Definition at line 192 of file Electrodes.hpp.
References Electrodes< DIM >::mGroundSecondElectrode.
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 99 of file Electrodes.hpp.
bool Electrodes< DIM >::mGroundSecondElectrode [private] |
Whether the second electrode is grounded
Definition at line 65 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::HasGroundedElectrode(), Electrodes< DIM >::load(), and Electrodes< DIM >::save().
boost::shared_ptr<BoundaryConditionsContainer<DIM,DIM,2> > Electrodes< DIM >::mpBoundaryConditionsContainer [private] |
The created bcc, which BidomainProblem will use
Definition at line 67 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::GetBoundaryConditionsContainer(), Electrodes< DIM >::load(), and Electrodes< DIM >::save().
double Electrodes< DIM >::mStartTime [private] |
The time the electrodes are switched on
Definition at line 69 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::GetSwitchOnTime(), Electrodes< DIM >::load(), Electrodes< DIM >::save(), and Electrodes< DIM >::SwitchOn().
double Electrodes< DIM >::mEndTime [private] |
The time the electrodes are switched off
Definition at line 71 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::GetSwitchOffTime(), Electrodes< DIM >::load(), Electrodes< DIM >::save(), Electrodes< DIM >::SwitchOff(), and Electrodes< DIM >::SwitchOn().
bool Electrodes< DIM >::mAreActive [private] |
Whether the electrodes are currently switched on
Definition at line 73 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::Electrodes(), Electrodes< DIM >::load(), Electrodes< DIM >::save(), Electrodes< DIM >::SwitchOff(), and Electrodes< DIM >::SwitchOn().
AbstractTetrahedralMesh<DIM,DIM>* Electrodes< DIM >::mpMesh [private] |
This is needed for archiving: the boundary conditions refer to nodes and/or elements, so need the mesh to be archived, but don't have a pointer to the mesh itself.
Definition at line 79 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), Electrodes< DIM >::Electrodes(), Electrodes< DIM >::load(), and Electrodes< DIM >::save().
double Electrodes< DIM >::mLeftElectrodeArea [private] |
Left electrode area
Definition at line 82 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), and Electrodes< DIM >::Electrodes().
double Electrodes< DIM >::mRightElectrodeArea [private] |
Right electrode area
Definition at line 85 of file Electrodes.hpp.
Referenced by Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), and Electrodes< DIM >::Electrodes().