34 std::vector<std::string> v;
45 v.emplace_back(
".prm");
58 v.emplace_back(
".inp");
59 v.emplace_back(
".xda");
60 v.emplace_back(
".dbmesh");
61 v.emplace_back(
".dat");
62 v.emplace_back(
".plt");
63 v.emplace_back(
".nc");
64 v.emplace_back(
".msh");
68std::vector<std::string> &
85std::vector<std::string> &
104 , my_path_list(get_path_list(cls))
105 , my_suffix_list(get_suffix_list(cls))
112 const std::string &suffix,
113 const char *open_mode)
115 std::vector<std::string>::const_iterator path;
116 const std::vector<std::string>::const_iterator endp =
my_path_list.end();
118 std::string real_name;
122 <<
" directories " << std::endl;
131 real_name = *path + filename;
133 deallog <<
"PathSearch[" <<
cls <<
"] trying " << real_name
135 FILE *fp = fopen(real_name.c_str(), open_mode);
139 deallog <<
"PathSearch[" <<
cls <<
"] opened " << real_name
150 real_name = *path + filename + suffix;
152 deallog <<
"PathSearch[" <<
cls <<
"] trying " << real_name
154 FILE *fp = fopen(real_name.c_str(), open_mode);
158 deallog <<
"PathSearch[" <<
cls <<
"] opened " << real_name
172 std::vector<std::string>::const_iterator suffix;
173 const std::vector<std::string>::const_iterator ends =
my_suffix_list.end();
184 return find(filename, *suffix, open_mode);
205 std::vector<std::string> v;
217 else if (pos ==
front)
221 std::vector<std::string>::iterator i =
235 else if (pos ==
front)
239 std::vector<std::string>::iterator i =
std::string find(const std::string &filename, const char *open_mode="r")
static std::vector< std::string > & get_path_list(const std::string &cls)
static std::vector< std::string > & get_suffix_list(const std::string &cls)
static std::map< std::string, std::vector< std::string > > path_lists
void add_path(const std::string &path, Position pos=back)
std::vector< std::string > & my_suffix_list
static std::map< std::string, std::vector< std::string > > suffix_lists
static void add_class(const std::string &cls)
std::vector< std::string > & my_path_list
@ back
Add new item at end of list.
@ after_none
Add in path list after empty element.
@ front
Add new item at front of list.
void add_suffix(const std::string &suffix, Position pos=back)
std::map< std::string, std::vector< std::string > >::value_type map_type
PathSearch(const std::string &cls, const unsigned int debug=0)
static void initialize_classes()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcFileNotFound(std::string arg1, std::string arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
#define AssertThrow(cond, exc)