version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ion.hh
Go to the documentation of this file.
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//
12#ifndef DUMUX_COMPONENT_ION_HH
13#define DUMUX_COMPONENT_ION_HH
14
15#include <dune/common/exceptions.hh>
16
18
19namespace Dumux::Components {
20
25template<class Scalar, class Component>
26class Ion
27{
28public:
32 template<class C = Component>
33 static constexpr int charge()
34 {
35 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: charge()");
36 return 0; // iso c++ requires a return statement for constexpr functions
37 }
38};
39
40} // end namespace Dumux::Components
41
42#endif
Interface for components that are ions.
Definition: ion.hh:27
static constexpr int charge()
Returns the charge of the ion.
Definition: ion.hh:33
Type traits.
Definition: air.hh:22
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24