Skip to content
Snippets Groups Projects
Select Git revision
  • d63cc39848a8dcbcdcdeb23a142eb6bbc01258a6
  • 2016-PippingKornhuberRosenauOncken default
  • 2022-Strikeslip-Benchmark
  • 2021-GraeserKornhuberPodlesny
  • Dissertation2021 protected
  • separate-deformation
  • AverageCrosspoints
  • old_solver_new_datastructure
  • last_working
  • 2014-Dissertation-Pipping
  • 2013-PippingSanderKornhuber
11 results

dune_tectonic.cc

Blame
  • Forked from agnumpde / dune-tectonic
    Source project has a limited visibility.
    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;
      }
    }