68 #include <sys/types.h> 70 #include <Epetra_ConfigDefs.h> 73 #include <Epetra_MpiComm.h> 75 #include <Epetra_SerialComm.h> 79 #include <lifev/core/LifeV.hpp> 80 #include <lifev/multiscale/framework/MultiscaleSolver.hpp> 82 using namespace LifeV;
89 std::shared_ptr< Epetra_Comm > comm;
92 Int numberOfProcesses (1);
96 MPI_Init ( &argc, &argv );
98 MPI_Comm_size ( MPI_COMM_WORLD, &numberOfProcesses );
99 MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
104 std::cout <<
"MPI Processes: " << numberOfProcesses << std::endl;
110 std::cout <<
"MPI Epetra Initialization ... " << std::endl;
112 comm.reset (
new Epetra_MpiComm ( MPI_COMM_WORLD ) );
114 std::cout <<
"SERIAL Epetra Initialization ... " << std::endl;
115 comm.reset (
new Epetra_SerialComm() );
119 bool exitFlag = EXIT_SUCCESS;
123 multiscale.setCommunicator ( comm );
127 std::string dataFile = commandLine
.follow ( "./Multiscale.dat", 2
, "-f", "--file" );
128 bool verbose = commandLine
.follow ( true, 2
, "-s", "--showme" );
129 std::string problemFolder = commandLine
.follow ( "Output", 2
, "-o", "--output" );
134 if ( coresPerNode >
static_cast<
UInt> ( numberOfProcesses ) )
136 coresPerNode = numberOfProcesses;
140 if ( problemFolder.compare (
"./") )
142 problemFolder +=
"/";
144 if ( comm->MyPID() == 0 )
146 mkdir ( problemFolder.c_str(), 0777 );
151 multiscale.setupProblem ( dataFile, problemFolder, coresPerNode );
165 std::cout <<
"MPI Finalization" << std::endl;
void showMe() const
Display some information about the Multiscale problem (should be called after setupProblem) ...
GetPot(const int argc_, char **argv_, const char *FieldSeparator=0x0)
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
double follow(const double &Default, unsigned No, const char *Option,...)
bool solveProblem(const Real &referenceSolution=-1., const Real &tolerance=1e-8)
Run the time-loop to solve the Multiscale problem.
int main(int argc, char **argv)
double Real
Generic real data.
const std::string follow(const char *Default, unsigned No, const char *Option,...)
MultiscaleSolver - The Multiscale solver.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
int follow(int Default, unsigned No, const char *Option,...)