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/StimulusSingleSource.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 std::string stimulus_datafile_name = command_line
.follow ("StimulationParameters.xml", 2
, "-s", "--stimulus");
89 Teuchos::ParameterList stimulusList = * ( Teuchos::getParametersFromXmlFile ( stimulus_datafile_name ) );
91 StimulusSingleSource stimulus;
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;
108 Teuchos::ScalarTraits<Real>::seedrandom (time (NULL) );
109 for (
ID i = 0; i < 100; i++)
112 x = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_X", 1.0 ) ) * DeltaX;
113 y = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_Y", 1.0 ) ) * DeltaY;
114 z = (Teuchos::ScalarTraits<Real>::random() + stimulusList.get (
"pacing_site_Z", 1.0 ) ) * DeltaZ;
115 t = (Teuchos::ScalarTraits<Real>::random() + 1.0 ) * DeltaX;
116 stimulus.appliedCurrent ( t, x, y, z, i );
118 if ( Comm->MyPID() == 0 )
120 std::cerr <<
"Ending test" << std::endl;
123 MPI_Barrier (MPI_COMM_WORLD);
126 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)
const std::string follow(const char *Default, unsigned No, const char *Option,...)