void TestWithCompressibleApproach() throw(Exception) { PlaneStimulusCellFactory<CellLuoRudy1991FromCellML, 2> cell_factory(-1000*1000); HeartConfig::Instance()->SetSimulationDuration(20.0); CardiacElectroMechProbRegularGeom<2> problem(COMPRESSIBLE, 0.05, /* width (cm) */ 1, /* mech mesh size*/ 5, /* elec elem each dir */ &cell_factory, KERCHOFFS2003, 1.0, /* mechanics solve timestep */ 0.01, /* Kerchoffs ode timestep */ "TestCompressibleWithKerchoffs"); problem.Solve(); // Mainly just testing no errors when Solve was called. // The results of this test can be visually compared with the results of the // equivalent incompressible simulation in TestWithKerchoffs. TS_ASSERT_DELTA(problem.rGetDeformedPosition()[1](0), 0.0472, 0.0002); TS_ASSERT_DELTA(problem.rGetDeformedPosition()[1](1),-0.0012, 0.0002); // create and initialise an incompressible NASH2004 problem, just for coverage.. HeartConfig::Instance()->SetSimulationDuration(20.0); CardiacElectroMechProbRegularGeom<2> problem2(COMPRESSIBLE,0.05,1,5,&cell_factory, NASH2004, 1.0, 0.01,""); problem2.Initialise(); }
int main() { // Test Example for functions int x = problem2(-4, 3); int x2 = problem3(0x12345678, 2, 0xaa); printf("A2) x = %d \nA3) x2 = 0x%x \n",x,x2); }
//Begin Execution int main(int argv,char *argc[]){ int inN; do{ Menu(); inN=getN(); switch(inN){ case 1: problem1();break; case 2: problem2();break; case 3: problem3();break; case 4: problem4();break; case 5: problem5();break; case 6: problem6();break; default: def(inN);} }while(inN>=1&&inN<=6); return 0; }
/* The main function, or the "entry function" of the lab2 program, simply calls the other * functions to run. */ int main() { cout << ">> I'm going to run the lab review now:" << endl; illegalStatements(); cout << ">> I'm going to run lab problem 1 now:" << endl; problem1(); cout << ">> I'm going to run lab problem 2 now:" << endl; problem2(); cout << ">> I'm going to run lab problem 3 now:" << endl; problem3(); cout << ">> I'm going to run lab problem 4/5 now:" << endl; problem45(); return 0; // Lets the operating system know everything ran successfully. }
int main(int argc, char* argv[]) { problem2(); return 0; }