Re: [deal.II] Dimension independent Maxwell`s equations

2016-12-30 Thread Konstantin Ladutenko
Thank you a lot! I`ve tried to play around and my conclusion is trivial and exactly what you have said - we do really need to solve a full 3d equation for 2D geometry too, it comes from physics, not from coding or math. Just imagine a typical 1D (or 2D) problem - an infinite subwavelength plate

Re: [deal.II] Dimension independent Maxwell`s equations

2016-12-26 Thread Timo Heister
The problem is that .curl returns a scalar in 2d and a tensor in 3d. A typical definition of maxwell curl notation is to treat the 2d case as a 3d solution that is constant in the (implicit) 3rd dimension, right? Maybe you can do something like Tensor<1,3> make_3d_curl(double curl_2d) { Tensor<1,3

[deal.II] Dimension independent Maxwell`s equations

2016-12-26 Thread Konstantin Ladutenko
Dear all, Any ideas, what is the best way to go when implementing Maxwell equations to make them dimension independent? Or at least to have the same code for 2d and 3d cases? Simply using dim template parameter doesn`t work by definition - when switching from 3D to 2D you need to specify, sho