38 #pragma GCC diagnostic ignored "-Wunused-variable" 39 #pragma GCC diagnostic ignored "-Wunused-parameter" 41 #include <Epetra_ConfigDefs.h> 44 #include <Epetra_MpiComm.h> 46 #include <Epetra_SerialComm.h> 50 #pragma GCC diagnostic warning "-Wunused-variable" 51 #pragma GCC diagnostic warning "-Wunused-parameter" 57 #include <lifev/electrophysiology/solver/ElectroETAMonodomainSolver.hpp> 60 #include <lifev/electrophysiology/stimulus/StimulusPMJ.hpp> 61 #include <lifev/core/LifeV.hpp> 63 #include <Teuchos_RCP.hpp> 64 #include <Teuchos_ParameterList.hpp> 65 #include "Teuchos_XMLParameterListHelpers.hpp" 66 #include <Teuchos_ScalarTraitsDecl.hpp> 71 using namespace LifeV;
79 MPI_Init (&argc, &argv);
80 std::shared_ptr<Epetra_Comm> Comm (
new Epetra_MpiComm (MPI_COMM_WORLD) );
88 const string stimulus_datafile_name = command_line.follow (
"StimulationParameters.xml", 2,
"-s",
"--stimulus");
89 Teuchos::ParameterList stimulusList = * ( Teuchos::getParametersFromXmlFile ( stimulus_datafile_name ) );
92 stimulus.setParameters ( stimulusList );
93 if ( Comm->MyPID() == 0 )
98 Real DeltaX, DeltaY, DeltaZ, DeltaT;
104 if ( Comm->MyPID() == 0 )
106 std::cerr <<
"Starting test" << std::endl;
109 Teuchos::ScalarTraits<Real>::seedrandom (time (NULL) );
110 for (
ID i = 0; i < 100; i++)
113 x = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_X", 1.0 ) ) * DeltaX;
114 y = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_Y", 1.0 ) ) * DeltaY;
115 z = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_Z", 1.0 ) ) * DeltaZ;
116 t = (Teuchos::ScalarTraits<Real>::random() + 1.0 ) * DeltaX;
117 stimulus.appliedCurrent ( t, x, y, z, i );
119 if ( Comm->MyPID() == 0 )
121 std::cerr <<
"Ending test" << std::endl;
124 MPI_Barrier (MPI_COMM_WORLD);
127 return ( EXIT_SUCCESS );
GetPot(const int argc_, char **argv_, const char *FieldSeparator=0x0)
int32_type Int
Generic integer data.
double Real
Generic real data.
int main(int argc, char **argv)