-
Notifications
You must be signed in to change notification settings - Fork 20
/
boundary_conditions.hpp
46 lines (39 loc) · 1.75 KB
/
boundary_conditions.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include "elements.hpp"
#include "fast_math.hpp"
#include "matlab_utilities.hpp"
#include "pde/pde_base.hpp"
#include "transformations.hpp"
template<typename P>
using unscaled_bc_parts = std::vector<std::vector<std::vector<fk::vector<P>>>>;
// FIXME refactor this component
namespace boundary_conditions
{
template<typename P>
std::array<unscaled_bc_parts<P>, 2> make_unscaled_bc_parts(
PDE<P> const &pde, elements::table const &table,
basis::wavelet_transform<P, resource::host> const &transformer,
int const start_element, int const stop_element, P const t_init = 0);
template<typename P>
fk::vector<P> generate_scaled_bc(unscaled_bc_parts<P> const &left_bc_parts,
unscaled_bc_parts<P> const &right_bc_parts,
PDE<P> const &pde, int const start_element,
int const stop_element, P const time);
template<typename P>
fk::vector<P>
compute_left_boundary_condition(g_func_type const g_func, P const time,
dimension<P> const &dim,
vector_func<P> const bc_func);
template<typename P>
fk::vector<P>
compute_right_boundary_condition(g_func_type const g_func, P const time,
dimension<P> const &dim,
vector_func<P> const bc_func);
template<typename P>
std::vector<fk::vector<P>> generate_partial_bcs(
std::vector<dimension<P>> const &dimensions, int const d_index,
std::vector<vector_func<P>> const &bc_funcs,
basis::wavelet_transform<P, resource::host> const &transformer,
P const time, std::vector<partial_term<P>> const &partial_terms,
int const p_index, fk::vector<P> &&trace_bc);
} // namespace boundary_conditions