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

Protocol base class. More...

#include <StimulusPoint.h>

Inheritance diagram for Nektar::StimulusPoint:
Inheritance graph
[legend]
Collaboration diagram for Nektar::StimulusPoint:
Collaboration graph
[legend]

Public Member Functions

 StimulusPoint (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
virtual ~StimulusPoint ()
void Initialise ()
 Initialise the stimulus storage and set initial conditions.
- Public Member Functions inherited from Nektar::Stimulus
 Stimulus (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
virtual ~Stimulus ()
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 StimulusSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
 Creates an instance of this class.
- Static Public Member Functions inherited from Nektar::Stimulus
static std::vector
< StimulusSharedPtr
LoadStimuli (const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)

Static Public Attributes

static std::string className
 Name of class.

Protected Member Functions

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

Protected Attributes

NekDouble m_strength
- Protected Attributes inherited from Nektar::Stimulus
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

Protocol 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 50 of file StimulusPoint.h.

Constructor & Destructor Documentation

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

Stimulus base class constructor.

Definition at line 62 of file StimulusPoint.cpp.

References Nektar::Stimulus::m_field, Nektar::Stimulus::m_nq, Nektar::Stimulus::m_session, and m_strength.

: Stimulus(pSession, pField, pXml)
{
m_session = pSession;
m_field = pField;
m_nq = pField->GetTotPoints();
if (!pXml)
{
return;
}
const TiXmlElement *pXmlparameter;
pXmlparameter = pXml->FirstChildElement("p_strength");
m_strength = atof(pXmlparameter->GetText());
}
virtual Nektar::StimulusPoint::~StimulusPoint ( )
inlinevirtual

Definition at line 70 of file StimulusPoint.h.

{}

Member Function Documentation

static StimulusSharedPtr Nektar::StimulusPoint::create ( const LibUtilities::SessionReaderSharedPtr pSession,
const MultiRegions::ExpListSharedPtr pField,
const TiXmlElement *  pXml 
)
inlinestatic

Creates an instance of this class.

Definition at line 54 of file StimulusPoint.h.

{
::AllocateSharedPtr(pSession, pField, pXml);
}
void Nektar::StimulusPoint::Initialise ( )

Initialise the stimulus storage and set initial conditions.

Initialise the stimulus. Allocate workspace and variable storage.

Reimplemented from Nektar::Stimulus.

Definition at line 88 of file StimulusPoint.cpp.

{
}
void Nektar::StimulusPoint::v_GenerateSummary ( SolverUtils::SummaryList s)
protectedvirtual

Implements Nektar::Stimulus.

Definition at line 111 of file StimulusPoint.cpp.

{
}
void Nektar::StimulusPoint::v_Update ( Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble  time 
)
protectedvirtual

Implements Nektar::Stimulus.

Definition at line 97 of file StimulusPoint.cpp.

References Nektar::Stimulus::m_Protocol, and m_strength.

{
// Get the protocol amplitude
NekDouble v_amp = m_Protocol->GetAmplitude(time) * m_strength;
outarray[0][0] += v_amp;
}

Member Data Documentation

std::string Nektar::StimulusPoint::className
static
Initial value:
"StimulusPoint",
"Point stimulus.")

Name of class.

Definition at line 64 of file StimulusPoint.h.

NekDouble Nektar::StimulusPoint::m_strength
protected

Definition at line 76 of file StimulusPoint.h.

Referenced by StimulusPoint(), and v_Update().