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
Compute Quadrature formula over a general poly #13807
Compute Quadrature formula over a general poly #13807
Conversation
70dab73
to
8ce674e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice. I must admit that I do not exactly understand the underlying algorithms in CGAL, but the overall workflow seems nice and convincing, so I agree with this one here. (It was a good opportunity for me to learn about the underlying assumptions in the CGAL part, like C++17 and similar.)
include/deal.II/cgal/utilities.h
Outdated
* the polyhedral. | ||
* @return A global Quadrature rule that allows to integrate over the polyhedron. | ||
*/ | ||
template <typename Tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not read all of the CGAL code, but wouldn't
template <typename Tr> | |
template <typename CGALTriangulationType> |
be a more expressive name for the template type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thanks!
include/deal.II/cgal/utilities.h
Outdated
|
||
/** | ||
* Compute a Quadrature formula over the polygonal/polyhedral region described | ||
* by a BooleanOperation between two deal.II cell_iterator. The degree of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* by a BooleanOperation between two deal.II cell_iterator. The degree of the | |
* by a BooleanOperation between two deal.II cell_iterator objects. The degree of the |
const Mapping<dim1, spacedim> &mapping1 = | ||
(dealii::ReferenceCells::get_hypercube<dim1>() | ||
.template get_default_linear_mapping<dim1, spacedim>())); | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
/** |
include/deal.II/cgal/utilities.h
Outdated
* intersection. The rationale behind this specialization is that deal.II | ||
* cells are convex sets, and as the intersection of convex sets is itself |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this always true? As soon as cells are non-affine, convexity is lost, isn't it? I have too little insight into the algorithms, so this comment might or might not be restriction, but it might be good if you try to reflect the actual behavior in the description here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. This should definitely be called for affine-cells only. I'll fix this within the day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late here. I've just document what really the code is doing, thanks for pointing that out.
/rebuild |
|
||
# include <deal.II/grid/tria.h> | ||
|
||
# include <boost/hana.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to record this as another external boost dependency - we don't rely on hana anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I wasn't aware of this. Actually, this has been used also in #13661
8ce674e
to
198c9dd
Compare
Since this is not ready yet for all possible dim-spacedim dimensions, I think we can postpone this to 9.5, together with #13814 |
The test failures are unrelated. |
…ure_over_region Compute Quadrature formula over a general poly
Given two deal.II cells, these two functions allow to compute a Quadrature rule over the region described by a given boolean operation between these two. Internally, the polyhedron is split into simplices and
compute_affine_transformation()
is exploited in order to get a rule on each one of them.These will be used inside the
NonMatching
namespace to provide exact quadratures during the assembly of coupling matrices (like the one in step-60). In particular, an exact version ofNonMatching::create_coupling_mass_matrix
(https://www.dealii.org/developer/doxygen/deal.II/namespaceNonMatching.html#abe338fc879922cc67627b5ca039fc663) will be available.Currently, this works in 3D and codimension 0, but I have working versions for 2D-2D, 1D-2D and 2D-3D.