FEI Version of the Day
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 //  This fei_VERSION::version() function is not intended for public use.
00028 //  There is another 'version' function below, which is for public use,
00029 //  but internally it calls this function in the fei_VERSION namespace. This
00030 //  prevents header-mismatch errors, where a user application accidentally
00031 //  includes headers from a different fei version than the fei libraries that
00032 //  are being linked.
00033 //  (In that scenario, unresolved symbol errors will occur, since the value
00034 //  of fei_VERSION in the headers won't match what's been compiled into the
00035 //  library.)
00036 const char* version();
00037 
00038 }//namespace fei_VERSION
00039 
00040 
00041 
00044 namespace fei {
00045 
00048 namespace utils {
00049 
00052 inline
00053 const char* version()
00054 {
00055   return( fei_VERSION::version() );
00056 }
00057 
00061 double cpu_time();
00062 
00068 fei::OutputLevel string_to_output_level(const std::string& str);
00069 
00073 LinearSystemCore* get_LinearSystemCore(fei::Matrix* matrix);
00074 
00086 void getConnectivityArrays(fei::MatrixGraph& matrixGraph,
00087                            std::vector<int>& nodes,
00088                            std::vector<int>& elem_offsets);
00089 
00093 void char_ptrs_to_strings(int numStrings,
00094                          const char*const* charstrings,
00095                          std::vector<std::string>& stdstrings);
00096 
00102 void strings_to_char_ptrs(std::vector<std::string>& stdstrings,
00103                           int& numStrings,
00104                           const char**& charPtrs);
00105 
00110 void parse_strings(std::vector<std::string>& stdstrings,
00111                   const char* separator_string,
00112                   fei::ParameterSet& paramset);
00113 
00118 void convert_ParameterSet_to_strings(const fei::ParameterSet* paramset,
00119                                      std::vector<std::string>& paramStrings);
00120 
00121 }//namespace utils
00122 }//namespace fei
00123 
00124 #endif
00125 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends