Skip to content
Snippets Groups Projects
Select Git revision
  • c558b9716169a1c41e553b6e9adfc6eb5b5949fe
  • tutorial-12 default
  • tutorial-10
  • tutorial-11
  • tutorial-9
  • tutorial-8
  • tutorial-7
  • tutorial-6
  • tutorial-5
  • tutorial-4
  • tutorial-3
  • tutorial-2
  • tutorial-1
  • main protected
14 results

README.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    dune_tectonic.cc 821 B
    #ifdef HAVE_CONFIG_H
    #include "config.h"
    #endif
    #include <iostream>
    #include "dune/common/mpihelper.hh"  // An initializer of MPI
    #include "dune/common/exceptions.hh" // We use exceptions
    
    int main(int argc, char** argv) {
      try {
        // Maybe initialize Mpi
        Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
        std::cout << "Hello World! This is dune-tectonic." << std::endl;
        if (Dune::MPIHelper::isFake)
          std::cout << "This is a sequential program." << std::endl;
        else
          std::cout << "I am rank " << helper.rank() << " of " << helper.size()
                    << " processes!" << std::endl;
        return 0;
      }
      catch (Dune::Exception& e) {
        std::cerr << "Dune reported error: " << e << std::endl;
      }
      catch (...) {
        std::cerr << "Unknown exception thrown!" << std::endl;
      }
    }