21 #include "library/helmholtz_3d.hpp"
26 void mexFunction(
int nlhs, mxArray *lhs[],
int nrhs, mxArray
const *rhs[])
28 dMatrix surf_nodes(rhs[0]), surf_elem(rhs[1]);
30 dMatrix field_nodes(rhs[2]), field_elem(rhs[3]);
35 auto const &field_sp =
NiHu::dirac(NiHu::constant_view(field_mesh));
38 size_t n = surf_sp.get_num_dofs();
39 size_t m = field_sp.get_num_dofs();
40 cMatrix Ms(n, n, lhs[0]), Mf(m, n, lhs[1]);
43 double k = *mxGetPr(rhs[4]);
47 Ms <<
dirac(surf_sp) * M[surf_sp] +
dirac(surf_sp) * (.5*I)[surf_sp];
48 Mf << field_sp * M[surf_sp];
integral_operator< Kernel > create_integral_operator(Kernel &&kernel)
factory function of an integral operator
Container class of a complex matrix stored in Matlab format.
mesh< tmp::vector< typename tag2type< Args >::type... > > create_mesh(nodes_t const &nodes, elements_t const &elements, Args...)
factory function to create a mesh from nodes and elements matrices
Metafunction assigning a tag to a type.
const function_space_view< Mesh, field_option::constant, Dimension > & constant_view(mesh_base< Mesh > const &msh, Dimension dim=Dimension())
factory function to transform a mesh into a constant function space
declaration of class NiHu::weighted_residual
A Matlab mex matrix interface.
const dirac_space< FuncSpace > & dirac(function_space_base< FuncSpace > const &space)
factory function to convert a function space into a dirac space
Normal derivative of a distance dependent kernel.
The identity integral operator .
const dirac_field< Field > & dirac(field_base< Field > const &f)
dirac field view factory