Member description of MeshWorker::DoFInfo.matrix

10 views
Skip to first unread message

vachan potluri

unread,
Sep 4, 2019, 11:49:42 AM9/4/19
to deal.II User Group
Hello,

I am reading step-12 of the tutorial. The following lines are from local integrator for interior face (dinfo is an alias to MeshWorker::DoFInfo).

FullMatrix<double> &u1_v1_matrix = dinfo1.matrix(0, false).matrix;
FullMatrix<double> &u2_v1_matrix = dinfo1.matrix(0, true).matrix;
FullMatrix<double> &u1_v2_matrix = dinfo2.matrix(0, true).matrix;
FullMatrix<double> &u2_v2_matrix = dinfo2.matrix(0, false).matrix;

The matrix() function is documented here: https://www.dealii.org/current/doxygen/deal.II/classMeshWorker_1_1LocalResults.html#afdae422206740b2f5a14fd562c27e6ca.

I couldn't understand what the arguments of this function signify. Can anyone please clarify?

Thank you
Vachan

Wolfgang Bangerth

unread,
Sep 13, 2019, 1:48:23 AM9/13/19
to dea...@googlegroups.com, vachan potluri

> I am reading step-12 of the tutorial. The following lines are from local
> integrator for interior face (dinfo is an alias to MeshWorker::DoFInfo).
>
> FullMatrix<double>
> <https://www.dealii.org/current/doxygen/deal.II/classFullMatrix.html>
> &u1_v1_matrix = dinfo1.matrix(0, false).matrix;
> FullMatrix<double>
> <https://www.dealii.org/current/doxygen/deal.II/classFullMatrix.html>
> &u2_v1_matrix = dinfo1.matrix(0, true).matrix;
> FullMatrix<double>
> <https://www.dealii.org/current/doxygen/deal.II/classFullMatrix.html>
> &u1_v2_matrix = dinfo2.matrix(0, true).matrix;
> FullMatrix<double>
> <https://www.dealii.org/current/doxygen/deal.II/classFullMatrix.html>
> &u2_v2_matrix = dinfo2.matrix(0, false).matrix;
>
> The matrix() function is documented here:
> https://www.dealii.org/current/doxygen/deal.II/classMeshWorker_1_1LocalResults.html#afdae422206740b2f5a14fd562c27e6ca.
>
> I couldn't understand what the arguments of this function signify. Can anyone
> please clarify?

Vachan,
Yes, this is all a bit terse. There is some documentation further up on that
page where the entire class is documented:
https://www.dealii.org/current/doxygen/deal.II/classMeshWorker_1_1LocalResults.html
In short, '0' indicates that this is the zero-th matrix this object stores; it
probably only stores a single matrix for your purpose, and consequently 0 is
the only valid argument. For the second argument, a 'false' value indicates
that this is a matrix that results from integration on one cell, whereas
'true' means that it results from the integration on a face between cells, and
consequently involves the variables from two adjacent cells.

I've taken the opportunity to update the documentation a little bit. You can
see my changes here:
https://github.com/dealii/dealii/pull/8745/files

I hope this helps!
Best
W.


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

vachan potluri

unread,
Sep 17, 2019, 12:48:33 AM9/17/19
to deal.II User Group
Sorry for the late reply. Thank you Prof. Bangerth.
Reply all
Reply to author
Forward
0 new messages