Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nektar::Stimulus Class Reference

Stimulus base class. More...

#include <Stimulus.h>

Inheritance diagram for Nektar::Stimulus:
Inheritance graph
[legend]

Public Member Functions

 Stimulus (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
virtual ~Stimulus ()
void Initialise ()
 Initialise the stimulus storage and set initial conditions.
void Update (Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 Updates RHS of outarray by adding a stimulus to it.
void GenerateSummary (SolverUtils::SummaryList &s)
 Print a summary of the outarray.

Static Public Member Functions

static std::vector
< StimulusSharedPtr
LoadStimuli (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)

Protected Member Functions

virtual void v_Update (Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)=0
virtual void v_GenerateSummary (SolverUtils::SummaryList &s)=0

Protected Attributes

LibUtilities::SessionReaderSharedPtr m_session
 Session.
MultiRegions::ExpListSharedPtr m_field
 Transmembrane potential field from PDE system.
int m_nq
 Number of physical points.
ProtocolSharedPtr m_Protocol

Detailed Description

Stimulus base class.

The Stimulus class and derived classes implement a range of stimuli. The stimulus contains input stimuli that can be applied throughout the domain, on specified regions determined by the derived classes of Stimulus, at specified frequencies determined by the derived classes of Protocol.

Definition at line 66 of file Stimulus.h.

Constructor & Destructor Documentation

Nektar::Stimulus::Stimulus ( const LibUtilities::SessionReaderSharedPtr pSession,
const MultiRegions::ExpListSharedPtr pField,
const TiXmlElement *  pXml 
)

Stimulus base class constructor.

Definition at line 65 of file Stimulus.cpp.

References Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::GetProtocolFactory(), m_field, m_nq, m_Protocol, and m_session.

{
m_session = pSession;
m_field = pField;
m_nq = pField->GetTotPoints();
const TiXmlElement* vProtocol = pXml->FirstChildElement("PROTOCOL");
string vTypeP = vProtocol->Attribute("TYPE");
vTypeP, pSession, vProtocol);
}
virtual Nektar::Stimulus::~Stimulus ( )
inlinevirtual

Definition at line 73 of file Stimulus.h.

{}

Member Function Documentation

void Nektar::Stimulus::GenerateSummary ( SolverUtils::SummaryList s)
inline

Print a summary of the outarray.

Definition at line 86 of file Stimulus.h.

References v_GenerateSummary().

void Nektar::Stimulus::Initialise ( )

Initialise the stimulus storage and set initial conditions.

Initialise the stimulus. Allocate workspace and variable storage.

Reimplemented in Nektar::StimulusCirc, Nektar::StimulusPoint, and Nektar::StimulusRect.

Definition at line 85 of file Stimulus.cpp.

{
}
vector< StimulusSharedPtr > Nektar::Stimulus::LoadStimuli ( const LibUtilities::SessionReaderSharedPtr pSession,
const MultiRegions::ExpListSharedPtr pField 
)
static

Definition at line 95 of file Stimulus.cpp.

References Nektar::GetStimulusFactory().

Referenced by main().

{
vector<StimulusSharedPtr> vStimList;
TiXmlElement* vStimuli = pSession->GetElement("Nektar/Stimuli");
if (vStimuli)
{
TiXmlElement* vStimulus = vStimuli->FirstChildElement("STIMULUS");
while (vStimulus)
{
string vType = vStimulus->Attribute("TYPE");
//unsigned int vId = atoi(vStimulus->Attribute("ID"));
vStimList.push_back(GetStimulusFactory().CreateInstance(
vType, pSession, pField, vStimulus));
vStimulus = vStimulus->NextSiblingElement("STIMULUS");
}
}
return vStimList;
}
void Nektar::Stimulus::Update ( Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time 
)
inline

Updates RHS of outarray by adding a stimulus to it.

Definition at line 79 of file Stimulus.h.

References v_Update().

{
v_Update(outarray, time);
}
virtual void Nektar::Stimulus::v_GenerateSummary ( SolverUtils::SummaryList s)
protectedpure virtual
virtual void Nektar::Stimulus::v_Update ( Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time 
)
protectedpure virtual

Member Data Documentation

MultiRegions::ExpListSharedPtr Nektar::Stimulus::m_field
protected
int Nektar::Stimulus::m_nq
protected
ProtocolSharedPtr Nektar::Stimulus::m_Protocol
protected
LibUtilities::SessionReaderSharedPtr Nektar::Stimulus::m_session
protected