DDC 0.11.0
Loading...
Searching...
No Matches
spline_boundary_conditions.cpp
1// Copyright (C) The DDC development team, see COPYRIGHT.md file
2//
3// SPDX-License-Identifier: MIT
4
5#include <ostream>
6#include <stdexcept>
7
9
10namespace ddc {
11
12std::ostream& operator<<(std::ostream& os, ddc::BoundCond const bc)
13{
14 if (bc == ddc::BoundCond::PERIODIC) {
15 return os << "PERIODIC";
16 }
17
18 if (bc == ddc::BoundCond::HERMITE) {
19 return os << "HERMITE";
20 }
21
23 return os << "HOMOGENEOUS_HERMITE";
24 }
25
26 if (bc == ddc::BoundCond::GREVILLE) {
27 return os << "GREVILLE";
28 }
29
30 throw std::runtime_error("ddc::BoundCond not handled");
31}
32
33} // namespace ddc
The top-level namespace of DDC.
BoundCond
An enum representing a spline boundary condition.
@ HOMOGENEOUS_HERMITE
Homogeneous Hermite boundary condition (derivatives are 0)
@ GREVILLE
Use Greville points instead of conditions on derivative for B-Spline interpolation.
@ HERMITE
Hermite boundary condition.
@ PERIODIC
Periodic boundary condition u(1)=u(n)