How to inspect triangulation on debugging mode using VS Code?

42 views
Skip to first unread message

Diego Magela

unread,
Sep 21, 2021, 9:47:07 PM9/21/21
to deal.II User Group
Hello deal.ii users.

I intend to use deal.ii on my PhD and start from the beginning (step-1) to learn how to use deal.ii (I suspect that it is the better way to start :D).

I'm using Visual Studio Code to run step-1 (with properly C++ and CMake Tools extensions). In the first run I faced a question: how to inspect triangulation? When I run step on debugging mode, triangulation seems to be empty, it just shows {...}, unlike grid_out, where I can see everything that was set up, as can be seen in the figure. 

Does someone know if this is a problem with VS Code or is something related to deal.ii?

Thank you in advance.

P.S.: I'm running deal.ii 9.1 from Ubuntu's repository.


Screenshot from 2021-09-21 22.43.53.png

Wolfgang Bangerth

unread,
Sep 22, 2021, 1:50:33 PM9/22/21
to dea...@googlegroups.com
On 9/21/21 7:47 PM, Diego Magela wrote:
>
> I intend to use deal.ii on my PhD and start from the beginning (step-1)
> to learn how to use deal.ii (I suspect that it is the better way to
> start :D).
>
> I'm using Visual Studio Code to run step-1 (with properly C++ and CMake
> Tools extensions). In the first run I faced a question: how to inspect
> triangulation? When I run step on debugging mode, triangulation seems to
> be empty, it just shows {...}, unlike grid_out, where I can see
> everything that was set up, as can be seen in the figure.
>
> Does someone know if this is a problem with VS Code or is something
> related to deal.ii?

Diego,
I don't know Visual Studio well enough to tell what specifically is
wrong. But you will not likely find anything very useful when you
inspect Triangulation objects: This class consists of a number of very
complicated data structures that together describe a triangulation, but
they are not obvious to understand. For example, you might think that a
Triangulation essentially consists of a
std::vector<Cell> cells;
structure where 'Cell' is where we store all of the information about
each cell. But that is not true -- in fact, the information about cells
is scattered across several dozen arrays grouped into a number of
different classes. This would make it quite difficult to understand
anything about the triangulation by looking at its member variables, but
is what is necessary to make this class work efficiently on modern
architectures.

In other words, I can't help you with your immediate problem, but think
that even if one could work out this case, you would not learn much from it.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
Reply all
Reply to author
Forward
0 new messages