Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triangulation::CellStatus: provide proper compatibility type #15707

Merged
merged 3 commits into from Jul 11, 2023

Conversation

tamiko
Copy link
Member

@tamiko tamiko commented Jul 10, 2023

  • CellStatus: provide old name aliases
  • Triangulation: include compatibility CellStatus via using instead of defining a new enum

In reference to #15576
In reference to #15698

@tamiko
Copy link
Member Author

tamiko commented Jul 10, 2023

@pcafrica What about this fix?

@tamiko
Copy link
Member Author

tamiko commented Jul 10, 2023

/rebuild

@tamiko
Copy link
Member Author

tamiko commented Jul 10, 2023

I wil run this through tester-tng real quick.

@tamiko tamiko force-pushed the proper_cell_status_deprecation branch from 51f01ec to f61a802 Compare July 10, 2023 20:53
@bangerth
Copy link
Member

The indentation script is unhappy:

[100%] Built target documentation
/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

warning: Inheritance graph for 'AlignedVector' not generated, too many nodes (51), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copydetails or @copydoc relation for argument '::CellStatus'.

warning: Inheritance graph for 'SmartPointer' not generated, too many nodes (140), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
warning: Inheritance graph for 'Subscriptor' not generated, too many nodes (190), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
warning: Inheritance graph for 'Table' not generated, too many nodes (50), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copydetails or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copydetails or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copydetails or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copybrief or @copydoc relation for argument '::CellStatus'.

/home/runner/work/dealii/dealii/include/deal.II/grid/tria.h:2228: warning: Found recursive @copydetails or @copydoc relation for argument '::CellStatus'.

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK if you can make the documentation work.

include/deal.II/grid/tria.h Outdated Show resolved Hide resolved
@tamiko
Copy link
Member Author

tamiko commented Jul 10, 2023

This needs a bit more fine-tuning: https://cdash.dealii.org/test/1393689

@bangerth
Copy link
Member

Just create an anonymous enum in that class that contains these values.

@bangerth
Copy link
Member

In addition to the using declaration.

@tamiko
Copy link
Member Author

tamiko commented Jul 10, 2023

@bangerth Yup. On it :-)

Update: This cannot work because you cannot implicitly cast between an unsigned int (from an enum) and the enum class. But what works is to provide static constexpr identifiers that can be used in switch statements.

@tamiko tamiko force-pushed the proper_cell_status_deprecation branch from f61a802 to e866392 Compare July 10, 2023 23:40
Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, nice trick. Now these things have the right type too. Well done!

@tamiko
Copy link
Member Author

tamiko commented Jul 11, 2023


/**
* @deprecated This is an alias for backward compatibility. Use
* ::dealii::CellStatus directly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is doxygen able to resolve this even though we delete the dealii namespace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjhei Perhaps not - but then, how am I supposed to tell doxygen to link to the global CellStatus and not the local version?

@tamiko tamiko merged commit 63ceec2 into dealii:master Jul 11, 2023
16 checks passed
@tamiko
Copy link
Member Author

tamiko commented Jul 11, 2023

@tjhei I have merged so that the regression tester can recover. Let's check how the generated documentation looks like and fix if necessary in a follow-up.

@tamiko
Copy link
Member Author

tamiko commented Jul 11, 2023

@tjhei The links work: doxygen

@pcafrica
Copy link
Contributor

Well done @tamiko! Thanks.

@tjhei
Copy link
Member

tjhei commented Jul 11, 2023

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants