version 3.10-dev
cubicsplinehermitebasis.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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_COMMON_CUBIC_SPLINE_HERMITE_BASIS_HH
13#define DUMUX_COMMON_CUBIC_SPLINE_HERMITE_BASIS_HH
14
15namespace Dumux {
16
22template<class Scalar = double>
24{
25 static constexpr Scalar h00(const Scalar t)
26 { return t*(2.0*t*t - 3.0*t) + 1.0; }
27
28 static constexpr Scalar h10(const Scalar t)
29 { return t*(t*t - 2.0*t + 1.0); }
30
31 static constexpr Scalar h01(const Scalar t)
32 { return t*t*(3.0 - 2.0*t); }
33
34 static constexpr Scalar h11(const Scalar t)
35 { return t*t*(t - 1.0); }
36
37 static constexpr Scalar dh00(const Scalar t)
38 { return 6.0*t*(t - 1.0); }
39
40 static constexpr Scalar dh10(const Scalar t)
41 { return t*(3.0*t - 4.0) + 1.0; }
42
43 static constexpr Scalar dh01(const Scalar t)
44 { return 6.0*t*(1.0 - t); }
45
46 static constexpr Scalar dh11(const Scalar t)
47 { return t*(3.0*t - 2.0); }
48};
49
50} // end namespace Dumux
51
52#endif
Definition: adapt.hh:17
The cubic spline hermite basis.
Definition: cubicsplinehermitebasis.hh:24
static constexpr Scalar h01(const Scalar t)
Definition: cubicsplinehermitebasis.hh:31
static constexpr Scalar dh01(const Scalar t)
Definition: cubicsplinehermitebasis.hh:43
static constexpr Scalar dh11(const Scalar t)
Definition: cubicsplinehermitebasis.hh:46
static constexpr Scalar h11(const Scalar t)
Definition: cubicsplinehermitebasis.hh:34
static constexpr Scalar h00(const Scalar t)
Definition: cubicsplinehermitebasis.hh:25
static constexpr Scalar dh10(const Scalar t)
Definition: cubicsplinehermitebasis.hh:40
static constexpr Scalar h10(const Scalar t)
Definition: cubicsplinehermitebasis.hh:28
static constexpr Scalar dh00(const Scalar t)
Definition: cubicsplinehermitebasis.hh:37