46 "Rectangular stimulus.");
64 const TiXmlElement* pXml)
69 m_nq = pField->GetTotPoints();
79 const TiXmlElement *pXmlparameter;
81 pXmlparameter = pXml->FirstChildElement(
"p_x1");
82 m_px1 = atof(pXmlparameter->GetText());
84 pXmlparameter = pXml->FirstChildElement(
"p_y1");
85 m_py1 = atof(pXmlparameter->GetText());
87 pXmlparameter = pXml->FirstChildElement(
"p_z1");
88 m_pz1 = atof(pXmlparameter->GetText());
90 pXmlparameter = pXml->FirstChildElement(
"p_x2");
91 m_px2 = atof(pXmlparameter->GetText());
93 pXmlparameter = pXml->FirstChildElement(
"p_y2");
94 m_py2 = atof(pXmlparameter->GetText());
96 pXmlparameter = pXml->FirstChildElement(
"p_z2");
97 m_pz2 = atof(pXmlparameter->GetText());
99 pXmlparameter = pXml->FirstChildElement(
"p_is");
100 m_pis = atof(pXmlparameter->GetText());
102 pXmlparameter = pXml->FirstChildElement(
"p_strength");
121 if (
m_field->GetNumElmts() == 0)
127 int dim =
m_field->GetCoordim(0);
130 int nq =
m_field->GetNpoints();
143 for(
int j=0; j<nq; j++)
145 outarray[0][j] += v_amp * ( ( tanh(
m_pis*(x0[j] -
m_px1))
151 for(
int j=0; j<nq; j++)
153 outarray[0][j] += v_amp * ( ( (tanh(
m_pis*(x0[j] -
m_px1))
161 for(
int j=0; j<nq; j++)
163 outarray[0][j] += v_amp * ( ( (tanh(
m_pis*(x0[j] -
m_px1))
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
MultiRegions::ExpListSharedPtr m_field
Transmembrane potential field from PDE system.
ProtocolSharedPtr m_Protocol
Stimulus protocol to apply.
int m_nq
Number of physical points.
LibUtilities::SessionReaderSharedPtr m_session
Session.
static std::string className
Name of class.
virtual void v_Update(Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
NekDouble m_chiCapMembrane
StimulusRect(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
void Initialise()
Initialise the stimulus storage and set initial conditions.
static StimulusSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
Creates an instance of this class.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::vector< std::pair< std::string, std::string > > SummaryList
The above copyright notice and this permission notice shall be included.
StimulusFactory & GetStimulusFactory()