Finite Element Domain Decomposition Library
FEDDLib
Toggle main menu visibility
Loading...
Searching...
No Matches
IO_ParameterList_decl.hpp
1
#ifndef IO_ParameterList_decl_hpp
2
#define IO_ParameterList_decl_hpp
3
4
#include "IO_Utils.hpp"
5
14
15
namespace
FEDD
{
16
17
namespace
IO {
18
25
26
class
ParameterList
{
27
28
protected
:
29
30
using
ParameterList_Type = Teuchos::ParameterList;
31
using
ParameterListPtr_Type = Teuchos::RCP<ParameterList_Type>;
32
33
public
:
34
41
ParameterList
(
const
std::string &name,
42
const
std::string &fileName,
43
const
std::string &fileType =
"yaml"
) :
44
name_
(name),
45
parameterList_
()
46
{
47
parameterList_
= parseParameterList(fileName,fileType);
48
parameterList_
= parseParameterListFiles(
parameterList_
,
"ParameterLists File Names"
,
"ParameterLists File Paths"
,
"ParameterLists File Types"
);
49
};
50
56
ParameterList
(
const
std::string &name,
57
ParameterListPtr_Type ¶meterList) :
58
name_
(name),
59
parameterList_
(parameterList)
60
{
61
parameterList_
= parseParameterListFiles(
parameterList_
,
"ParameterLists File Names"
,
"ParameterLists File Paths"
,
"ParameterLists File Types"
);
62
};
63
67
std::ostream&
print
(std::ostream &os,
int
indent=0,
bool
showTypes=
false
,
bool
showFlags=
true
,
bool
showDefault=
true
)
68
{
69
os <<
name_
<< std::endl;
70
for
(
size_t
i = 0; i <
name_
.length(); i++)
71
{
72
os <<
"="
;
73
}
74
os << std::endl;
75
return
parameterList_
->print(os,indent,showTypes,showFlags,showDefault);
76
};
77
81
ParameterListPtr_Type
operator()
()
82
{
83
return
parameterList_
;
84
};
85
86
protected
:
87
88
const
std::string
name_
;
89
90
ParameterListPtr_Type
parameterList_
;
91
92
};
93
94
}
95
96
}
97
#endif
FEDD::IO::ParameterList::print
std::ostream & print(std::ostream &os, int indent=0, bool showTypes=false, bool showFlags=true, bool showDefault=true)
Print parameter list.
Definition
IO_ParameterList_decl.hpp:67
FEDD::IO::ParameterList::ParameterList
ParameterList(const std::string &name, ParameterListPtr_Type ¶meterList)
Construct FEDD::IO::ParameterList from Teuchos::ParameterList.
Definition
IO_ParameterList_decl.hpp:56
FEDD::IO::ParameterList::operator()
ParameterListPtr_Type operator()()
Access to the underlying Teuchos::ParamterList.
Definition
IO_ParameterList_decl.hpp:81
FEDD::IO::ParameterList::ParameterList
ParameterList(const std::string &name, const std::string &fileName, const std::string &fileType="yaml")
Read FEDD::IO::ParameterList from yaml or xml input file.
Definition
IO_ParameterList_decl.hpp:41
FEDD::IO::ParameterList::parameterList_
ParameterListPtr_Type parameterList_
Teuchos::RCP of the underlying Teuchos::ParameterList.
Definition
IO_ParameterList_decl.hpp:90
FEDD::IO::ParameterList::name_
const std::string name_
Name of the parameter list.
Definition
IO_ParameterList_decl.hpp:88
FEDD
Adaptive Mesh Refinement.
Definition
AdaptiveMeshRefinement_decl.hpp:36
feddlib
core
IO
IO_ParameterList_decl.hpp
Generated by
1.17.0