• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Main_Dakota.cpp

Go to the documentation of this file.
00001 //*****************************************************************//
00002 //    Albany 2.0:  Copyright 2012 Sandia Corporation               //
00003 //    This Software is released under the BSD license detailed     //
00004 //    in the file "license.txt" in the top-level Albany directory  //
00005 //*****************************************************************//
00006 
00007 #include <iostream>
00008 
00009 #include "Albany_SolverFactory.hpp"
00010 #include "Albany_Dakota.hpp"
00011 #include "Teuchos_GlobalMPISession.hpp"
00012 #include "Teuchos_TimeMonitor.hpp"
00013 #include "Teuchos_VerboseObject.hpp"
00014 #include "Teuchos_StandardCatchMacros.hpp"
00015 
00016 int main(int argc, char *argv[]) {
00017 
00018   int status=0; // 0 = pass, failures are incremented
00019   bool success = true;
00020   Teuchos::GlobalMPISession mpiSession(&argc,&argv);
00021   Teuchos::RCP<Teuchos::FancyOStream> out(Teuchos::VerboseObjectBase::getDefaultOStream());
00022 
00023   Albany_MPI_Comm appComm = Albany_MPI_COMM_WORLD;
00024 
00025   try {
00026     Teuchos::RCP<Teuchos::Time> totalTime = 
00027       Teuchos::TimeMonitor::getNewTimer("AlbanyDakota: ***Total Time***");
00028     Teuchos::TimeMonitor totalTimer(*totalTime); //start timer
00029 
00030     status += Albany_Dakota(argc, argv);
00031 
00032     // Regression comparisons fopr Dakota runs only valid on Proc 0.
00033     if (mpiSession.getRank() > 0) status=0;
00034     else *out << "\nNumber of Failed Comparisons: " << status << std::endl;
00035   }
00036   TEUCHOS_STANDARD_CATCH_STATEMENTS(true, std::cerr, success);
00037   if (!success) status+=10000;
00038   
00039   Teuchos::TimeMonitor::summarize(std::cout, false, true, false);
00040   return status;
00041 }

Generated on Wed Mar 26 2014 18:36:39 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1