-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redo the quadrilateral measure function.
This is a lot simpler and somewhat more efficient: master, best of 10, summing hyper ball face measures: 2434 ms feature, same setup: 2124 ms Lets not use complex checks for planarity - either we have a parallelogram (up to the last few significant digits) or we do not. If people are reading in CAD data then they probably don't have uniform meshes anyway. P.S. benchmark source: #include <deal.II/grid/grid_generator.h> #include <deal.II/grid/tria.h> #include <chrono> #include <iostream> int main() { using namespace dealii; Triangulation<3> tria; GridGenerator::hyper_ball(tria); tria.refine_global(3); double area = 0.0; auto t0 = std::chrono::high_resolution_clock::now(); for (unsigned int i = 0; i < 1000; ++i) for (const auto &face : tria.active_face_iterators()) area += face->measure(); auto t1 = std::chrono::high_resolution_clock::now(); std::cout << "time elapsed = " << std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0).count() << std::endl; }
- Loading branch information
Showing
2 changed files
with
52 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters