Matrix-Vector-multiplication on deal.II-grid

34 views
Skip to first unread message

Maxi Miller

unread,
Jul 12, 2019, 10:49:58 AM7/12/19
to deal.II User Group
Is it possible to "mis-"use the facilities of deal.II for calculating a NLS using the discrete hankel transformation? The idea here was to take an evenly refined grid, and calculate the values of each node column based on the values of the node column to the left/right times a constant matrix, while beginning on the right/left side, and iterating to the other side? That would simplify the integration of my equations into my FEM-simulation significantly, especially because I can use deal.II-facilities for creating and managing the grid.
Thanks!

Daniel Arndt

unread,
Jul 12, 2019, 12:24:22 PM7/12/19
to deal.II User Group
Maxi,

can you clarify the operator evaluation you want to perform in mathematical terms (maybe as an integral)?

Best,
Daniel

Maxi Miller

unread,
Jul 12, 2019, 1:28:40 PM7/12/19
to deal.II User Group
It is difficult to write it as a single integral. The operation is similar to the split-step fourier method, i.e. transforming the column vector f(r) once using
g(rho)=2\pi\int_0^\infty rf(r)J_0(2\pi\rho r)dr,
multiplying it with a vector, and transforming it back using
f(r) = 2\pi\int_0^\infty\rho g(\rho)J_0(2\pi\rho r)d\rho
The operation is for radially symmetric systems, i.e. with z along the x-axis, and r along the y-axis. When starting on the left border with f_0, i.e. at position z = 0, doing the operation mentioned above gives the values for the nodes at z = 1, when enumerating the nodes from 0 to n along the z axis, and having equidistant nodes along the z-axis. Those integrals can be replaced by a matrix-vector-multiplication, thus making it easier to implement numerically.
Does that make sense?

Wolfgang Bangerth

unread,
Jul 21, 2019, 6:05:45 PM7/21/19
to dea...@googlegroups.com
On 7/12/19 11:28 AM, 'Maxi Miller' via deal.II User Group wrote:
> It is difficult to write it as a single integral. The operation is similar to
> the split-step fourier method, i.e. transforming the column vector f(r) once using
> g(rho)=2\pi\int_0^\infty rf(r)J_0(2\pi\rho r)dr,
> multiplying it with a vector, and transforming it back using
> f(r) = 2\pi\int_0^\infty\rho g(\rho)J_0(2\pi\rho r)d\rho
> The operation is for radially symmetric systems, i.e. with z along the x-axis,
> and r along the y-axis. When starting on the left border with f_0, i.e. at
> position z = 0, doing the operation mentioned above gives the values for the
> nodes at z = 1, when enumerating the nodes from 0 to n along the z axis, and
> having equidistant nodes along the z-axis. Those integrals can be replaced by
> a matrix-vector-multiplication, thus making it easier to implement numerically.

This makes sense -- every linear operator can be represented as a matrix. So
yes, you can express the operation as a matrix, and of course you can express
this matrix using the deal.II classes.

But I'm not clear what your question is then. Are you asking how to build this
matrix?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Maxi Miller

unread,
Jul 22, 2019, 3:32:59 AM7/22/19
to deal.II User Group
More or less, yes, together with how I could get the "column" vector I would like to apply the matrix to. It is not a problem to do that in a FTDT-setting, but I do not know how to do that in a FEM-setting.

Wolfgang Bangerth

unread,
Jul 23, 2019, 4:35:57 PM7/23/19
to dea...@googlegroups.com
On 7/22/19 1:32 AM, 'Maxi Miller' via deal.II User Group wrote:
> More or less, yes, together with how I could get the "column" vector I would
> like to apply the matrix to. It is not a problem to do that in a FTDT-setting,
> but I do not know how to do that in a FEM-setting.

When you say "column vector", you mean the vector of unknowns that corresponds
to one column of nodes in the mesh?

One can think of deal.II Triangulations as unstructured meshes. So extracting
a column of nodes is not a natural thing to do. But you can of course always
loop over all nodes (e.g., using DoFTools::map_dofs_to_support_points()) and
group them by the x-coordinate of their location.

How you would build this matrix? That's something we can't know without
actually seeing a formula for the operator you're thinking of.

Maxi Miller

unread,
Jul 23, 2019, 4:46:05 PM7/23/19
to deal.II User Group
I took a look at your (incomplete) step-58, which (as far as I could understand) solves the equation, but without propagating it in space, just in time. I would like to propagate the result in time and accordingly in space, i.e. if the pulse propagates through a fiber, I would like to see the moving pulse. Is that possible?
The matrix I was mentioning earlier would be a dense matrix, formed according to the DHT-method (i.e. no relation to FEM)

Am Dienstag, 23. Juli 2019 22:35:57 UTC+2 schrieb Wolfgang Bangerth:
On 7/22/19 1:32 AM, 'Maxi Miller' via deal.II User Group wrote:
> More or less, yes, together with how I could get the "column" vector I would
> like to apply the matrix to. It is not a problem to do that in a FTDT-setting,
> but I do not know how to do that in a FEM-setting.

When you say "column vector", you mean the vector of unknowns that corresponds
to one column of nodes in the mesh?
Yes, basically

Wolfgang Bangerth

unread,
Jul 24, 2019, 9:50:26 PM7/24/19
to dea...@googlegroups.com
On 7/23/19 2:46 PM, 'Maxi Miller' via deal.II User Group wrote:
> I took a look at your (incomplete) step-58, which (as far as I could
> understand) solves the equation, but without propagating it in space, just in
> time. I would like to propagate the result in time and accordingly in space,
> i.e. if the pulse propagates through a fiber, I would like to see the moving
> pulse. Is that possible?

I don't know. I haven't finished the program yet. As you noticed, right now
only the temporal part is implemented.


> The matrix I was mentioning earlier would be a dense matrix, formed according
> to the DHT-method (i.e. no relation to FEM)

I have to admit that I know nothing of this method (not even what the
abbreviation stands for). I'm afraid you'll have to figure this out yourself :-(
Reply all
Reply to author
Forward
0 new messages