www.cemf.ir
utilityFunctions.hpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
#ifndef __utilityFunctions_hpp__
22
#define __utilityFunctions_hpp__
23
24
#include <regex>
25
26
27
namespace
pFlow::utilities
28
{
29
30
bool
inline
pointFieldGetType
(std::string TYPENAME, std::string& fieldType, std::string& fieldSpace)
31
{
32
std::regex match(
"pointField\\<([A-Za-z1-9_]*)\\,([A-Za-z1-9_]*)\\>"
);
33
std::smatch search;
34
if
(!std::regex_match(TYPENAME, search, match))
return
false
;
35
if
(search.size()!= 3)
return
false
;
36
fieldType = search[1];
37
fieldSpace = search[2];
38
return
true
;
39
}
40
41
42
}
43
44
45
#endif //__utilityFunctions_hpp__
pFlow::utilities::pointFieldGetType
bool pointFieldGetType(std::string TYPENAME, std::string &fieldType, std::string &fieldSpace)
Definition:
utilityFunctions.hpp:30
pFlow::utilities
Definition:
utilityFunctions.hpp:27
utilities
Utilities
utilityFunctions.hpp
Generated by
1.8.17