|
1 | 1 | //! Helmholtz operators
|
2 |
| -
|
3 |
| -/// Assemblers for Helmholtz problems |
4 |
| -pub mod assembler { |
5 |
| - use green_kernels::{helmholtz_3d::Helmholtz3dKernel, types::GreenKernelEvalType}; |
6 |
| - use rlst::{MatrixInverse, RlstScalar}; |
7 |
| - |
8 |
| - use crate::boundary_assemblers::{ |
9 |
| - helpers::KernelEvaluator, |
10 |
| - integrands::{ |
11 |
| - AdjointDoubleLayerBoundaryIntegrand, BoundaryIntegrandSum, |
12 |
| - BoundaryIntegrandTimesScalar, DoubleLayerBoundaryIntegrand, |
13 |
| - HypersingularCurlCurlBoundaryIntegrand, HypersingularNormalNormalBoundaryIntegrand, |
14 |
| - SingleLayerBoundaryIntegrand, |
15 |
| - }, |
16 |
| - BoundaryAssembler, BoundaryAssemblerOptions, |
17 |
| - }; |
18 |
| - |
19 |
| - /// Helmholtz single layer assembler type. |
20 |
| - pub type SingleLayer3dAssembler<'o, T> = |
21 |
| - BoundaryAssembler<'o, T, SingleLayerBoundaryIntegrand<T>, Helmholtz3dKernel<T>>; |
22 |
| - |
23 |
| - /// Helmholtz double layer assembler type. |
24 |
| - pub type DoubleLayer3dAssembler<'o, T> = |
25 |
| - BoundaryAssembler<'o, T, DoubleLayerBoundaryIntegrand<T>, Helmholtz3dKernel<T>>; |
26 |
| - |
27 |
| - /// Helmholtz adjoint double layer assembler type. |
28 |
| - pub type AdjointDoubleLayer3dAssembler<'o, T> = |
29 |
| - BoundaryAssembler<'o, T, AdjointDoubleLayerBoundaryIntegrand<T>, Helmholtz3dKernel<T>>; |
30 |
| - |
31 |
| - /// Helmholtz hypersingular double layer assembler type. |
32 |
| - pub type Hypersingular3dAssembler<'o, T> = BoundaryAssembler< |
33 |
| - 'o, |
34 |
| - T, |
35 |
| - BoundaryIntegrandSum< |
36 |
| - T, |
37 |
| - HypersingularCurlCurlBoundaryIntegrand<T>, |
38 |
| - BoundaryIntegrandTimesScalar<T, HypersingularNormalNormalBoundaryIntegrand<T>>, |
39 |
| - >, |
40 |
| - Helmholtz3dKernel<T>, |
41 |
| - >; |
42 |
| - |
43 |
| - /// Assembler for the Helmholtz single layer operator. |
44 |
| - pub fn single_layer<T: RlstScalar<Complex = T> + MatrixInverse>( |
45 |
| - wavenumber: T::Real, |
46 |
| - options: &BoundaryAssemblerOptions, |
47 |
| - ) -> SingleLayer3dAssembler<T> { |
48 |
| - let kernel = KernelEvaluator::new( |
49 |
| - Helmholtz3dKernel::new(wavenumber), |
50 |
| - GreenKernelEvalType::Value, |
51 |
| - ); |
52 |
| - |
53 |
| - BoundaryAssembler::new(SingleLayerBoundaryIntegrand::new(), kernel, options, 1, 0) |
54 |
| - } |
55 |
| - |
56 |
| - /// Assembler for the Helmholtz double layer operator. |
57 |
| - pub fn double_layer<T: RlstScalar<Complex = T> + MatrixInverse>( |
58 |
| - wavenumber: T::Real, |
59 |
| - options: &BoundaryAssemblerOptions, |
60 |
| - ) -> DoubleLayer3dAssembler<T> { |
61 |
| - let kernel = KernelEvaluator::new( |
62 |
| - Helmholtz3dKernel::new(wavenumber), |
63 |
| - GreenKernelEvalType::ValueDeriv, |
64 |
| - ); |
65 |
| - |
66 |
| - BoundaryAssembler::new(DoubleLayerBoundaryIntegrand::new(), kernel, options, 4, 0) |
67 |
| - } |
68 |
| - |
69 |
| - /// Assembler for the Helmholtz adjoint double layer operator. |
70 |
| - pub fn adjoint_double_layer<T: RlstScalar<Complex = T> + MatrixInverse>( |
71 |
| - wavenumber: T::Real, |
72 |
| - options: &BoundaryAssemblerOptions, |
73 |
| - ) -> AdjointDoubleLayer3dAssembler<T> { |
74 |
| - let kernel = KernelEvaluator::new( |
75 |
| - Helmholtz3dKernel::new(wavenumber), |
76 |
| - GreenKernelEvalType::ValueDeriv, |
77 |
| - ); |
78 |
| - |
79 |
| - BoundaryAssembler::new( |
80 |
| - AdjointDoubleLayerBoundaryIntegrand::new(), |
81 |
| - kernel, |
82 |
| - options, |
83 |
| - 4, |
84 |
| - 0, |
85 |
| - ) |
86 |
| - } |
87 |
| - |
88 |
| - /// Assembler for the Helmholtz hypersingular operator. |
89 |
| - pub fn hypersingular<T: RlstScalar<Complex = T> + MatrixInverse>( |
90 |
| - wavenumber: T::Real, |
91 |
| - options: &BoundaryAssemblerOptions, |
92 |
| - ) -> Hypersingular3dAssembler<T> { |
93 |
| - let kernel = KernelEvaluator::new( |
94 |
| - Helmholtz3dKernel::new(wavenumber), |
95 |
| - GreenKernelEvalType::ValueDeriv, |
96 |
| - ); |
97 |
| - |
98 |
| - let integrand = BoundaryIntegrandSum::new( |
99 |
| - HypersingularCurlCurlBoundaryIntegrand::new(), |
100 |
| - BoundaryIntegrandTimesScalar::new( |
101 |
| - num::cast::<T::Real, T>(-wavenumber.powi(2)).unwrap(), |
102 |
| - HypersingularNormalNormalBoundaryIntegrand::new(), |
103 |
| - ), |
104 |
| - ); |
105 |
| - |
106 |
| - BoundaryAssembler::new(integrand, kernel, options, 4, 1) |
107 |
| - } |
108 |
| -} |
| 2 | +pub mod assembler; |
| 3 | +pub mod evaluator; |
0 commit comments