6 using namespace Nektar;
8 int main(
int argc,
char *argv[])
13 std::string vCellModel;
15 std::vector<StimulusSharedPtr> vStimulus;
16 Array<OneD, Array<OneD, NekDouble> > vWsp(1);
17 Array<OneD, Array<OneD, NekDouble> > vSol(1);
34 vSession->LoadSolverInfo(
"CELLMODEL", vCellModel,
"");
35 ASSERTL0(vCellModel !=
"",
"Cell Model not specified.");
38 vCellModel, vSession, vExp);
45 vSol[0] = Array<OneD, NekDouble>(1, 0.0);
46 vWsp[0] = Array<OneD, NekDouble>(1, 0.0);
47 vDeltaT = vSession->GetParameter(
"TimeStep");
49 nSteps = vSession->GetParameter(
"NumSteps");
52 vSession->GetFunction(
"InitialConditions",
"u");
53 vSol[0][0] = e->Evaluate(0.0, 0.0, 0.0, 0.0);
56 for (
unsigned int i = 0; i < nSteps; ++i)
59 vCell->TimeIntegrate(vSol, vWsp, vTime);
62 for (
unsigned int i = 0; i < vStimulus.size(); ++i)
64 vStimulus[i]->Update(vWsp, vTime);
68 Vmath::Svtvp(1, vDeltaT, vWsp[0], 1, vSol[0], 1, vSol[0], 1);
74 cout << vTime <<
" " << vSol[0][0] << endl;
77 for (
unsigned int i = 0; i < vCell->GetNumCellVariables(); ++i)
79 cout <<
"# " << vCell->GetCellVarName(i) <<
" "
80 << vCell->GetCellSolution(i)[0] << endl;
85 cerr <<
"An error occured" << endl;