GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/examples/biomineralization/material/components/suspendedbiomass.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 1 1 100.0%
Branches: 4 6 66.7%

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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7
8 #ifndef DUMUX_MATERIAL_COMPONENTS_SUSPENDEDBIOMASS_HH
9 #define DUMUX_MATERIAL_COMPONENTS_SUSPENDEDBIOMASS_HH
10
11 // ## The suspended biomass component (`suspendedbiomass.hh`)
12 //
13 // This file contains the __ component class__ which defines the name and molar mass of suspended biomass
14 //
15 // [[content]]
16 //
17 // ### Include files
18 // [[codeblock]]
19 // including the base component
20 #include <dumux/material/components/base.hh>
21
22 #include <dumux/common/parameters.hh>
23 // [[/codeblock]]
24
25 // ### The suspended biomass component
26 // [[codeblock]]
27 namespace Dumux::Components {
28
29 // In SuspendedBiomass, we define the properties of the component suspended biomass
30 template <class Scalar>
31 class SuspendedBiomass
32 : public Components::Base<Scalar, SuspendedBiomass<Scalar> >
33 {
34 public:
35 // the name
36 static std::string name()
37 4 { return "Suspended_Biomass"; }
38 // [[/codeblock]]
39
40 // ### The suspended biomass component's properties
41 // [[codeblock]]
42 // The molar mass, which is not really defined for suspended biomass. Thus, we read it from params.input or use a default of 1.
43 // Based on a cell mass of 2.5e-16, the molar mass of cells would be 1.5e8 kg/mol, but such high molar masses would lead to numerical problems.
44 67023443 static Scalar molarMass()
45 {
46
4/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 67023442 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
67023443 static Scalar molarMass = getParam<Scalar>("BioCoefficients.SuspendedBiomassMolarMass", 1);
47 67023443 return molarMass;
48 }
49 };
50
51
52 } // end namespace Dumux::Components
53 // [[/codeblock]]
54 // [[/content]]
55 #endif
56