GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/material/components/sodiumion.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 0 0 -%
Branches: 3 6 50.0%

Line Branch Exec Source
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 //
4 // SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 /*!
8 * \file
9 * \ingroup Components
10 * \brief A class for the Na+ (Sodium ion) component properties
11 */
12 #ifndef DUMUX_MATERIAL_COMPONENTS_NA_ION_HH
13 #define DUMUX_MATERIAL_COMPONENTS_NA_ION_HH
14
15 #include <dumux/material/components/base.hh>
16 #include <dumux/material/components/ion.hh>
17
18 namespace Dumux::Components {
19
20 /*!
21 * \ingroup Components
22 * \brief A class for the Na+ (Sodium ion) component properties
23 */
24 template <class Scalar>
25 class SodiumIon
26 : public Components::Base<Scalar, SodiumIon<Scalar> >
27 , public Components::Ion<Scalar, SodiumIon<Scalar> >
28 {
29 public:
30 /*!
31 * \brief A human readable name for the Na+ ion.
32 */
33
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
3 static std::string name()
34
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
3 { return "Na+"; }
35
36 /*!
37 * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the Na+ ion.
38 */
39 static Scalar molarMass()
40 { return 22.9898e-3; }
41
42 /*!
43 * \brief The charge of the Na+ ion.
44 */
45 static constexpr int charge()
46 {
47 return +1;
48 }
49
50 };
51
52 } // end namespace Dumux::Components
53
54 #endif
55