61 const TiXmlElement *pXml)
66 m_nq = pField->GetTotPoints();
75 const TiXmlElement *pXmlparameter;
77 pXmlparameter = pXml->FirstChildElement(
"p_x1");
78 m_px1 = atof(pXmlparameter->GetText());
80 pXmlparameter = pXml->FirstChildElement(
"p_y1");
81 m_py1 = atof(pXmlparameter->GetText());
83 pXmlparameter = pXml->FirstChildElement(
"p_z1");
84 m_pz1 = atof(pXmlparameter->GetText());
86 pXmlparameter = pXml->FirstChildElement(
"p_x2");
87 m_px2 = atof(pXmlparameter->GetText());
89 pXmlparameter = pXml->FirstChildElement(
"p_y2");
90 m_py2 = atof(pXmlparameter->GetText());
92 pXmlparameter = pXml->FirstChildElement(
"p_z2");
93 m_pz2 = atof(pXmlparameter->GetText());
95 pXmlparameter = pXml->FirstChildElement(
"p_is");
96 m_pis = atof(pXmlparameter->GetText());
98 pXmlparameter = pXml->FirstChildElement(
"p_strength");
115 if (
m_field->GetNumElmts() == 0)
121 int dim =
m_field->GetCoordim(0);
124 int nq =
m_field->GetNpoints();
128 m_field->GetCoords(x0, x1, x2);
137 for (
int j = 0; j < nq; j++)
139 outarray[0][j] += v_amp * ((tanh(
m_pis * (x0[j] -
m_px1)) -
145 for (
int j = 0; j < nq; j++)
147 outarray[0][j] += v_amp * (((tanh(
m_pis * (x0[j] -
m_px1)) -
155 for (
int j = 0; j < nq; j++)
157 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.
void v_GenerateSummary(SolverUtils::SummaryList &s) override
NekDouble m_chiCapMembrane
StimulusRect(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField, const TiXmlElement *pXml)
void v_Update(Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) override
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.
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
StimulusFactory & GetStimulusFactory()