BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_check_unit.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
13
#ifndef BELFEM_FN_CHECK_UNIT_HPP
14
#define BELFEM_FN_CHECK_UNIT_HPP
15
16
#include "
typedefs.hpp
"
17
#include "
stringtools.hpp
"
18
19
namespace
belfem
20
{
24
inline
bool
25
check_unit
(
const
value
& aValue,
const
string
& aUnit )
26
{
27
return
aValue.second ==
unit_to_si
( aUnit ).second ;
28
}
29
}
30
#endif
//BELFEM_FN_CHECK_UNIT_HPP
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::unit_to_si
value unit_to_si(const string &aString)
Definition
stringtools.cpp:335
belfem::value
std::pair< real, unit > value
Definition
typedefs.hpp:74
belfem::check_unit
bool check_unit(const value &aValue, const string &aUnit)
check if a value has the correct unit
Definition
fn_check_unit.hpp:25
stringtools.hpp
typedefs.hpp
src
core
fn_check_unit.hpp
Generated by
1.18.0