1 #ifndef NIHU_CONVECTED_HELMHOLTZ_3D_NEARLY_SINGULAR_INTEGRALS_HPP_INCLUDED
2 #define NIHU_CONVECTED_HELMHOLTZ_3D_NEARLY_SINGULAR_INTEGRALS_HPP_INCLUDED
6 #include "convected_helmholtz_3d_kernel.hpp"
8 #include "nearly_singular_collocational_telles.hpp"
10 #define NIHU_MEX_DEBUGGING 0
13 #if NIHU_MEX_DEBUGGING
21 template <
class TestField,
class TrialField,
class WaveNumber>
24 typename std::enable_if<
25 is_collocational<TestField, TrialField>::value
30 typedef typename kernel_t::test_input_t test_input_t;
31 typedef TestField test_field_t;
32 typedef typename test_field_t::nset_t test_nset_t;
33 static unsigned const num_test_nodes = test_nset_t::num_nodes;
42 double const limit = 1.5;
45 double d = (test_field.
get_elem().get_center() - trial_field.
get_elem().get_center()).norm();
46 double R = trial_field.
get_elem().get_linear_size_estimate();
51 template <
class result_t>
52 static result_t &eval(
60 nsc_t nsc(trial_field, kernel);
62 #if NIHU_MEX_DEBUGGING
63 static bool printed =
false;
65 mexPrintf(
"Nearly singular Telles for convected DLP\n");
70 for (
unsigned i = 0; i < num_test_nodes; ++i)
72 test_input_t tsti(test_field.
get_elem(), test_nset_t::corner_at(i));
73 nsc.integrate(result.row(i), tsti);
82 template <
class TestField,
class TrialField,
class WaveNumber>
85 typename std::enable_if<
86 is_collocational<TestField, TrialField>::value
91 typedef typename kernel_t::test_input_t test_input_t;
92 typedef TestField test_field_t;
93 typedef typename test_field_t::nset_t test_nset_t;
94 static unsigned const num_test_nodes = test_nset_t::num_nodes;
103 double const limit = 1.5;
106 double d = (test_field.
get_elem().get_center() - trial_field.
get_elem().get_center()).norm();
107 double R = trial_field.
get_elem().get_linear_size_estimate();
112 template <
class result_t>
113 static result_t &eval(
121 nsc_t nsc(trial_field, kernel);
123 #if NIHU_MEX_DEBUGGING
124 static bool printed =
false;
126 mexPrintf(
"Nearly singular Telles for convected DLPt\n");
132 for (
unsigned i = 0; i < num_test_nodes; ++i)
134 test_input_t tsti(test_field.
get_elem(), test_nset_t::corner_at(i));
135 nsc.integrate(result.row(i), tsti);
144 template <
class TestField,
class TrialField,
class WaveNumber>
147 typename std::enable_if<
148 is_collocational<TestField, TrialField>::value
153 typedef typename kernel_t::test_input_t test_input_t;
154 typedef TestField test_field_t;
155 typedef typename test_field_t::nset_t test_nset_t;
156 static unsigned const num_test_nodes = test_nset_t::num_nodes;
165 double const limit = 1.5;
168 double d = (test_field.
get_elem().get_center() - trial_field.
get_elem().get_center()).norm();
169 double R = trial_field.
get_elem().get_linear_size_estimate();
174 template <
class result_t>
175 static result_t &eval(
183 nsc_t nsc(trial_field, kernel);
185 #if NIHU_MEX_DEBUGGING
186 static bool printed =
false;
188 mexPrintf(
"Nearly singular Telles for convected HSP\n");
193 for (
unsigned i = 0; i < num_test_nodes; ++i)
195 test_input_t tsti(test_field.
get_elem(), test_nset_t::corner_at(i));
196 nsc.integrate(result.row(i), tsti);