42 #include <lifev/electrophysiology/solver/IonicModels/IonicGoldbeter.hpp> 45 #include <lifev/core/LifeV.hpp> 48 using namespace LifeV;
52 #define SolutionTestNorm 639.4563875712343588
61 std::cout <<
"Building Constructor for Goldbeter Model with parameters ... ";
63 std::cout <<
" Done!" << std::endl;
81 std::cout <<
"Initializing solution vector...";
82 std::vector<Real> unknowns (model.Size(), 0);
83 model.initialize (unknowns);
84 std::cout <<
" Done!" << std::endl;
93 std::cout <<
"Initializing rhs..." ;
94 std::vector<Real> rhs (model.Size(), 0);
95 std::cout <<
" Done! " << std::endl;
108 std::string filename =
"output.txt";
109 std::ofstream output (
"output.txt");
115 Real SolutionNorm = unknowns[0];
120 std::cout <<
"Time loop starts...\n";
121 for (
Real t = 0; t < TF; )
127 model.computeRhs ( unknowns, rhs);
133 unknowns.at (0) = unknowns.at (0) + dt * rhs.at (0);
134 unknowns.at (1) = unknowns.at (1) + dt * rhs.at (1);
139 output << t <<
", " << unknowns.at (0) <<
", " << unknowns.at (1) <<
"\n";
150 SolutionNorm += unknowns[0];
152 std::cout <<
"\n...Time loop ends.\n";
153 std::cout <<
"Solution written on file: " << filename <<
"\n";
161 std::cout << std::setprecision (20) <<
"\nError: " << err <<
"\nSolution norm: " << SolutionNorm <<
"\n";
164 returnValue = EXIT_FAILURE;
168 returnValue = EXIT_SUCCESS;
170 return ( returnValue );
173 #undef SolutionTestNorm
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
void showMe()
Display information about the model.