Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef ALBANY_UTILS_H
00008 #define ALBANY_UTILS_H
00009
00010 #ifdef ALBANY_MPI
00011 #define Albany_MPI_Comm MPI_Comm
00012 #define Albany_MPI_COMM_WORLD MPI_COMM_WORLD
00013 #define Albany_MPI_COMM_NULL MPI_COMM_NULL
00014 #include "Epetra_MpiComm.h"
00015 #include "Teuchos_DefaultMpiComm.hpp"
00016 #else
00017 #define Albany_MPI_Comm int
00018 #define Albany_MPI_COMM_WORLD 0 // This is compatible with Dakota
00019 #define Albany_MPI_COMM_NULL 99
00020 #include "Epetra_SerialComm.h"
00021 #include "Teuchos_DefaultSerialComm.hpp"
00022 #endif
00023 #include "Teuchos_RCP.hpp"
00024
00025 namespace Albany {
00026
00027 const Albany_MPI_Comm getMpiCommFromEpetraComm(const Epetra_Comm& ec);
00028
00029 Albany_MPI_Comm getMpiCommFromEpetraComm(Epetra_Comm& ec);
00030
00031 Teuchos::RCP<Epetra_Comm> createEpetraCommFromMpiComm(const Albany_MPI_Comm& mc);
00032 Teuchos::RCP<Teuchos::Comm<int> > createTeuchosCommFromMpiComm(const Albany_MPI_Comm& mc);
00033
00035 std::string strint(const std::string s, const int i);
00036
00038 bool isValidInitString(const std::string& initString);
00039
00041 std::string doubleToInitString(double val);
00042
00044 double initStringToDouble(const std::string& initString);
00045
00047 void splitStringOnDelim(const std::string &s, char delim, std::vector<std::string> &elems);
00048 }
00049 #endif //ALBANY_UTILS