FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_utils.hpp
Go to the documentation of this file.
1 #ifndef _fei_utils_hpp_
2 #define _fei_utils_hpp_
3 
4 /*--------------------------------------------------------------------*/
5 /* Copyright 2006 Sandia Corporation. */
6 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
7 /* non-exclusive license for use of this work by or on behalf */
8 /* of the U.S. Government. Export of this program may require */
9 /* a license from the United States Government. */
10 /*--------------------------------------------------------------------*/
11 
12 #include <fei_macros.hpp>
13 #include <fei_fwd.hpp>
14 #include <fei_version.h>
15 
17 
18 #include <string>
19 #include <vector>
20 
21 
22 
23 namespace fei_VERSION {
24 // Mangled 'version' function. The name of this namespace, 'fei_VERSION'
25 // is a macro that is defined (in fei_version.h) to include the current
26 // version number.
27 // This fei_VERSION::version() function is not intended for public use.
28 // There is another 'version' function below, which is for public use,
29 // but internally it calls this function in the fei_VERSION namespace. This
30 // prevents header-mismatch errors, where a user application accidentally
31 // includes headers from a different fei version than the fei libraries that
32 // are being linked.
33 // (In that scenario, unresolved symbol errors will occur, since the value
34 // of fei_VERSION in the headers won't match what's been compiled into the
35 // library.)
36 const char* version();
37 
38 }//namespace fei_VERSION
39 
40 
41 
44 namespace fei {
45 
48 namespace utils {
49 
52 inline
53 const char* version()
54 {
55  return( fei_VERSION::version() );
56 }
57 
61 double cpu_time();
62 
68 fei::OutputLevel string_to_output_level(const std::string& str);
69 
74 
86 void getConnectivityArrays(fei::MatrixGraph& matrixGraph,
87  std::vector<int>& nodes,
88  std::vector<int>& elem_offsets);
89 
93 void char_ptrs_to_strings(int numStrings,
94  const char*const* charstrings,
95  std::vector<std::string>& stdstrings);
96 
102 void strings_to_char_ptrs(std::vector<std::string>& stdstrings,
103  int& numStrings,
104  const char**& charPtrs);
105 
110 void parse_strings(std::vector<std::string>& stdstrings,
111  const char* separator_string,
112  fei::ParameterSet& paramset);
113 
119  std::vector<std::string>& paramStrings);
120 
121 }//namespace utils
122 }//namespace fei
123 
124 #endif
125 
void strings_to_char_ptrs(std::vector< std::string > &stdstrings, int &numStrings, const char **&charPtrs)
Definition: fei_utils.cpp:178
void char_ptrs_to_strings(int numStrings, const char *const *charstrings, std::vector< std::string > &stdstrings)
Definition: fei_utils.cpp:164
void convert_ParameterSet_to_strings(const fei::ParameterSet *paramset, std::vector< std::string > &paramStrings)
Definition: fei_utils.cpp:270
fei::OutputLevel string_to_output_level(const std::string &str)
Definition: fei_utils.cpp:58
LinearSystemCore * get_LinearSystemCore(fei::Matrix *matrix)
Definition: fei_utils.cpp:81
OutputLevel
Definition: fei_fwd.hpp:81
#define fei_VERSION
Definition: fei_version.h:60
void parse_strings(std::vector< std::string > &stdstrings, const char *separator_string, fei::ParameterSet &paramset)
Definition: fei_utils.cpp:191
double cpu_time()
Definition: fei_utils.cpp:46
const char * version()
Definition: fei_utils.hpp:53
void getConnectivityArrays(fei::MatrixGraph &matrixGraph, std::vector< int > &nodes, std::vector< int > &elem_offsets)
Definition: fei_utils.cpp:98
const char * version()
Definition: fei_utils.cpp:24