From: Martin Kronbichler Date: Thu, 8 Sep 2016 12:45:19 +0000 (+0200) Subject: Add unit support points for FE_TraceQ X-Git-Tag: v8.5.0-rc1~691^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c0c02a0603ad08e39e4950c920c0211bcd60e38;p=dealii.git Add unit support points for FE_TraceQ --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 3ff65ab14b..8efa301f57 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -513,6 +513,11 @@ inconvenience this causes.

Specific improvements

    +
  1. Fixed: FE_TraceQ now provides unit support points. +
    + (Martin Kronbichler, 2016/09/08) +
  2. +
  3. Fixed: Fix MPI_InitFinalize by correctly initializing and destroying all p4est/libsc related objects by calls to sc_init(), p4est_init(), and sc_finalize(); compatibility with p4est versions >1.1. diff --git a/source/fe/fe_trace.cc b/source/fe/fe_trace.cc index 78992e00ed..1262f9c580 100644 --- a/source/fe/fe_trace.cc +++ b/source/fe/fe_trace.cc @@ -49,6 +49,14 @@ FE_TraceQ::FE_TraceQ (const unsigned int degree) // Initialize face support points this->unit_face_support_points = fe_q.get_unit_face_support_points(); + + // initialize unit support points (this makes it possible to assign initial + // values to FE_TraceQ). Note that we simply take the points of fe_q but + // skip the last ones which are associated with the interior of FE_Q. + this->unit_support_points.resize(this->dofs_per_cell); + for (unsigned int i=0; idofs_per_cell; ++i) + this->unit_support_points[i] = fe_q.get_unit_support_points()[i]; + // Initialize constraint matrices this->interface_constraints = fe_q.constraints(); } diff --git a/tests/bits/unit_support_points.cc b/tests/bits/unit_support_points.cc index 952610438c..6ca55bc74b 100644 --- a/tests/bits/unit_support_points.cc +++ b/tests/bits/unit_support_points.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,8 @@ void face_check() { check1 (FE_FaceQ(2)); check2 (FE_FaceQ(2), 0); + check1 (FE_TraceQ(2)); + check2 (FE_TraceQ(2), 0); } diff --git a/tests/bits/unit_support_points.output b/tests/bits/unit_support_points.output index d7e00356c3..445c69ad69 100644 --- a/tests/bits/unit_support_points.output +++ b/tests/bits/unit_support_points.output @@ -63,6 +63,21 @@ DEAL::0 0.00000 DEAL::1 0.500000 DEAL::2 1.00000 DEAL::dim=2, face=ok +DEAL::dim=2, cell=ok +DEAL::dim=2, face=ok +DEAL::0 0.00000 0.00000 +DEAL::1 1.00000 0.00000 +DEAL::2 0.00000 1.00000 +DEAL::3 1.00000 1.00000 +DEAL::4 0.00000 0.500000 +DEAL::5 1.00000 0.500000 +DEAL::6 0.500000 0.00000 +DEAL::7 0.500000 1.00000 +DEAL::dim=2, cell=ok +DEAL::0 0.00000 +DEAL::1 1.00000 +DEAL::2 0.500000 +DEAL::dim=2, face=ok DEAL::dim=3, cell=ok DEAL::dim=3, face=ok DEAL::dim=3, cell=ok @@ -205,3 +220,42 @@ DEAL::6 0.00000 1.00000 DEAL::7 0.500000 1.00000 DEAL::8 1.00000 1.00000 DEAL::dim=3, face=ok +DEAL::dim=3, cell=ok +DEAL::dim=3, face=ok +DEAL::0 0.00000 0.00000 0.00000 +DEAL::1 1.00000 0.00000 0.00000 +DEAL::2 0.00000 1.00000 0.00000 +DEAL::3 1.00000 1.00000 0.00000 +DEAL::4 0.00000 0.00000 1.00000 +DEAL::5 1.00000 0.00000 1.00000 +DEAL::6 0.00000 1.00000 1.00000 +DEAL::7 1.00000 1.00000 1.00000 +DEAL::8 0.00000 0.500000 0.00000 +DEAL::9 1.00000 0.500000 0.00000 +DEAL::10 0.500000 0.00000 0.00000 +DEAL::11 0.500000 1.00000 0.00000 +DEAL::12 0.00000 0.500000 1.00000 +DEAL::13 1.00000 0.500000 1.00000 +DEAL::14 0.500000 0.00000 1.00000 +DEAL::15 0.500000 1.00000 1.00000 +DEAL::16 0.00000 0.00000 0.500000 +DEAL::17 1.00000 0.00000 0.500000 +DEAL::18 0.00000 1.00000 0.500000 +DEAL::19 1.00000 1.00000 0.500000 +DEAL::20 0.00000 0.500000 0.500000 +DEAL::21 1.00000 0.500000 0.500000 +DEAL::22 0.500000 0.00000 0.500000 +DEAL::23 0.500000 1.00000 0.500000 +DEAL::24 0.500000 0.500000 0.00000 +DEAL::25 0.500000 0.500000 1.00000 +DEAL::dim=3, cell=ok +DEAL::0 0.00000 0.00000 +DEAL::1 1.00000 0.00000 +DEAL::2 0.00000 1.00000 +DEAL::3 1.00000 1.00000 +DEAL::4 0.00000 0.500000 +DEAL::5 1.00000 0.500000 +DEAL::6 0.500000 0.00000 +DEAL::7 0.500000 1.00000 +DEAL::8 0.500000 0.500000 +DEAL::dim=3, face=ok