]> https://gitweb.dealii.org/ - dealii.git/commit
Redo the quadrilateral measure function. 15755/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 6 Jul 2023 13:49:02 +0000 (09:49 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 17 Jul 2023 15:00:09 +0000 (11:00 -0400)
commitcc409317c50b34a9af08e8abb22a1b8da0076cb3
treea18cc75656af3d9851a52f74731e1ed5c5a7bc0f
parent161b34841b7cc833c0325e194da0d8a47e6453b9
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;
}
include/deal.II/grid/tria_accessor.h
source/grid/tria_accessor.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.