fei_utils.hpp

00001 #ifndef _fei_utils_hpp_
00002 #define _fei_utils_hpp_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2006 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_fwd.hpp>
00014 #include <fei_version.h>
00015 
00016 #include <Teuchos_ParameterList.hpp>
00017 
00018 #include <string>
00019 #include <vector>
00020 
00021 
00022 
00023 namespace fei_VERSION {
00024 //  Mangled 'version' function. The name of this namespace, 'fei_VERSION'
00025 //  is a macro that is defined (in fei_version.h) to include the current
00026 //  version number.
00027 //  There is another 'version' function below, which is for public use,
00028 //  but internally it calls this function in the fei_VERSION namespace. This
00029 //  prevents header-mismatch errors, where a user application accidentally
00030 //  includes headers from a different fei version than the fei libraries that
00031 //  are being linked.
00032 //  (In that scenario, unresolved symbol errors will occur, since the value
00033 //  of fei_VERSION in the headers won't match what's been compiled into the
00034 //  library.)
00035 const char* version();
00036 
00037 }//namespace fei_VERSION
00038 
00039 
00040 
00043 namespace fei {
00044 
00047 namespace utils {
00048 
00051 inline
00052 const char* version()
00053 {
00054   return( fei_VERSION::version() );
00055 }
00056 
00060 double cpu_time();
00061 
00067 fei::OutputLevel string_to_output_level(const std::string& str);
00068 
00072 LinearSystemCore* get_LinearSystemCore(fei::Matrix* matrix);
00073 
00085 void getConnectivityArrays(fei::MatrixGraph& matrixGraph,
00086                            std::vector<int>& nodes,
00087                            std::vector<int>& elem_offsets);
00088 
00092 void char_ptrs_to_strings(int numStrings,
00093                          const char*const* charstrings,
00094                          std::vector<std::string>& stdstrings);
00095 
00101 void strings_to_char_ptrs(std::vector<std::string>& stdstrings,
00102                           int& numStrings,
00103                           const char**& charPtrs);
00104 
00109 void parse_strings(std::vector<std::string>& stdstrings,
00110                   const char* separator_string,
00111                   fei::ParameterSet& paramset);
00112 
00117 void convert_ParameterSet_to_strings(const fei::ParameterSet* paramset,
00118                                      std::vector<std::string>& paramStrings);
00119 
00120 }//namespace utils
00121 }//namespace fei
00122 
00123 #endif
00124 

Generated on Wed May 12 21:30:41 2010 for FEI by  doxygen 1.4.7