Commit 7630c0c3 authored by GILLES Sebastien's avatar GILLES Sebastien

#317 XCodeTemplate: initialization of MPI and Petsc is now put together.

parent 1be23c74
......@@ -20,12 +20,11 @@ int main(int argc, char ** argv)
{
Wrappers::Mpi::InitEnvironment(argc, argv);
Wrappers::Mpi mpi_world(0, Wrappers::MpiNS::Comm::World); // must be called before Petsc RAII
std::string input_parameter_file =
Utilities::CommandLineOptions::InputParameterFileFromCommandLine(argc, argv, __FILE__, __LINE__);
Wrappers::Petsc::Petsc raii_over_petsc(__FILE__, __LINE__);
const std::string input_parameter_file =
Utilities::CommandLineOptions::InputParameterFileFromCommandLine(argc, argv, __FILE__, __LINE__);
HyperelasticityNS::InputParameterList input_parameter_data(input_parameter_file);
InitTimeKeepLog(mpi_world, input_parameter_data);
......
......@@ -27,11 +27,10 @@ int main(int argc, char ** argv)
Wrappers::Mpi::InitEnvironment(argc, argv);
Wrappers::Mpi::shared_ptr mpi_world_ptr =
std::make_shared<Wrappers::Mpi>(0, Wrappers::MpiNS::Comm::World); // must be called before Petsc RAII
std::string input_parameter_file =
Utilities::CommandLineOptions::InputParameterFileFromCommandLine(argc, argv, __FILE__, __LINE__);
Wrappers::Petsc::Petsc raii_over_petsc(__FILE__, __LINE__);
const std::string input_parameter_file =
Utilities::CommandLineOptions::InputParameterFileFromCommandLine(argc, argv, __FILE__, __LINE__);
___VARIABLE_problemName:identifier___NS::InputParameterList
input_parameter_data(input_parameter_file, mpi_world_ptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment