BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_InputFile.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_CL_INPUTFILE_HPP
13
#define BELFEM_CL_INPUTFILE_HPP
14
15
#include "
cl_Ascii.hpp
"
16
#include "
cl_Cell.hpp
"
17
#include "
cl_Input_Section.hpp
"
18
19
namespace
belfem
20
{
21
//------------------------------------------------------------------------------
22
29
class
InputFile
:
public
Ascii
30
{
31
input::Section
* mData = nullptr ;
32
33
//------------------------------------------------------------------------------
34
public
:
35
//------------------------------------------------------------------------------
36
37
InputFile
(
const
string
& aPath );
38
39
~InputFile
()
override
;
40
41
void
42
print
();
43
44
//------------------------------------------------------------------------------
45
50
const
input::Section
*
51
section
(
const
string
& aSection )
const
;
52
53
//------------------------------------------------------------------------------
54
58
const
input::Section
*
59
section
(
const
index_t
aIndex )
const
;
60
61
//------------------------------------------------------------------------------
65
bool
66
section_exists
(
const
string
& aSection )
const
;
67
68
//------------------------------------------------------------------------------
69
73
index_t
74
num_sections
()
const
;
75
76
//------------------------------------------------------------------------------
77
private
:
78
//------------------------------------------------------------------------------
79
80
void
81
remove_comments();
82
83
//------------------------------------------------------------------------------
84
85
void
86
tidy_up();
87
88
//------------------------------------------------------------------------------
89
};
90
91
//----------------------------------------------------------------------------
92
}
93
#endif
//BELFEM_CL_INPUTFILE_HPP
cl_Ascii.hpp
cl_Cell.hpp
cl_Input_Section.hpp
belfem::Ascii::Ascii
Ascii(const string &aPath, const enum FileMode &aMode)
Definition
cl_Ascii.cpp:25
belfem::InputFile::section_exists
bool section_exists(const string &aSection) const
tell if a section exists
Definition
cl_InputFile.cpp:170
belfem::InputFile::num_sections
index_t num_sections() const
number of sections
Definition
cl_InputFile.cpp:162
belfem::InputFile::InputFile
InputFile(const string &aPath)
Definition
cl_InputFile.cpp:18
belfem::InputFile::section
const input::Section * section(const string &aSection) const
return a top-level section by type string ( a labelled section is keyed as "type:label" )
Definition
cl_InputFile.cpp:146
belfem::InputFile::print
void print()
Definition
cl_InputFile.cpp:44
belfem::input::Section
One hierarchical section of a configuration file.
Definition
cl_Input_Section.hpp:34
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::index_t
uint32_t index_t
Definition
typedefs.hpp:52
src
io
cl_InputFile.hpp
Generated by
1.18.0